2defc33f211a406d64e97591a40e8c9afac010a1
[osm/NG-UI.git] / src / app / utilities / edit-packages / EditPackagesComponent.html
1 <!--
2 Copyright 2020 TATA ELXSI
3
4 Licensed under the Apache License, Version 2.0 (the 'License');
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16 Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in)
17 -->
18 <div class="form-group row">
19 <div class="d-flex align-items-center header-style">{{'EDIT' | translate}}&nbsp;<span
20 class="text-uppercase">{{pacakgeType}}&nbsp;</span>{{'DESCRIPTOR' | translate}}</div>
21 </div>
22 <form *ngIf="defaults[mode]">
23 <div class="row">
24 <div class="col-2">
25 <div class="form-group">
26 <select class="form-control custom-select" name="state" [(ngModel)]="mode" (ngModelChange)="changeMode()">
27 <option *ngFor="let types of fileTypes;" [value]="types.value">
28 {{types.viewValue}}</option>
29 </select>
30 </div>
31 </div>
32 <div class="col-4">
33 <div class="btn-group-toggle mb-1 mr-1 float-left">
34 <label class="btn btn-light" [class.active]="readOnly">
35 <input type="checkbox" [(ngModel)]="readOnly" name="readOnly" autocomplete="off">
36 {{'READONLYMODE' | translate}} ({{'CURRENTLY' | translate}} {{ (readOnly ? 'ON' : 'OFF') | translate }})
37 </label>
38 </div>
39 </div>
40 <div class="col-6 text-right">
41 <button type="button" class="btn btn-primary mr-2" routerLink="/packages/{{navigatePath}}/compose/{{paramsID}}"
42 [hidden]="navigatePath==='netslice'">
43 <i class="fa fa-sitemap" aria-hidden="true"></i>&nbsp;{{'SHOWGRAPH' | translate}}
44 </button>
45 <button type="button" class="btn btn-primary mr-2" (click)="update(true)" [hidden]="navigatePath==='netslice'">
46 <i class="fa fa-save" aria-hidden="true"></i>&nbsp;{{'UPDATESHOWGRAPH' | translate}}
47 </button>
48 <button type="button" class="btn btn-primary" (click)="update(false)">
49 <i class="fa fa-save" aria-hidden="true"></i>&nbsp;{{'UPDATE' | translate}}
50 </button>
51 </div>
52 </div>
53 </form>
54 <div class="ngx-codemirror" *ngIf="defaults[mode] else noData">
55 <ngx-codemirror [options]="options" [ngModel]="defaults[mode]" [disabled]="readOnly" [autoFocus]="true"
56 (ngModelChange)="handleChange($event)"></ngx-codemirror>
57 </div>
58 <ng-template #noData>
59 {{'NODATAERROR' | translate}}
60 </ng-template>
61 <app-loader [waitingMessage]="message" *ngIf="isLoadingResults"></app-loader>