2 ============LICENSE_START=======================================================
4 ================================================================================
5 Copyright (C) 2017 AT&T Intellectual Property. All rights
7 ================================================================================
8 Licensed under the Apache License, Version 2.0 (the "License");
9 you may not use this file except in compliance with the License.
10 You may obtain a copy of the License at
12 http://www.apache.org/licenses/LICENSE-2.0
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 ============LICENSE_END============================================
20 ===================================================================
21 ECOMP is a trademark and service mark of AT&T Intellectual Property.
24 <div attribute-test="cldsmodelofftemplate" id="configure-widgets">
25 <div attribute-test="cldsmodelofftemplate" class="modal-header">
26 <button type="button" class="close" ng-click="close(false)" aria-hidden="true" style="margin-top: -3px">×</button>
27 <h4>Model Creation</h4>
29 <div attribute-test="cldsmodelofftemplate" class="modal-body" >
31 <ul style="margin-bottom:15px;" class="nav nav-tabs">
32 <li ng-class="{active : typeModel == 'template'}" ng-click="setTypeModel('template');"><a href="#">Template</a></li>
33 <li ng-class="{active : typeModel == 'clone'}" ng-click="setTypeModel('clone');"><a href="#">Clone</a></li>
35 <div ng-show="error.flag">{{error.message}} </div>
36 <div ng-show="(typeModel=='template')">
37 <form name="model" class="form-horizontal" novalidate>
38 <div class="form-group">
39 <label for="modelName" class="col-sm-3 control-label">Model Name</label>
40 <div class="col-sm-8">
41 <input type="text" class="form-control" id="modelName" name="modelName" ng-model="modelName" placeholder="Model Name" ng-change="checkExisting();" autofocus="autofocus" ng-pattern="/^\s*[\w\-]*\s*$/" required ng-trim="true">
42 <div role="alert"><span ng-show="model.modelName.$error.pattern" style="color: red">Special Characters are not allowed in Model name.</span> <span ng-show="nameinUse" style="color: red"> Model Name Already In Use</span></div>
45 <div class="form-group">
46 <label for="modelName" class="col-sm-3 control-label">Templates</label>
47 <div class="col-sm-8">
48 <select class="form-control" id="templateName" name="templateName" autofocus="autofocus" required ng-trim="true">
49 <option ng-repeat="x in templateNamel" value="{{x}}">{{x}}</option>
55 <div ng-show="(typeModel=='clone')">
56 <form name="model" class="form-horizontal" novalidate>
57 <div class="form-group">
58 <label for="modelName" class="col-sm-3 control-label">Model Name</label>
59 <div class="col-sm-8">
60 <input type="text" class="form-control" id="modelName" name="modelName" ng-model="modelName" placeholder="Model Name" ng-change="checkExisting()" autofocus="autofocus" ng-pattern="/^\s*[\w\-]*\s*$/" required ng-trim="true">
61 <div role="alert"><span ng-show="model.modelName.$error.pattern" style="color: red">Special Characters are not allowed in Model name.</span> <span ng-show="nameinUse" style="color: red"> Model Name Already In Use</span></div>
64 <div class="form-group">
65 <label for="modelName" class="col-sm-3 control-label">Clone</label>
66 <div class="col-sm-8">
67 <select class="form-control" id="modelList" name="modelList" autofocus="autofocus" required ng-trim="true">
68 <option ng-repeat="x in modelNamel" value="{{x}}">{{x}}</option>
75 <div ng-show="(typeModel=='template')">
76 <div class="modal-footer">
77 <button ng-click="createNewModelOffTemplate(model)" class="btn btn-primary" ng-disabled="spcl || nameinUse" class="btn btn-primary">Create</button>
78 <button ng-click="close(true)" class="btn btn-primary">Cancel</button>
81 <div ng-show="(typeModel=='clone')">
82 <div class="modal-footer">
83 <button ng-click="cloneModel()" class="btn btn-primary" ng-disabled="model.modelName.$error.pattern || nameinUse" class="btn btn-primary">Clone</button>
84 <button ng-click="close(true)" class="btn btn-primary">Cancel</button>