From 38967c19351d69b456a39a890b73b50d4b99169c Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Fri, 8 Sep 2017 12:46:24 +0100 Subject: [PATCH 1/7] Allow parameters to be supplied when creating a service instance and binding to an application --- .../app-framework/src/filters/json.filter.js | 32 ++++++++ .../async-task-dialog/async-task-dialog.html | 38 ++++----- .../json-text-input.directive.js | 31 +++++++ .../src/widgets/wizard/wizard.html | 59 +++++++------- .../src/widgets/wizard/wizard.scss | 24 +++++- .../style/components/_async_task_dialog.scss | 26 ++++++ .../frontend/i18n/en_US/app.json | 6 ++ .../add-service-workflow.directive.js | 4 + .../add-service-workflow.scss | 4 +- .../add-service-workflow/instance.html | 21 +++++ .../create-service-instance.html | 21 ++++- .../create-service-instance.scss | 80 +++++++++++++++++-- .../create-servince-instance.service.js | 9 ++- .../add-service-workflow.directive.spec.js | 2 - 14 files changed, 298 insertions(+), 59 deletions(-) create mode 100644 components/app-framework/src/filters/json.filter.js create mode 100644 components/app-framework/src/widgets/json-text-input/json-text-input.directive.js diff --git a/components/app-framework/src/filters/json.filter.js b/components/app-framework/src/filters/json.filter.js new file mode 100644 index 0000000000..e22344c886 --- /dev/null +++ b/components/app-framework/src/filters/json.filter.js @@ -0,0 +1,32 @@ +(function () { + 'use strict'; + + // The filters + angular.module('app.framework.filters') + .filter('jsonString', jsonStringFilter); + + /** + * @namespace app.framework.filters.jsonStringFilter + * @memberof app.framework.filters + * @name jsonStringFilter + * @description An angular filter which will format the JSON object as a string OR show a supplied invalid message + * @param {object} $filter - Angular $filter service + * @returns {Function} The filter itself + */ + function jsonStringFilter($filter) { + var jsonStringFilter = function (obj, invalidMsg) { + + try { + return angular.toJson(obj); + } catch (e) { + return $filter('translate')(invalidMsg) || ''; + } + }; + + // Ensure the filter is reapplied on change of language + jsonStringFilter.$stateful = true; + + return jsonStringFilter; + } + +})(); diff --git a/components/app-framework/src/widgets/async-task-dialog/async-task-dialog.html b/components/app-framework/src/widgets/async-task-dialog/async-task-dialog.html index d223d0afd1..f55421ed37 100644 --- a/components/app-framework/src/widgets/async-task-dialog/async-task-dialog.html +++ b/components/app-framework/src/widgets/async-task-dialog/async-task-dialog.html @@ -23,24 +23,26 @@

{{asyncTaskDialogCtrl.content.title}}

diff --git a/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js b/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js new file mode 100644 index 0000000000..64d1a35dd9 --- /dev/null +++ b/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js @@ -0,0 +1,31 @@ +(function () { + 'use strict'; + + angular + .module('app.framework.widgets') + .directive('jsonTextInput', jsonTextInput); + + /** + * @name jsonTextInput + * @description A directive that displays JSON. + * @returns {object} The directive definition object + */ + function jsonTextInput() { + return { + restrict: 'A', + require: 'ngModel', + scope: { + ngModel: '=' + }, + link: function ($scope, elem, attr, ngModelCtrl) { + ngModelCtrl.$parsers.push(function (viewValue) { + try { + return angular.fromJson(viewValue); + } catch (e) { + return undefined; + } + }); + } + }; + } +})(); diff --git a/components/app-framework/src/widgets/wizard/wizard.html b/components/app-framework/src/widgets/wizard/wizard.html index df013b04eb..80814ed167 100644 --- a/components/app-framework/src/widgets/wizard/wizard.html +++ b/components/app-framework/src/widgets/wizard/wizard.html @@ -69,36 +69,37 @@

{{ wizardCtrl.workflow.title }}

+
+ - - - + - + +
diff --git a/components/app-framework/src/widgets/wizard/wizard.scss b/components/app-framework/src/widgets/wizard/wizard.scss index 4ff52ae3bb..5b8a6f5ef0 100644 --- a/components/app-framework/src/widgets/wizard/wizard.scss +++ b/components/app-framework/src/widgets/wizard/wizard.scss @@ -14,4 +14,26 @@ .wizard-nav-step-number, .wizard-nav-step-number-complete, .wizard-nav-item-sep { display: none; -} \ No newline at end of file +} + + +.wizard-foot { + overflow: hidden; + .wizard-foot-buttons { + + button { + transition: margin-left 0.5s, margin-right 0.5s; + } + + &.wizard-footer-hidden { + + button:first-child { + margin-left: -200px + } + + button:last-child { + margin-right: -200px + } + } + } +} diff --git a/components/app-theme/src/scss/style/components/_async_task_dialog.scss b/components/app-theme/src/scss/style/components/_async_task_dialog.scss index bd3fd3f0ff..cf5dced94d 100644 --- a/components/app-theme/src/scss/style/components/_async_task_dialog.scss +++ b/components/app-theme/src/scss/style/components/_async_task_dialog.scss @@ -1,3 +1,6 @@ +$async-dialog-header-height: $console-unit-space * 3; +$async-dialog-footer-height: $button-height + $console-unit-space * 2 + 1; + .async-dialog { margin-right: $detail-view-margin; margin-left: $detail-view-margin; @@ -20,10 +23,33 @@ .modal-footer { margin-top: $console-unit-space * 2; padding-top: $console-unit-space; + height: $async-dialog-footer-height; + overflow: hidden; + flex: 0 0 $async-dialog-footer-height; } .disable-margin { margin-top: 0; } + + .modal-footer { + .async-footer-buttons { + + button { + transition: margin-left 0.5s, margin-right 0.5s; + } + + &.async-footer-hidden { + + button:first-child { + margin-left: -200px + } + + button:last-child { + margin-right: -200px + } + } + } + } } diff --git a/components/cloud-foundry/frontend/i18n/en_US/app.json b/components/cloud-foundry/frontend/i18n/en_US/app.json index e333122629..abf91a2711 100644 --- a/components/cloud-foundry/frontend/i18n/en_US/app.json +++ b/components/cloud-foundry/frontend/i18n/en_US/app.json @@ -226,6 +226,12 @@ "name-error-pattern": "Name contains invalid pattern", "plan-label": "Plan", "plan-placeholder": "Select a Plan", + "params-label": "Parameters", + "service-params": "Service Parameters", + "params-placeholder": "Enter Service Parameter JSON", + "tags-label": "Tags", + "edit-params": "Edit", + "done": "Done", "button": { "yes": "Create", "no": "@:buttons.cancel" diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js index 497fb19bad..b70278c75d 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js @@ -257,6 +257,10 @@ app_guid: vm.data.app.summary.guid }; + if (vm.options.userInput.params) { + bindingSpec.parameters = vm.options.userInput.params; + } + return bindingModel.createServiceBinding(vm.data.cnsiGuid, bindingSpec) .then(function (newBinding) { if (angular.isDefined(newBinding.metadata)) { diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.scss b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.scss index 163f4dd7a9..fd61524848 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.scss +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.scss @@ -36,7 +36,7 @@ .select-instance-tabs { - min-height: 264px; + min-height: 300px; .nav.nav-tabs { .uib-tab > a { @@ -62,7 +62,7 @@ .no-bindable-instances > td { text-align: center; p { - margin: $console-unit-space / 2; + margin: $console-half-space; } } diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html index fc1e6d907a..144319bd53 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html @@ -53,6 +53,27 @@ + +
+ + app.app-info.app-tabs.services.create.edit-params +
{{ wizardCtrl.options.userInput.params | jsonString }}
+
+ + + +
+
+

app.app-info.app-tabs.services.create.service-params

+ + +
+
\ No newline at end of file diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html index f9bfdb155a..31773dd00e 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html @@ -26,11 +26,30 @@
- +
+
+ + app.app-info.app-tabs.services.create.edit-params +
{{ asyncTaskDialogCtrl.context.options.userInput.params | jsonString }}
+
+ + +
+
+

app.app-info.app-tabs.services.create.service-params

+ + +
+
\ No newline at end of file diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.scss b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.scss index c9d794cc24..1fbb39a0a1 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.scss +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.scss @@ -9,14 +9,84 @@ flex: 1; width: 100%; - >ng-include { + > ng-include { flex: 1 1 0; } } + } + } +} - .form-actions.modal-footer { - flex: 0; - } +.async-dialog-param-editor { + display: none; + top: $async-dialog-header-height; + bottom: $async-dialog-footer-height; + left: $console-unit-space; + right: $console-unit-space; + + &.param-editor-open { + position: absolute; + display: block; + } + + .param-editor-container { + display: flex; + width: 100%; + height: 100%; + } +} + +.async-dialog-param-editor { + .param-editor-container { + flex-direction: column; + background-color: $white; + + p { + flex: 0 0 $console-unit-space; + margin: 0px; } - } + + textarea { + flex: 1 1 0; + resize: none; + } + + .param-editor-buttons { + flex: 0 0 auto; + align-self: center; + margin: $console-half-space 0; + } + } +} + +form .form-group { + + &.tags-input-field { + width: 100%; + } + + &.form-json-editor-input { + padding-right: $console-unit-space * 3; + width: 100%; + + a.input-box-edit { + position: absolute; + right: 0; + border: 1px solid $input-border; + padding: 2px 6px; + margin-right: $console-half-space; + bottom: $padding-base-vertical; + } + + input.json-edit-box { + pointer-events: none; + } + + div.json-edit-box { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + } } \ No newline at end of file diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js index d62db16437..84ab5da518 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js @@ -31,9 +31,16 @@ name: userInput.name, service_plan_guid: userInput.plan.metadata.guid, space_guid: spaceGuid, - tags: _.map(userInput.tags, function (tag) { return tag.text; }) + tags: _.map(userInput.tags, function (tag) { return tag.text; }), + parameters: userInput.params || {} }; + if (userInput.params) { + newInstance.parameters = userInput.params; + } + + newServiceInstance.name = undefined; + return instanceModel.createServiceInstance(cnsiGuid, newInstance) .then(function (newServiceInstance) { if (angular.isDefined(newServiceInstance.metadata)) { diff --git a/components/cloud-foundry/frontend/test/unit/view/applications/workflows/add-service-workflow.directive.spec.js b/components/cloud-foundry/frontend/test/unit/view/applications/workflows/add-service-workflow.directive.spec.js index 8d26cb03ab..4664aa2e60 100644 --- a/components/cloud-foundry/frontend/test/unit/view/applications/workflows/add-service-workflow.directive.spec.js +++ b/components/cloud-foundry/frontend/test/unit/view/applications/workflows/add-service-workflow.directive.spec.js @@ -201,8 +201,6 @@ dialog.options.userInput = addServiceWorkflowCtrl.userInput; dialog.submit().then(function () { fail('should not succeed'); - }).catch(function () { - console.log('OK'); }); $httpBackend.flush(); From 3a4a2d9ac40e5dfa2be1541b33406ee1fc521efd Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Tue, 19 Sep 2017 16:55:00 +0100 Subject: [PATCH 2/7] Bug fix --- .../create-service-instance/create-servince-instance.service.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js index 1326fb40bb..9ad7772094 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js @@ -39,8 +39,6 @@ newInstance.parameters = userInput.params; } - newServiceInstance.name = undefined; - return instanceModel.createServiceInstance(cnsiGuid, newInstance) .then(function (newServiceInstance) { if (angular.isDefined(newServiceInstance.metadata)) { From 6bd0c493bc7402ffcb296cd7e13cf3809aabdef7 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Wed, 20 Sep 2017 10:05:09 +0100 Subject: [PATCH 3/7] Address PR feedback --- .../utils/auto-focus/focus-when.directive.js | 28 +++++++++++++++++++ .../focusable-input.directive.js | 2 ++ .../json-text-input/json-text-input.scss | 16 +++++++++++ .../app-framework/src/widgets/widgets.scss | 1 + .../frontend/i18n/en_US/app.json | 3 +- .../add-service-workflow/instance.html | 21 ++++++++------ .../create-service-instance.html | 19 ++++++++----- 7 files changed, 74 insertions(+), 16 deletions(-) create mode 100644 components/app-framework/src/utils/auto-focus/focus-when.directive.js create mode 100644 components/app-framework/src/widgets/json-text-input/json-text-input.scss diff --git a/components/app-framework/src/utils/auto-focus/focus-when.directive.js b/components/app-framework/src/utils/auto-focus/focus-when.directive.js new file mode 100644 index 0000000000..27a42ce898 --- /dev/null +++ b/components/app-framework/src/utils/auto-focus/focus-when.directive.js @@ -0,0 +1,28 @@ +(function () { + 'use strict'; + + angular + .module('app.framework.utils') + .directive('focusWhen', focusWhen); + + /** + * A simple attribute directive to set focus on an element when a value is set + * @param {Object} $timeout - the Angular $timeout service + * @returns {Object} the focus-when directive + * */ + function focusWhen($timeout) { + return { + restrict: 'A', + link: function (scope, element, attrs) { + scope.$watch(attrs.focusWhen, function (nv) { + if (nv) { + $timeout(function () { + element[0].focus(); + }, 0); + } + }); + } + }; + } + +})(); diff --git a/components/app-framework/src/utils/focusable-input/focusable-input.directive.js b/components/app-framework/src/utils/focusable-input/focusable-input.directive.js index dca2a9a24a..c85ed94068 100644 --- a/components/app-framework/src/utils/focusable-input/focusable-input.directive.js +++ b/components/app-framework/src/utils/focusable-input/focusable-input.directive.js @@ -28,9 +28,11 @@ element.find('input').on('focus', handleOnFocus); element.find('select-input').on('focus', handleOnFocus); element.find('tags-input').on('focus', handleOnFocus); + element.find('textarea').on('focus', handleOnFocus); element.find('input').on('blur', handleOnBlur); element.find('select-input').on('blur', handleOnBlur); element.find('tags-input').on('blur', handleOnBlur); + element.find('textarea').on('blur', handleOnBlur); function handleOnFocus() { element.addClass(focusedClass); diff --git a/components/app-framework/src/widgets/json-text-input/json-text-input.scss b/components/app-framework/src/widgets/json-text-input/json-text-input.scss new file mode 100644 index 0000000000..2a4cb917bb --- /dev/null +++ b/components/app-framework/src/widgets/json-text-input/json-text-input.scss @@ -0,0 +1,16 @@ +.json-input-field { + flex: 1 1 0; + display: flex; + flex-direction: column; + + &.form-group { + width: 100%; + } + + textarea { + outline: 0; + border: 0; + font-family: monospace; + font-size: $font-size-monospace; + } +} \ No newline at end of file diff --git a/components/app-framework/src/widgets/widgets.scss b/components/app-framework/src/widgets/widgets.scss index ace17485dd..b5a8dfad26 100644 --- a/components/app-framework/src/widgets/widgets.scss +++ b/components/app-framework/src/widgets/widgets.scss @@ -11,6 +11,7 @@ @import "flyout/flyout"; @import "gallery-card/gallery-card"; @import "global-spinner/global-spinner"; +@import "json-text-input/json-text-input"; @import "json-tree-view/json-tree-view"; @import "log-viewer/logs-viewer"; @import "paginator/paginator"; diff --git a/components/cloud-foundry/frontend/i18n/en_US/app.json b/components/cloud-foundry/frontend/i18n/en_US/app.json index 95d44ae3b9..630250190f 100644 --- a/components/cloud-foundry/frontend/i18n/en_US/app.json +++ b/components/cloud-foundry/frontend/i18n/en_US/app.json @@ -253,7 +253,8 @@ "button": { "yes": "Create", "no": "@:buttons.cancel" - } + }, + "json-error-invalid": "Must be valid JSON" }, "view-envs": { "title": "{{instanceName}}: Variables" diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html index e05279da1e..daf1445ede 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html @@ -69,12 +69,17 @@ -
-
-

app.app-info.app-tabs.services.create.service-params

- - -
+
+
+
+ + + app.app-info.app-tabs.services.create.json-error-invalid + + +
+ +
\ No newline at end of file diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html index f3e937abd6..9aa856caff 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html @@ -45,11 +45,16 @@
-
-

app.app-info.app-tabs.services.create.service-params

- - -
+
+
+ + + app.app-info.app-tabs.services.create.json-error-invalid + + +
+ +
\ No newline at end of file From 2c6ea0e3de7ddf8bd1d3801a125a5c30bee34bb1 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Wed, 20 Sep 2017 11:46:52 +0100 Subject: [PATCH 4/7] Fix for failing unit test --- .../add-service-workflow/add-service-workflow.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js index 9e2857fb16..c605eb62c2 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js @@ -257,7 +257,7 @@ app_guid: vm.data.app.summary.guid }; - if (vm.options.userInput.params) { + if (vm.options.userInput && vm.options.userInput.params) { bindingSpec.parameters = vm.options.userInput.params; } From 7752e4bf8c70e4b5faeb76516d5ff6127b1b9223 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Wed, 20 Sep 2017 13:43:22 +0100 Subject: [PATCH 5/7] e2e test fix --- .../create-service-instance/create-service-instance.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html index 9aa856caff..17ce1b0bb3 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.html @@ -44,7 +44,7 @@ -
+
From 63e002a3148855ad64c4a3fc96debbe8ca76f414 Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Wed, 20 Sep 2017 16:18:45 +0100 Subject: [PATCH 6/7] Address PR feedback --- components/cloud-foundry/frontend/i18n/en_US/app.json | 6 ++++-- .../workflows/add-service-workflow/instance.html | 4 ++-- ...stance.service.js => create-service-instance.service.js} | 0 3 files changed, 6 insertions(+), 4 deletions(-) rename components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/{create-servince-instance.service.js => create-service-instance.service.js} (100%) diff --git a/components/cloud-foundry/frontend/i18n/en_US/app.json b/components/cloud-foundry/frontend/i18n/en_US/app.json index 630250190f..8ea453b148 100644 --- a/components/cloud-foundry/frontend/i18n/en_US/app.json +++ b/components/cloud-foundry/frontend/i18n/en_US/app.json @@ -244,8 +244,10 @@ "name-error-pattern": "Name contains invalid pattern", "plan-label": "Plan", "plan-placeholder": "Select a Plan", - "params-label": "Parameters", - "service-params": "Service Parameters", + "params-label": "Instance Parameters", + "binding-params-label": "Binding Parameters", + "service-params": "Service Instance Parameters", + "binding-params": "Service Binding Parameters", "params-placeholder": "Enter Service Parameter JSON", "tags-label": "Tags", "edit-params": "Edit", diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html index daf1445ede..532ed539a9 100644 --- a/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html +++ b/components/cloud-foundry/frontend/src/view/applications/workflows/add-service-workflow/instance.html @@ -58,7 +58,7 @@
app.app-info.app-tabs.services.create.edit-params
{{ wizardCtrl.options.userInput.params | jsonString }}
@@ -72,7 +72,7 @@
- + app.app-info.app-tabs.services.create.json-error-invalid diff --git a/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js b/components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.service.js similarity index 100% rename from components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-servince-instance.service.js rename to components/cloud-foundry/frontend/src/view/applications/workflows/create-service-instance/create-service-instance.service.js From 88dc715986dd9cc258bfce6971f51c776273febe Mon Sep 17 00:00:00 2001 From: Neil MacDougall Date: Thu, 21 Sep 2017 11:45:16 +0100 Subject: [PATCH 7/7] Fix bug when re-editing a parameter --- .../src/widgets/json-text-input/json-text-input.directive.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js b/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js index 64d1a35dd9..f1edfbbbd8 100644 --- a/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js +++ b/components/app-framework/src/widgets/json-text-input/json-text-input.directive.js @@ -25,6 +25,9 @@ return undefined; } }); + ngModelCtrl.$formatters.push(function (value) { + return angular.toJson(value, 2); + }); } }; }