Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 1 | <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 Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 4 | |
| 5 | <no-content-message-and-icon *ngIf="objectToModelTreeService.numberOfPlusButton != 0" class="span-over" |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 6 | 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 Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 11 | |
| 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 Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 18 | </div> |
| 19 | <div class="tree-header" *ngIf="nodes?.length > 0"> |
| 20 | <div class="title-tree">Instance:</div> |
| 21 | <search-component (updateNodes)="updateNodes($event)" |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 22 | [nodes]="nodes" [tree]="tree" |
| 23 | [inputTestId]="'search-right-tree'" |
| 24 | *ngIf="drawingBoardTreeService.isViewEditFlagTrue()"></search-component> |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 25 | </div> |
| 26 | <tree-root [attr.data-tests-id]="'drawing-board-tree'" #tree [nodes]="nodes" [options]="options" |
| 27 | id="drawing-board-tree"> |
| 28 | |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 29 | <ng-template #treeNodeTemplate let-node let-index="index"> |
Yoav Schneiderman | ecfe8e2 | 2019-12-29 14:33:21 +0200 | [diff] [blame] | 30 | <div class="main-row" [attr.id]="getNodeId(node)" |
| 31 | [attr.data-tests-id]="'node-'+node.data.modelId +'-' +node.data.modelName" |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 32 | (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 Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 37 | </div> |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 38 | </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 Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 44 | <custom-icon |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 45 | [ngClass]="'link'" |
| 46 | class="icon-link" |
| 47 | [size]="'small'" |
| 48 | [name]="'link'"> |
Yoav Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 49 | </custom-icon> |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 50 | </div> |
| 51 | </div> |
| 52 | <div class="model-info" [ngClass]="{'rightBorder' : pageMode === 'VIEW'}"> |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 53 | <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 Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 62 | <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 Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 70 | <span class="icon-browse" |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 71 | [ngClass]="{'isLinked' : isLinkedInstance(node?.data)}" |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 72 | [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 Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 81 | <custom-icon |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 82 | class="icon-edit" |
Einat Vinouze | e1f7974 | 2019-08-27 16:01:01 +0300 | [diff] [blame] | 83 | [ngClass]="contextMenuOption.iconClass" |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 84 | [size]="'small'" |
| 85 | [name]="contextMenuOption.iconClass"> |
Yoav Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 86 | </custom-icon></div> |
Einat Vinouze | e1f7974 | 2019-08-27 16:01:01 +0300 | [diff] [blame] | 87 | <div style="padding-left: 25px;">{{getcontextMenuOptionLabel(contextMenuOption)}}</div> |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 88 | </div> |
| 89 | </ng-template> |
| 90 | </context-menu> |
| 91 | </span> |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 92 | <span |
Yoav Schneiderman | ecfe8e2 | 2019-12-29 14:33:21 +0200 | [diff] [blame] | 93 | *ngIf="drawingBoardTreeService.isVNFMissingData(node, serviceModelId) || drawingBoardTreeService.isVFModuleMissingData(node, serviceModelId)" |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 94 | tooltip="{{ missingDataTooltip }}" |
| 95 | tooltipPlacement="left" |
Yoav Schneiderman | ecfe8e2 | 2019-12-29 14:33:21 +0200 | [diff] [blame] | 96 | [attr.data-tests-id]="'node-'+ node.data.modelId + '-' + node.data.modelName +'-alert-icon'" |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 97 | class="icon-alert"> |
Yoav Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 98 | <custom-icon |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 99 | [mode]="'warning'" |
| 100 | [testId]="'icon-alert'" |
| 101 | [size]="'medium'" |
| 102 | [name]="'alert-triangle-o'"> |
Yoav Schneiderman | 3279721 | 2020-01-15 15:32:10 +0200 | [diff] [blame] | 103 | </custom-icon> |
Einat Vinouze | e1f7974 | 2019-08-27 16:01:01 +0300 | [diff] [blame] | 104 | </span> |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 105 | </div> |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 106 | |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 107 | <div class="action-status"> |
Einat Vinouze | e1f7974 | 2019-08-27 16:01:01 +0300 | [diff] [blame] | 108 | <span |
| 109 | [ngClass]="isUpgraded(node)?'action-status-type upgrade':'action-status-type delete'" |
Yoav Schneiderman | ecfe8e2 | 2019-12-29 14:33:21 +0200 | [diff] [blame] | 110 | [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 Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 112 | </div> |
Ittay Stern | f792671 | 2019-07-07 19:23:03 +0300 | [diff] [blame] | 113 | </div> |
| 114 | </ng-template> |
Ittay Stern | 6f900cc | 2018-08-29 17:01:32 +0300 | [diff] [blame] | 115 | </tree-root> |
| 116 | </div> |
| 117 | |
| 118 | |
| 119 | |
Einat Vinouze | e1f7974 | 2019-08-27 16:01:01 +0300 | [diff] [blame] | 120 | |