Epic-231:versioning, and backup the configuration
[sdnc/oam.git] / configbackuprestore / vnfconfigbackupservice / src / main / webapp / static / views / form-validationTest.html
1 <!-- /*
2    * ============LICENSE_START=======================================================
3    * ONAP : SDNC-FEATURES
4    * ================================================================================
5    * Copyright 2018 TechMahindra
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
10    *
11    *     http://www.apache.org/licenses/LICENSE-2.0
12    *
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=========================================================
19    */
20     -->
21 <div  class="testMain">
22    <div class="heading"><img src="static/images/validation.png" width=30 height="30" style="margin-left:5px;">&nbsp;&nbsp;Pre-test/Certification</div>
23    <form name="reportForm">
24     <div growl></div>
25       <div class="row">
26          <div class="column testCol">
27             <label class="labeltext">Specify IP Address</label>
28          </div>
29          <div class="column" style="background-color:#f2f2f2;width:50%;margin-left:0px;">
30             <input type="text" ng-model="IPAddress" name="IPAddress" style="margin-left:5px;width:170px;" ng-ip-address placeholder='255.255.255.255' required></input>
31             <div role="alert">
32                <span class="error" ng-show="reportForm.IPAddress.$error.required">Required!</span>
33             </div>
34             <div role="alert">
35                <span class="error" ng-if="reportForm.IPAddress.$invalid">Not a valid IPAddress!</span>
36             </div>
37             <div role="alert">
38                <span class="error" ng-if="reportForm.IPAddress.pattern">Not a valid IPAddress!</span>
39             </div>
40          </div>
41       </div>
42       <div class="row">
43          <div class="column testCol">
44             <label class="labeltext">Specify Host Name</label>
45          </div>
46          <div class="column" style="background-color:#f2f2f2;width:50%;margin-left:0px;">
47             <input type="text" ng-model="HostName" name="HostName" style="margin-left:5px;width:170px;"  required ng-pattern="hostNamePattern"></input>
48             <div role="alert">
49                <span class="error" ng-show="reportForm.HostName.$error.required">Required!</span>
50             </div>
51             <div role="alert">
52                <span class="error" ng-show="reportForm.HostName.$invalid">Not a valid HostName!</span>
53             </div>
54          </div>
55       </div>
56       <div class="row">
57          <div class="column" style="width:25%;background-color:#f2f2f2;height:45px;margin-left:35px;"> 
58             <label class="labeltext">Select Certification</label>
59          </div>
60          <div class="column" style="background-color:#f2f2f2;width:50%;height:45px;margin-left:0px;">
61             <label ng-repeat="val in validationTestList" class="labeltext" style="margin-right:35px;">
62             <input type="checkbox" ng-model="val.Selected" class="check" ng-change="updateSelection($index,validationTestList,val.validationType);">{{val.validationType}}</input>
63             </label>
64          </div>
65       </div>
66       <!--<hr style="border-color:darkGrey;">-->
67       <div class="row">
68          <div class="column btnRunTest">
69             <input type="submit" ng-click="runTest()" value="Run PreTest" id="btnSubmit" ng-disabled="showError" style="margin-left:0px;"/>
70          </div>
71       </div>
72    
73    <table class="tableDisplay" ng-show="ShowResult" id="tableToExport" style="margin-left:10px;width:1000px;">
74       <tr class="first_row">
75          <th>SNo.
76          </th>
77          <th colspan="2" style="text-align:center;">TestName
78          </th>
79          <th>Device IP
80          </th>
81          <th>Status
82          </th>
83          <th style="width:20%;">Statistics (%Loss)</th>
84          <th style="width:20%;">Average Time (ms)</th>
85          <th>Result
86          </th>
87       </tr>
88       <tr ng-repeat="test in objPreTest">
89          <td>{{$index+1}}
90          </td>
91          <td><img src="{{(test.testtype=='Network Layer') ? 'static/images/images.png': 'static/images/protocol.png'}}" width=40 height=30 ></img></td>
92          <td>{{test.testtype}}
93          </td>
94          <td>{{test.ipaddress}}
95          </td>
96          <td>{{test.status | uppercase}}
97          </td>
98          <td>
99             <div ng-show="test.testtype =='Network Layer'" class="w3-light-grey">
100                <div ng-show=test.statistics!=null class="w3-container w3-red w3-center" style="width:{{test.statisticPer}}%">{{test.statistics}}% Loss
101                </div>
102                <div ng-show=test.statistics==null class="w3-orange w3-center" style="width:{{test.statisticPer}}%">No Statistics Recorded
103                </div>
104             </div>
105             <div ng-show="test.testtype =='Protocol Layer'">
106                <img src='static/images/router.png' width=30 height=30 style="margin-bottom:10px;"></img>
107                <span class="{{(test.status == 'unreachable') ? 'arrowRed':'arrowGreen'}}">&#8594;</span><span class="{{(test.status == 'unreachable') ? 'arrowRed':'arrowGreen'}}">&#8594;</span><span class="{{(test.status == 'unreachable') ? 'arrowRed':'arrowGreen'}}">&#8594;                             
108                <img src='static/images/router.png' width=30 height=30 ></img>
109             </div>
110          </td>
111          <td>
112             <div ng-show="test.testtype =='Network Layer'" class="w3-light-grey">
113                <div  ng-show=test.avgTime!=null class="w3-container w3-green w3-center" style="width:{{test.avgTimePer}}%">{{test.avgTime}} ms</div>
114                <div ng-show=test.statistics==null class="w3-blue w3-center" style="width:{{test.statisticPer}}%">No AvgTime Recorded
115                </div>
116             </div>
117          </td>
118          <td><img src="{{(test.status=='reachable') ? 'static/images/success.png': 'static/images/FailImage.png'}}" width=30 height=25></img>
119          </td>
120       </tr>
121    </table>
122    <div class="row">
123       <div class="column" style="margin-top:10px;width:800px;" ng-show="ShowResult"> 
124          <span class='arrowRed'>&#8594;</span>
125          <label class="labeltext">UnReachable</label>&nbsp;&nbsp;
126          <span class='arrowGreen'>&#8594;</span>
127          <label class="labeltext">Reachable</label>&nbsp;&nbsp;
128          <span><img src='static/images/success.png' width=30 height=25></span>
129          <label class="labeltext">Pass</label>&nbsp;&nbsp;
130          <span><img src='static/images/FailImage.png' width=30 height=25></span>
131          <label class="labeltext">Fail</label>
132       </div>
133    </div>
134    </form>
135 </div>