Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Justin
slapos.toolbox
Commits
38a788d5
Commit
38a788d5
authored
Mar 02, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prevent to load of large data for auto load slapgrid log
parent
ea7bd536
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
slapos/runner/static/js/scripts/process.js
slapos/runner/static/js/scripts/process.js
+2
-1
slapos/runner/static/js/scripts/viewlog.js
slapos/runner/static/js/scripts/viewlog.js
+3
-3
slapos/runner/utils.py
slapos/runner/utils.py
+2
-2
No files found.
slapos/runner/static/js/scripts/process.js
View file @
38a788d5
...
...
@@ -33,7 +33,8 @@ function getRunningState(){
.
scrollTop
(
$
(
"
#salpgridLog
"
)[
0
].
scrollHeight
-
$
(
"
#salpgridLog
"
)
.
height
());
}
processState
=
(
running
&&
processState
!=
"
Running
"
)?
"
Running
"
:
"
Stopped
"
;
if
(
running
&&
processState
==
"
Checking
"
&&
openedlogpage
!=
""
){
$
(
"
#salpgridLog
"
).
show
();
$
(
"
#manualLog
"
).
hide
();}
processState
=
(
running
)?
"
Running
"
:
"
Stopped
"
;
})
.
error
(
function
()
{
clearAll
(
false
);
})
.
complete
(
function
()
{
...
...
slapos/runner/static/js/scripts/viewlog.js
View file @
38a788d5
...
...
@@ -13,17 +13,17 @@ $(document).ready( function() {
});
$
(
"
#live
"
).
change
(
function
(){
updatelogBox
();
$
(
"
#logconfigbox
"
).
find
(
"
input:radio
"
).
attr
(
'
checked
'
,
false
);
$
(
"
#live
"
).
attr
(
'
checked
'
,
true
);
setSpeed
(
5
00
);
setCookie
(
"
autoUpdate
"
,
"
live
"
);
openedlogpage
=
$
(
"
input#type
"
).
val
();});
setSpeed
(
1
00
);
setCookie
(
"
autoUpdate
"
,
"
live
"
);
openedlogpage
=
$
(
"
input#type
"
).
val
();});
$
(
"
#slow
"
).
change
(
function
(){
updatelogBox
();
$
(
"
#logconfigbox
"
).
find
(
"
input:radio
"
).
attr
(
'
checked
'
,
false
);
$
(
"
#slow
"
).
attr
(
'
checked
'
,
true
);
setSpeed
(
50
00
);
setCookie
(
"
autoUpdate
"
,
"
slow
"
);
openedlogpage
=
$
(
"
input#type
"
).
val
();});
setSpeed
(
25
00
);
setCookie
(
"
autoUpdate
"
,
"
slow
"
);
openedlogpage
=
$
(
"
input#type
"
).
val
();});
if
(
state
){
$
(
"
#
"
+
state
).
attr
(
'
checked
'
,
true
);
updatelogBox
();
if
(
state
==
"
manual
"
){
openedlogpage
=
""
;
setSpeed
(
0
);
}
else
{
setSpeed
((
state
==
"
live
"
)?
500
:
50
00
);}
else
{
setSpeed
((
state
==
"
live
"
)?
100
:
25
00
);}
}
else
{
$
(
"
#slow
"
).
attr
(
'
checked
'
,
true
);}
...
...
slapos/runner/utils.py
View file @
38a788d5
...
...
@@ -483,8 +483,8 @@ def readFileFrom(f, lastPosition):
block = -1
data = ""
length = bytes
if lastPosition <= 0 and length >
5
0000:
lastPosition =
5
0000
if lastPosition <= 0 and length >
3
0000:
lastPosition =
length-3
0000
size = bytes - lastPosition
while bytes > lastPosition:
if abs(block*BUFSIZ) <= size:
...
...
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