478cbb2b16bb47669f5fdfb5663f26fb3691455b
[portal/ric-dashboard.git] / dashboard / webapp-frontend / src / app / onboard / onboard.component.html
1 <!--
2   ========================LICENSE_START=================================
3   O-RAN-SC
4   %%
5   Copyright (C) 2020 AT&T Intellectual Property
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
22
23 <mat-tab-group>
24   <mat-tab label="From Local">
25     <input #configInput type="file" (change)="selectConfigFile($event)" style="display:none;" ngModel />
26     <mat-form-field class="example-full-width" (click)="configInput.click()">
27       <input matInput placeholder="Choose config file" value="{{configInput.value.substr(configInput.value.lastIndexOf('\\')+1)}}">
28       <mat-icon matSuffix>folder_open</mat-icon>
29     </mat-form-field>
30     <input #schemaInput type="file" (change)="selectControlsSchema($event)" style="display:none;" ngModel />
31     <mat-form-field class="example-full-width" (click)="schemaInput.click()">
32       <input matInput placeholder="Choose control schema" value="{{schemaInput.value.substr(schemaInput.value.lastIndexOf('\\')+1)}}">
33       <mat-icon matSuffix>folder_open</mat-icon>
34     </mat-form-field>
35     <div class="modal-footer justify-content-center">
36       <button mat-button class="mat-raised-button  mat-primary" (click)="uploadFromLocal()">upload</button>
37       <button mat-button class="mat-raised-button" [mat-dialog-close]="false">Cancel</button>
38     </div>
39
40   </mat-tab>
41
42   <mat-tab label="From URL">
43     <form [formGroup]="urlOnboardForm">
44       <mat-form-field >
45         <mat-label>config file URL</mat-label>
46         <input matInput formControlName="configURL">
47       </mat-form-field>
48       <mat-form-field >
49         <mat-label>control schema URL</mat-label>
50         <input matInput formControlName="schemaURL">
51       </mat-form-field>
52       <div class="modal-footer justify-content-center">
53         <button mat-button class="mat-raised-button  mat-primary"  [disabled]="!urlOnboardForm.valid" (click)="uploadFromURL(urlOnboardForm.value)" >upload</button>
54         <button mat-button class="mat-raised-button" [mat-dialog-close]="false">Cancel</button>
55       </div>
56     </form>
57   </mat-tab>
58
59 </mat-tab-group>
60