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
Open sidebar
Hardik Juneja
slapos.toolbox
Commits
a6ca555e
Commit
a6ca555e
authored
10 years ago
by
Nicolas Wavrant
Browse files
Options
Download
Email Patches
Plain Diff
runner: fix bug in displaying logs when slapgrid is not running
in page /viewLog
parent
1650be7b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
slapos/runner/static/js/scripts/process.js
slapos/runner/static/js/scripts/process.js
+3
-3
slapos/runner/static/js/scripts/viewlog.js
slapos/runner/static/js/scripts/viewlog.js
+4
-4
No files found.
slapos/runner/static/js/scripts/process.js
View file @
a6ca555e
/*jslint undef: true */
/*global $, window, $SCRIPT_ROOT, setRunningState, setCookie, getCookie, deleteCookie */
/*global currentState: true, running:
tru
e, $current: true, currentProcess: true, processTypes: true */
/*global currentState: true, running:
fals
e, $current: true, currentProcess: true, processTypes: true */
/*global sendStop: true, openedlogpage: true, logReadingPosition: true, speed: true */
/*global isRunning: true */
/* vim: set et sts=4: */
...
...
@@ -9,7 +9,7 @@
var
url
=
$SCRIPT_ROOT
+
"
/slapgridResult
"
;
var
currentState
=
false
;
var
running
=
tru
e
;
var
running
=
fals
e
;
var
currentProcess
=
""
;
var
processTypes
=
{
instance
:
"
instance
"
,
software
:
"
software
"
};
var
sendStop
=
false
;
...
...
@@ -55,7 +55,7 @@ function writeLogs(data) {
size
=
data
.
content
.
position
-
logReadingPosition
;
if
(
size
<
0
)
{
clearAll
();
clearAll
(
false
);
}
if
(
logReadingPosition
!==
0
&&
data
.
content
.
truncated
)
{
log_info
=
"
<p class='info' rel='0'>SLAPRUNNER INFO: SLAPGRID-LOG HAS BEEN TRUNCATED HERE. To see full log reload your log page</p>
"
;
...
...
This diff is collapsed.
Click to expand it.
slapos/runner/static/js/scripts/viewlog.js
View file @
a6ca555e
/*jslint undef: true */
/*global $, document, window,
processState,
getCookie, setCookie, setSpeed, $SCRIPT_ROOT */
/*global openedlogpage: true */
/*global $, document, window, getCookie, setCookie, setSpeed, $SCRIPT_ROOT */
/*global openedlogpage: true
, running: false
*/
/* vim: set et sts=4: */
$
(
document
).
ready
(
function
()
{
...
...
@@ -53,7 +53,7 @@ $(document).ready(function () {
}
function
updatelogBox
()
{
if
(
processState
===
"
Stopped
"
||
processState
===
"
Check
ing
"
||
$
(
"
#manual
"
).
is
(
"
:checked
"
))
{
if
(
!
runn
ing
||
$
(
"
#manual
"
).
is
(
"
:checked
"
))
{
$
(
"
#salpgridLog
"
).
hide
();
$
(
"
#manualLog
"
).
show
();
$
(
"
#slapstate
"
).
hide
();
...
...
@@ -113,7 +113,7 @@ $(document).ready(function () {
})
.
always
(
function
()
{
sending
=
false
;
if
(
processState
===
"
Stopped
"
||
processState
===
"
Check
ing
"
||
$
(
"
#manual
"
).
is
(
"
:checked
"
))
{
if
(
!
runn
ing
||
$
(
"
#manual
"
).
is
(
"
:checked
"
))
{
$
(
"
#logheader
"
).
html
(
info
);
}
else
{
$
(
"
#logheader
"
).
html
(
"
Inspecting slapgrid log - Click for more options
"
);
...
...
This diff is collapsed.
Click to expand it.
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