Template interface Function modification
[dcaegen2/services.git] / components / datalake-handler / admin / src / src / app / dashboard-setting / template / template-list / template-list.component.html
1 <!--
2     Copyright (C) 2019 CMCC, Inc. and others. All rights reserved.
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 <div class="topic-list-panel">
17   <div class="row">
18     <div class="col-md-12">
19       <div class="d-flex justify-content-end p-2">
20         <!-- Search bar -->
21         <div class="p-1">
22           <div class="input-group">
23             <input #searchText type="text" class="form-control dl-input-text-search" placeholder="Search..."
24               (keyup)="this.updateFilter($event.target.value)" />
25             <div class="input-group-append">
26               <button type="button" class="btn dl-btn-dark">
27                 <i class="fa fa-search"></i>
28               </button>
29             </div>
30           </div>
31         </div>
32
33         <!-- button -->
34         <div class="p-1">
35           <button class="btn dl-btn-dark" (click)="newTemplateModal();">
36             {{ "NEW_TEMPLATE" | translate }}
37           </button>
38         </div>
39       </div>
40     </div>
41   </div>
42   <!-- datatable -->
43   <div class="row">
44     <div class="col-md-12">
45       <ngx-datatable #mytemlate class="bootstrap" [rows]="template_list" [columnMode]="'force'" [headerHeight]="40"
46         [footerHeight]="40" [rowHeight]="50" [scrollbarV]="true" [scrollbarH]="true"
47         [loadingIndicator]="loadingIndicator" [messages]="mesgNoData" [limit]="10"  (activate)="onActivate($event)">
48
49         <!--<ngx-datatable-column [width]="40" name="{{ 'No' | translate }}" prop="id"-->
50           <!--headerClass="d-flex justify-content-center" cellClass="d-flex justify-content-center">-->
51           <!--<div>-->
52             <!--<ng-template let-row="row">-->
53               <!--<span>{{ row.id }}</span>-->
54             <!--</ng-template>-->
55           <!--</div>-->
56         <!--</ngx-datatable-column>-->
57
58         <ngx-datatable-column [width]="100" name="{{ 'TEMPLATE_NAME' | translate }}" prop="name" headerClass="d-flex justify-content-center" cellClass="d-flex justify-content-center">
59           <ng-template let-row="row" ngx-datatable-cell-template>
60             <span>{{ row.name }}</span>
61           </ng-template>
62         </ngx-datatable-column>
63
64         <ngx-datatable-column [width]="180" name="{{ 'TEMPLATE_TYPE' | translate }}" prop="type">
65           <ng-template let-row="row" ngx-datatable-cell-template>
66             <span>{{ row.designType }}</span>
67           </ng-template>
68         </ngx-datatable-column>
69
70         <ngx-datatable-column [width]="220" name="{{ 'TOPICS_NAME' | translate }}" prop="topic">
71           <ng-template let-row="row" ngx-datatable-cell-template>
72             <span>{{ row.topic }}</span>
73           </ng-template>
74         </ngx-datatable-column>
75
76         <ngx-datatable-column [width]="20" name="{{ 'DEPLOY_TO_DASHBOARD' | translate }}"
77           headerClass="d-flex justify-content-center" cellClass="d-flex justify-content-center">
78           <div>
79             <ng-template let-row="row" ngx-datatable-cell-template>
80               <span  (click)="this.deployTemplate(row.id);"  class="dl-btn-dark" style="cursor: pointer">&nbsp;&nbsp;{{ 'DEPLOY' | translate }}&nbsp;&nbsp;</span>
81             </ng-template>
82           </div>
83         </ngx-datatable-column>
84         <ngx-datatable-column [width]="10" name="" sortable="false" cellClass="d-flex justify-content-center">
85           <ng-template let-row="row" ngx-datatable-cell-template>
86             <span>
87               <button class="btn action-icon-setting" (click)="this.deleteTemplateModel(row.id);">
88                 <i class="fas fa-trash-alt fa-xs"></i>
89               </button>
90             </span>
91           </ng-template>
92         </ngx-datatable-column>
93
94         <!-- <ngx-datatable-footer>
95             <ng-template ngx-datatable-footer-template let-rowCount="rowCount" let-pageSize="pageSize"
96               let-selectedCount="selectedCount" let-curPage="curPage" let-offset="offset" let-isVisible="isVisible">
97               <div class="page-count">
98                 total: {{ rowCount.toLocaleString() }}
99               </div>
100               <datatable-pager [pagerLeftArrowIcon]="'datatable-icon-left'" [pagerRightArrowIcon]="'datatable-icon-right'"
101                 [pagerPreviousIcon]="'datatable-icon-prev'" [pagerNextIcon]="'datatable-icon-skip'" [page]="curPage"
102                 [size]="pageSize" [count]="rowCount" [hidden]="!(rowCount / pageSize > 1)"
103                 (change)="topicTable.onFooterPage($event)">
104               </datatable-pager>
105             </ng-template>
106           </ngx-datatable-footer> -->
107       </ngx-datatable>
108     </div>
109   </div>
110 </div>