Skip to content

Commit 1b50ca0

Browse files
authored
Run Migration to Update Control Flow Syntax and Self Closing Tag (#7675)
* update: Migration to self-closing tags * update: Migrate Angular templates to new control flow syntax and fix warnings not auto-resolved by schematic. * revert change
1 parent ea8bd89 commit 1b50ca0

File tree

349 files changed

+11409
-9577
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

349 files changed

+11409
-9577
lines changed

modules/web/src/app/backup/details/automatic-backup/backups/template.html

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
</th>
6969
<td mat-cell
7070
*matCellDef="let element">
71-
<km-relative-time [date]="element.backupFinishedTime"></km-relative-time>
71+
<km-relative-time [date]="element.backupFinishedTime" />
7272
</td>
7373
</ng-container>
7474

@@ -79,7 +79,7 @@
7979
</th>
8080
<td mat-cell
8181
*matCellDef="let element">
82-
<km-relative-time [date]="element.scheduledTime"></km-relative-time>
82+
<km-relative-time [date]="element.scheduledTime" />
8383
</td>
8484
</ng-container>
8585

@@ -108,17 +108,18 @@
108108
*matRowDef="let row; columns: columns;"></tr>
109109
</table>
110110

111-
<div class="km-row km-empty-list-msg"
112-
*ngIf="isEmpty">
111+
@if (isEmpty) {
112+
<div class="km-row km-empty-list-msg">
113113
No backups available.
114114
</div>
115+
}
115116

116117
<div [hidden]="!hasPaginator"
117118
class="km-paginator-container">
118119
<div fxLayout="row"
119120
fxLayoutAlign="flex-end center">
120-
<km-pagination-page-size></km-pagination-page-size>
121-
<mat-paginator showFirstLastButtons></mat-paginator>
121+
<km-pagination-page-size />
122+
<mat-paginator showFirstLastButtons />
122123
</div>
123124
</div>
124125
</mat-card-content>

modules/web/src/app/backup/details/automatic-backup/template.html

Lines changed: 69 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -14,80 +14,74 @@
1414
limitations under the License.
1515
-->
1616

17-
<ng-container *ngIf="!isInitialized">
18-
<mat-spinner color="accent"
19-
class="km-spinner km-with-spacing"
20-
[diameter]="50"></mat-spinner>
21-
</ng-container>
17+
@if (!isInitialized) {
18+
<mat-spinner color="accent"
19+
class="km-spinner km-with-spacing"
20+
[diameter]="50" />
21+
}
2222

23-
<ng-container *ngIf="isInitialized">
24-
<div fxLayout="row">
25-
<button mat-icon-button
26-
color="tertiary"
27-
(click)="goBack()"
28-
matTooltip="Go back to the backup list">
29-
<i class="km-icon-mask km-icon-arrow-left"></i>
30-
</button>
31-
</div>
32-
33-
<mat-card appearance="outlined"
34-
class="info">
35-
<mat-card-header>
36-
<mat-card-title fxFlex
37-
fxLayout="row"
38-
fxLayoutAlign=" center"
39-
class="title">
40-
<i [matTooltip]="getStatus(backup).message"
41-
[ngClass]="getStatus(backup).icon"
42-
class="km-vertical-center"></i>
43-
<div>{{backup.name}}</div>
44-
</mat-card-title>
45-
<div fxFlex></div>
46-
<div fxLayout="row">
47-
<button mat-icon-button
48-
color="tertiary"
49-
[attr.id]="'km-delete-backup-' + backup.name"
50-
(click)="delete(backup)"
51-
[disabled]="!canDelete"
52-
matTooltip="Delete Automatic Backup">
53-
<i class="km-icon-mask km-icon-delete"></i>
54-
</button>
23+
@if (isInitialized) {
24+
<div fxLayout="row">
25+
<button mat-icon-button
26+
color="tertiary"
27+
(click)="goBack()"
28+
matTooltip="Go back to the backup list">
29+
<i class="km-icon-mask km-icon-arrow-left"></i>
30+
</button>
31+
</div>
32+
<mat-card appearance="outlined"
33+
class="info">
34+
<mat-card-header>
35+
<mat-card-title fxFlex
36+
fxLayout="row"
37+
fxLayoutAlign=" center"
38+
class="title">
39+
<i [matTooltip]="getStatus(backup).message"
40+
[ngClass]="getStatus(backup).icon"
41+
class="km-vertical-center"></i>
42+
<div>{{backup.name}}</div>
43+
</mat-card-title>
44+
<div fxFlex></div>
45+
<div fxLayout="row">
46+
<button mat-icon-button
47+
color="tertiary"
48+
[attr.id]="'km-delete-backup-' + backup.name"
49+
(click)="delete(backup)"
50+
[disabled]="!canDelete"
51+
matTooltip="Delete Automatic Backup">
52+
<i class="km-icon-mask km-icon-delete"></i>
53+
</button>
54+
</div>
55+
</mat-card-header>
56+
<mat-card-content fxLayout="row">
57+
<km-property>
58+
<div key>Cluster ID</div>
59+
<div value>{{backup.spec?.clusterId}}</div>
60+
</km-property>
61+
<km-property>
62+
<div key>Destination</div>
63+
<div value>{{backup.spec?.destination}}</div>
64+
</km-property>
65+
<km-property>
66+
<div key>Schedule</div>
67+
<div value>{{backup.spec?.schedule}}</div>
68+
</km-property>
69+
<km-property>
70+
<div key
71+
fxLayout="row"
72+
fxLayoutGap="4px"
73+
fxLayoutAlign=" center">
74+
<div>Keep</div>
75+
<div class="km-icon-info km-pointer"
76+
matTooltip="Keep is the number of backups to keep around before deleting the oldest one. If not set, it will be controlled by the Kubermatic. Only used if Schedule is set."></div>
5577
</div>
56-
</mat-card-header>
57-
58-
<mat-card-content fxLayout="row">
59-
<km-property>
60-
<div key>Cluster ID</div>
61-
<div value>{{backup.spec?.clusterId}}</div>
62-
</km-property>
63-
64-
<km-property>
65-
<div key>Destination</div>
66-
<div value>{{backup.spec?.destination}}</div>
67-
</km-property>
68-
69-
<km-property>
70-
<div key>Schedule</div>
71-
<div value>{{backup.spec?.schedule}}</div>
72-
</km-property>
73-
74-
<km-property>
75-
<div key
76-
fxLayout="row"
77-
fxLayoutGap="4px"
78-
fxLayoutAlign=" center">
79-
<div>Keep</div>
80-
<div class="km-icon-info km-pointer"
81-
matTooltip="Keep is the number of backups to keep around before deleting the oldest one. If not set, it will be controlled by the Kubermatic. Only used if Schedule is set."></div>
82-
</div>
83-
<div value>{{keep(backup)}}</div>
84-
</km-property>
85-
</mat-card-content>
86-
</mat-card>
87-
88-
<km-backup-list [backups]="backup.status.lastBackups"
89-
[projectID]="selectedProject.id"
90-
[clusterID]="backup.spec.clusterId"
91-
[destination]="backup.spec.destination"
92-
[backupHealth]="getStatus(backup).message"></km-backup-list>
93-
</ng-container>
78+
<div value>{{keep(backup)}}</div>
79+
</km-property>
80+
</mat-card-content>
81+
</mat-card>
82+
<km-backup-list [backups]="backup.status.lastBackups"
83+
[projectID]="selectedProject.id"
84+
[clusterID]="backup.spec.clusterId"
85+
[destination]="backup.spec.destination"
86+
[backupHealth]="getStatus(backup).message" />
87+
}

modules/web/src/app/backup/details/snapshot/template.html

Lines changed: 50 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -14,58 +14,54 @@
1414
limitations under the License.
1515
-->
1616

17-
<ng-container *ngIf="!isInitialized">
18-
<mat-spinner color="accent"
19-
class="km-spinner km-with-spacing"
20-
[diameter]="50"></mat-spinner>
21-
</ng-container>
17+
@if (!isInitialized) {
18+
<mat-spinner color="accent"
19+
class="km-spinner km-with-spacing"
20+
[diameter]="50" />
21+
}
2222

23-
<ng-container *ngIf="isInitialized">
24-
<div fxLayout="row">
25-
<button mat-flat-button
26-
type="button"
27-
color="tertiary"
28-
[attr.id]="'km-delete-backup-' + backup.name"
29-
(click)="delete(backup)"
30-
[disabled]="!canDelete">
31-
<i class="km-icon-mask km-icon-delete"
32-
matButtonIcon></i>
33-
<span>Delete Snapshot</span>
34-
</button>
35-
</div>
36-
37-
<mat-card appearance="outlined"
38-
class="info">
39-
<mat-card-header>
40-
<mat-card-title fxFlex
41-
fxLayout="row"
42-
fxLayoutAlign=" center"
43-
class="title">
44-
<i [matTooltip]="getStatus(backup).message"
45-
[ngClass]="getStatus(backup).icon"
46-
class="km-vertical-center"></i>
47-
<div>{{backup.name}}</div>
48-
</mat-card-title>
49-
</mat-card-header>
50-
51-
<mat-card-content fxLayout="row">
52-
<km-property>
53-
<div key>Cluster ID</div>
54-
<div value>{{backup.spec?.clusterId}}</div>
55-
</km-property>
56-
</mat-card-content>
57-
58-
<mat-card-content>
59-
<km-property>
60-
<div key>Destination</div>
61-
<div value>{{backup.spec?.destination}}</div>
62-
</km-property>
63-
</mat-card-content>
64-
</mat-card>
65-
66-
<km-backup-list [backups]="backup.status.lastBackups"
67-
[projectID]="selectedProject.id"
68-
[clusterID]="backup.spec.clusterId"
69-
[destination]="backup.spec.destination"
70-
[backupHealth]="getStatus(backup).message"></km-backup-list>
71-
</ng-container>
23+
@if (isInitialized) {
24+
<div fxLayout="row">
25+
<button mat-flat-button
26+
type="button"
27+
color="tertiary"
28+
[attr.id]="'km-delete-backup-' + backup.name"
29+
(click)="delete(backup)"
30+
[disabled]="!canDelete">
31+
<i class="km-icon-mask km-icon-delete"
32+
matButtonIcon></i>
33+
<span>Delete Snapshot</span>
34+
</button>
35+
</div>
36+
<mat-card appearance="outlined"
37+
class="info">
38+
<mat-card-header>
39+
<mat-card-title fxFlex
40+
fxLayout="row"
41+
fxLayoutAlign=" center"
42+
class="title">
43+
<i [matTooltip]="getStatus(backup).message"
44+
[ngClass]="getStatus(backup).icon"
45+
class="km-vertical-center"></i>
46+
<div>{{backup.name}}</div>
47+
</mat-card-title>
48+
</mat-card-header>
49+
<mat-card-content fxLayout="row">
50+
<km-property>
51+
<div key>Cluster ID</div>
52+
<div value>{{backup.spec?.clusterId}}</div>
53+
</km-property>
54+
</mat-card-content>
55+
<mat-card-content>
56+
<km-property>
57+
<div key>Destination</div>
58+
<div value>{{backup.spec?.destination}}</div>
59+
</km-property>
60+
</mat-card-content>
61+
</mat-card>
62+
<km-backup-list [backups]="backup.status.lastBackups"
63+
[projectID]="selectedProject.id"
64+
[clusterID]="backup.spec.clusterId"
65+
[destination]="backup.spec.destination"
66+
[backupHealth]="getStatus(backup).message" />
67+
}

0 commit comments

Comments
 (0)