Matteo Scandolo | d2044a4 | 2017-08-07 16:08:28 -0700 | [diff] [blame] | 1 | |
| 2 | <!-- |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | --> |
| 17 | |
| 18 | |
Rizwan Haider | 8e5f477 | 2016-08-17 18:04:35 -0400 | [diff] [blame] | 19 | <!-- ELINE CREATION POINT TO POINT --> |
| 20 | <div class="container-fluid eline-form"> |
| 21 | <div class="row"> |
| 22 | <div class="col-xs-10 col-xs-offset-1"> |
| 23 | <div class="panel panel-primary animate-vertical"> |
| 24 | <div class="panel-heading"> |
| 25 | <h3 class="panel-title">Create E-LINE</h3> |
| 26 | </div> |
| 27 | <form name="vm.eline" ng-submit="vm.createEline(vm.el, vm.eline)"> |
| 28 | <div class="panel-body"> |
| 29 | <div class="row"> |
| 30 | <div class="col-xs-12"> |
| 31 | <label>Name:</label> |
| 32 | <input type="text" class="form-control input-lg" ng-model="vm.el.evcCfgidentifier" required></div> |
| 33 | </div> |
| 34 | <div class="row"> |
| 35 | <div class="col-xs-6"> |
| 36 | <label>Start:</label> |
| 37 | <div class="alert alert-danger animate-vertical" ng-hide="!vm.formErrors.startError"> |
| 38 | {{vm.formErrors.startError}} |
| 39 | </div> |
| 40 | <!--<pre>{{vm.startUnis | json}}</pre>--> |
| 41 | <div class="row uni-repeat" ng-repeat="u in vm.startUnis"> |
| 42 | <div class="col-xs-2"> |
| 43 | <checkbox largest |
| 44 | ng-class="{'btn-primary': !u.alreadySelected, 'btn-danger': u.alreadySelected === true}" |
| 45 | ng-model="u.selected" |
| 46 | ng-change="vm.selectUni(u, 'start')" |
| 47 | required |
| 48 | ></checkbox> |
| 49 | </div> |
| 50 | <div class="col-xs-5"> |
| 51 | |
| 52 | <b>{{u.name || u.interfaceCfgIdentifier}}</b> |
| 53 | |
| 54 | </div> |
| 55 | <div class="col-xs-5"> |
| 56 | {{u.location}} |
| 57 | </div> |
| 58 | </div> |
| 59 | </div> |
| 60 | <div class="col-xs-6"> |
| 61 | <label>End:</label> |
| 62 | <div class="alert alert-danger animate-vertical" ng-hide="!vm.formErrors.endError"> |
| 63 | {{vm.formErrors.endError}} |
| 64 | </div> |
| 65 | <div class="row uni-repeat" ng-repeat="u in vm.endUnis"> |
| 66 | <div class="col-xs-2"> |
| 67 | <checkbox largest |
| 68 | ng-class="{'btn-primary': !u.alreadySelected, 'btn-danger': u.alreadySelected === true}" |
| 69 | ng-model="u.selected" |
| 70 | ng-change="vm.selectUni(u, 'end')" |
| 71 | required |
| 72 | ></checkbox> |
| 73 | </div> |
| 74 | <div class="col-xs-5"> |
| 75 | <b>{{u.name || u.interfaceCfgIdentifier}}</b> |
| 76 | </div> |
| 77 | <div class="col-xs-5"> |
| 78 | {{u.location}} |
| 79 | </div> |
| 80 | </div> |
| 81 | </div> |
| 82 | </div> |
| 83 | </div> |
| 84 | <div class="panel-footer text-right"> |
| 85 | <button ng-hide="vm.eline.$saved" type="submit" class="btn btn-success btn-lg animate-fade">Save</button> |
| 86 | <div ng-hide="!vm.eline.$saved" class="form-success animate-fade">Done</div> |
| 87 | </div> |
| 88 | </form> |
| 89 | </div> |
| 90 | </div> |
| 91 | </div> |
| 92 | </div> |
| 93 | |
| 94 | <!-- MULTIPLE POINT CREATION --> |
| 95 | <div class="container-fluid eline-form" ng-if="vm.currentUser.userId === 2"> |
| 96 | <div class="row"> |
| 97 | <div class="col-xs-10 col-xs-offset-1"> |
| 98 | <div class="panel panel-primary animate-vertical"> |
| 99 | <div class="panel-heading"> |
| 100 | <h3 class="panel-title">Create Infrastructure</h3> |
| 101 | </div> |
| 102 | <form name="vm.infrastructure" ng-submit="vm.createInfrastructure(vm.infrastructureUnis)"> |
| 103 | <div class="panel-body"> |
| 104 | <div class="row"> |
| 105 | <div class="col-sm-6 infrastructureUnis" ng-repeat="u in vm.infrastructureUnis"> |
| 106 | <div class="row uni-repeat"> |
| 107 | <div class="col-xs-2"> |
| 108 | <checkbox largest |
| 109 | class="btn-primary" |
| 110 | ng-model="u.selected" |
| 111 | required |
| 112 | ></checkbox> |
| 113 | </div> |
| 114 | <div class="col-xs-5"> |
| 115 | <b>{{u.name}}</b> |
| 116 | </div> |
| 117 | <div class="col-xs-5"> |
| 118 | {{u.location}} |
| 119 | </div> |
| 120 | </div> |
| 121 | </div> |
| 122 | </div> |
| 123 | </div> |
| 124 | <div class="panel-footer text-right"> |
| 125 | <button ng-hide="vm.eline.$saved" type="submit" class="btn btn-success btn-lg animate-fade">Save</button> |
| 126 | <div ng-hide="!vm.eline.$saved" class="form-success animate-fade">Done</div> |
| 127 | </div> |
| 128 | </form> |
| 129 | </div> |
| 130 | </div> |
| 131 | </div> |
| 132 | </div> |