blob: f02ed6293a39bb965976545c2376c31caf712cde [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001<div class="drawing-board-header">
2 <div class="left-header">
3 <span class="vid-logo-small"></span>
4 <span class="icon-back">
5 <svg-icon
6 (click)="closePage()"
7 [testId]="'backBtn'"
8 [size]="'large'"
9 [name]="'navigation-arrow-back'">
10 </svg-icon>
11 </span>
12
13 <div class="header-col middleDetails" style="padding-top: 5px;padding-left: 13px;line-height: 100%;" *ngIf="isServiceFailed">
14 <custom-popover class="failed-popover-wrap" [value]= "serviceStatusMessage" [placement]="'bottom'" [popoverType]="'error'">
15 <span [attr.data-tests-id]="'service-failed-msg'" class="failed-msg labelPosition" >Failed</span>
16 </custom-popover>
17 </div>
18 <div class="header-col middleDetails" style="padding-top: 0px;padding-left: 13px;line-height: 100%;padding-right: 50px;">
19 <span [attr.data-tests-id]="'serviceInstance'" class="service-instance-label labelPosition">Service instance:</span>
20 <span [attr.data-tests-id]="'serviceName'" [ngClass]="{'deleted' : isDeleted}" class="service-instance-name">{{serviceName}}</span>
21 </div>
22 <div class="header-col middleDetails notShowOnCreateMode"
23 style="padding-top: 0px;padding-left: 13px;line-height: 100%;">
24 <span [attr.data-tests-id]="'orchStatusLabel'" class="service-instance-label labelPosition">Orch Status:</span>
25 <span [attr.data-tests-id]="'orchStatusValue'" class="orch-status-value">{{serviceOrchStatus}}</span>
26 </div>
27 <div class="quantity-container header-col middleDetails"
28 style="padding-top: 0px;padding-left: 13px;line-height: 100%;"
29 tooltip="Number of services to instantiate including all their objects as defined below">
30 <span [attr.data-tests-id]="'quantityLabel'" class="quantity-instance-label labelPosition">Scale Times:</span>
31 <span [attr.data-tests-id]="'servicesQuantity'" class="scale-value"
32 style="font-family: OpenSans-Semibold;font-size: 13px;"> {{numServicesToDeploy}} </span>
33 </div>
34
35 <span [attr.data-tests-id]="'serviceStatus'" class="status" tooltip="{{status}}"></span>
36 <span [attr.data-tests-id]="'isViewOnly-status-test'" class="service-instance-label purple">{{getModeName()}}</span>
37 </div>
38
39
40 <div class="right-header">
41 <span class="menu-container notShowOnViewMode notShowOnRetryMode">
42 <span [attr.data-tests-id]="'openMenuBtn'" class="icon-browse" (click)="onContextMenu($event)"></span>
43 <context-menu>
44 <ng-template *ngIf="drawingBoardHeaderService?.showEditService(mode, serviceModelId)" contextMenuItem (execute)="editService()">
45 <div [attr.data-tests-id]="'context-menu-header-edit-item'">
46 <span class="icon-edit"></span>Edit</div>
47 </ng-template>
48 <ng-template *ngIf="mode === 'EDIT'" contextMenuItem
49 (execute)="isDeleted=!isDeleted; drawingBoardHeaderService.deleteService(serviceModelId,isDeleted)">
50 <div [attr.data-tests-id]="'context-menu-header-delete-item'"><span class="icon-trash"></span>{{isDeleted ? 'Undo delete': 'Delete'}}</div>
51 </ng-template>
52 <ng-template *ngIf="mode !== 'CREATE'" contextMenuItem
53 (execute)="drawingBoardHeaderService.showAuditInfo(serviceModelId)">
54 <div [attr.data-tests-id]="'context-menu-header-audit-item'" style="float: left;margin-top: 8px;">
55 <svg-icon
56 [ngClass]="'eye-o'"
57 class="eye-o"
58 [size]="'small'"
59 [name]="'eye-o'">
60 </svg-icon></div>
61 <div style="padding-left: 12px;">Show Audit Info</div>
62 </ng-template>
63 </context-menu>
64 </span>
65 <button [disabled]="drawingBoardHeaderService?.deployShouldBeDisabled(serviceModelId, mode)"
66 *ngIf="mode !== 'VIEW' && mode !== 'RETRY'; else viewEditButton"
67 [attr.data-tests-id]="'deployBtn'"
68 (click)="deployService()"
69 class="deploy-btn">{{drawingBoardHeaderService?.getModeButton(mode)}}</button>
70 <ng-template #viewEditButton>
71 <button [disabled]="!isPermitted()"
72 [attr.data-tests-id]="'editBtn'"
73 (click)="editViewEdit()"
74 class="deploy-btn">{{drawingBoardHeaderService?.getButtonText(mode)}}
75 </button>
76 </ng-template>
77 </div>
78</div>