Skip to content

Commit

Permalink
Upgrade versions of catalog (0.0.27) and common (0.0.39)
Browse files Browse the repository at this point in the history
Added project display name to common bind service form component.
  • Loading branch information
jeff-phillips-18 committed Jun 28, 2017
1 parent 2fb6223 commit f07da83
Show file tree
Hide file tree
Showing 9 changed files with 73 additions and 56 deletions.
11 changes: 9 additions & 2 deletions app/scripts/directives/bindService.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
controllerAs: 'ctrl',
bindings: {
target: '<',
project: '<',
onClose: '<'
},
templateUrl: 'views/directives/bind-service.html'
Expand Down Expand Up @@ -145,12 +146,12 @@

ctrl.$onInit = function() {
ctrl.serviceSelection = {};
var formStepLabel = (ctrl.target.kind === 'Instance') ? 'Applications' : 'Services';
ctrl.projectDisplayName = $filter('displayName')(ctrl.project);

ctrl.steps = [
{
id: 'bindForm',
label: formStepLabel,
label: "Binding",
view: 'views/directives/bind-service/bind-service-form.html',
valid: true,
onShow: showBind
Expand Down Expand Up @@ -190,6 +191,12 @@
}
};

ctrl.$onChanges = function(onChangesObj) {
if (onChangesObj.project && !onChangesObj.project.isFirstChange()) {
ctrl.projectDisplayName = $filter('displayName')(ctrl.project);
}
};

ctrl.$onDestroy = function() {
if (validityWatcher) {
validityWatcher();
Expand Down
1 change: 1 addition & 0 deletions app/views/directives/bind-service/bind-service-form.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
service-class-name="ctrl.serviceClassName"
form-name="ctrl.selectionForm"
applications="ctrl.applications"
project-name="ctrl.projectDisplayName"
bind-type="ctrl.bindType"
app-to-bind="ctrl.appToBind">
</bind-service-form>
Expand Down
1 change: 1 addition & 0 deletions app/views/overview/_list-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<overlay-panel single-column="true" show-panel="row.overlay.panelVisible" show-close="true" handle-close="row.closeOverlayPanel">
<div ng-if="row.overlay.panelName === 'bindService'">
<bind-service target="row.overlay.state.target"
project="row.state.project"
on-close="row.closeOverlayPanel"></bind-service>
</div>
<div ng-if="row.overlay.panelName === 'unbindService'">
Expand Down
1 change: 1 addition & 0 deletions app/views/overview/_service-instance-row.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ <h3>
<overlay-panel single-column="true" show-panel="row.overlay.panelVisible" show-close="true" handle-close="row.closeOverlayPanel">
<div ng-if="row.overlay.panelName === 'bindService'">
<bind-service target="row.overlay.state.target"
project="row.state.project"
on-close="row.closeOverlayPanel"></bind-service>
</div>
<div ng-if="row.overlay.panelName === 'unbindService'">
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
"angular-moment": "1.0.0",
"angular-utf8-base64": "0.0.5",
"file-saver": "1.3.3",
"origin-web-common": "0.0.38",
"origin-web-catalog": "0.0.26"
"origin-web-common": "0.0.39",
"origin-web-catalog": "0.0.27"
},
"devDependencies": {
"angular-mocks": "1.5.11",
Expand Down
9 changes: 5 additions & 4 deletions dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -12319,11 +12319,9 @@ l.serviceInstances = a.by("metadata.name"), l.serviceToBind || n(), o();
});
};
l.$onInit = function() {
l.serviceSelection = {};
var a = "Instance" === l.target.kind ? "Applications" :"Services";
l.steps = [ {
l.serviceSelection = {}, l.projectDisplayName = b("displayName")(l.project), l.steps = [ {
id:"bindForm",
label:a,
label:"Binding",
view:"views/directives/bind-service/bind-service-form.html",
valid:!0,
onShow:q
Expand All @@ -12339,6 +12337,8 @@ resource:"serviceclasses"
}, {}).then(function(a) {
l.serviceClasses = a.by("metadata.name"), "Instance" === l.target.kind && (l.serviceClass = l.serviceClasses[l.target.spec.serviceClassName], l.serviceClassName = l.target.spec.serviceClassName), o();
}), "Instance" === l.target.kind ? (l.bindType = "secret-only", l.appToBind = null, l.serviceToBind = l.target.metadata.name, s()) :(l.bindType = "application", l.appToBind = l.target, t());
}, l.$onChanges = function(a) {
a.project && !a.project.isFirstChange() && (l.projectDisplayName = b("displayName")(l.project));
}, l.$onDestroy = function() {
e && (e(), e = void 0), f && c.unwatch(f);
}, l.bindService = function() {
Expand All @@ -12361,6 +12361,7 @@ controller:[ "$scope", "$filter", "DataService", "BindingService", a ],
controllerAs:"ctrl",
bindings:{
target:"<",
project:"<",
onClose:"<"
},
templateUrl:"views/directives/bind-service.html"
Expand Down
6 changes: 3 additions & 3 deletions dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -5812,7 +5812,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</bind-application-form>\n" +
"</div>\n" +
"<div ng-if=\"ctrl.target.kind === 'Instance'\">\n" +
"<bind-service-form selected-project=\"ctrl.project\" service-class=\"ctrl.serviceClass\" service-class-name=\"ctrl.serviceClassName\" form-name=\"ctrl.selectionForm\" applications=\"ctrl.applications\" bind-type=\"ctrl.bindType\" app-to-bind=\"ctrl.appToBind\">\n" +
"<bind-service-form selected-project=\"ctrl.project\" service-class=\"ctrl.serviceClass\" service-class-name=\"ctrl.serviceClassName\" form-name=\"ctrl.selectionForm\" applications=\"ctrl.applications\" project-name=\"ctrl.projectDisplayName\" bind-type=\"ctrl.bindType\" app-to-bind=\"ctrl.appToBind\">\n" +
"</bind-service-form>\n" +
"</div>"
);
Expand Down Expand Up @@ -12021,7 +12021,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<overlay-panel single-column=\"true\" show-panel=\"row.overlay.panelVisible\" show-close=\"true\" handle-close=\"row.closeOverlayPanel\">\n" +
"<div ng-if=\"row.overlay.panelName === 'bindService'\">\n" +
"<bind-service target=\"row.overlay.state.target\" on-close=\"row.closeOverlayPanel\"></bind-service>\n" +
"<bind-service target=\"row.overlay.state.target\" project=\"row.state.project\" on-close=\"row.closeOverlayPanel\"></bind-service>\n" +
"</div>\n" +
"<div ng-if=\"row.overlay.panelName === 'unbindService'\">\n" +
"<unbind-service target=\"row.overlay.state.target\" bindings=\"row.state.deleteableBindingsByApplicationUID[row.overlay.state.target.metadata.uid]\" on-close=\"row.closeOverlayPanel\"></unbind-service>\n" +
Expand Down Expand Up @@ -12355,7 +12355,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(
"</div>\n" +
"<overlay-panel single-column=\"true\" show-panel=\"row.overlay.panelVisible\" show-close=\"true\" handle-close=\"row.closeOverlayPanel\">\n" +
"<div ng-if=\"row.overlay.panelName === 'bindService'\">\n" +
"<bind-service target=\"row.overlay.state.target\" on-close=\"row.closeOverlayPanel\"></bind-service>\n" +
"<bind-service target=\"row.overlay.state.target\" project=\"row.state.project\" on-close=\"row.closeOverlayPanel\"></bind-service>\n" +
"</div>\n" +
"<div ng-if=\"row.overlay.panelName === 'unbindService'\">\n" +
"<unbind-service target=\"row.overlay.state.target\" bindings=\"row.deleteableBindings\" applications-by-binding=\"row.state.applicationsByBinding\" on-close=\"row.closeOverlayPanel\"></unbind-service>\n" +
Expand Down
Loading

0 comments on commit f07da83

Please sign in to comment.