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
Joanne Hugé
slapos.toolbox
Commits
ccd8605a
Commit
ccd8605a
authored
Jul 26, 2013
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: simpler len() and if: logic, improved naming
parent
e59f85be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
slapos/runner/utils.py
slapos/runner/utils.py
+2
-2
slapos/runner/views.py
slapos/runner/views.py
+9
-9
No files found.
slapos/runner/utils.py
View file @
ccd8605a
...
@@ -278,11 +278,11 @@ def config_SR_folder(config):
...
@@ -278,11 +278,11 @@ def config_SR_folder(config):
continue
# there is a broken config file
continue
# there is a broken config file
list
.
append
(
cfg
[
1
])
list
.
append
(
cfg
[
1
])
folder_list
=
os
.
listdir
(
config
[
'software_root'
])
folder_list
=
os
.
listdir
(
config
[
'software_root'
])
if
len
(
folder_list
)
<
1
:
if
not
folder_list
:
return
return
current_project
=
open
(
os
.
path
.
join
(
config
[
'etc_dir'
],
".project"
)).
read
()
current_project
=
open
(
os
.
path
.
join
(
config
[
'etc_dir'
],
".project"
)).
read
()
projects
=
current_project
.
split
(
'/'
)
projects
=
current_project
.
split
(
'/'
)
name
=
projects
[
len
(
projects
)
-
2
]
name
=
projects
[
-
2
]
for
folder
in
folder_list
:
for
folder
in
folder_list
:
if
folder
in
list
:
if
folder
in
list
:
continue
# this folder is already registered
continue
# this folder is already registered
...
...
slapos/runner/views.py
View file @
ccd8605a
...
@@ -182,17 +182,17 @@ def editInstanceProfile():
...
@@ -182,17 +182,17 @@ def editInstanceProfile():
# get status of all computer partitions and process state
# get status of all computer partitions and process state
@
login_required
()
@
login_required
()
def
inspectInstance
():
def
inspectInstance
():
file_content
=
''
result
=
''
if
os
.
path
.
exists
(
app
.
config
[
'instance_root'
]):
if
os
.
path
.
exists
(
app
.
config
[
'instance_root'
]):
file_content
=
'instance_root'
file_path
=
'instance_root'
result
=
getSvcStatus
(
app
.
config
)
supervisor
=
getSvcStatus
(
app
.
config
)
if
len
(
result
)
==
0
:
else
:
result
=
[]
file_path
=
''
supervisor
=
[]
return
render_template
(
'instanceInspect.html'
,
return
render_template
(
'instanceInspect.html'
,
file_path
=
file_content
,
supervisor
=
result
,
file_path
=
file_path
,
supervisor
=
supervisor
,
slap_status
=
getSlapStatus
(
app
.
config
),
slap_status
=
getSlapStatus
(
app
.
config
),
supervisore
=
result
,
partition_amount
=
app
.
config
[
'partition_amount'
])
partition_amount
=
app
.
config
[
'partition_amount'
])
#Reload instance process ans returns new value to ajax
#Reload instance process ans returns new value to ajax
...
...
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