diff options
author | Ofir Sonsino <os0695@att.com> | 2017-09-20 13:20:42 +0300 |
---|---|---|
committer | Ofir Sonsino <os0695@att.com> | 2017-09-20 13:37:03 +0300 |
commit | 9dfd7e28c1eb348fcb4a2de8c6faae2a01b34942 (patch) | |
tree | c273862f59b0b64c19ccfea5f59ab574071cb323 /vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp | |
parent | c3722d135481cfab5978c84853d8229d1e7d9cb3 (diff) |
Global Read only role, Support VID specific Roles
Issue-ID: VID-46 , VID-47
Change-Id: Ib100d20ac40a65d39e27a6e2741b19a173a2b8ea
Signed-off-by: Ofir Sonsino <os0695@att.com>
Diffstat (limited to 'vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp')
-rw-r--r-- | vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp | 146 |
1 files changed, 146 insertions, 0 deletions
diff --git a/vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp b/vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp new file mode 100644 index 000000000..fd2030e6c --- /dev/null +++ b/vid-app-common/src/test/resources/WEB-INF/jsp/createnewserviceinstance.jsp @@ -0,0 +1,146 @@ +<script> +app.controller('createNewSIController',['$scope','$http',function ($scope,$http) { + + $scope.searchCategory = ""; + $scope.searchString = ""; + $scope.tableData=[]; + $scope.displayData=[]; + $scope.selectedSubscriber = $scope.tableData[0]; + $scope.selectedServiceType = "Select Service Type"; + function escapeRegExp(str) { + return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|\&]/g, " "); + } + $scope.serviceTypes=["Select Service Type", "uCPE-VMS", "SDN-L3-BONDING", "SDN-ETHERNET-INTERNET"]; + + $scope.getSubscribers = function(refresh){ + + var refreshTxt = 'refresh_subscribers'; + var getTxt = 'get_subscribers'; + var selectedTxt = getTxt; + if (refresh) + selectedTxt = refreshTxt; + $http.get(selectedTxt). + then(function(response){ + var data = JSON.parse(response.data.result); + $scope.tableData = data['customer']; + $scope.initSubscriberList(); + }) + .catch(function(data,status){ + console.log("Error: " + status + " : " + data); + }) + .finally(function() { + + }); + + } + + + $scope.initSubscriberList = function () { + //$scope.selectedSubscriber = $scope.selectedSubscriber['subscriber-name'] || $scope.tableData[0]['subscriber-name']; + $scope.selectedSubscriber = 'Select Subscriber Name'; + } + + $scope.initSrvcTypeList = function () { + $scope.selectedServiceType = $scope.serviceTypes[0]; + } + + $scope.getSubscriberDetails = function(selectedSubscriber){ + if (selectedSubscriber == 'Select Subscriber Name') + return; + $http.get('createsubscriber/' + encodeURIComponent(selectedSubscriber)). + then(function(response){ + // window.location.href = 'createsubscriberdetails.htm'; + }) + .catch(function(data,status){ + console.log("Error: " + status + " : " + data); + }) + .finally(function() { + + }); + } + + $scope.disableSubmitBtn = function (subName, svcType) { + return (typeof subName === "undefined") && (svcType == 'Select Service Type'); + //return (subName == 'Select Subscriber Name') && (svcType == 'Select Service Type'); + } + + $scope.cancelCreateSI = function(selectedSubscriber){ + + window.location.href = 'welcome.htm'; + + } + + $scope.getSubscribers(false); + //$scope.initSubscriberList(); + +}]); + + +</script> + +<div ng-controller="createNewSIController"> + + <h1 class="heading1"><center>Create New Service Instance</center></h1> + + +<BR> + <table> <tr> + + <td width="5%" align="left"> + <!-- <a ng-click="getSubscriberDetails(selectedSubscriber['global-customer-id']);" ng-disabled="disableSubmitBtn(selectedSubscriber['subscriber-name'], selectedServiceType);" ><img src="static/fusion/images/plus.png"></a>--> + <input type="image" ng-click="getSubscriberDetails(selectedSubscriber['global-customer-id']);" ng-disabled="disableSubmitBtn(selectedSubscriber['subscriber-name'], selectedServiceType);" src="static/fusion/images/plus.png"/> + </td> + + <td style="width:10%" align="left"><div class="fn-ebz-container"> + <label class="fn-ebz-text-label">Subscriber:</label> + </div> </td> + <td style="width:30%"><div class="fn-ebz-container"> + <select ng-model="selectedSubscriber" ng-options="resultdata['subscriber-name'] for resultdata in tableData" required> + <option value="">Select Subscriber Name</option> + </select> + </div></td> + <td width="5%" align="left"> + <input type="image" ng-click="getSubscribers(true);" src="static/fusion/images/refresh.jpg"/> + </td> + + <td width="5%"> </td> +<td style="width:10%" align="left"> + + + <div class="fn-ebz-container"> + <label class="fn-ebz-text-label">Service Type:</label> + </div> </td> + <td style="width:32%"><div class="fn-ebz-container"> + <select ng-model="selectedServiceType" ng-options="sType for sType in serviceTypes" ng-init="initSrvcTypeList();" ></select> + </div> </td> + + <td width="5%"> </td> + + </tr> + </table> + + <center> + <button type="cancel" ng-click="cancelCreateSI();" att-button size="small">Cancel</button> + </center> + + + +</div> +<!-- Temporary solution for footer overlapping the men after talking to EComp SDK developer on 06/16/2016 --> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> +<br> + + |