From aa5b9b88bae98b0898d89d6f0b608e898d73769f Mon Sep 17 00:00:00 2001 From: Ekaterina Chernova Date: Fri, 23 Jan 2015 12:51:16 +0300 Subject: [PATCH] Fix UI definitions * Make Unit Naming Pattern visable, since this feature is working correctly. Also, correct validators were added. * Make Avalibility zone visiable and add to the Application models. * Use ` symbol instead of ' as apostrophe. Otherwise it looks like the string ending backtick is forgotten Change-Id: Iecf3122f388019da42b20bd1eefdb827586018d7 --- io.murano.apps.WordPress/UI/ui.yaml | 4 ++-- io.murano.apps.ZabbixAgent/UI/ui.yaml | 2 +- io.murano.apps.ZabbixServer/UI/ui.yaml | 15 ++++++++---- .../UI/ui.yaml | 24 ++++++++++++------- io.murano.apps.apache.Tomcat/UI/ui.yaml | 15 ++++++++---- io.murano.databases.MySql/UI/ui.yaml | 24 ++++++++++++------- io.murano.databases.PostgreSql/UI/ui.yaml | 22 ++++++++++------- 7 files changed, 71 insertions(+), 35 deletions(-) diff --git a/io.murano.apps.WordPress/UI/ui.yaml b/io.murano.apps.WordPress/UI/ui.yaml index 6899e748..d33567df 100644 --- a/io.murano.apps.WordPress/UI/ui.yaml +++ b/io.murano.apps.WordPress/UI/ui.yaml @@ -6,10 +6,10 @@ Application: name: $.appConfiguration.name database: $.appConfiguration.database server: $.appConfiguration.server + monitoring: $.appConfiguration.zabbix dbName: $.dbConfiguration.database dbUser: $.dbConfiguration.username dbPassword: $.dbConfiguration.password - monitoring: $.appConfiguration.zabbix Forms: @@ -26,7 +26,7 @@ Forms: type: io.murano.databases.MySql label: Database Server description: >- - Select a database server to host the application's database + Select a database server to host the application`s database - name: server type: io.murano.apps.apache.ApacheHttpServer label: HTTP Server diff --git a/io.murano.apps.ZabbixAgent/UI/ui.yaml b/io.murano.apps.ZabbixAgent/UI/ui.yaml index c3cb17a7..fa738611 100644 --- a/io.murano.apps.ZabbixAgent/UI/ui.yaml +++ b/io.murano.apps.ZabbixAgent/UI/ui.yaml @@ -44,4 +44,4 @@ Forms: - [ICMP, 'ICMP'] initial: ICMP description: >- - Choose probe method + Choose probe method diff --git a/io.murano.apps.ZabbixServer/UI/ui.yaml b/io.murano.apps.ZabbixServer/UI/ui.yaml index 4ad96cf0..b3726c73 100644 --- a/io.murano.apps.ZabbixServer/UI/ui.yaml +++ b/io.murano.apps.ZabbixServer/UI/ui.yaml @@ -14,6 +14,7 @@ Application: flavor: $.instanceConfiguration.flavor image: $.instanceConfiguration.osImage keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone assignFloatingIp: $.appConfiguration.assignFloatingIP Forms: @@ -92,8 +93,14 @@ Forms: required: false - name: unitNamingPattern type: string + label: Instance Naming Pattern required: false - hidden: true - widgetMedia: - js: ['muranodashboard/js/support_placeholder.js'] - css: {all: ['muranodashboard/css/support_placeholder.css']} + maxLength: 200 + regexpValidator: '^[-_\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a string, that will be used in instance hostname. + Just A-Z, a-z, 0-9, dash and underline are allowed. + diff --git a/io.murano.apps.apache.ApacheHttpServer/UI/ui.yaml b/io.murano.apps.apache.ApacheHttpServer/UI/ui.yaml index c909f18b..aed60761 100644 --- a/io.murano.apps.apache.ApacheHttpServer/UI/ui.yaml +++ b/io.murano.apps.apache.ApacheHttpServer/UI/ui.yaml @@ -8,10 +8,11 @@ Application: instance: ?: type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.unitNamingPattern, 1) + name: generateHostname($.instanceConfiguration.unitNamingPattern, 1) flavor: $.instanceConfiguration.flavor image: $.instanceConfiguration.osImage keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone assignFloatingIp: $.appConfiguration.assignFloatingIP Forms: @@ -46,13 +47,7 @@ Forms: type: integer hidden: true initial: 1 - - name: unitNamingPattern - type: string - required: false - hidden: true - widgetMedia: - js: ['muranodashboard/js/support_placeholder.js'] - css: {all: ['muranodashboard/css/support_placeholder.css']} + - instanceConfiguration: fields: - name: title @@ -86,3 +81,16 @@ Forms: label: Availability zone description: Select availability zone where application would be installed. required: false + - name: unitNamingPattern + type: string + label: Instance Naming Pattern + required: false + maxLength: 200 + regexpValidator: '^[-_\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a string, that will be used in instance hostname. + Just A-Z, a-z, 0-9, dash and underline are allowed. + diff --git a/io.murano.apps.apache.Tomcat/UI/ui.yaml b/io.murano.apps.apache.Tomcat/UI/ui.yaml index f6151a6a..0c31446a 100644 --- a/io.murano.apps.apache.Tomcat/UI/ui.yaml +++ b/io.murano.apps.apache.Tomcat/UI/ui.yaml @@ -11,6 +11,7 @@ Application: flavor: $.instanceConfiguration.flavor image: $.instanceConfiguration.osImage keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone assignFloatingIp: $.appConfiguration.assignFloatingIP Forms: @@ -66,9 +67,15 @@ Forms: description: Select availability zone where the application would be installed. required: false - name: unitNamingPattern - label: Hostname type: string + label: Instance Naming Pattern required: false - widgetMedia: - js: ['muranodashboard/js/support_placeholder.js'] - css: {all: ['muranodashboard/css/support_placeholder.css']} + maxLength: 200 + regexpValidator: '^[-_\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a string, that will be used in instance hostname. + Just A-Z, a-z, 0-9, dash and underline are allowed. + diff --git a/io.murano.databases.MySql/UI/ui.yaml b/io.murano.databases.MySql/UI/ui.yaml index 3deacec9..dd636cdb 100644 --- a/io.murano.databases.MySql/UI/ui.yaml +++ b/io.murano.databases.MySql/UI/ui.yaml @@ -10,10 +10,11 @@ Application: instance: ?: type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.unitNamingPattern, 1) + name: generateHostname($.instanceConfiguration.unitNamingPattern, 1) flavor: $.instanceConfiguration.flavor image: $.instanceConfiguration.osImage keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone assignFloatingIp: $.appConfiguration.assignFloatingIP Forms: @@ -33,13 +34,6 @@ Forms: Select to true to assign floating IP automatically initial: false required: false - - name: unitNamingPattern - type: string - required: false - hidden: true - widgetMedia: - js: ['muranodashboard/js/support_placeholder.js'] - css: {all: ['muranodashboard/css/support_placeholder.css']} - initDatabaseConfiguration: fields: @@ -102,4 +96,18 @@ Forms: label: Availability zone description: Select availability zone where the application would be installed. required: false + - name: unitNamingPattern + type: string + label: Instance Naming Pattern + required: false + maxLength: 200 + regexpValidator: '^[-_\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a string, that will be used in instance hostname. + Just A-Z, a-z, 0-9, dash and underline are allowed. + + diff --git a/io.murano.databases.PostgreSql/UI/ui.yaml b/io.murano.databases.PostgreSql/UI/ui.yaml index c3e7553b..75b27fc1 100644 --- a/io.murano.databases.PostgreSql/UI/ui.yaml +++ b/io.murano.databases.PostgreSql/UI/ui.yaml @@ -10,10 +10,11 @@ Application: instance: ?: type: io.murano.resources.LinuxMuranoInstance - name: generateHostname($.appConfiguration.unitNamingPattern, 1) + name: generateHostname($.instanceConfiguration.unitNamingPattern, 1) flavor: $.instanceConfiguration.flavor image: $.instanceConfiguration.osImage keyname: $.instanceConfiguration.keyPair + availabilityZone: $.instanceConfiguration.availabilityZone assignFloatingIp: $.appConfiguration.assignFloatingIP Forms: @@ -33,13 +34,6 @@ Forms: Select to true to assign floating IP automatically initial: false required: false - - name: unitNamingPattern - type: string - required: false - hidden: true - widgetMedia: - js: ['muranodashboard/js/support_placeholder.js'] - css: {all: ['muranodashboard/css/support_placeholder.css']} - initDatabaseConfiguration: fields: - name: title @@ -100,3 +94,15 @@ Forms: label: Availability zone description: Select availability zone where the application would be installed. required: false + - name: unitNamingPattern + type: string + label: Instance Naming Pattern + required: false + maxLength: 200 + regexpValidator: '^[-_\w]+$' + errorMessages: + invalid: Just letters, numbers, underscores and hyphens are allowed. + helpText: Just letters, numbers, underscores and hyphens are allowed. + description: >- + Specify a string, that will be used in instance hostname. + Just A-Z, a-z, 0-9, dash and underline are allowed.