Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
18
Merge Requests
18
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
c988e4a8
Commit
c988e4a8
authored
Dec 29, 2023
by
Roque
Browse files
Options
Browse Files
Download
Plain Diff
Slapos master monitoring url update
See merge request
!579
parents
7bb4864f
0c881c5f
Pipeline
#32001
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
...l_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
+9
-4
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
View file @
c988e4a8
base_url
=
'https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Software Instance" AND '
# TODO how to avoid hardcode here? from InstanceTree_getConnectionParameterList?
base_url
=
'https://monitor.app.officejs.com/#/?page=ojsm_landing'
if
context
.
getPortalType
()
==
"Instance Tree"
:
if
context
.
getPortalType
()
==
"Instance Tree"
:
for
connection_parameter
in
context
.
InstanceTree_getConnectionParameterList
(
raw
=
True
):
for
connection_parameter
in
context
.
InstanceTree_getConnectionParameterList
(
raw
=
True
):
if
connection_parameter
[
'connection_key'
]
==
"monitor-setup-url"
:
if
connection_parameter
[
'connection_key'
]
==
"monitor-setup-url"
:
return
connection_parameter
[
'connection_value'
]
return
connection_parameter
[
'connection_value'
]
base_url
=
'https://monitor.app.officejs.com/#/?page=ojsm_dispatch&query=portal_type:"Instance Tree" AND '
connection_parameter_dict
=
context
.
InstanceTree_getMonitorParameterDict
()
return
base_url
+
"title:(%s)"
%
context
.
getTitle
()
connection_url
=
'&url=%s'
%
connection_parameter_dict
[
'url'
]
+
'&username=%s'
%
connection_parameter_dict
[
'username'
]
+
'&password=%s'
%
connection_parameter_dict
[
'password'
]
return
base_url
+
'&query=portal_type:"Instance Tree" AND title:(%s)'
%
context
.
getTitle
()
+
connection_url
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
return
base_url
+
"reference:%s"
%
context
.
getReference
()
instance_tree
=
context
.
getSpecialise
()
connection_parameter_dict
=
instance_tree
.
InstanceTree_getMonitorParameterDict
()
connection_url
=
'&url=%s'
%
connection_parameter_dict
[
'url'
]
+
'&username=%s'
%
connection_parameter_dict
[
'username'
]
+
'&password=%s'
%
connection_parameter_dict
[
'password'
]
return
base_url
+
'&query=portal_type:"Software Instance" AND title:"%s" AND '
%
context
.
getTitle
()
+
'specialise_title:"%s"'
%
context
.
getSpecialiseTitle
()
+
connection_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