diff options
author | talasila <talasila@research.att.com> | 2017-02-08 10:13:29 -0500 |
---|---|---|
committer | talasila <talasila@research.att.com> | 2017-02-08 10:15:00 -0500 |
commit | f8a8d5192b1e5013d9e2f699be54b072ef39d5f0 (patch) | |
tree | b7a65bb0a7d70a9dc24c064113868e5f3b8e6a09 /dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess | |
parent | 72a80fbff7120630576ccd5aa67c20818c2943c7 (diff) |
Initial OpenECOMP UI/DMaapBC commit
Change-Id: Ia492e1b88311b9bed4c31f593b28deaaad73b7e4
Signed-off-by: talasila <talasila@research.att.com>
Diffstat (limited to 'dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess')
6 files changed, 686 insertions, 0 deletions
diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-list-controller.js b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-list-controller.js new file mode 100644 index 0000000..0c60aee --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-list-controller.js @@ -0,0 +1,194 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Web Application + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +app.controller('dmaapAccessListCtrl', function ($scope, $log, $modal, modalService, DmaapAccessService) { + 'use strict'; + + // this object holds all app data and functions + $scope.dbcapp = {}; + // Model for radio-button selection group. + // Uses database row ID as unique value. + $scope.dbcapp.selectDmaapModel = { id: null }; + $("#dialog").hide(); + $scope.dbcapp.isDataLoading=true; + + /** + * Loads the table of DMaaP access profiles. + * + * Interprets the remote controller's response and copies to scope + * variables. The response is either list to be assigned to tableData, + * or an error to be shown. + */ + $scope.dbcapp.loadTable = function() { + $scope.dbcapp.isDataLoading = true; + DmaapAccessService.getDmaapAccessList() + .then(function(jsonObj) { + if (jsonObj.error) { + $scope.dbcapp.isRequestFailed = true; + $scope.dbcapp.errMsg = jsonObj.error; + $scope.dbcapp.tableData = []; + } else { + $scope.dbcapp.isRequestFailed = false; + $scope.dbcapp.errMsg = null; + $scope.dbcapp.tableData = jsonObj.data; + $scope.dbcapp.updateDmaapAccessSelection(); + } + $scope.dbcapp.isDataLoading = false; + }, function(error) { + // Called with a string, not JSON obj. + $log.error("dmaapAccessListCtrl.getDmaapAccessList failed: " + error); + $scope.dbcapp.isRequestFailed = true; + $scope.dbcapp.errMsg = error; + $scope.dbcapp.tableData = []; + $scope.dbcapp.isDataLoading = false; + }); + }; + + /** + * Sets a value in the model for the radio-button selection group. + */ + $scope.dbcapp.updateDmaapAccessSelection = function() { + for (var i in $scope.dbcapp.tableData) { + var da = $scope.dbcapp.tableData[i]; + // Set radio button for the selected profile + // $log.info('dmaapAccessListCtrl: examining ' + JSON.stringify(da)); + if (da.selected) { + // $log.info('dmaapAccessListCtrl: selecting id ' + da.id); + $scope.dbcapp.selectDmaapModel.id = da.id; + } + } + }; + + /** + * Handles a click on radio button to select a profile. + */ + $scope.dbcapp.selectDmaapAccess = function(dmaapAccess) { + if (dmaapAccess == null || dmaapAccess.id == null) + $log.error('selectDmaapAccess invoked with null'); + else + DmaapAccessService.setSelectedDmaapAccess(dmaapAccess.id); + }; + + /** + * Shows a modal pop-up to add a DMaaP access profile. + * Passes data in via an object named "message". + * On successful completion, updates the profile list. + * + * After implementing DE238329, this is never called. + */ + $scope.dbcapp.addDmaapAccessModalPopup = function() { + $scope.dbcapp.editDmaapAccess = null; + var modalInstance = $modal.open({ + templateUrl: 'edit_dmaap_access_popup.html', + controller: 'dmaapAccessPopupCtrl', + resolve: { + message: function () { + var dataForPopup = { + dmaapAccess : $scope.dbcapp.editDmaapAccess, + dmaapAccessList : $scope.dbcapp.tableData + }; + return dataForPopup; + } + } + }); + modalInstance.result.then(function(response) { + if (response == null) { + // $log.debug('addDmaapAccessModelPopup: user closed dialog'); + } + else { + if (response.error != null) + modalService.showFailure('Add Profile Failed', + 'Failed to add access profile:\n' + response.error); + else + // success, get the updated list. + $scope.dbcapp.loadTable(); + } + }); + }; + + /** + * Shows a modal pop-up to edit a DMaaP access profile. + * Passes data in via an object named "message". + * On successful completion, updates the profile list. + */ + $scope.dbcapp.editDmaapAccessModalPopup = function(dmaapAccess) { + // edit a copy, not the model for the table row. + $scope.dbcapp.editDmaapAccess = JSON.parse(JSON.stringify(dmaapAccess)); + var modalInstance = $modal.open({ + templateUrl: 'edit_dmaap_access_popup.html', + controller: 'dmaapAccessPopupCtrl', + resolve: { + message: function () { + var dataForPopup = { + dmaapAccess : $scope.dbcapp.editDmaapAccess, + dmaapAccessList : $scope.dbcapp.tableData + }; + return dataForPopup; + } + } + }); + modalInstance.result.then(function(response) { + if (response == null) { + // $log.debug('addDmaapAccessModelPopup: user closed dialog'); + } + else { + if (response.error != null) + modalService.showFailure('Edit Profile Failed', + 'Failed to edit access profile:\n' + response.error); + else + // success, get the updated list. + $scope.dbcapp.loadTable(); + } + }); + }; + + /** + * Shows a modal pop-up to confirm deletion of a DMaaP access profile. + * On successful completion, updates the profile list. + * + * After implementing DE238329, this is never called. + */ + $scope.dbcapp.deleteDmaapAccess = function(dmaapAccess) { + modalService.popupConfirmWin("Confirm", "Delete the DMaaP access profile: " + + dmaapAccess.name + "\nContinue?", + function() { + // $log.debug('deleteDmaapAccess: deleting id ' + dmaapAccess.id); + DmaapAccessService.deleteDmaapAccess(dmaapAccess.id).then( + function(response) { + if (response.error != null) { + $log.error('deleteDmaapAccess: failed to delete: ' + response.error); + modalService.showFailure('Delete Failed', + 'Failed to delete access profile:\n' + response.error); + } + else { + // success, get the updated list. + $scope.dbcapp.loadTable() + } + }, + function(error) { + $log.error('deleteDmaapAccess failed: ' + error); + modalService.showFailure("Fail", "dmaapAccessListCtrl failed to delete object"); + }); + }) + }; + + // Populate the table on load. + $scope.dbcapp.loadTable(); + +}); diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-popup-controller.js b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-popup-controller.js new file mode 100644 index 0000000..d4d2301 --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-popup-controller.js @@ -0,0 +1,125 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Web Application + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +app.controller('dmaapAccessPopupCtrl', function($scope, $log, $modalInstance, modalService, message, DmaapAccessService) { + 'use strict'; + + // this object holds all app data and functions + $scope.dbcapp = {}; + + // Set the label variable for the template + if (message.dmaapAccess == null) + $scope.dbcapp.label = 'Add Access Profile'; + else + $scope.dbcapp.label = 'Edit Access Profile'; + $scope.dbcapp.editDmaapAccess = message.dmaapAccess; + + /** + * Validates content of user-editable fields. + * Returns null if all is well, + * a descriptive error message otherwise. + */ + $scope.dbcapp.validateProfile = function(dmaapAccess) { + if (dmaapAccess == null) + return "No data found.\nPlease enter some values."; + if (dmaapAccess.name == null || dmaapAccess.name.trim() == '') + return "Name is required.\nPlease enter a value."; + // User cannot edit URL + //if (dmaapAccess.dmaapUrl == null || dmaapAccess.dmaapUrl.trim() == '') + // return "URL is required.\nPlease enter a value."; + //if (dmaapAccess.dmaapUrl.toLowerCase().indexOf('http') != 0) + // return "Unexpected URL prefix.\nPlease enter a URL starting with 'http'."; + for (var x in message.dmaapAccessList) { + // $log.debug('saveDmaapAccess: checking item >' + message.dmaapAccessList[x].name + '<'); + // Ignore the name in the one being edited. + if (message.dmaapAccessList[x].id == dmaapAccess.id) + continue; + if (message.dmaapAccessList[x].name == dmaapAccess.name) + return "Name " + dmaapAccess.name + " exists.\nPlease enter a different name."; + } + return null; + } + + /** + * Tests the URL for validity. Shows a modal dialog to display test result. + * Returns nothing. + */ + $scope.dbcapp.testDmaapAccess = function(dmaapAccess) { + if (dmaapAccess == null || dmaapAccess.dmaapUrl == null || dmaapAccess.dmaapUrl.trim() == '') { + modalService.showFailure("Missing Input", "No URL found.\nPlease enter a URL."); + return; + } + // result should have a data aggregate that's a serialized DMaaP object + DmaapAccessService.testDmaapAccess(dmaapAccess) + .then(function(response) { + if (response.error != null) + modalService.showFailure("Invalid Content", response.error); + else + modalService.showSuccess("Valid URL", "DMaaP name is " + response.data.dmaapName) + }, + function (error) { + modalService.showFailure("Invalid Content", error); + } + ); + } + + /** + * Validates the content; on success, calls service to save it. + */ + $scope.dbcapp.saveDmaapAccess = function(dmaapAccess) { + var validateMsg = $scope.dbcapp.validateProfile(dmaapAccess); + if (validateMsg != null) { + modalService.showFailure("Invalid Content", validateMsg); + return; + } + + // Set the selected flag if this is the only access profile. + if (dmaapAccess.id == null && message.dmaapAccessList.length == 0) + dmaapAccess.selected = true; + + if (dmaapAccess.id == null) { + // No id, so create a new one + DmaapAccessService.addDmaapAccess(dmaapAccess) + .then(function(dmaapAccessList) { + + $modalInstance.close(dmaapAccessList); + }, + function (error) { + $log.error('dmaapAccessPopupCtrl: error while adding: ' + error); + } + ); + } + else { + // Has id, so update an existing one + DmaapAccessService.updateDmaapAccess(dmaapAccess) + .then(function(dmaapAccessList) { + $modalInstance.close(dmaapAccessList); + }, + function (error) { + $log.error('dmaapAccessPopupCtrl: error while updating: ' + error); + } + ); + } + + }; + + $scope.dbcapp.close = function() { + $modalInstance.close(); + }; +}); diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-service.js b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-service.js new file mode 100644 index 0000000..8e92c67 --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap-access-service.js @@ -0,0 +1,160 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Web Application + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +app.factory('DmaapAccessService', function ($http, $q, $log) { + return { + /** + * Gets the list of DMaaP access profiles for the current user (not paginated). + * @return {JSON} Response object from remote side + */ + getDmaapAccessList: function() { + // cache control for IE + var cc = "?cc=" + new Date().getTime().toString(); + return $http({ + method: 'GET', + url: 'dmaap_access' + cc, + cache: false, + responseType: 'json'}) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.getDmaapAccessList: response.data null or not object'); + else + return response.data; + }, function(error) { + $log.error('DmaapAccessService.getDmaapAccessList failed: ' + error.data); + return $q.reject(error.data); + }); + }, + + // Gets and returns the selected DMaaP access profile for the current user. + getSelectedDmaapAccess: function() { + // cache control for IE + var cc = "?cc=" + new Date().getTime().toString(); + return $http({ + method: 'GET', + url: 'select_dmaap_access' + cc, + cache: false, + responseType: 'json'}) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.getSelectedDmaapAccess: response.data null or not object'); + else + return response.data; + }, function(error) { + $log.error('DmaapAccessService.getSelectedDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + // Selects the specified DMaaP access profile for the current user. + // Returns nothing. + setSelectedDmaapAccess: function(dmaapId) { + return $http({ + method: 'PUT', + url: 'select_dmaap_access/' + dmaapId, + responseType: 'json' }) + .then(function(response) { + // successful response is status:200 + // $log.info('setSelectedDmaapAccess complete: ' + JSON.stringify(response)); + }, function(error) { + $log.error('DmaapAccessService.setSelectedDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + // Creates a new DMaaP access profile for the current user. + // Returns the current DMaaP access list. + addDmaapAccess: function(dmaapAccess) { + return $http({ + method: 'POST', + url: 'dmaap_access', + data: dmaapAccess, + responseType: 'json' }) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.addDmaapAccess: response.data null or not object'); + else + return response.data; + }, + function(error) { + $log.error('DmaapAccessService.addDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + // Updates an existing DMaaP access profile for the current user + // Returns the current DMaaP access list. + updateDmaapAccess: function(dmaapAccess) { + return $http({ + method: 'PUT', + url: 'dmaap_access/' + dmaapAccess.id, + data: dmaapAccess, + responseType: 'json' }) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.updateDmaapAccess: response.data null or not object'); + else + return response.data; + }, + function(error) { + $log.error('DmaapAccessService.updateDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + // Deletes the specified DMaaP access profile for the current user. + // Returns the current DMaaP access list. + deleteDmaapAccess: function(dmaapId) { + return $http({ + method: 'DELETE', + url: 'dmaap_access/' + dmaapId, + responseType: 'json' }) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.deleteDmaapAccess: response.data null or not object'); + else + return response.data; + }, + function(error) { + $log.error('DmaapAccessService.deleteDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + // Tests the URL in the access profile by fetching the DMaaP object from it. + testDmaapAccess: function(dmaapAccess) { + return $http({ + method: 'POST', + url: 'test_dmaap_access', + data: dmaapAccess, + responseType: 'json' }) + .then(function(response) { + if (response.data == null || typeof response.data != 'object') + return $q.reject('DmaapAccessService.testDmaapAccess: response.data null or not object'); + else + return response.data; + }, function(error) { + $log.error('DmaapAccessService.testDmaapAccess failed: ' + error); + return $q.reject(error.data); + }); + }, + + + }; +}); diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_list.html b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_list.html new file mode 100644 index 0000000..381a850 --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_list.html @@ -0,0 +1,108 @@ +<!-- + ================================================================================ + DCAE DMaaP Bus Controller Web Application + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --> +<!-- controller is specified by route provider --> + +<div class="pageTitle"> + <h3 class="heading3" style="margin-top: 10px; margin-bottom: 10px;">DMaaP + Access Profiles</h3> +</div> + +<div id="button-search-row"> + <!-- add disabled for DE238329 + <button att-button + type="submit" + ng-click="dbcapp.addDmaapAccessModalPopup();" + btn-type="primary" + size="small"> + Add profile... + </button> + --> + <div style="float: right;"> + <div class="form-field form-field__small"> + <input class="fn-ebz-text.search" type="text" + placeholder="Search profiles" ng-model="dbcapp.searchString" /> <i + class="ion-search" style="position:relative;line-height:10px;top:-25px;right:-190px"></i> + </div> + </div> +</div> + +<!-- show progress indicator --> +<div ng-show="isDataLoading"> + <div att-loading></div> +</div> + +<div ng-hide="isDataLoading"> + + <div ng-show="dbcapp.isRequestFailed"> + <span class="errorMessageText">{{dbcapp.errMsg}}</span> + </div> + + <div ng-hide="dbcapp.isRequestFailed"> + <div style="text-align: justify; text-align-last: auto;"> + Click on a radio button to select that profile for use in this web application. + </div> + </div> + + <div id="dmaapAccessTable"> + <table att-table table-data="dbcapp.dmaapAccessList" + search-string="dbcapp.searchString" + view-per-page="dbcapp.viewPerPageIgnored" + current-page="dbcapp.currentPageIgnored" + total-page="dbcapp.totalPageIgnored"> + + <thead att-table-row type="header"> + <tr> + <th att-table-header sortable="false">Selected</th> + <th att-table-header sortable="true" key="name">Name</th> + <th att-table-header sortable="true" key="dmaapUrl">URL</th> + <th att-table-header sortable="true" key="mechId">Mech ID</th> + <!-- delete disabled for DE238329 + <th att-table-header sortable="false">Delete</th> --> + </tr> + </thead> + <!-- row-repeat enables sorting --> + <tbody att-table-row type="body" + row-repeat="rowData in dbcapp.tableData"> + <tr> + <td att-table-body> + <!-- att-radio control does not work; not selected by controller successfully --> + <input type="radio" name="dmaapSelGroup" title="rowData.id" + ng-value="rowData.id" ng-model="dbcapp.selectDmaapModel.id" + ng-change="dbcapp.selectDmaapAccess(rowData);" /> + </td> + <td att-table-body ng-bind="rowData.name" + ng-click="dbcapp.editDmaapAccessModalPopup(rowData)"></td> + <td att-table-body ng-bind="rowData.dmaapUrl" + ng-click="dbcapp.editDmaapAccessModalPopup(rowData)"></td> + <td att-table-body ng-bind="rowData.mechId" + ng-click="dbcapp.editDmaapAccessModalPopup(rowData)"></td> + <!-- delete disabled for DE238329 + <td att-table-body> + <div ng-click="dbcapp.deleteDmaapAccess(rowData);" style="font-size:20px;"> + <a href="" class="ion-trash-b"></a> + </div> + </td> + --> + </tr> + </tbody> + </table> + </div> + +</div> diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_popup_template.html b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_popup_template.html new file mode 100644 index 0000000..c64f28c --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/dmaap_access_popup_template.html @@ -0,0 +1,73 @@ +<!-- + ================================================================================ + DCAE DMaaP Bus Controller Web Application + ================================================================================ + Copyright (C) 2017 AT&T Intellectual Property + ================================================================================ + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ================================================================================ + --> +<script type="text/ng-template" id="edit_dmaap_access_popup.html"> + <div class="modal__informative font-showcase" style="width:425px;"> + <div class="modal__header"> + <h2 class="font-showcase-font-name" style="width: 500px;">{{dbcapp.label}}</h2> + </div> + <div class="divider-container"> + <hr> + </div> + <div class="modal__content"> + <div class="fn-ebz-container" > + Name:<sup><b>*</b></sup> + <br/> + <!--autofocus is HTML5 attribute; doesn't work in Firefox--> + <input type="text" class="fn-ebz-text" ng-model="dbcapp.editDmaapAccess.name" /> + </div> + <br/> + <div class="fn-ebz-container" > + URL:<sup><b>*</b></sup> + <br/> + <!-- edit disabled for DE238329 --> + <input type="text" class="fn-ebz-text" ng-model="dbcapp.editDmaapAccess.dmaapUrl" disabled="disabled" /> + <button class="button button--primary button--small" + href="javascript:void(0)" + ng-click="dbcapp.testDmaapAccess(dbcapp.editDmaapAccess);"> + Test... + </button> + </div> + <br/> + <div class="fn-ebz-container" > + Mech ID: + <br/> + <input type="text" class="fn-ebz-text" ng-model="dbcapp.editDmaapAccess.mechId" /> + </div> + <br/> + <div class="fn-ebz-container" > + Password: + <br/> + <input type="password" class="fn-ebz-text dbcpassword" ng-model="dbcapp.editDmaapAccess.password" /> + </div> + </div> + <div class="modal__footer"> + <button class="button button--primary button--small" + href="javascript:void(0)" + ng-click="dbcapp.saveDmaapAccess(dbcapp.editDmaapAccess);"> + Save + </button> + <button class="button button--primary button--small" + href="javascript:void(0)" + ng-click="dbcapp.close()"> + Close + </button> + </div> + </div> +</script> diff --git a/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/modal-popup-controller.js b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/modal-popup-controller.js new file mode 100644 index 0000000..00b6e3e --- /dev/null +++ b/dcae_dmaapbc_webapp/src/main/webapp/app/dbcapp/dmaapaccess/modal-popup-controller.js @@ -0,0 +1,26 @@ +/*- + * ================================================================================ + * DCAE DMaaP Bus Controller Web Application + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property + * ================================================================================ + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ================================================================================ + */ +app.controller('modalpopupController', function ($scope, $modalInstance, message) { + 'use strict'; + // The modalService from modalService.js requires this controller. + // One is provided by fusion/scripts/controllers/modelpopupController.js + // (yes, with spelling error) but that has cruft not required here. + $scope.message = message; +}); |