2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
20 <script type="text/ng-template" id="add_optimizationModel_popup.html">
21 <div class="modal" tabindex="-1">
22 <div class="modal-dialog modal-lg">
23 <div class="modal-content">
24 <div class="modal-header">
25 <h2 class="font-showcase-font-name" style="color : #157bb2">{{label}}</h2>
27 <form name="formdata" ng-submit="saveOptimizationModel(editOptimizationModelName);" novalidate>
28 <div class="modal-body">
29 <div class="form-group row">
30 <div class="form-group col-sm-12">
31 <label>Description:</label><br>
32 <input type="text" ng-model="editOptimizationModelName.description" class="form-control"/>
35 <div class="form-group row">
36 <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.file.$invalid && !formdata.file.$pristine }">
37 <input type="file" name="file" onchange="angular.element(this).scope().uploadFile(this.files)" name= "file" required/>
38 <p ng-show="formdata.file.$invalid && !formdata.file.$pristine" class="help-block">Uploading Model is required.</p>
41 <div class="form-group row">
42 <div class="form-group col-sm-6" ng-class="{ 'has-error' : formdata.modelName.$invalid && !formdata.modelName.$pristine }">
43 <label>Optimization Model Name:<sup><b>*</b></sup></label><br>
44 <select class="form-control" name= "editOptimizationModelName.modelName" required ng-model="editOptimizationModelName.modelName" ng-options="option for option in classListDatas track by option" ></select>
45 <p ng-show="formdata.classList.$invalid && !formdata.classList.$pristine" class="help-block">Optimization Model is required.</p>
47 <div class="form-group col-sm-6">
48 <label>Version:<sup><b>*</b></sup></label><br>
49 <input type="text" required ng-model="editOptimizationModelName.version" class="form-control"/>
53 <div class="modal-footer">
54 <button class="btn btn-success" type="submit" ng-disabled="formdata.$invalid">Save</button>
55 <button class="btn btn-default" type="button" ng-click="close()">Close</button>