|
2 | 2 | <app-bd-dialog-toolbar header="{{isDataFiles?'Data':'Log'}} Files"> |
3 | 3 | <div class="flex-auto"></div> |
4 | 4 | @if (cfg.isCentral$ | async) { |
5 | | - <app-bd-server-sync-button [server]="instance?.managedServer"></app-bd-server-sync-button> |
6 | | - <mat-divider [vertical]="true"></mat-divider> |
| 5 | + <app-bd-server-sync-button [server]="instance?.managedServer"></app-bd-server-sync-button> |
| 6 | + <mat-divider [vertical]="true"></mat-divider> |
7 | 7 | } |
8 | 8 | @if (isDataFiles) { |
9 | | - <app-bd-panel-button |
10 | | - icon="add" |
11 | | - text="Add File..." |
12 | | - [collapsed]="false" |
13 | | - color="primary" |
14 | | - [disabled]="(loading$ | async) || (noactive$ | async) || !(authService.isCurrentScopeWrite$ | async)" |
15 | | - [route]="['panels', 'instances', 'data-files', 'add']" |
16 | | - ></app-bd-panel-button> |
| 9 | + <app-bd-panel-button |
| 10 | + icon="add" |
| 11 | + text="Add File..." |
| 12 | + [collapsed]="false" |
| 13 | + color="primary" |
| 14 | + [disabled]="(loading$ | async) || (noactive$ | async) || (remoteDirs$ | async)?.length < 1 || !(authService.isCurrentScopeWrite$ | async)" |
| 15 | + [route]="['panels', 'instances', 'data-files', 'add']" |
| 16 | + ></app-bd-panel-button> |
17 | 17 | } |
18 | 18 | <app-bd-panel-button |
19 | 19 | #bulkMode |
|
34 | 34 | </app-bd-dialog-toolbar> |
35 | 35 | <app-bd-dialog-content> |
36 | 36 | @if (noactive$ | async) { |
37 | | - <app-bd-no-data |
38 | | - >The current instance does not have an active version yet. {{isDataFiles?'Data':'Log'}} files are not yet |
39 | | - available.</app-bd-no-data |
40 | | - > |
41 | | - } @else { |
42 | | - @if (servers.isCurrentInstanceSynchronized$ | async) { |
43 | | - @if ((remoteDirs$ | async)?.length > 1) { |
44 | | - <mat-tab-group |
45 | | - animationDuration="0ms" |
46 | | - [selectedIndex]="tabIndex" |
47 | | - (selectedTabChange)="onTabChange($event)" |
48 | | - > |
49 | | - @for (node of remoteDirs$ | async; track node) { |
50 | | - <mat-tab [label]="node.minion"> </mat-tab> |
51 | | - } |
52 | | - </mat-tab-group> |
53 | | - } |
54 | | - <div class="mt-2 mx-1.5"> |
55 | | - @if (selectedPath) { |
56 | | - <app-bd-breadcrumbs [crumbs]="selectedPath.crumbs"></app-bd-breadcrumbs> |
57 | | - } |
58 | | - </div> |
59 | | - <app-bd-data-table |
60 | | - [records]="records$ | async" |
61 | | - [columns]="columns" |
62 | | - [searchable]="false" |
63 | | - (recordClick)="onClick($event)" |
64 | | - [checkMode]="bulkMode.toggle && !!bulkMode.rla?.isActive" |
65 | | - [(checked)]="filesBulkService.selection" |
66 | | - > |
67 | | - <app-bd-no-data> |
68 | | - <p>No data available. This either means that the instance has no active version, or no files exist.</p> |
69 | | - <p>Try to refresh to fetch current information from the node(s).</p> |
70 | | - <app-bd-button |
71 | | - text="Refresh" |
72 | | - icon="refresh" |
73 | | - (click)="load(instance)" |
74 | | - [collapsed]="false" |
75 | | - [loadingWhen$]="loading$" |
76 | | - [disabled]="loading$ | async" |
77 | | - ></app-bd-button> |
78 | | - </app-bd-no-data> |
79 | | - </app-bd-data-table> |
80 | | - } @else { |
81 | | - <app-bd-no-data> |
82 | | - <p class="text-center"> |
83 | | - <strong>{{ instance?.instanceConfiguration?.name }}</strong> is not synchronized with the controlling server |
84 | | - <strong>{{ instance?.managedServer?.hostName }}</strong> |
85 | | - </p> |
86 | | - <p>Synchronize the instance to view {{isDataFiles?'data':'log'}} files.</p> |
87 | | - <app-bd-server-sync-button [collapsed]="false" [server]="instance.managedServer"></app-bd-server-sync-button> |
88 | | - </app-bd-no-data> |
| 37 | + <app-bd-no-data |
| 38 | + >The current instance does not have an active version yet. {{isDataFiles?'Data':'Log'}} files are not yet |
| 39 | + available.</app-bd-no-data |
| 40 | + > |
| 41 | + } @else { @if (servers.isCurrentInstanceSynchronized$ | async) { @if ((remoteDirs$ | async)?.length > 1) { |
| 42 | + <mat-tab-group animationDuration="0ms" [selectedIndex]="tabIndex" (selectedTabChange)="onTabChange($event)"> |
| 43 | + @for (node of remoteDirs$ | async; track node) { |
| 44 | + <mat-tab [label]="node.minion"> </mat-tab> |
| 45 | + } |
| 46 | + </mat-tab-group> |
| 47 | + } |
| 48 | + <div class="mt-2 mx-1.5"> |
| 49 | + @if (selectedPath) { |
| 50 | + <app-bd-breadcrumbs [crumbs]="selectedPath.crumbs"></app-bd-breadcrumbs> |
| 51 | + } |
| 52 | + </div> |
| 53 | + <app-bd-data-table |
| 54 | + [records]="records$ | async" |
| 55 | + [columns]="columns" |
| 56 | + [searchable]="false" |
| 57 | + (recordClick)="onClick($event)" |
| 58 | + [checkMode]="bulkMode.toggle && !!bulkMode.rla?.isActive" |
| 59 | + [(checked)]="filesBulkService.selection" |
| 60 | + > |
| 61 | + <app-bd-no-data> |
| 62 | + <p>No data available. This either means that the instance has no active version, or no files exist.</p> |
| 63 | + <p>Try to refresh to fetch current information from the node(s).</p> |
| 64 | + <app-bd-button |
| 65 | + text="Refresh" |
| 66 | + icon="refresh" |
| 67 | + (click)="load(instance)" |
| 68 | + [collapsed]="false" |
| 69 | + [loadingWhen$]="loading$" |
| 70 | + [disabled]="loading$ | async" |
| 71 | + ></app-bd-button> |
| 72 | + </app-bd-no-data> |
| 73 | + </app-bd-data-table> |
| 74 | + } @else { |
| 75 | + <app-bd-no-data> |
| 76 | + <p class="text-center"> |
| 77 | + <strong>{{ instance?.instanceConfiguration?.name }}</strong> is not synchronized with the controlling server |
| 78 | + <strong>{{ instance?.managedServer?.hostName }}</strong> |
| 79 | + </p> |
| 80 | + <p>Synchronize the instance to view {{isDataFiles?'data':'log'}} files.</p> |
| 81 | + <app-bd-server-sync-button [collapsed]="false" [server]="instance.managedServer"></app-bd-server-sync-button> |
| 82 | + </app-bd-no-data> |
| 83 | + } } |
| 84 | + <ng-template #active> |
| 85 | + @if (servers.isCurrentInstanceSynchronized$ | async) { @if ((remoteDirs$ | async)?.length > 1) { |
| 86 | + <mat-tab-group animationDuration="0ms" [selectedIndex]="tabIndex" (selectedTabChange)="onTabChange($event)"> |
| 87 | + @for (node of remoteDirs$ | async; track node) { |
| 88 | + <mat-tab [label]="node.minion"> </mat-tab> |
89 | 89 | } |
| 90 | + </mat-tab-group> |
90 | 91 | } |
91 | | - <ng-template #active> |
92 | | - @if (servers.isCurrentInstanceSynchronized$ | async) { |
93 | | - @if ((remoteDirs$ | async)?.length > 1) { |
94 | | - <mat-tab-group |
95 | | - animationDuration="0ms" |
96 | | - [selectedIndex]="tabIndex" |
97 | | - (selectedTabChange)="onTabChange($event)" |
98 | | - > |
99 | | - @for (node of remoteDirs$ | async; track node) { |
100 | | - <mat-tab [label]="node.minion"> </mat-tab> |
101 | | - } |
102 | | - </mat-tab-group> |
103 | | - } |
104 | | - <div class="mt-2 mx-1.5"> |
105 | | - @if (selectedPath) { |
106 | | - <app-bd-breadcrumbs [crumbs]="selectedPath.crumbs"></app-bd-breadcrumbs> |
107 | | - } |
108 | | - </div> |
109 | | - <app-bd-data-table |
110 | | - [records]="records$ | async" |
111 | | - [columns]="columns" |
112 | | - [searchable]="false" |
113 | | - (recordClick)="onClick($event)" |
114 | | - [checkMode]="bulkMode.toggle && !!bulkMode.rla?.isActive" |
115 | | - [(checked)]="filesBulkService.selection" |
116 | | - > |
117 | | - <app-bd-no-data> |
118 | | - <p>No data available. This either means that the instance has no active version, or no files exist.</p> |
119 | | - <p>Try to refresh to fetch current information from the node(s).</p> |
120 | | - <app-bd-button |
121 | | - text="Refresh" |
122 | | - icon="refresh" |
123 | | - (click)="load(instance)" |
124 | | - [collapsed]="false" |
125 | | - [loadingWhen$]="loading$" |
126 | | - [disabled]="loading$ | async" |
127 | | - ></app-bd-button> |
128 | | - </app-bd-no-data> |
129 | | - </app-bd-data-table> |
130 | | - } @else { |
131 | | - <app-bd-no-data> |
132 | | - <p class="text-center"> |
133 | | - <strong>{{ instance?.instanceConfiguration?.name }}</strong> is not synchronized with the controlling server |
134 | | - <strong>{{ instance?.managedServer?.hostName }}</strong> |
135 | | - </p> |
136 | | - <p>Synchronize the instance to view {{isDataFiles?'data':'log'}} files.</p> |
137 | | - <app-bd-server-sync-button [collapsed]="false" [server]="instance.managedServer"></app-bd-server-sync-button> |
138 | | - </app-bd-no-data> |
| 92 | + <div class="mt-2 mx-1.5"> |
| 93 | + @if (selectedPath) { |
| 94 | + <app-bd-breadcrumbs [crumbs]="selectedPath.crumbs"></app-bd-breadcrumbs> |
139 | 95 | } |
140 | | - </ng-template> |
141 | | - </app-bd-dialog-content> |
142 | | - </app-bd-dialog> |
| 96 | + </div> |
| 97 | + <app-bd-data-table |
| 98 | + [records]="records$ | async" |
| 99 | + [columns]="columns" |
| 100 | + [searchable]="false" |
| 101 | + (recordClick)="onClick($event)" |
| 102 | + [checkMode]="bulkMode.toggle && !!bulkMode.rla?.isActive" |
| 103 | + [(checked)]="filesBulkService.selection" |
| 104 | + > |
| 105 | + <app-bd-no-data> |
| 106 | + <p>No data available. This either means that the instance has no active version, or no files exist.</p> |
| 107 | + <p>Try to refresh to fetch current information from the node(s).</p> |
| 108 | + <app-bd-button |
| 109 | + text="Refresh" |
| 110 | + icon="refresh" |
| 111 | + (click)="load(instance)" |
| 112 | + [collapsed]="false" |
| 113 | + [loadingWhen$]="loading$" |
| 114 | + [disabled]="loading$ | async" |
| 115 | + ></app-bd-button> |
| 116 | + </app-bd-no-data> |
| 117 | + </app-bd-data-table> |
| 118 | + } @else { |
| 119 | + <app-bd-no-data> |
| 120 | + <p class="text-center"> |
| 121 | + <strong>{{ instance?.instanceConfiguration?.name }}</strong> is not synchronized with the controlling server |
| 122 | + <strong>{{ instance?.managedServer?.hostName }}</strong> |
| 123 | + </p> |
| 124 | + <p>Synchronize the instance to view {{isDataFiles?'data':'log'}} files.</p> |
| 125 | + <app-bd-server-sync-button [collapsed]="false" [server]="instance.managedServer"></app-bd-server-sync-button> |
| 126 | + </app-bd-no-data> |
| 127 | + } |
| 128 | + </ng-template> |
| 129 | + </app-bd-dialog-content> |
| 130 | +</app-bd-dialog> |
0 commit comments