diff --git a/src/plugins/cloud-foundry/view/applications/application/application.module.js b/src/plugins/cloud-foundry/view/applications/application/application.module.js index 4e0e18624a..77fae1801b 100644 --- a/src/plugins/cloud-foundry/view/applications/application/application.module.js +++ b/src/plugins/cloud-foundry/view/applications/application/application.module.js @@ -73,7 +73,7 @@ this.id = $stateParams.guid; this.ready = false; this.warningMsg = gettext('The application needs to be restarted for highlighted variables to be added to the runtime.'); - this.UPDATE_INTERVAL = 1000; // milliseconds + this.UPDATE_INTERVAL = 5000; // milliseconds this.init(); diff --git a/src/plugins/cloud-foundry/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js b/src/plugins/cloud-foundry/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js index 579262ad6c..71426d922f 100644 --- a/src/plugins/cloud-foundry/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js +++ b/src/plugins/cloud-foundry/view/applications/workflows/add-service-workflow/add-service-workflow.directive.js @@ -24,9 +24,11 @@ AddServiceWorkflowController.$inject = [ '$q', '$scope', + '$interpolate', 'app.model.modelManager', 'app.event.eventService', - 'helion.framework.widgets.detailView' + 'helion.framework.widgets.detailView', + 'helion.framework.widgets.toaster' ]; /** @@ -35,11 +37,15 @@ * @constructor * @param {object} $q - the Angular $q service * @param {object} $scope - the Angular $scope service + * @param {object} $interpolate - the Angular $interpolate service * @param {app.model.modelManager} modelManager - the application model manager * @param {app.event.eventService} eventService - the event management service * @param {helion.framework.widgets.detailView} detailView - the detail view widget + * @param {helion.framework.widgets.toaster} toaster - the toast notification service * @property {object} $q - the Angular $q service + * @property {object} $interpolate - the Angular $interpolate service * @property {helion.framework.widgets.detailView} detailView - the detail view widget + * @property {helion.framework.widgets.toaster} toaster - the toast notification service * @property {cloud-foundry.model.application} appModel - the CF application model * @property {cloud-foundry.model.service-binding} bindingModel - the CF service binding model * @property {cloud-foundry.model.service-instance} instanceModel - the CF service instance model @@ -49,10 +55,12 @@ * @property {string} path - the path to this add-service-workflow folder * @property {object} addServiceActions - the stop and finish workflow actions */ - function AddServiceWorkflowController($q, $scope, modelManager, eventService, detailView) { + function AddServiceWorkflowController($q, $scope, $interpolate, modelManager, eventService, detailView, toaster) { var that = this; this.$q = $q; + this.$interpolate = $interpolate; this.detailView = detailView; + this.toaster = toaster; this.appModel = modelManager.retrieve('cloud-foundry.model.application'); this.bindingModel = modelManager.retrieve('cloud-foundry.model.service-binding'); this.instanceModel = modelManager.retrieve('cloud-foundry.model.service-instance'); @@ -324,6 +332,13 @@ if (!this.data.confirm) { this.addService().then(function () { that.addBinding().then(function () { + // show notification for successful binding + var successMsg = gettext('The {{service}} service has been attached to your {{appName}} application'); + var context = { + service: that.options.serviceInstance.entity.name, + appName: that.data.app.summary.name + }; + that.toaster.success(that.$interpolate(successMsg)(context), {positionClass: 'toast-top-right'}); that.modal.close(); }); }); diff --git a/tools/gulp.config.js b/tools/gulp.config.js index c7107aaee9..6e18c19076 100644 --- a/tools/gulp.config.js +++ b/tools/gulp.config.js @@ -20,7 +20,9 @@ module.exports = function () { "main": [ "release/angular-link-header-parser.min.js" ] }, "angular-toastr": { - "main": [ "./dist/angular-toastr.tpls.js" ] + "main": [ + "./dist/angular-toastr.tpls.js" + ] } } },