Commit 270f2210 authored by Roque's avatar Roque

stack/monitor: only one request parameter for app interface url

parent e8be17cb
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# not need these here). # not need these here).
[monitor2-template] [monitor2-template]
filename = instance-monitor.cfg.jinja2.in filename = instance-monitor.cfg.jinja2.in
md5sum = 07a76d0865aa3b4a735d5b200f5a458d md5sum = 6913cfbd08f812a58ec6094e3fd183ad
[monitor-httpd-conf] [monitor-httpd-conf]
_update_hash_filename_ = templates/monitor-httpd.conf.in _update_hash_filename_ = templates/monitor-httpd.conf.in
......
...@@ -9,8 +9,7 @@ cert = ${slap-connection:cert-file} ...@@ -9,8 +9,7 @@ cert = ${slap-connection:cert-file}
# XXX Default values if doesn't exists # XXX Default values if doesn't exists
root-instance-title = UNKNOWN H-S root-instance-title = UNKNOWN H-S
instance-title = UNKNOWN Instance instance-title = UNKNOWN Instance
configuration.monitor-cors-domains = monitor.app.officejs.com configuration.monitor-interface-url = https://monitor.app.officejs.com/#page=ojsm_landing
configuration.monitor-interface-url = https://monitor.app.officejs.com
[directory] [directory]
recipe = slapos.cookbook:mkdirectory recipe = slapos.cookbook:mkdirectory
...@@ -330,9 +329,15 @@ monitor-user = ${monitor-instance-parameter:username} ...@@ -330,9 +329,15 @@ monitor-user = ${monitor-instance-parameter:username}
monitor-password = ${monitor-instance-parameter:password} monitor-password = ${monitor-instance-parameter:password}
[monitor-parameters-propagation] [monitor-parameters-propagation]
config-monitor-cors-domains = ${slap-configuration:configuration.monitor-cors-domains}
config-monitor-interface-url = ${slap-configuration:configuration.monitor-interface-url} config-monitor-interface-url = ${slap-configuration:configuration.monitor-interface-url}
[monitor-interface-configuration]
recipe = slapos.recipe.build
url = ${monitor-parameters-propagation:config-monitor-interface-url}
init =
from six.moves.urllib.parse import urlparse
options['cors-domain'] = urlparse(options['url']).hostname
[monitor-instance-parameter] [monitor-instance-parameter]
monitor-title = ${slap-configuration:instance-title} monitor-title = ${slap-configuration:instance-title}
monitor-httpd-ipv6 = ${slap-configuration:ipv6-random} monitor-httpd-ipv6 = ${slap-configuration:ipv6-random}
...@@ -342,7 +347,7 @@ monitor-base-url = ${monitor-frontend:connection-secure_access} ...@@ -342,7 +347,7 @@ monitor-base-url = ${monitor-frontend:connection-secure_access}
#monitor-base-url = ${monitor-httpd-conf-parameter:url} #monitor-base-url = ${monitor-httpd-conf-parameter:url}
root-instance-title = ${slap-configuration:root-instance-title} root-instance-title = ${slap-configuration:root-instance-title}
monitor-url-list = monitor-url-list =
cors-domains = ${monitor-parameters-propagation:config-monitor-cors-domains} cors-domains = ${monitor-interface-configuration:cors-domain}
# XXX Hard coded parameter # XXX Hard coded parameter
collector-db = /srv/slapgrid/var/data-log/collector.db collector-db = /srv/slapgrid/var/data-log/collector.db
# Credentials # Credentials
...@@ -350,7 +355,7 @@ password = ${monitor-htpasswd:passwd} ...@@ -350,7 +355,7 @@ password = ${monitor-htpasswd:passwd}
username = admin username = admin
instance-configuration = instance-configuration =
configuration-file-path = ${monitor-directory:etc}/monitor_knowledge0.cfg configuration-file-path = ${monitor-directory:etc}/monitor_knowledge0.cfg
interface-url = ${monitor-parameters-propagation:config-monitor-interface-url} interface-url = ${monitor-interface-configuration:url}
[monitor-frontend] [monitor-frontend]
<= slap-connection <= slap-connection
...@@ -434,8 +439,8 @@ depends = ...@@ -434,8 +439,8 @@ depends =
[monitor-publish] [monitor-publish]
monitor-base-url = ${monitor-publish-parameters:monitor-base-url} monitor-base-url = ${monitor-publish-parameters:monitor-base-url}
monitor-setup-url = ${monitor-instance-parameter:interface-url}/#page=ojsm_landing&url=${monitor-publish-parameters:monitor-url}&username=${monitor-publish-parameters:monitor-user}&password=${monitor-publish-parameters:monitor-password} # interface-url can be a template URI.
monitor-setup-url = ${monitor-instance-parameter:interface-url}&url=${monitor-publish-parameters:monitor-url}&username=${monitor-publish-parameters:monitor-user}&password=${monitor-publish-parameters:monitor-password}
[buildout] [buildout]
......
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