Fix duplicate breadcrumb and Export Center delete confirmation
BC1 — Fix "Operations > Operations > ..." duplicate breadcrumb: - Set breadcrumb to empty string on /ops/operations parent route and /ops/operations (overview) route, so only the top-level "Operations" breadcrumb from /ops renders. Affects 7 pages: Feeds, Signals, Jobs, Diagnostics, Notifications, Watchlist, overview. EC1 — Export Center delete confirmation: - Replace window.confirm() with app-confirm-dialog variant="danger" - Names the export profile being deleted in confirmation message - Follows the destructive action convention from AGENTS.md Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import {
|
||||
ChangeDetectionStrategy,
|
||||
Component,
|
||||
ViewChild,
|
||||
computed,
|
||||
inject,
|
||||
OnDestroy,
|
||||
@@ -22,6 +23,7 @@ import { StellaBundleExportButtonComponent } from './stella-bundle-export-button
|
||||
import { OperatorOnlyDirective } from '../../shared/directives/operator-only.directive';
|
||||
import { DateFormatService } from '../../core/i18n/date-format.service';
|
||||
import { StellaPageTabsComponent, StellaPageTab } from '../../shared/components/stella-page-tabs/stella-page-tabs.component';
|
||||
import { ConfirmDialogComponent } from '../../shared/components/confirm-dialog/confirm-dialog.component';
|
||||
/**
|
||||
* Export Center Component (Sprint: SPRINT_20251229_016)
|
||||
* Manages export profiles and monitors export runs with SSE updates.
|
||||
@@ -33,7 +35,7 @@ const EXPORT_CENTER_TABS: StellaPageTab[] = [
|
||||
|
||||
@Component({
|
||||
selector: 'app-export-center',
|
||||
imports: [FormsModule, StellaBundleExportButtonComponent, OperatorOnlyDirective, StellaPageTabsComponent],
|
||||
imports: [FormsModule, StellaBundleExportButtonComponent, OperatorOnlyDirective, StellaPageTabsComponent, ConfirmDialogComponent],
|
||||
template: `
|
||||
<div class="export-center">
|
||||
<header class="page-header">
|
||||
@@ -350,6 +352,11 @@ const EXPORT_CENTER_TABS: StellaPageTab[] = [
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<app-confirm-dialog #deleteConfirm
|
||||
title="Delete Export Profile"
|
||||
[message]="'Delete profile \\'' + (pendingDeleteProfile()?.name ?? '') + '\\'? This cannot be undone.'"
|
||||
confirmLabel="Delete" cancelLabel="Cancel" variant="danger"
|
||||
(confirmed)="executeDeleteProfile()" />
|
||||
</div>
|
||||
`,
|
||||
styles: [`
|
||||
@@ -1021,10 +1028,19 @@ export class ExportCenterComponent implements OnInit, OnDestroy {
|
||||
this.closeModal();
|
||||
}
|
||||
|
||||
readonly pendingDeleteProfile = signal<ExportProfile | null>(null);
|
||||
@ViewChild('deleteConfirm') deleteConfirm!: ConfirmDialogComponent;
|
||||
|
||||
deleteProfile(profile: ExportProfile): void {
|
||||
if (confirm(`Delete profile "${profile.name}"?`)) {
|
||||
this.profiles.update(profiles => profiles.filter(p => p.id !== profile.id));
|
||||
}
|
||||
this.pendingDeleteProfile.set(profile);
|
||||
this.deleteConfirm.open();
|
||||
}
|
||||
|
||||
executeDeleteProfile(): void {
|
||||
const profile = this.pendingDeleteProfile();
|
||||
if (!profile) return;
|
||||
this.profiles.update(profiles => profiles.filter(p => p.id !== profile.id));
|
||||
this.pendingDeleteProfile.set(null);
|
||||
}
|
||||
|
||||
runProfile(profile: ExportProfile): void {
|
||||
|
||||
@@ -6,7 +6,7 @@ export const OPERATIONS_ROUTES: Routes = [
|
||||
path: '',
|
||||
pathMatch: 'full',
|
||||
title: 'Operations',
|
||||
data: { breadcrumb: 'Operations' },
|
||||
data: { breadcrumb: '' },
|
||||
loadComponent: () =>
|
||||
import('../features/platform/ops/platform-ops-overview-page.component').then(
|
||||
(m) => m.PlatformOpsOverviewPageComponent,
|
||||
|
||||
@@ -10,7 +10,7 @@ export const OPS_ROUTES: Routes = [
|
||||
{
|
||||
path: 'operations',
|
||||
title: 'Operations',
|
||||
data: { breadcrumb: 'Operations' },
|
||||
data: { breadcrumb: '' },
|
||||
loadChildren: () => import('./operations.routes').then((m) => m.OPERATIONS_ROUTES),
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user