aboutsummaryrefslogtreecommitdiffstats
path: root/src/app/test/test.component.html
blob: 8147f0592303bdea13f0a86b9b2d004f200aa512 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
<!--
============LICENSE_START==========================================
===================================================================
Copyright (C) 2018 AT&T Intellectual Property. All rights reserved.
===================================================================

Unless otherwise specified, all software contained herein is licensed
under the Apache License, Version 2.0 (the License);
you may not use this software 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.

============LICENSE_END============================================
-->
<simple-notifications [options]="options"></simple-notifications>
<ngx-spinner bdColor="rgba(51,51,51,0.8)"
  size="large"
  color="orange"
  loadingText="Uploading test spreadsheet..."
  type="ball-scale-multiple"></ngx-spinner>
<ng-progress [positionUsing]="'marginLeft'" [minimum]="0.15" [maximum]="1" [speed]="200" [showSpinner]="false" [direction]="'leftToRightIncreased'" [color]="'#6ab344'"
    [trickleSpeed]="250" [thick]="true" [ease]="'linear'"></ng-progress>

<div class="card" style=" margin-bottom: 23px;">
    <div class="card-block" style="border-top: 5px solid #6ab344;border-top-right-radius: 7px;border-top-left-radius: 7px;">
        <div class="row" style="padding: 10px 15px">
            <div class="col-lg-3 col-sm-6 col-md-4 col-xs-12">
                <label>Action:</label>
                <input class="form-control" type="text" disabled value="{{action}}" />
            </div>

            <div class="col-lg-3 col-sm-6 col-md-4 col-xs-12">
                <label>Vnf Id:</label>
                <input class="form-control" type="text" [(ngModel)]="this.actionIdentifiers['vnf-id']" />

            </div>

            <div class="col-lg-3 col-sm-6 col-md-4 col-xs-12" *ngIf="this.actionIdentifiers['vserver-id']">
                <label>Vserver-Id(optional):</label>
                <input class="form-control" disabled type="text" [(ngModel)]="this.actionIdentifiers['vserver-id']" />

            </div>
        </div>
        <div class="row" style="padding: 10px 15px">

            <div class="col-12">
                <div class="input-group">
                    <input id="excelInputFile" #myInput1 hidden class="file" type="file" (change)="upload($event)">
                    <input [(ngModel)]="uploadFileName" type="text" class="input-lg" disabled placeholder="Upload SpreadSheet" name="uploadFileName" style="width:80%">
                    <button (click)="excelBrowseOption($event)" [disabled]="!enableBrowse" class="browse mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary input-lg"
                        type="button">Upload SpreadSheet
                    </button>
                </div>
            </div>

        </div>
    </div>
</div>
<br>

<div class="card">

    <div class="card-block">

        <div class="row">
            <div class="col-md-6">
                <span style="margin-left: 5%"><b>REQUEST:</b></span>
            </div>
            <div class="col-md-6">
                <span style="margin-left: 5%"><b>RESPONSE:</b></span>
            </div>

            <div class="col-md-6">
                <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">

                    <div style="height:200px;width:100%;border:solid 2px grey;overflow:scroll;overflow-x:hidden;overflow-y:scroll;">
                        <p style="height:450px;" disabled class="text-center">
                            {{apiRequest}}
                        </p>
                    </div>
                </div>

            </div>

            <div class="col-md-6">
                <div class="col-lg-12 col-sm-12 col-md-12 col-xs-12">

                    <div style="height:200px;width:100%;border:solid 2px grey;overflow:scroll;overflow-x:hidden;overflow-y:scroll;">
                        <p style="height:450px;" disabled class="text-center">
                            {{apiResponse}}
                        </p>
                    </div>
                </div>

            </div>

            <div class="col-md-12">
                <div class="row justify-content-center" style="padding-top:0.3cm">

                    <button style="margin-left:6%;" [disabled]="!enableTestButton" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary"
                        type="submit" (click)="testVnf()">Execute Test
                    </button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

                </div>

            </div>

        </div>

    </div>

    <div style="padding-left:60%;padding-bottom:0.5cm">
        <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" type="button" [disabled]="!enableDownload" (click)="download()">Download Raw Request/Response
        </button>
        <button class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent" type="button" [disabled]="!enableAbort" (click)="abortTest()">Abandon Test</button>    
    </div>
</div>
<br>
<div class="card">
    <div class="card-block">

        <div class="mdl-dialog__content" style="border:solid 1px grey;">

            <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label" style="margin-left: 25%">
                <input placeholder="Request Id" [(ngModel)]="requestId" class="mdl-textfield__input" id="requestId" required name="requestId">
            </div><br/>
            <button style="margin-left: 30%" type="submit" [disabled]="!enablePollButton" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary" (click)=pollTestStatus()>Poll Test Status
            </button>
            <br/><br/>
            <div class="col-md-12">
                <span style="margin-left: 18.5%"><b>POLL TEST STATUS RESPONSE</b></span>
            </div>

            <div style="margin-left: 18.5%;height:130px;width:60%;border:solid 2px grey;overflow:scroll;overflow-x:hidden;overflow-y:hidden;">

                <div *ngIf="showStatusResponseDiv">
                    <div *ngIf="enableCounterDiv"><b>Poll test no {{pollCounter}}</b></div>
                    <table>
                        <thead></thead>
                        <tbody>
                            <tr>
                                <td>
                                    <div class="android-title mdl-layout-title">TimeStamp :</div>
                                </td>
                                <td>
                                    <div class="android-title mdl-layout-title">{{outputTimeStamp}}</div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="android-title mdl-layout-title">Status :</div>
                                </td>
                                <td>
                                    <div class="android-title mdl-layout-title">{{status}}</div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <div class="android-title mdl-layout-title">Status Reason:</div>
                                </td>
                                <td>
                                    <div class="android-title mdl-layout-title">{{statusReason}}</div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
                <div *ngIf="!showStatusResponseDiv">
                    <div *ngIf="enableCounterDiv"><b>Poll test no {{pollCounter}}</b></div>
                    <span>{{statusResponse}}</span>
                </div>

                <div *ngIf="errorResponse">
                    <p style="height:450px;" disabled class="text-center">
                        {{errorResponse}}
                    </p>
                </div>

            </div>
        </div>
    </div>
</div>