3ed2173b154f1aac2ba3abda6338d1b93979ab2e
[sdc.git] /
1 <div class="deployment-artifact-page" *ngIf="(workspaceState$ | async) as state">
2     <svg-icon-label *ngIf="!state.isViewOnly" class="add-artifact-btn" [clickable]="true" [mode]="'primary'" [labelPlacement]="'right'"
3                     [label]="'Add'" [name]="'plus'"
4                     (click)="addOrUpdateArtifact()"></svg-icon-label>
5     <ngx-datatable
6             columnMode="flex"
7             [headerHeight]="40"
8             [footerHeight]="'undefined'"
9             [reorderable]="false"
10             [swapColumns]="false"
11                 [rows]="deploymentArtifacts$ | async"
12             #deploymentArtifactsTable>
13         <ngx-datatable-column [resizeable]="false" name="Name" [flexGrow]="1">
14             <ng-template ngx-datatable-cell-template let-row="row">
15                 <div *ngIf="row.generatedFromId" class="env-artifact-container">
16                      <div class="env-artifact"></div>
17                 </div>
18                 <span sdc-tooltip [tooltip-text]="row.artifactDisplayName" [tooltip-placement]="3" [attr.data-tests-id]="'artifactDisplayName_' + row.artifactDisplayName">{{row.artifactDisplayName}}</span>
19                 <span *ngIf="row.description && row.description.length > 0" class="info">
20                     <svg-icon [clickable]="true" [name]="'comment'" [mode]="'primary2'" (click)="openPopOver('Description',row.description,{x:$event.pageX , y:$event.pageY },'bottom')"></svg-icon>
21                 </span>
22             </ng-template>
23         </ngx-datatable-column>
24         <ngx-datatable-column [resizeable]="false" name="Filename" [flexGrow]="1">
25             <ng-template ngx-datatable-cell-template let-row="row">
26                 <span sdc-tooltip [tooltip-text]="row.artifactName" [tooltip-placement]="3" [attr.data-tests-id]="'artifactName_' + row.artifactName">{{row.artifactName}}</span>
27             </ng-template>
28         </ngx-datatable-column>
29         <ngx-datatable-column [resizeable]="false" name="Type" [flexGrow]="0.6">
30             <ng-template ngx-datatable-cell-template let-row="row">
31                 <span sdc-tooltip [tooltip-text]="row.artifactType" [tooltip-placement]="3" [attr.data-tests-id]="'artifactType_' + row.artifactDisplayName">{{row.artifactType}}</span>
32             </ng-template>
33         </ngx-datatable-column> exactly 2 tosca artifacts
34         <ngx-datatable-column [resizeable]="false" name="Version" [flexGrow]="0.3">
35             <ng-template ngx-datatable-cell-template let-row="row">
36                 <span [attr.data-tests-id]="'artifactVersion_' + row.artifactDisplayName">{{ row.artifactVersion }}</span>
37             </ng-template>
38         </ngx-datatable-column>
39         <ngx-datatable-column [resizeable]="false" name="UUID" [flexGrow]="1">
40             <ng-template ngx-datatable-cell-template let-row="row">
41                 <span sdc-tooltip [tooltip-text]="row.artifactUUID" [tooltip-placement]="3">{{ row.artifactUUID }}</span>
42             </ng-template>
43         </ngx-datatable-column>
44         <ngx-datatable-column [resizeable]="false" [flexGrow]="0.6">
45             <ng-template ngx-datatable-cell-template let-row="row">
46                 <div class="download-artifact-button">
47                     <svg-icon *ngIf="!row.heatParameters?.length && !state.isViewOnly" class="action-icon action-icon-1" [mode]="'primary2'" [name]="'edit-o'"
48                               testId="edit_{{row.artifactDisplayName}}" clickable="true" size="medium"
49                               (click)="addOrUpdateArtifact(row, state.isViewOnly)"></svg-icon>
50                     <svg-icon *ngIf="row.heatParameters?.length && !state.isViewOnly" class="action-icon action-icon-2" [mode]="'primary2'" [name]="'indesign_status'"
51                               testId="update_heat_params_{{row.artifactDisplayName}}" clickable="true" size="medium"
52                               (click)="updateEnvParams(row, state.isViewOnly)"></svg-icon>
53                     <svg-icon *ngIf="!row.isFromCsar && !state.isViewOnly" class="action-icon action-icon-3" [mode]="'primary2'" [name]="'trash-o'"
54                               testId="delete_{{row.artifactDisplayName}}" clickable="true" size="medium" (click)="deleteArtifact(row)"></svg-icon>
55                     <svg-icon *ngIf="row.isGenericBrowseable()" class="action-icon action-icon-4" [mode]="'primary2'" [name]="'search-o'"
56                               testId="gab-{{row.artifactDisplayName}}" clickable="true" size="medium" (click)="openGenericArtifactBrowserModal(row)"></svg-icon>
57
58                     <!--Download-->
59                 </div>
60             </ng-template>
61         </ngx-datatable-column>
62
63         <ngx-datatable-footer>
64             <ng-template ngx-datatable-footer-template>
65                 <div class="table-footer-container">
66                     <sdc-button *ngIf="!state.isViewOnly" [type]="'secondary'"
67                                 [testId]="'add_artifact_btn'"
68                                 [text]="'DEPLOYMENT_ARTIFACT_BUTTON_ADD_OTHER' | translate"
69                                 [icon_name]="'plus-circle-o'"
70                                 [icon_mode] = "'secondary'"
71                                 [icon_position]="'left'"
72                                 (click)="addOrUpdateArtifact()">
73                     </sdc-button>
74                 </div>
75             </ng-template>
76         </ngx-datatable-footer>
77     </ngx-datatable>
78 </div>