mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-11 00:15:14 +00:00
fix
This commit is contained in:
parent
d786940ebd
commit
9a90778d34
15
app/index.js
15
app/index.js
|
@ -21,11 +21,13 @@ var assign = function() {
|
||||||
SHELL.runVisibleWindow("cscript app.js shadow");
|
SHELL.runVisibleWindow("cscript app.js shadow");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
var pingtest = function() {
|
var pingtest = function() {
|
||||||
for (var i = 0; i < servers.length; i++) {
|
for (var i = 0; i < servers.length; i++) {
|
||||||
servers[i].entry.find("span.ping").text(SYS.ping(servers[i].data.ipaddress) + " ms");
|
servers[i].entry.find("span.status").text(SYS.ping(servers[i].data.ipaddress) + " ms");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
var getLocalApplications = function() {
|
var getLocalApplications = function() {
|
||||||
// LDPlayer
|
// LDPlayer
|
||||||
|
@ -194,6 +196,7 @@ var getMyServers = function(assignedServers) {
|
||||||
var entry = template.clone();
|
var entry = template.clone();
|
||||||
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.find("span.status").text(res.data[i].status !== "published" ? "점검중" : "사용가능");
|
||||||
entry.appendTo("#listview_servers");
|
entry.appendTo("#listview_servers");
|
||||||
servers.push({
|
servers.push({
|
||||||
"data": res.data[i],
|
"data": res.data[i],
|
||||||
|
@ -210,13 +213,15 @@ var getMyServers = function(assignedServers) {
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
.setParameters({
|
.setParameters({
|
||||||
|
//"filter[status][eq]": "published", // get only available items
|
||||||
|
"filter[id][in]": assignedServers.join(','),
|
||||||
"limit": "-1"
|
"limit": "-1"
|
||||||
})
|
})
|
||||||
.get(apiUrl + "/netsolid/items/servers", onSuccess)
|
.get(apiUrl + "/netsolid/items/servers", onSuccess)
|
||||||
;
|
;
|
||||||
|
|
||||||
pingtest();
|
//pingtest();
|
||||||
setInterval(pingtest, 5000);
|
//setInterval(pingtest, 5000);
|
||||||
//document.getElementById("btn_pingtest").onclick = pingtest;
|
//document.getElementById("btn_pingtest").onclick = pingtest;
|
||||||
|
|
||||||
getMyApplications();
|
getMyApplications();
|
||||||
|
@ -238,6 +243,7 @@ var getAssignedServers = function() {
|
||||||
.setBearerAuth(token)
|
.setBearerAuth(token)
|
||||||
.setUseCache(false)
|
.setUseCache(false)
|
||||||
.setParameters({
|
.setParameters({
|
||||||
|
//"filter[status][eq]": "published", // get only available items
|
||||||
"filter[assigned_to][eq]": userId
|
"filter[assigned_to][eq]": userId
|
||||||
})
|
})
|
||||||
.get(apiUrl + "/netsolid/items/assignedservers", onSuccess)
|
.get(apiUrl + "/netsolid/items/assignedservers", onSuccess)
|
||||||
|
@ -252,7 +258,7 @@ var getNotices = function() {
|
||||||
var entry = template.clone();
|
var entry = template.clone();
|
||||||
entry.find("a.title").text(res.data[i].title);
|
entry.find("a.title").text(res.data[i].title);
|
||||||
entry.find("div.description").text(res.data[i].content);
|
entry.find("div.description").text(res.data[i].content);
|
||||||
entry.find("span.ping").text(res.data[i].created_on.substring(0, 10));
|
entry.find("span.status").text(res.data[i].created_on.substring(0, 10));
|
||||||
entry.appendTo("#listview_notices");
|
entry.appendTo("#listview_notices");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -262,6 +268,7 @@ var getNotices = function() {
|
||||||
HTTP.create()
|
HTTP.create()
|
||||||
.setContentType("application/x-www-form-urlencoded")
|
.setContentType("application/x-www-form-urlencoded")
|
||||||
.setParameters({
|
.setParameters({
|
||||||
|
"filter[status][eq]": "published", // get only available items
|
||||||
"sort": "-created_on",
|
"sort": "-created_on",
|
||||||
"limit": 3
|
"limit": 3
|
||||||
})
|
})
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
<div class="col width-fit mobile-width-fit"><span class="icon icon-bell color-blue"></span></div>
|
<div class="col width-fit mobile-width-fit"><span class="icon icon-bell color-blue"></span></div>
|
||||||
<div class="col width-fill mobile-width-fill">
|
<div class="col width-fill mobile-width-fill">
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<span class="ping text">
|
<span class="status text">
|
||||||
N/A
|
N/A
|
||||||
</span>
|
</span>
|
||||||
<span class="icon icon-time"></span>
|
<span class="icon icon-time"></span>
|
||||||
|
@ -37,8 +37,8 @@
|
||||||
<div class="col width-fit mobile-width-fit"><span class="icon icon-bookmark color-blue"></span></div>
|
<div class="col width-fit mobile-width-fit"><span class="icon icon-bookmark color-blue"></span></div>
|
||||||
<div class="col width-fill mobile-width-fill">
|
<div class="col width-fill mobile-width-fill">
|
||||||
<span class="float-right">
|
<span class="float-right">
|
||||||
<span class="ping text">
|
<span class="status text">
|
||||||
N/A
|
No measure
|
||||||
</span>
|
</span>
|
||||||
<span class="icon icon-bolt color-yellow"></span>
|
<span class="icon icon-bolt color-yellow"></span>
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,7 +2,7 @@ html, body {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 90%;
|
overflow: hidden;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
font-family: "맑은 고딕", "Malgun Gothic", "Segoe UI", Calibri, Arial, Sans-Serif;
|
font-family: "맑은 고딕", "Malgun Gothic", "Segoe UI", Calibri, Arial, Sans-Serif;
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,6 @@ input, textarea {
|
||||||
|
|
||||||
#app {
|
#app {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#loading {
|
#loading {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user