Commit ba6cfec5 authored by Roque's avatar Roque

slapos_jio: keep backward compatibility for monitoring url

parent 7950da2e
Pipeline #32728 failed with stage
in 0 seconds
from ZTUtils import make_query
# TODO how to avoid hardcode here? from InstanceTree_getConnectionParameterList?
base_url = 'https://monitor.app.officejs.com/#/?'
url_parameter_kw = { 'page': 'ojsm_landing' }
url_parameter_kw = { 'page': 'ojsm_dispatch' }
instance_tree = context
if context.getPortalType() in ["Software Instance", "Slave Instance"]:
......
......@@ -43,9 +43,9 @@ class TestSlapOSHalJsonStyleMixin(SlapOSTestCaseMixinWithAbort):
def getMonitorUrl(self, context):
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:
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
def afterSetUp(self):
......@@ -351,7 +351,7 @@ class TestSoftwareInstance_getNewsDict(TestSlapOSHalJsonStyleMixin):
'reference': instance.getReference(),
'is_slave': 1,
'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'}
self.assertEqual(_decode_with_json(news_dict),
_decode_with_json(expected_news_dict))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment