diff options
author | Luji7 <lu.ji3@zte.com.cn> | 2017-09-27 17:20:35 +0800 |
---|---|---|
committer | Luji7 <lu.ji3@zte.com.cn> | 2017-09-27 17:20:43 +0800 |
commit | 10c71729955623307b0b4a170a6ef004ab188a91 (patch) | |
tree | 292e0b2625cd8246e19b155dd0578147b6eccc9e /usecaseui-lcm/src/main/webapp/app/uui/fusion | |
parent | d965932b2dfdb9114820b3a715a998c3e6114373 (diff) |
add lcm page
Change-Id: I52fa1ae3efaa4836f449c9c6e60b23165449fd85
Issue-Id: USECASEUI-36
Signed-off-by: Luji7 <lu.ji3@zte.com.cn>
Diffstat (limited to 'usecaseui-lcm/src/main/webapp/app/uui/fusion')
4 files changed, 386 insertions, 0 deletions
diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js new file mode 100644 index 00000000..328e1bbb --- /dev/null +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/ServiceTemplateService.js @@ -0,0 +1,19 @@ +/* + * Copyright 2016-2017 ZTE Corporation. + * + * 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("ServiceTemplateService", function($http, $log) { + + return {}; + }); diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js new file mode 100644 index 00000000..b09cfb07 --- /dev/null +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/controller/lcmController.js @@ -0,0 +1,50 @@ +/* + * Copyright 2016-2017 ZTE Corporation. + * + * 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('lcmCtrl', ['$scope','$uibModal', '$log', '$http', '$timeout', '$interval', 'uiGridConstants', 'uiGridGroupingConstants', + function ($scope,$uibModal, $log, $http, $timeout, $interval) { + $scope.openCreateServiceDialog = function () { + console.log('start to open dialog....'); + var modalInstance = $uibModal.open({ + ariaLabelledBy: 'modal-title', + ariaDescribedBy: 'modal-body', + templateUrl : 'app/uui/fusion/scripts/view-models/create-service-dialog.html', + controller : 'createServiceCtrl' + }); + modalInstance.result.then( + function() { + console.log('receive ok button clicked!'); + }, + function() { + console.log('receive cancel button clicked!'); + $log.info('Modal dismissed at: ' + new Date()) + } + ); + }; + } + ] +) +.controller('createServiceCtrl',['ServiceTemplateService', + function($scope, $uibModalInstance, ServiceTemplateService) { + + $scope.ok = function() { + console.log('ok button clicked!'); + }; + // cancel click + $scope.cancel = function() { + $uibModalInstance.dismiss('cancel'); + } + }] +); diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html new file mode 100644 index 00000000..a00f54b9 --- /dev/null +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/create-service-dialog.html @@ -0,0 +1,83 @@ +<!-- + + Copyright 2016-2017 ZTE Corporation. + + 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. + +--> +<div class="modal-header" style="margin-bottom: 15px;"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel"> + <span>Create</span> + </h4> +</div> + +<div class="modal-body"> + <ul class="nav nav-tabs nav-justified vmapp-margin"> + <li class="active basic"> + <a href="#basicTab" style="margin-left:1px;" onclick="showBasic();" id="basicTab" data-toggle="tab"> + <span>Base</span> + </a> + </li> + <li style="padding-right:2px;" class="para"> + <a href="#" onclick="hideBasic();" data-toggle="tab"> + <span>Template Parameters</span> + </a> + </li> + </ul> + + <div id="basicInfoTab"> + <div class="mT15 form-group" style="margin-left:25px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Name</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <input type="text" id="svcName" name="svcName" class="form-control" placeholder="Service Name" maxlength="256"/> + </div> + </div> + <div class="mT15 form-group" style="margin-left:25px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Description</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <input type="text" id="svcDesc" name="" class="form-control" placeholder="Service Description" maxlength="256"/> + </div> + </div> + <div class="form-group" style="margin-left:25px;margin-bottom:15px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Template</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <select class="form-control" style="padding-top: 0px;padding-bottom: 0px;" id="svcTempl" name="svcTempl" onchange="serviceTemplateChanged();"> + <option value="select">--select--</option> + <option value="1.1">1.1</option> + <option value="1.2">1.2</option> + </select> + </div> + </div> + </div> + + <div id="templateParameterTab"></div> +</div> + +<div class="modal-footer"> + <button type="button" style="width:80px;" class="btn SDBtn" ng-click="ok()" data-dismiss="modal" aria-hidden="true" id="startToCreateService"> + <span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span> + </button> + <button type="button" style="width:80px;" class="btn button-previous SDBtn" ng-click="cancel()" data-dismiss="modal"> + <span id="nfv-virtualApplication-iui-text-previousBtn">Cancel</span> + </button> +</div> diff --git a/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html new file mode 100644 index 00000000..e0a9d2ad --- /dev/null +++ b/usecaseui-lcm/src/main/webapp/app/uui/fusion/scripts/view-models/lifecyclemanagement.html @@ -0,0 +1,234 @@ +<!-- + + Copyright 2016-2017 ZTE Corporation. + + 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. + +--> +<div class="templatemo-content-wrapper" ng-controller="lcmCtrl" ng-init="init()"> + <div class="templatemo-content"> + <h1 style="margin-bottom:40px">Life Cycle Manager</h1> + <!--ul class="nav nav-tabs nav-justified vmapp-margin"--> + <ul class="nav nav-tabs nav-justified vmapp-margin" style="border-bottom-color:#66B3FF"> + <li class="active basic"> + <a href="#" style="margin-left:1px" onclick="showService();" id="serviceTab" data-toggle="tab"> + <span>Services</span> + </a> + </li> + <li style="padding-right:2px;" class="para"> + <a href="#vnf-ns-onboard" onclick="hideService();" data-toggle="tab" id="vnfNsTab"> + <span>Vnf/NS Packages</span> + </a> + </li> + </ul> + + <div id="vnf-ns-onboard"> + <table id="onbaordTable" class="table table-striped table-hover table-bordered"> + <thead> + <tr> + <th>Name</th> + <th>Type</th> + <th>Action</th> + </tr> + </thead> + <tbody> + <tr> + <td>vBras</td> + <td>VNF</td> + <td> + <button class="btn btn-primary onboard-button">Onboard</button> + </td> + </tr> + <tr> + <td>network service</td> + <td>NS</td> + <td> + <button class="btn btn-primary onboard-button">Onboard</button> + </td> + </tr> + </tbody> + </table> + </div> + + <div id="service-table"> + <!--button id="createService" style="margin-top: 20px" class="btn btn-default"><span class="glyphicon glyphicon-plus"></span></button--> + <button id="createService" style="font-size:20px" ng-click="openCreateServiceDialog()"> + <span class="glyphicon glyphicon-plus" style="margin-top:20px;width:80px;margin-left:20px"></span> + </button> + <table class="table table-striped table-hover table-bordered" style="margin:2px"> + <thead> + <tr> + <th>Service Instance Id</th> + <th>Service Name</th> + <th>Service Type</th> + <th>Action</th> + </tr> + </thead> + <tbody id="bb"> + <tr> + <td>123</td> + <td>VoLTE Use Case 1</td> + <td>E2E Service</td> + <td><a href="#" class="btn btn-primary">Delete</a></td> + </tr> + <tr> + <td>456</td> + <td>VoLTE Use Case 2</td> + <td>E2E Service</td> + <td><a href="#" class="btn btn-primary">Delete</a></td> + </tr> + <tr> + <td>789</td> + <td>VoLTE Use Case 3</td> + <td>E2E Service</td> + <td><a href="#" class="btn btn-primary">Delete</a></td> + </tr> + </tbody> + </table> + <ul class="pagination pull-right"> + <li class="disabled"><a href="#">«</a></li> + <li class="active"><a href="#">1 <span class="sr-only">(current)</span></a></li> + <li><a href="#">2 <span class="sr-only">(current)</span></a></li> + <li><a href="#">3 <span class="sr-only">(current)</span></a></li> + <li><a href="#">4 <span class="sr-only">(current)</span></a></li> + <li><a href="#">5 <span class="sr-only">(current)</span></a></li> + <li><a href="#">»</a></li> + </ul> + </div> + +</div> + +<!-- Modal --> +<div class="modal fade" id="confirmModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal"> + <span aria-hidden="true">×</span><span class="sr-only">Close</span> + </button> + <h4 class="modal-title" id="myModalLabel">Are you sure you want to sign out?</h4> + </div> + <div class="modal-footer"> + <a href="sign-in.html" class="btn btn-primary">Yes</a> + <button type="button" class="btn btn-default" data-dismiss="modal">No</button> + </div> + </div> + </div> +</div> + +<!--div id="createServiceDialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="content"> + <div class="modal-header" style="margin-bottom: 15px;"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel"> + <span>Create</span> + </h4> + </div> + <form class="form-horizontal" role="form" id="neForm"> + <div id="wizard"> + <div class="modal-body"> + <ul class="nav nav-tabs nav-justified vmapp-margin"> + <li class="active basic"> + <a href="#basicTab" style="margin-left:1px;" onclick="showBasic();" id="basicTab" data-toggle="tab"> + <span>Base</span> + </a> + </li> + <li style="padding-right:2px;" class="para"> + <a href="#" onclick="hideBasic();" data-toggle="tab"> + <span>Template Parameters</span> + </a> + </li> + </ul> + + <div id="basicInfoTab"> + <div class="mT15 form-group" style="margin-left:25px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Name</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <input type="text" id="svcName" name="svcName" class="form-control" placeholder="Service Name" maxlength="256"/> + </div> + </div> + <div class="mT15 form-group" style="margin-left:25px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Description</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <input type="text" id="svcDesc" name="" class="form-control" placeholder="Service Description" maxlength="256"/> + </div> + </div> + <div class="form-group" style="margin-left:25px;margin-bottom:15px;" ms-class="has-error:vmAppDialog.name==''"> + <label class="col-sm-3 control-label"> + <span>Service Template</span> + <span class="required">*</span> + </label> + <div class="col-sm-7"> + <select class="form-control" style="padding-top: 0px;padding-bottom: 0px;" id="svcTempl" name="svcTempl" onchange="serviceTemplateChanged();"> + <option value="select">--select--</option> + <option value="1.1">1.1</option> + <option value="1.2">1.2</option> + </select> + </div> + </div> + </div> + + <div id="templateParameterTab"></div> + </div> + <div class="modal-footer"> + <button type="button" style="width:80px;" class="btn SDBtn" data-dismiss="modal" aria-hidden="true" id="startToCreateService"> + <span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span> + </button> + <button type="button" style="width:80px;" class="btn button-previous SDBtn" data-dismiss="modal"> + <span id="nfv-virtualApplication-iui-text-previousBtn">Cancel</span> + </button> + </div> + </div> + </form> + </div> + </div> + </div> +</div--> + +<div id="vnf-ns-onboard-dialog" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> + <div class="modal-dialog"> + <div class="modal-content"> + <div class="content"> + <div class="modal-header" style="margin-bottom: 15px;"> + <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> + <h4 class="modal-title" id="myModalLabel"> + <span>Select VIM Onboard Image</span> + </h4> + </div> + <form class="form-horizontal" role="form" id="neForm"> + <div id="wizard"> + <div class="modal-body"> + <div id="vnf-ns-vim-table"></div> + </div> + <div class="modal-footer"> + <button type="button" style="width:80px;" class="btn SDBtn" data-dismiss="modal" aria-hidden="true" id="startToCreateService"> + <span id="nfv-virtualApplication-iui-text-cancelBtn">OK</span> + </button> + <button type="button" style="width:80px;" class="btn button-previous SDBtn" data-dismiss="modal"> + <span id="nfv-virtualApplication-iui-text-previousBtn">Cancel</span> + </button> + </div> + </div> + </form> + </div> + </div> + </div> +</div> |