mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-10-19 07:10:58 +00:00
fix
This commit is contained in:
parent
952b48f245
commit
ed84db843e
14
app/index.js
14
app/index.js
|
@ -82,7 +82,7 @@ var getLocalApplications = function() {
|
||||||
&& applications[k].uniqueId == localApplications[i].uniqueId
|
&& applications[k].uniqueId == localApplications[i].uniqueId
|
||||||
&& applications[k].createdBy == userId)
|
&& applications[k].createdBy == userId)
|
||||||
{
|
{
|
||||||
entry.find("select").data("application-id", applications[i].id);
|
entry.find("select").data("application-id", applications[k].id);
|
||||||
serverId = applications[k].server;
|
serverId = applications[k].server;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -139,6 +139,7 @@ var getMyApplications = function() {
|
||||||
xmlStrings.push('<?xml version="1.0" encoding="UTF-8"?>');
|
xmlStrings.push('<?xml version="1.0" encoding="UTF-8"?>');
|
||||||
xmlStrings.push("<StaticIP>");
|
xmlStrings.push("<StaticIP>");
|
||||||
for (var i = 0; i < res.data.length; i++) {
|
for (var i = 0; i < res.data.length; i++) {
|
||||||
|
if (res.data[i].created_by == userId) {
|
||||||
xmlStrings.push("<Item>");
|
xmlStrings.push("<Item>");
|
||||||
xmlStrings.push("<Name>" + res.data[i].name + "</Name>");
|
xmlStrings.push("<Name>" + res.data[i].name + "</Name>");
|
||||||
xmlStrings.push("<UniqueID>" + res.data[i].unique_id + "</UniqueID>");
|
xmlStrings.push("<UniqueID>" + res.data[i].unique_id + "</UniqueID>");
|
||||||
|
@ -165,6 +166,7 @@ var getMyApplications = function() {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
xmlStrings.push("</StaticIP>");
|
xmlStrings.push("</StaticIP>");
|
||||||
|
|
||||||
FILE.writeFile("staticip.xml", xmlStrings.join("\r\n"), "utf-8");
|
FILE.writeFile("staticip.xml", xmlStrings.join("\r\n"), "utf-8");
|
||||||
|
@ -176,6 +178,9 @@ var getMyApplications = function() {
|
||||||
.setContentType("application/x-www-form-urlencoded")
|
.setContentType("application/x-www-form-urlencoded")
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
|
.setParameters({
|
||||||
|
"filter[created_by][eq]": userId
|
||||||
|
})
|
||||||
.get(apiUrl + "/netsolid/items/applications", onSuccess)
|
.get(apiUrl + "/netsolid/items/applications", onSuccess)
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
@ -190,7 +195,6 @@ var getMyServers = function(assignedServers) {
|
||||||
entry.find("a.title").text(res.data[i].ipaddress);
|
entry.find("a.title").text(res.data[i].ipaddress);
|
||||||
entry.find("div.description").text(res.data[i].name);
|
entry.find("div.description").text(res.data[i].name);
|
||||||
entry.appendTo("#listview_servers");
|
entry.appendTo("#listview_servers");
|
||||||
|
|
||||||
servers.push({
|
servers.push({
|
||||||
"data": res.data[i],
|
"data": res.data[i],
|
||||||
"entry": entry
|
"entry": entry
|
||||||
|
@ -205,6 +209,9 @@ var getMyServers = function(assignedServers) {
|
||||||
.setContentType("application/x-www-form-urlencoded")
|
.setContentType("application/x-www-form-urlencoded")
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
|
.setParameters({
|
||||||
|
"limit": "-1"
|
||||||
|
})
|
||||||
.get(apiUrl + "/netsolid/items/servers", onSuccess)
|
.get(apiUrl + "/netsolid/items/servers", onSuccess)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -230,6 +237,9 @@ var getAssignedServers = function() {
|
||||||
.setContentType("application/x-www-form-urlencoded")
|
.setContentType("application/x-www-form-urlencoded")
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
|
.setParameters({
|
||||||
|
"filter[assigned_to][eq]": userId
|
||||||
|
})
|
||||||
.get(apiUrl + "/netsolid/items/assignedservers", onSuccess)
|
.get(apiUrl + "/netsolid/items/assignedservers", onSuccess)
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
|
@ -15,7 +15,7 @@ input, textarea {
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading {
|
#loading {
|
||||||
|
|
|
@ -292,7 +292,7 @@ var HTTPObject = function() {
|
||||||
return this.jqAjax({
|
return this.jqAjax({
|
||||||
type: "GET",
|
type: "GET",
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
url: url,
|
url: this.serializeParameters(url),
|
||||||
data: this.requestBody,
|
data: this.requestBody,
|
||||||
contentType: this.contentType,
|
contentType: this.contentType,
|
||||||
success: callback,
|
success: callback,
|
||||||
|
@ -315,7 +315,7 @@ var HTTPObject = function() {
|
||||||
return this.jqAjax({
|
return this.jqAjax({
|
||||||
type: "PATCH",
|
type: "PATCH",
|
||||||
headers: this.headers,
|
headers: this.headers,
|
||||||
url: url,
|
url: this.serializeParameters(url),
|
||||||
data: this.requestBody,
|
data: this.requestBody,
|
||||||
contentType: this.contentType,
|
contentType: this.contentType,
|
||||||
success: callback,
|
success: callback,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user