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
Thomas Leymonerie
slapos.toolbox
Commits
9accbfe2
Commit
9accbfe2
authored
Jul 20, 2015
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
runner: support instance_name parameter (to be displayed in title)
parent
7631850a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
slapos/runner/templates/layout.html
slapos/runner/templates/layout.html
+1
-1
slapos/runner/utils.py
slapos/runner/utils.py
+6
-2
No files found.
slapos/runner/templates/layout.html
View file @
9accbfe2
...
...
@@ -5,7 +5,7 @@
{% block head %}
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
/>
<title>
SlapOS Buildout web runner
</title>
<title>
{{ session.title }} -
SlapOS Buildout web runner
</title>
<meta
name=
"keywords"
content=
""
/>
...
...
slapos/runner/utils.py
View file @
9accbfe2
...
...
@@ -623,11 +623,15 @@ def checkSoftwareFolder(path, config):
def getProjectTitle(config):
"""Generate the name of the current software Release (for slaprunner UI)"""
conf = os.path.join(config['
etc_dir
'], ".project")
# instance_name is optional parameter
instance_name = config.get('
instance_name
')
if instance_name:
instance_name = '
%
s
-
' % instance_name
if os.path.exists(conf):
project = open(conf, "r").read().split("/")
software = project[-2]
return '
%
s
(
%
s
)
' % (
software, '
/
'.join(project[:-2]))
return "
No Profile"
return '
%
s
%
s
(
%
s
)
' % (instance_name,
software, '
/
'.join(project[:-2]))
return "
%sNo Profile" % instance_name
def getSoftwareReleaseName(config):
...
...
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