Commit 0133f657 by Sam Padgett Committed by GitHub

Merge pull request #90 from jeff-phillips-18/bind

Update bind pages for different bind types
parents 47bb9504 43da3c78
......@@ -98,8 +98,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <span class=\"sr-only\">Success</span>\n" +
" <h3 class=\"bind-message\">\n" +
" <strong>{{ctrl.serviceToBind}}</strong>\n" +
" <span>&nbsp;has been bound</span>\n" +
" <span ng-if=\"ctrl.applicationToBind\">&nbsp;to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" <span>has been bound</span>\n" +
" <span ng-if=\"ctrl.bindType === 'application'\"> to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" </h3>\n" +
" </div>\n" +
" <div class=\"sub-title\">\n" +
......@@ -152,13 +152,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <fieldset>\n" +
" <div class=\"radio\">\n" +
" <label class=\"bind-choice\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"true\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"application\" ng-disabled=\"!ctrl.applications.length\">\n" +
" Bind to an application\n" +
" </label>\n" +
" <div class=\"application-select\">\n" +
" <ui-select ng-model=\"ctrl.appToBind\"\n" +
" ng-disabled=\"ctrl.shouldBindToApp !== 'true'\"\n" +
" ng-required=\"ctrl.shouldBindToApp === 'true'\">\n" +
" ng-disabled=\"ctrl.bindType !== 'application'\"\n" +
" ng-required=\"ctrl.bindType === 'application'\">\n" +
" <ui-select-match placeholder=\"{{ctrl.applications.length ? 'Select an application' : 'There are no applications in this project'}}\">\n" +
" <span>\n" +
" {{$select.selected.metadata.name}}\n" +
......@@ -173,14 +173,14 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" </ui-select>\n" +
" </div>\n" +
" <label class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"false\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"secret-only\">\n" +
" Create a secret in my project\n" +
" </label>\n" +
" <div class=\"help-block bind-description\">\n" +
" You can reference this secret later from any application either as environment variables or configuration files mounted as volumes.\n" +
" </div>\n" +
" <label ng-if=\"ctrl.allowNoBinding\" class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"none\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"none\">\n" +
" Do not bind at this time\n" +
" </label>\n" +
" <div ng-if=\"ctrl.allowNoBinding\" class=\"help-block bind-description\">\n" +
......@@ -482,6 +482,7 @@ angular.module('openshiftCommonUI').component('bindResults', {
binding: '<',
progressInline: '@',
serviceToBind: '<',
bindType: '@',
applicationToBind: '<',
showPodPresets: '<',
secretHref: '<'
......@@ -509,17 +510,20 @@ angular.module('openshiftCommonUI').component('bindServiceForm', {
bindings: {
serviceClass: '<',
serviceClassName: '<',
formName: '=',
applications: '<',
appToBind: '=',
createBinding: '=?',
formName: '=',
allowNoBinding: '<?',
shouldBindToApp: '=',
groupByKind: '<'
bindType: '=', // One of: 'none', 'application', 'secret-only'
appToBind: '=' // only applicable to 'application' bindType
},
templateUrl: 'src/components/binding/bindServiceForm.html',
controller: function () {
controller: function ($filter) {
var ctrl = this;
var humanizeKind = $filter('humanizeKind');
ctrl.groupByKind = function(object) {
return humanizeKind(object.kind);
};
}
});
;"use strict";
......
......@@ -269,8 +269,8 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <span class=\"sr-only\">Success</span>\n" +
" <h3 class=\"bind-message\">\n" +
" <strong>{{ctrl.serviceToBind}}</strong>\n" +
" <span>&nbsp;has been bound</span>\n" +
" <span ng-if=\"ctrl.applicationToBind\">&nbsp;to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" <span>has been bound</span>\n" +
" <span ng-if=\"ctrl.bindType === 'application'\"> to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" </h3>\n" +
" </div>\n" +
" <div class=\"sub-title\">\n" +
......@@ -323,13 +323,13 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" <fieldset>\n" +
" <div class=\"radio\">\n" +
" <label class=\"bind-choice\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"true\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"application\" ng-disabled=\"!ctrl.applications.length\">\n" +
" Bind to an application\n" +
" </label>\n" +
" <div class=\"application-select\">\n" +
" <ui-select ng-model=\"ctrl.appToBind\"\n" +
" ng-disabled=\"ctrl.shouldBindToApp !== 'true'\"\n" +
" ng-required=\"ctrl.shouldBindToApp === 'true'\">\n" +
" ng-disabled=\"ctrl.bindType !== 'application'\"\n" +
" ng-required=\"ctrl.bindType === 'application'\">\n" +
" <ui-select-match placeholder=\"{{ctrl.applications.length ? 'Select an application' : 'There are no applications in this project'}}\">\n" +
" <span>\n" +
" {{$select.selected.metadata.name}}\n" +
......@@ -344,14 +344,14 @@ hawtioPluginLoader.addModule('openshiftCommonUI');
" </ui-select>\n" +
" </div>\n" +
" <label class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"false\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"secret-only\">\n" +
" Create a secret in my project\n" +
" </label>\n" +
" <div class=\"help-block bind-description\">\n" +
" You can reference this secret later from any application either as environment variables or configuration files mounted as volumes.\n" +
" </div>\n" +
" <label ng-if=\"ctrl.allowNoBinding\" class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"none\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"none\">\n" +
" Do not bind at this time\n" +
" </label>\n" +
" <div ng-if=\"ctrl.allowNoBinding\" class=\"help-block bind-description\">\n" +
......@@ -653,6 +653,7 @@ angular.module('openshiftCommonUI').component('bindResults', {
binding: '<',
progressInline: '@',
serviceToBind: '<',
bindType: '@',
applicationToBind: '<',
showPodPresets: '<',
secretHref: '<'
......@@ -680,18 +681,21 @@ angular.module('openshiftCommonUI').component('bindServiceForm', {
bindings: {
serviceClass: '<',
serviceClassName: '<',
formName: '=',
applications: '<',
appToBind: '=',
createBinding: '=?',
formName: '=',
allowNoBinding: '<?',
shouldBindToApp: '=',
groupByKind: '<'
bindType: '=', // One of: 'none', 'application', 'secret-only'
appToBind: '=' // only applicable to 'application' bindType
},
templateUrl: 'src/components/binding/bindServiceForm.html',
controller: function () {
controller: ["$filter", function ($filter) {
var ctrl = this;
}
var humanizeKind = $filter('humanizeKind');
ctrl.groupByKind = function(object) {
return humanizeKind(object.kind);
};
}]
});
;"use strict";
......
......@@ -71,8 +71,8 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" <span class=\"sr-only\">Success</span>\n" +
" <h3 class=\"bind-message\">\n" +
" <strong>{{ctrl.serviceToBind}}</strong>\n" +
" <span>&nbsp;has been bound</span>\n" +
" <span ng-if=\"ctrl.applicationToBind\">&nbsp;to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" <span>has been bound</span>\n" +
" <span ng-if=\"ctrl.bindType === 'application'\"> to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>\n" +
" </h3>\n" +
" </div>\n" +
" <div class=\"sub-title\">\n" +
......@@ -125,13 +125,13 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" <fieldset>\n" +
" <div class=\"radio\">\n" +
" <label class=\"bind-choice\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"true\" ng-disabled=\"!ctrl.applications.length\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"application\" ng-disabled=\"!ctrl.applications.length\">\n" +
" Bind to an application\n" +
" </label>\n" +
" <div class=\"application-select\">\n" +
" <ui-select ng-model=\"ctrl.appToBind\"\n" +
" ng-disabled=\"ctrl.shouldBindToApp !== 'true'\"\n" +
" ng-required=\"ctrl.shouldBindToApp === 'true'\">\n" +
" ng-disabled=\"ctrl.bindType !== 'application'\"\n" +
" ng-required=\"ctrl.bindType === 'application'\">\n" +
" <ui-select-match placeholder=\"{{ctrl.applications.length ? 'Select an application' : 'There are no applications in this project'}}\">\n" +
" <span>\n" +
" {{$select.selected.metadata.name}}\n" +
......@@ -146,14 +146,14 @@ angular.module('openshiftCommonUI').run(['$templateCache', function($templateCac
" </ui-select>\n" +
" </div>\n" +
" <label class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"false\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"secret-only\">\n" +
" Create a secret in my project\n" +
" </label>\n" +
" <div class=\"help-block bind-description\">\n" +
" You can reference this secret later from any application either as environment variables or configuration files mounted as volumes.\n" +
" </div>\n" +
" <label ng-if=\"ctrl.allowNoBinding\" class=\"bind-choice\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.shouldBindToApp\" value=\"none\">\n" +
" <input type=\"radio\" ng-model=\"ctrl.bindType\" value=\"none\">\n" +
" Do not bind at this time\n" +
" </label>\n" +
" <div ng-if=\"ctrl.allowNoBinding\" class=\"help-block bind-description\">\n" +
......
......@@ -12,8 +12,8 @@
<span class="sr-only">Success</span>
<h3 class="bind-message">
<strong>{{ctrl.serviceToBind}}</strong>
<span>&nbsp;has been bound</span>
<span ng-if="ctrl.applicationToBind">&nbsp;to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>
<span>has been bound</span>
<span ng-if="ctrl.bindType === 'application'"> to <strong>{{ctrl.applicationToBind}}</strong> successfully</span>
</h3>
</div>
<div class="sub-title">
......
......@@ -7,6 +7,7 @@ angular.module('openshiftCommonUI').component('bindResults', {
binding: '<',
progressInline: '@',
serviceToBind: '<',
bindType: '@',
applicationToBind: '<',
showPodPresets: '<',
secretHref: '<'
......
......@@ -12,13 +12,13 @@
<fieldset>
<div class="radio">
<label class="bind-choice" ng-disabled="!ctrl.applications.length">
<input type="radio" ng-model="ctrl.shouldBindToApp" value="true" ng-disabled="!ctrl.applications.length">
<input type="radio" ng-model="ctrl.bindType" value="application" ng-disabled="!ctrl.applications.length">
Bind to an application
</label>
<div class="application-select">
<ui-select ng-model="ctrl.appToBind"
ng-disabled="ctrl.shouldBindToApp !== 'true'"
ng-required="ctrl.shouldBindToApp === 'true'">
ng-disabled="ctrl.bindType !== 'application'"
ng-required="ctrl.bindType === 'application'">
<ui-select-match placeholder="{{ctrl.applications.length ? 'Select an application' : 'There are no applications in this project'}}">
<span>
{{$select.selected.metadata.name}}
......@@ -33,14 +33,14 @@
</ui-select>
</div>
<label class="bind-choice">
<input type="radio" ng-model="ctrl.shouldBindToApp" value="false">
<input type="radio" ng-model="ctrl.bindType" value="secret-only">
Create a secret in my project
</label>
<div class="help-block bind-description">
You can reference this secret later from any application either as environment variables or configuration files mounted as volumes.
</div>
<label ng-if="ctrl.allowNoBinding" class="bind-choice">
<input type="radio" ng-model="ctrl.shouldBindToApp" value="none">
<input type="radio" ng-model="ctrl.bindType" value="none">
Do not bind at this time
</label>
<div ng-if="ctrl.allowNoBinding" class="help-block bind-description">
......
......@@ -5,16 +5,19 @@ angular.module('openshiftCommonUI').component('bindServiceForm', {
bindings: {
serviceClass: '<',
serviceClassName: '<',
formName: '=',
applications: '<',
appToBind: '=',
createBinding: '=?',
formName: '=',
allowNoBinding: '<?',
shouldBindToApp: '=',
groupByKind: '<'
bindType: '=', // One of: 'none', 'application', 'secret-only'
appToBind: '=' // only applicable to 'application' bindType
},
templateUrl: 'src/components/binding/bindServiceForm.html',
controller: function () {
controller: function ($filter) {
var ctrl = this;
var humanizeKind = $filter('humanizeKind');
ctrl.groupByKind = function(object) {
return humanizeKind(object.kind);
};
}
});
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