Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-stable
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
emulab
emulab-stable
Commits
42d92be0
Commit
42d92be0
authored
Sep 17, 2018
by
Leigh B Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better handling of the case where idlegraph info contains no info cause
there are no nodes allocated (transient situation).
parent
e9be5a3a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
9 deletions
+29
-9
www/aptui/js/adminextend.js
www/aptui/js/adminextend.js
+12
-6
www/aptui/js/idlegraphs.js
www/aptui/js/idlegraphs.js
+13
-2
www/aptui/js/status.js
www/aptui/js/status.js
+1
-1
www/aptui/template/adminextend.html
www/aptui/template/adminextend.html
+3
-0
No files found.
www/aptui/js/adminextend.js
View file @
42d92be0
...
...
@@ -765,12 +765,18 @@ $(function ()
var
callback
=
function
(
status
,
json
)
{
console
.
info
(
"
LoadIdleData callback
"
);
if
(
status
<
0
)
{
// Error, show something that indicates we could not get
// the idle data.
$
(
'
#idledata-error
'
).
html
(
"
Could not get graph data:
"
+
json
.
value
);
$
(
'
#idledata-error
'
).
removeClass
(
"
hidden
"
);
if
(
status
<=
0
)
{
if
(
status
==
0
)
{
// No data.
$
(
'
#idledata-nodata
'
).
removeClass
(
"
hidden
"
);
}
else
{
// Error, show something that indicates we could not get
// the idle data.
$
(
'
#idledata-error
'
).
html
(
"
Could not get graph data:
"
+
json
.
value
);
$
(
'
#idledata-error
'
).
removeClass
(
"
hidden
"
);
}
}
if
(
continuation
!==
undefined
)
{
continuation
();
...
...
www/aptui/js/idlegraphs.js
View file @
42d92be0
...
...
@@ -385,10 +385,21 @@ window.ShowIdleGraphs = (function ()
return
;
}
_
.
each
(
json
.
value
,
function
(
data
,
name
)
{
var
idledata
=
JSON
.
parse
(
data
);
rawData
[
name
]
=
idledata
;
// No data, skip
if
(
data
==
""
)
{
return
;
}
rawData
[
name
]
=
JSON
.
parse
(
data
);
});
console
.
info
(
"
raw
"
,
rawData
);
// No data, tell caller and done.
if
(
Object
.
keys
(
rawData
).
length
==
0
)
{
if
(
C_callback
)
{
C_callback
(
0
,
json
);
}
return
;
}
var
load
=
ProcessData
(
"
load
"
,
"
avg
"
);
var
ctrl
=
ProcessData
(
"
ctrl
"
,
"
avg
"
);
var
expt
=
ProcessData
(
"
expt
"
,
"
avg
"
);
...
...
www/aptui/js/status.js
View file @
42d92be0
...
...
@@ -3313,7 +3313,7 @@ $(function ()
* This callback is to let us know if there is any actual data.
*/
var
callback
=
function
(
gotdata
,
ignored
)
{
if
(
!
gotdata
)
{
if
(
gotdata
<=
0
)
{
$
(
'
#Idlegraphs #nodata
'
).
removeClass
(
"
hidden
"
);
}
};
...
...
www/aptui/template/adminextend.html
View file @
42d92be0
...
...
@@ -209,6 +209,9 @@ pre {
<div
class=
'col-sm-10 col-sm-offset-1
col-xs-12 col-xs-offset-0'
>
<div
class=
"well well-sm text-danger hidden"
id=
"idledata-error"
></div>
<div
class=
"well well-sm hidden"
id=
"idledata-nodata"
>
There is insufficient data to graph, please check back later.
</div>
<div
class=
'panel panel-default hidden'
id=
"loadavg-panel-div"
>
<div
class=
"panel-heading"
>
<a
data-toggle=
"collapse"
id=
"loadavg-toggle"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment