15
15
~ See the License for the specific language governing permissions and
16
16
~ limitations under the License.
17
17
-->
18
- < div *ngIf ="dataSource.data.length == 0; else tableBlock ">
18
+ < div *ngIf ="dataSource.data.length == 0; else tableBlock ">
19
19
There are currently no instances running.
20
20
</ div >
21
21
< ng-template #tableBlock >
51
51
52
52
< ng-container matColumnDef ="Details ">
53
53
< mat-header-cell *matHeaderCellDef > </ mat-header-cell >
54
- < mat-cell *matCellDef ="let element; let row " class ="example-element-row " [class.example-expanded-row] ="expandedElement === element "
54
+ < mat-cell *matCellDef ="let element; let row " class ="example-element-row "
55
+ [class.example-expanded-row] ="expandedElement === element "
55
56
(click) ="expandedElement = expandedElement === element ? null : element; data = onRowClicked(row) ">
56
- < button mat-button [ngClass] = "'customOutline' ">
57
+ < button mat-button [ngClass] = "'customOutline' ">
57
58
View Details
58
59
</ button >
59
60
</ mat-cell >
60
61
</ ng-container >
61
62
62
- < ng-container matColumnDef ="action ">
63
- < mat-header-cell [ngClass] ="'customWidthClass' " *matHeaderCellDef > Action </ mat-header-cell >
64
- < mat-cell [ngClass] ="'customWidthClass customWidthClassNew' " *matCellDef ="let element; let i=index; let row; " >
65
- < div *ngIf ="!element.dockerId; else actions ">
66
- Instance not hosted with docker.
67
- </ div >
68
- < ng-template #actions >
69
- < button [disabled] ="!(element.instanceState==='Stopped') " mat-icon-button (click) = startInstance(element.id) matTooltip ="Start ">
70
- < mat-icon aria-label ="play_circle_filled_white "> play_circle_filled_white</ mat-icon >
71
- </ button >
72
- < button [disabled] ="!(element.instanceState==='Running') " mat-icon-button (click) = stopInstance(element.id) matTooltip ="Stop ">
73
- < mat-icon aria-label ="stop "> stop</ mat-icon >
74
- </ button >
75
- < button [disabled] ="!(element.instanceState==='Running') " mat-icon-button (click) = pauseInstance(element.id) matTooltip ="Pause ">
76
- < mat-icon aria-label ="pause_circle_outline "> pause_circle_outline</ mat-icon >
77
- </ button >
78
- < button [disabled] ="!(element.instanceState==='Paused') " mat-icon-button (click) = resumeInstance(element.id) matTooltip ="Resume ">
79
- < mat-icon aria-label ="play_circle_outline "> play_circle_outline</ mat-icon >
80
- </ button >
81
- < button [disabled] ="!(element.instanceState==='Stopped') " id ="deleteButton " (click) ="openDeleteDialog(i,row, element.id) " mat-icon-button matTooltip ="Delete ">
82
- < mat-icon aria-label ="delete " id ="deleteButton " > delete</ mat-icon >
83
- </ button >
84
- </ ng-template >
85
- </ mat-cell >
63
+ < ng-container matColumnDef ="action ">
64
+ < mat-header-cell [ngClass] ="'customWidthClass' " *matHeaderCellDef > Action </ mat-header-cell >
65
+ < mat-cell [ngClass] ="'customWidthClass customWidthClassNew' "
66
+ *matCellDef ="let element; let i=index; let row; ">
67
+ < div *ngIf ="!element.dockerId; else actions ">
68
+ Instance not hosted with docker.
69
+ </ div >
70
+ < ng-template #actions >
71
+ < button [disabled] ="!(element.instanceState==='Stopped') " mat-icon-button
72
+ (click) =startInstance(element.id) matTooltip ="Start ">
73
+ < mat-icon aria-label ="play_circle_filled_white "> play_circle_filled_white</ mat-icon >
74
+ </ button >
75
+ < button [disabled] ="!(element.instanceState==='Running') " mat-icon-button
76
+ (click) =stopInstance(element.id) matTooltip ="Stop ">
77
+ < mat-icon aria-label ="stop "> stop</ mat-icon >
78
+ </ button >
79
+ < button [disabled] ="!(element.instanceState==='Running') " mat-icon-button
80
+ (click) =pauseInstance(element.id) matTooltip ="Pause ">
81
+ < mat-icon aria-label ="pause_circle_outline "> pause_circle_outline</ mat-icon >
82
+ </ button >
83
+ < button [disabled] ="!(element.instanceState==='Paused') " mat-icon-button
84
+ (click) =resumeInstance(element.id) matTooltip ="Resume ">
85
+ < mat-icon aria-label ="play_circle_outline "> play_circle_outline</ mat-icon >
86
+ </ button >
87
+ < button [disabled] ="!(element.instanceState==='Stopped') " id ="deleteButton "
88
+ (click) ="openDeleteDialog(i,row, element.id) " mat-icon-button matTooltip ="Delete ">
89
+ < mat-icon aria-label ="delete " id ="deleteButton "> delete</ mat-icon >
90
+ </ button >
91
+ </ ng-template >
92
+ </ mat-cell >
86
93
87
94
</ ng-container >
88
-
95
+
89
96
< ng-container matColumnDef ="expandedDetail ">
90
97
< td mat-cell *matCellDef ="let element " [attr.colspan] ="displayedColumns.length ">
91
- < div class ="example-element-detail " [@detailExpand] ="element == expandedElement ? 'expanded' : 'collapsed' ">
98
+ < div class ="example-element-detail "
99
+ [@detailExpand] ="element == expandedElement ? 'expanded' : 'collapsed' ">
92
100
< table mat-table [dataSource] ="data " class ="mat-elevation-z8 ">
93
101
< ng-container matColumnDef ="dockerId ">
94
- < th mat-header-cell *matHeaderCellDef > DockerID </ th >
95
- < td mat-cell *matCellDef ="let element "> {{element.dockerId}} </ td >
96
- </ ng-container >
97
- < ng-container matColumnDef ="labels ">
98
- < th mat-header-cell *matHeaderCellDef > Labels </ th >
99
- < td mat-cell *matCellDef ="let element "> {{element.labels}} </ td >
100
- </ ng-container >
101
- < tr mat-header-row *matHeaderRowDef ="columnsToDisplay "> </ tr >
102
- < tr mat-row *matRowDef ="let row; columns: columnsToDisplay; "> </ tr >
103
- </ table >
104
-
105
- </ div >
106
- </ td >
102
+ < th mat-header-cell *matHeaderCellDef > DockerID </ th >
103
+ < td mat-cell *matCellDef ="let element "> {{element.dockerId}} </ td >
104
+ </ ng-container >
105
+ < ng-container matColumnDef ="labels ">
106
+ < th mat-header-cell *matHeaderCellDef > Labels </ th >
107
+ < td mat-cell *matCellDef ="let element "> {{element.labels}} </ td >
107
108
</ ng-container >
109
+ < tr mat-header-row *matHeaderRowDef ="columnsToDisplay "> </ tr >
110
+ < tr mat-row *matRowDef ="let row; columns: columnsToDisplay; "> </ tr >
111
+ </ table >
108
112
109
- < mat-header-row *matHeaderRowDef =" displayedColumns " > </ mat-header-row >
110
- < mat-row *matRowDef =" let row; columns: displayedColumns; " > </ mat-row >
111
- < tr mat-row *matRowDef =" let row; columns: ['expandedDetail'] " class =" example-detail-row " > </ tr >
113
+ </ div >
114
+ </ td >
115
+ </ ng-container >
112
116
113
- </ table >
117
+ < mat-header-row *matHeaderRowDef ="displayedColumns "> </ mat-header-row >
118
+ < mat-row *matRowDef ="let row; columns: displayedColumns; "> </ mat-row >
119
+ < tr mat-row *matRowDef ="let row; columns: ['expandedDetail'] " class ="example-detail-row "> </ tr >
120
+
121
+ </ table >
114
122
</ div >
115
123
</ ng-template >
116
124
117
125
< mat-paginator class ="paginator " [pageSizeOptions] ="[5, 10, 20] "> </ mat-paginator >
118
126
119
127
< div class ="button-row ">
120
128
< button mat-raised-button color ="primary " id ="addButton " (click) ="openAddDialog() "> Add Instance</ button >
121
- </ div >
129
+ </ div >
0 commit comments