Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
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
Stephane VAROQUI
slapos
Commits
67e76d77
Commit
67e76d77
authored
Mar 29, 2016
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
monitor: fix check of valid monitor URL
parent
b6ba7fd2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
stack/monitor/buildout.cfg
stack/monitor/buildout.cfg
+1
-1
stack/monitor/scripts/monitor.py
stack/monitor/scripts/monitor.py
+2
-1
No files found.
stack/monitor/buildout.cfg
View file @
67e76d77
...
@@ -120,7 +120,7 @@ context =
...
@@ -120,7 +120,7 @@ context =
[monitor2-bin]
[monitor2-bin]
<= monitor-template-script
<= monitor-template-script
filename = monitor.py
filename = monitor.py
md5sum =
927501a8c4ce8dcc39d55af1efdc66ed
md5sum =
222365a469f8ab08a0367d81c0b03982
[run-promise-py]
[run-promise-py]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
...
stack/monitor/scripts/monitor.py
View file @
67e76d77
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import
sys
import
sys
import
os
import
os
...
@@ -220,7 +221,7 @@ class Monitoring(object):
...
@@ -220,7 +221,7 @@ class Monitoring(object):
def
getMonitorTitleFromUrl
(
self
,
monitor_url
):
def
getMonitorTitleFromUrl
(
self
,
monitor_url
):
# This file should be generated
# This file should be generated
if
not
monitor_url
.
startswith
(
'https://'
)
or
not
monitor_url
.
startswith
(
'http://'
):
if
not
monitor_url
.
startswith
(
'https://'
)
and
not
monitor_url
.
startswith
(
'http://'
):
return
'Unknow Instance'
return
'Unknow Instance'
if
not
monitor_url
.
endswith
(
'/'
):
if
not
monitor_url
.
endswith
(
'/'
):
monitor_url
=
monitor_url
+
'/'
monitor_url
=
monitor_url
+
'/'
...
...
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