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
6
Merge Requests
6
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
slapos.toolbox
Commits
6b2655a2
Commit
6b2655a2
authored
Jul 27, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: jslint compliance
parent
a3c09a4b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
25 deletions
+22
-25
slapos/runner/static/js/scripts/cookies.js
slapos/runner/static/js/scripts/cookies.js
+2
-2
slapos/runner/static/js/scripts/process.js
slapos/runner/static/js/scripts/process.js
+15
-17
slapos/runner/static/js/scripts/softwareFolder.js
slapos/runner/static/js/scripts/softwareFolder.js
+4
-5
slapos/runner/static/js/scripts/workspace.js
slapos/runner/static/js/scripts/workspace.js
+1
-1
No files found.
slapos/runner/static/js/scripts/cookies.js
View file @
6b2655a2
...
@@ -37,7 +37,7 @@ function deleteCookie(name, path, domain) {
...
@@ -37,7 +37,7 @@ function deleteCookie(name, path, domain) {
function
setCookie
(
name
,
value
,
expires
,
path
,
domain
,
secure
)
{
function
setCookie
(
name
,
value
,
expires
,
path
,
domain
,
secure
)
{
"
use strict
"
;
"
use strict
"
;
if
(
getCookie
(
name
)
!==
null
){
if
(
getCookie
(
name
)
!==
null
)
{
deleteCookie
(
name
);
deleteCookie
(
name
);
}
}
if
(
!
expires
)
{
if
(
!
expires
)
{
...
...
slapos/runner/static/js/scripts/process.js
View file @
6b2655a2
...
@@ -44,7 +44,7 @@ function clearAll(setStop) {
...
@@ -44,7 +44,7 @@ function clearAll(setStop) {
running
=
setStop
;
running
=
setStop
;
}
}
function
removeFirstLog
(){
function
removeFirstLog
()
{
"
use strict
"
;
"
use strict
"
;
currentLogSize
-=
parseInt
(
$
(
"
#salpgridLog p:first-child
"
).
attr
(
'
rel
'
),
10
);
currentLogSize
-=
parseInt
(
$
(
"
#salpgridLog p:first-child
"
).
attr
(
'
rel
'
),
10
);
$
(
"
#salpgridLog p:first-child
"
).
remove
();
$
(
"
#salpgridLog p:first-child
"
).
remove
();
...
@@ -52,16 +52,16 @@ function removeFirstLog(){
...
@@ -52,16 +52,16 @@ function removeFirstLog(){
function
getRunningState
()
{
function
getRunningState
()
{
"
use strict
"
;
"
use strict
"
;
var
size
=
0
;
var
size
=
0
,
var
log_info
=
""
;
log_info
=
""
,
var
param
=
{
param
=
{
position
:
logReadingPosition
,
position
:
logReadingPosition
,
log
:
(
processState
!==
"
Checking
"
&&
openedlogpage
===
processType
.
toLowerCase
())
?
openedlogpage
:
""
log
:
(
processState
!==
"
Checking
"
&&
openedlogpage
===
processType
.
toLowerCase
())
?
openedlogpage
:
""
},
},
jqxhr
=
$
.
post
(
url
,
param
,
function
(
data
)
{
jqxhr
=
$
.
post
(
url
,
param
,
function
(
data
)
{
setRunningState
(
data
);
setRunningState
(
data
);
size
=
data
.
content
.
position
-
logReadingPosition
;
size
=
data
.
content
.
position
-
logReadingPosition
;
if
(
logReadingPosition
!==
0
&&
data
.
content
.
truncated
){
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>
"
;
log_info
=
"
<p class='info' rel='0'>SLAPRUNNER INFO: SLAPGRID-LOG HAS BEEN TRUNCATED HERE. To see full log reload your log page</p>
"
;
}
}
logReadingPosition
=
data
.
content
.
position
;
logReadingPosition
=
data
.
content
.
position
;
...
@@ -78,18 +78,16 @@ function getRunningState() {
...
@@ -78,18 +78,16 @@ function getRunningState() {
}
}
processState
=
running
?
"
Running
"
:
"
Stopped
"
;
processState
=
running
?
"
Running
"
:
"
Stopped
"
;
currentLogSize
+=
parseInt
(
size
,
10
);
currentLogSize
+=
parseInt
(
size
,
10
);
if
(
currentLogSize
>
maxLogSize
){
if
(
currentLogSize
>
maxLogSize
)
{
//Remove the first element into log div
//Remove the first element into log div
removeFirstLog
();
removeFirstLog
();
if
(
currentLogSize
>
maxLogSize
){
if
(
currentLogSize
>
maxLogSize
)
{
removeFirstLog
();
//in cas of previous <p/> size is 0
removeFirstLog
();
//in cas of previous <p/> size is 0
}
}
}
}
})
}).
error
(
function
()
{
.
error
(
function
()
{
clearAll
(
false
);
clearAll
(
false
);
})
}).
complete
(
function
()
{
.
complete
(
function
()
{
if
(
running
)
{
if
(
running
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
getRunningState
();
getRunningState
();
...
...
slapos/runner/static/js/scripts/softwareFolder.js
View file @
6b2655a2
...
@@ -19,11 +19,10 @@ $(document).ready(function () {
...
@@ -19,11 +19,10 @@ $(document).ready(function () {
send
=
false
,
send
=
false
,
edit
=
false
,
edit
=
false
,
selection
=
""
,
selection
=
""
,
edit_status
=
""
;
edit_status
=
""
,
base_path
=
function
()
{
var
base_path
=
function
()
{
return
softwareDisplay
?
projectDir
:
currentProject
;
return
softwareDisplay
?
projectDir
:
currentProject
;
}
};
function
setEditMode
(
file
)
{
function
setEditMode
(
file
)
{
var
i
,
var
i
,
...
...
slapos/runner/static/js/scripts/workspace.js
View file @
6b2655a2
...
@@ -6,5 +6,5 @@
...
@@ -6,5 +6,5 @@
$
(
document
).
ready
(
function
()
{
$
(
document
).
ready
(
function
()
{
"
use strict
"
;
"
use strict
"
;
$
(
'
#fileNavigator
'
).
gsFileManager
({
script
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
root
:
'
workspace/
'
});
$
(
'
#fileNavigator
'
).
gsFileManager
({
script
:
$SCRIPT_ROOT
+
"
/fileBrowser
"
,
root
:
'
workspace/
'
});
});
});
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