blob: 610986279fedbdf6d02b74ec9ac29693a99f6326 [file] [log] [blame]
Ittay Stern6f900cc2018-08-29 17:01:32 +03001<error-msg></error-msg>
2<div class="drawing-board-tree" style="height: calc(100vh - 55px);">
3 <div *ngIf="nodes?.length == 0" style="text-align: center; margin-top: 50px;">
Ittay Sternf7926712019-07-07 19:23:03 +03004
5 <no-content-message-and-icon *ngIf="objectToModelTreeService.numberOfPlusButton != 0" class="span-over"
Ittay Stern6f900cc2018-08-29 17:01:32 +03006 data-title="Please add objects (VNFs, network, modules etc.)"
7 title2="from the left tree to design the service instance"
8 subtitle="Once done, click Deploy to start instantiation"
9 iconPath="./assets/img/UPLOAD.svg"
10 iconClass="upload-icon-service-planing"></no-content-message-and-icon>
Ittay Sternf7926712019-07-07 19:23:03 +030011
12 <no-content-message-and-icon *ngIf="objectToModelTreeService.numberOfPlusButton == 0" class="span-over"
13 data-title="No objects to add in this service instance."
14 title2=""
15 subtitle="Click Deploy to start instantiation"
16 iconPath="./assets/img/UPLOAD.svg"
17 iconClass="upload-icon-service-planing"></no-content-message-and-icon>
Ittay Stern6f900cc2018-08-29 17:01:32 +030018 </div>
19 <div class="tree-header" *ngIf="nodes?.length > 0">
20 <div class="title-tree">Instance:</div>
21 <search-component (updateNodes)="updateNodes($event)"
Ittay Sternf7926712019-07-07 19:23:03 +030022 [nodes]="nodes" [tree]="tree"
23 [inputTestId]="'search-right-tree'"
24 *ngIf="drawingBoardTreeService.isViewEditFlagTrue()"></search-component>
Ittay Stern6f900cc2018-08-29 17:01:32 +030025 </div>
26 <tree-root [attr.data-tests-id]="'drawing-board-tree'" #tree [nodes]="nodes" [options]="options"
27 id="drawing-board-tree">
28
Ittay Sternf7926712019-07-07 19:23:03 +030029 <ng-template #treeNodeTemplate let-node let-index="index">
Yoav Schneidermanecfe8e22019-12-29 14:33:21 +020030 <div class="main-row" [attr.id]="getNodeId(node)"
31 [attr.data-tests-id]="'node-'+node.data.modelId +'-' +node.data.modelName"
Ittay Sternf7926712019-07-07 19:23:03 +030032 (click)="selectNode(node)"
33 [ngClass]="{'isLinked' : isLinkedInstance(node?.data)}">
34 <custom-popover class="failed-popover-wrap" *ngIf="node?.data?.isFailed" [value]="node?.data?.statusMessage"
35 [placement]="'left'" [popoverType]="'error'">
36 <div class="failed-msg" [attr.data-tests-id]="'failed-error-message'" *ngIf="node?.data?.isFailed">Failed
Ittay Stern6f900cc2018-08-29 17:01:32 +030037 </div>
Ittay Sternf7926712019-07-07 19:23:03 +030038 </custom-popover>
39 <div class="instance-type" style="position: relative;border: 1px solid #D2D2CD;">
40 <div *ngIf="node?.data?.action == 'Create'" class="notShowOnViewMode notShowOnCreateMode newIcon"></div>
41 <div><span title="{{node.data.type}}"
42 [attr.data-tests-id]="'node-type-indicator'">{{node?.data?.typeName}}</span></div>
43 <div *ngIf="isLinkedInstance(node?.data)">
Yoav Schneiderman32797212020-01-15 15:32:10 +020044 <custom-icon
Ittay Sternf7926712019-07-07 19:23:03 +030045 [ngClass]="'link'"
46 class="icon-link"
47 [size]="'small'"
48 [name]="'link'">
Yoav Schneiderman32797212020-01-15 15:32:10 +020049 </custom-icon>
Ittay Sternf7926712019-07-07 19:23:03 +030050 </div>
51 </div>
52 <div class="model-info" [ngClass]="{'rightBorder' : pageMode === 'VIEW'}">
Ittay Stern6f900cc2018-08-29 17:01:32 +030053 <span class="header-info">
54 <span class="property-name">
55 <span class="auto-name"
56 [ngClass]="{'text_decoration' : drawingBoardTreeService.isTextDecoration(node)}"
57 [innerHtml]="getNodeName(node, filterValue) | safe : 'html'"
58 [attr.data-tests-id]="'node-name'"
59 ></span>
60 </span>
61 </span>
Ittay Sternf7926712019-07-07 19:23:03 +030062 <tree-node-header-properties
63 *ngIf="(node?.data?.action !== 'Create' || node?.data?.parentType === 'VnfGroup') && !node?.data?.isFailed"
64 [properties]="node.data.statusProperties"></tree-node-header-properties>
65 </div>
66 <div class="scaling invalid" *ngIf="node?.data?.errors?.scalingError" [attr.data-tests-id]="'scaling-policy'">
67 <span>Limit</span><span>{{node?.data?.limitMembers}}</span>
68 </div>
69 <div class="model-actions notShowOnViewMode ">
Ittay Stern6f900cc2018-08-29 17:01:32 +030070 <span class="icon-browse"
Ittay Sternf7926712019-07-07 19:23:03 +030071 [ngClass]="{'isLinked' : isLinkedInstance(node?.data)}"
Ittay Stern6f900cc2018-08-29 17:01:32 +030072 [attr.data-tests-id]="'node-'+node.data.modelId +'-' +node.data.modelName+'-menu-btn'"
73 (click)="onContextMenu($event, node)">
74 <context-menu>
75 <ng-template *ngFor="let contextMenuOption of contextMenuOptions"
76 contextMenuItem (execute)="executeMenuAction(contextMenuOption.methodName)"
77 [visible]="isVisible(currentNode, contextMenuOption.methodName)"
78 [enabled]="isEnabled(currentNode, serviceModelId, contextMenuOption.methodName)">
79 <div [attr.data-tests-id]="contextMenuOption.dataTestId">
80 <div style="float: left;margin-top: 3px;">
Yoav Schneiderman32797212020-01-15 15:32:10 +020081 <custom-icon
Ittay Stern6f900cc2018-08-29 17:01:32 +030082 class="icon-edit"
Einat Vinouzee1f79742019-08-27 16:01:01 +030083 [ngClass]="contextMenuOption.iconClass"
Ittay Stern6f900cc2018-08-29 17:01:32 +030084 [size]="'small'"
85 [name]="contextMenuOption.iconClass">
Yoav Schneiderman32797212020-01-15 15:32:10 +020086 </custom-icon></div>
Einat Vinouzee1f79742019-08-27 16:01:01 +030087 <div style="padding-left: 25px;">{{getcontextMenuOptionLabel(contextMenuOption)}}</div>
Ittay Stern6f900cc2018-08-29 17:01:32 +030088 </div>
89 </ng-template>
90 </context-menu>
91 </span>
Ittay Sternf7926712019-07-07 19:23:03 +030092 <span
Yoav Schneidermanecfe8e22019-12-29 14:33:21 +020093 *ngIf="drawingBoardTreeService.isVNFMissingData(node, serviceModelId) || drawingBoardTreeService.isVFModuleMissingData(node, serviceModelId)"
Ittay Sternf7926712019-07-07 19:23:03 +030094 tooltip="{{ missingDataTooltip }}"
95 tooltipPlacement="left"
Yoav Schneidermanecfe8e22019-12-29 14:33:21 +020096 [attr.data-tests-id]="'node-'+ node.data.modelId + '-' + node.data.modelName +'-alert-icon'"
Ittay Sternf7926712019-07-07 19:23:03 +030097 class="icon-alert">
Yoav Schneiderman32797212020-01-15 15:32:10 +020098 <custom-icon
Ittay Stern6f900cc2018-08-29 17:01:32 +030099 [mode]="'warning'"
100 [testId]="'icon-alert'"
101 [size]="'medium'"
102 [name]="'alert-triangle-o'">
Yoav Schneiderman32797212020-01-15 15:32:10 +0200103 </custom-icon>
Einat Vinouzee1f79742019-08-27 16:01:01 +0300104 </span>
Ittay Sternf7926712019-07-07 19:23:03 +0300105 </div>
Ittay Stern6f900cc2018-08-29 17:01:32 +0300106
Ittay Sternf7926712019-07-07 19:23:03 +0300107 <div class="action-status">
Einat Vinouzee1f79742019-08-27 16:01:01 +0300108 <span
109 [ngClass]="isUpgraded(node)?'action-status-type upgrade':'action-status-type delete'"
Yoav Schneidermanecfe8e22019-12-29 14:33:21 +0200110 [attr.data-tests-id]="isUpgraded(node)?'action-status-type':'delete-status-type'"
111 [ngStyle]="{ 'opacity': isUpgraded(node) || isDeleted(node) ? '1' : '0'}">{{isUpgraded(node) ? "Upgrade" : "Delete"}}</span>
Ittay Sternf7926712019-07-07 19:23:03 +0300112 </div>
Ittay Sternf7926712019-07-07 19:23:03 +0300113 </div>
114 </ng-template>
Ittay Stern6f900cc2018-08-29 17:01:32 +0300115 </tree-root>
116</div>
117
118
119
Einat Vinouzee1f79742019-08-27 16:01:01 +0300120