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
0
Merge Requests
0
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
Rafael Monnerat
slapos.core
Commits
ba6cfec5
Commit
ba6cfec5
authored
Feb 09, 2024
by
Roque
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapos_jio: keep backward compatibility for monitoring url
parent
7950da2e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
...l_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
+1
-1
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
...ortal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
+3
-3
No files found.
master/bt5/slapos_jio/SkinTemplateItem/portal_skins/slapos_hal_json_style/Base_getStatusMonitorUrl.py
View file @
ba6cfec5
from
ZTUtils
import
make_query
from
ZTUtils
import
make_query
# TODO how to avoid hardcode here? from InstanceTree_getConnectionParameterList?
# TODO how to avoid hardcode here? from InstanceTree_getConnectionParameterList?
base_url
=
'https://monitor.app.officejs.com/#/?'
base_url
=
'https://monitor.app.officejs.com/#/?'
url_parameter_kw
=
{
'page'
:
'ojsm_
landing
'
}
url_parameter_kw
=
{
'page'
:
'ojsm_
dispatch
'
}
instance_tree
=
context
instance_tree
=
context
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
...
...
master/bt5/slapos_jio/TestTemplateItem/portal_components/test.erp5.testSlapOSHalJsonStyleSkins.py
View file @
ba6cfec5
...
@@ -43,9 +43,9 @@ class TestSlapOSHalJsonStyleMixin(SlapOSTestCaseMixinWithAbort):
...
@@ -43,9 +43,9 @@ class TestSlapOSHalJsonStyleMixin(SlapOSTestCaseMixinWithAbort):
def
getMonitorUrl
(
self
,
context
):
def
getMonitorUrl
(
self
,
context
):
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
if
context
.
getPortalType
()
in
[
"Software Instance"
,
"Slave Instance"
]:
return
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Software%20Instance%22%20AND%20title%3A%22Template%20Software%20Instance%22%20AND%20specialise_title%3A%22Template%20Instance%20Tree%22&page=ojsm_
landing
'
return
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Software%20Instance%22%20AND%20title%3A%22Template%20Software%20Instance%22%20AND%20specialise_title%3A%22Template%20Instance%20Tree%22&page=ojsm_
dispatch
'
else
:
else
:
return
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Instance%20Tree%22%20AND%20title%3A%22Template%20Instance%20Tree%22&page=ojsm_
landing
'
return
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Instance%20Tree%22%20AND%20title%3A%22Template%20Instance%20Tree%22&page=ojsm_
dispatch
'
maxDiff
=
None
maxDiff
=
None
def
afterSetUp
(
self
):
def
afterSetUp
(
self
):
...
@@ -351,7 +351,7 @@ class TestSoftwareInstance_getNewsDict(TestSlapOSHalJsonStyleMixin):
...
@@ -351,7 +351,7 @@ class TestSoftwareInstance_getNewsDict(TestSlapOSHalJsonStyleMixin):
'reference'
:
instance
.
getReference
(),
'reference'
:
instance
.
getReference
(),
'is_slave'
:
1
,
'is_slave'
:
1
,
'text'
:
'#nodata is a slave %s'
%
instance
.
getReference
(),
'text'
:
'#nodata is a slave %s'
%
instance
.
getReference
(),
'monitor_url'
:
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Software%20Instance%22%20AND%20title%3A%22Template%20Slave%20Instance%22%20AND%20specialise_title%3A%22Template%20Instance%20Tree%22&page=ojsm_
landing
'
,
'monitor_url'
:
'https://monitor.app.officejs.com/#/?query=portal_type%3A%22Software%20Instance%22%20AND%20title%3A%22Template%20Slave%20Instance%22%20AND%20specialise_title%3A%22Template%20Instance%20Tree%22&page=ojsm_
dispatch
'
,
'user'
:
'SlapOS Master'
}
'user'
:
'SlapOS Master'
}
self
.
assertEqual
(
_decode_with_json
(
news_dict
),
self
.
assertEqual
(
_decode_with_json
(
news_dict
),
_decode_with_json
(
expected_news_dict
))
_decode_with_json
(
expected_news_dict
))
...
...
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