From f40a85fe6badd05ec8831596f5f2b9e315654cc4 Mon Sep 17 00:00:00 2001 From: Igor Kulikov Date: Wed, 2 Dec 2026 13:02:32 +0200 Subject: [PATCH 1/9] AI chat review follow-up: a dropped solution message counts only the visible messages on both sides, so a hidden start or skip message no longer makes an unsent prompt look received; when every recovery poll fails the prompt comes back with the connection notice, which the start screen now shows too; the history table fits a narrow chat (smaller sparkline, Range wraps); a long facts block scrolls inside the capped height unless it is a change form; the unused search-alarms-of detail keys and the never-bound disabled input of the question card are removed --- .../ai/ai-action-detail.component.html | 2 +- .../components/ai/ai-action-detail.models.ts | 2 +- .../ai/ai-color-field.component.html | 8 ++--- .../components/ai/ai-color-field.component.ts | 7 ---- .../ai/ai-number-field.component.html | 6 ++-- .../ai/ai-number-field.component.ts | 4 --- .../components/ai/ai-question.component.html | 36 +++++++++---------- .../components/ai/ai-question.component.ts | 16 +++------ .../ai/ai-secret-field.component.html | 4 +-- .../ai/ai-secret-field.component.ts | 1 - .../ai/solution/solution-chat.component.html | 4 +++ .../ai/solution/solution-chat.component.scss | 10 ++++++ .../ai/solution/solution-chat.component.ts | 14 +++++--- .../assets/locale/locale.constant-en_US.json | 2 -- ui-ngx/src/theme/ai-theme.scss | 21 ++++++++++- 15 files changed, 78 insertions(+), 59 deletions(-) diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html index 939c25ddff..d4eb2310ea 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html +++ b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.component.html @@ -142,7 +142,7 @@ } } @if (plainRows(block.rows).length) { -
+
@for (fact of plainRows(block.rows); track $index) {
{{ label(fact) }}
diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts index 0757247883..3ca2b37366 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts +++ b/ui-ngx/src/app/modules/home/components/ai/ai-action-detail.models.ts @@ -127,7 +127,7 @@ export interface AiStepView { const ASKED_FOR: Record = { 'search-named': 'named', 'search-typed': 'typed', 'search-text': 'text', 'search-related-from': 'related-from', - 'search-related-to': 'related-to', 'search-alarms-of': 'alarms-of', 'read-attributes-scope': 'attributes-scope', + 'search-related-to': 'related-to', 'read-attributes-scope': 'attributes-scope', 'search-alarms': 'alarms', 'search-alarms-on': 'alarms-on', 'search-alarms-filter-on': 'alarms-filter-on', 'search-alarms-window': 'alarms-window', 'search-alarms-filter-window': 'alarms-filter-window', 'search-alarms-on-window': 'alarms-on-window', 'search-alarms-filter-on-window': 'alarms-filter-on-window', 'read-history': 'history', 'read-history-keys': 'history-keys', 'read-latest-keys': 'latest-keys', 'iot-hub-query': 'query', diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.html b/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.html index 4e9c9baef8..26b3ad0bd7 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.html +++ b/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.html @@ -7,12 +7,12 @@
@for (option of question().options; track option.label) { } - diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.ts b/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.ts index d38ab5bd0d..27c16f7082 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.ts +++ b/ui-ngx/src/app/modules/home/components/ai/ai-color-field.component.ts @@ -22,7 +22,6 @@ export class AiColorFieldComponent { question = input.required(); value = model(''); - disabled = input(false); enter = output(); private elementRef: ElementRef = inject(ElementRef); @@ -40,9 +39,6 @@ export class AiColorFieldComponent { } openHex(): void { - if (this.disabled()) { - return; - } if (!this.other()) { this.value.set('#'); } @@ -76,9 +72,6 @@ export class AiColorFieldComponent { } openPicker(picker: HTMLInputElement, field: HTMLInputElement): void { - if (this.disabled()) { - return; - } picker.value = aiHexOf(field.value) ?? '#000000'; try { picker.showPicker(); diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.html b/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.html index 262b55a238..b2f16d33d2 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.html +++ b/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.html @@ -5,16 +5,16 @@ -->
- - @if (question().number?.unit) { {{ question().number.unit }} } -
@if (wrong()) { diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.ts b/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.ts index 685fdc4bf0..b7eae1fd27 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.ts +++ b/ui-ngx/src/app/modules/home/components/ai/ai-number-field.component.ts @@ -15,7 +15,6 @@ export class AiNumberFieldComponent { question = input.required(); value = model(''); - disabled = input(false); enter = output(); private translate = inject(TranslateService); @@ -31,9 +30,6 @@ export class AiNumberFieldComponent { } stepBy(field: HTMLInputElement, direction: number): void { - if (this.disabled()) { - return; - } const current = aiReadNumber(field.value, this.locale()); const base = isNaN(current) ? (this.question().number?.suggested ?? 0) : current; const decimals = Math.max(aiStepDecimals(this.step()), isNaN(current) ? 0 : aiStepDecimals(current)); diff --git a/ui-ngx/src/app/modules/home/components/ai/ai-question.component.html b/ui-ngx/src/app/modules/home/components/ai/ai-question.component.html index 79c6653a57..3fe0631674 100644 --- a/ui-ngx/src/app/modules/home/components/ai/ai-question.component.html +++ b/ui-ngx/src/app/modules/home/components/ai/ai-question.component.html @@ -30,11 +30,11 @@ }
- - +
} @else if (current(); as question) { @@ -56,11 +56,11 @@ arrow_back{{ 'action.back' | translate }} } - - + } @@ -78,15 +78,15 @@
@switch (kind(step)) { @case ('color') { - } @case ('secret') { - } @case ('number') { - } @case ('text') { @@ -94,7 +94,7 @@
{{ otherLabel(step) }} - @@ -106,7 +106,7 @@ [style.--n]="step.options.length"> @for (option of step.options; track option.label) { @@ -115,7 +115,7 @@ {{ otherLabel(step) }} - @@ -128,11 +128,11 @@ @for (option of step.options; track option.label) { + (click)="pick(step, option.label)">{{ option.label }} }
@@ -142,16 +142,16 @@ @for (option of step.options; track option.label) { + (click)="pick(step, option.label)">{{ option.label }} } + (click)="pickOther(step)">{{ step.other?.label ? step.other.label + '…' : ('ai-assistant.question.other-chip' | translate) }}
@if (isOther(step) && step.number) { - } @else if (isOther(step)) { - @@ -164,7 +164,7 @@ [style.--n]="step.options.length"> @for (option of step.options; track option.label) { @@ -173,7 +173,7 @@ {{ otherLabel(step) }} - - - + + + } + @case ('config') { + +
+ +
+ + agent.app-profile-name + + @if (profileForm.get('name').hasError('required')) { + {{ 'agent.profile-name-required' | translate }} + } + + + + agent.app-profile-description + + +
+ + @if (composeTypeKeys.length > 1) { + + agent.app-compose-template-select + + @for (key of composeTypeKeys; track key) { + + {{ composeTypeLabel(key) }} + + } + + + } - @if (composeTypeKeys.length > 1) { - - agent.app-compose-template-select - - @for (key of composeTypeKeys; track key) { - - {{ composeTypeLabel(key) }} - + @if (selectedType === 'EDGE' || selectedType === 'GATEWAY') { +
+ info_outline + agent.app-profile-compose-creds-hint +
} -
-
- } - @if (selectedType === 'EDGE' || selectedType === 'GATEWAY') { -
- info_outline - agent.app-profile-compose-creds-hint -
+
+
agent.app-install-diff-template
+
agent.app-install-diff-editable
+ +
+ +

agent.app-install-diff-hint

+
+
} + @case ('save') { + +
+ +
+
+
+ agent.app-profile-name + {{ profileName }} +
+
+ agent.app-type + {{ selectedType }} +
+ @if (template) { +
+ agent.app-template + {{ template.currentVersion }} +
+ } + @if (profileDescription) { +
+ agent.app-profile-description + {{ profileDescription }} +
+ } +
-
-
agent.app-install-diff-template
-
agent.app-install-diff-editable
- -
- -

agent.app-install-diff-hint

-
- - - - -
- -
-
-
- agent.app-profile-name - {{ profileName }} -
-
- agent.app-type - {{ selectedType }} -
- @if (template) { -
- agent.app-template - {{ template.currentVersion }} -
- } - @if (profileDescription) { -
- agent.app-profile-description - {{ profileDescription }} +
+ info_outline + agent.app-profile-wizard-confirm-info +
- } -
- -
- info_outline - agent.app-profile-wizard-confirm-info -
-
-
-
- +
+
+ } + } + } - - +
+
+ @if (selectedIndex > 0) { + } - - @if (stepIndex === stepper?.steps.length - 1) { - - } @else { - + + @if (!isLastStep()) { + }
+ +
+ + +
diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss index 06ddb621d2..39bf8d6bbc 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss @@ -2,7 +2,7 @@ // SPDX-License-Identifier: BUSL-1.1 @use '../../../components/agent/wizard/agent-wizard' as *; -@include wizard-chrome; +@include wizard-stepper-dialog(1280px); @include wizard-step-basics; @include wizard-type-cards; @include wizard-diff; diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts index 200428b83c..17a59870ac 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts @@ -33,6 +33,10 @@ import { import { orderTemplatesNewestFirst } from '@home/pages/agent/util/template-version-order'; import { EdgeTemplateCompatibilityService } from '@home/pages/agent/util/edge-template-compatibility.service'; import { AgentAppWizardLoaderService } from '@home/pages/agent/wizard/agent-app-wizard-loader.service'; +import { + AGENT_APP_PROFILE_STEP_LABELS, + AgentAppProfileStepKey +} from '@home/pages/agent/wizard/agent-app-wizard.models'; export interface AgentAppProfileWizardData { profile?: AgentAppProfile; @@ -58,6 +62,10 @@ export class AgentAppProfileWizardComponent extends DialogComponent implements OnInit { + readonly stepLabels = AGENT_APP_PROFILE_STEP_LABELS; + steps: AgentAppProfileStepKey[] = []; + selectedIndex = 0; + // Left (read-only) = raw template compose; right (editable) = same content, // user-editable. This is the value persisted on submit. proposedYaml = ''; @@ -130,6 +138,7 @@ export class AgentAppProfileWizardComponent } ngOnInit() { + this.steps = this.buildSteps(); const prefetchTypes = this.lockedAppType ? [this.lockedAppType] : this.typeCards.map(card => card.type); prefetchTypes.forEach(type => { this.loader.loadTemplatesByType(type).subscribe({ error: () => {} }); @@ -308,6 +317,22 @@ export class AgentAppProfileWizardComponent this.dialogRef.close(undefined); } + isLastStep(): boolean { + return this.selectedIndex === this.steps.length - 1; + } + + canGoNext(): boolean { + return this.steps[this.selectedIndex] === 'type' ? this.canProceedFromType() : this.canSubmit(); + } + + nextStepLabel(): string { + return this.stepLabels[this.steps[this.selectedIndex + 1]] ?? ''; + } + + private buildSteps(): AgentAppProfileStepKey[] { + return this.editMode ? ['config', 'save'] : ['type', 'config', 'save']; + } + canProceedFromType(): boolean { return !!this.selectedType && !!this.selectedTemplateVersion && !!this.template && !this.loadingTemplate && !this.loadingTemplates && !this.loadError; diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard.models.ts b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard.models.ts index d7f0c68a2d..0fb0e54272 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard.models.ts +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard.models.ts @@ -41,6 +41,32 @@ export interface AgentAppWizardFinish { closeOnly?: boolean; } +export type AgentAppInstallStepKey = 'agent' | 'type' | 'config' | 'summary' | 'deploy'; + +export const AGENT_APP_INSTALL_STEP_LABELS: Record = { + agent: 'agent.deploy-select-agent-step', + type: 'agent.app-install-step1', + config: 'agent.app-install-step3', + summary: 'agent.app-install-step4', + deploy: 'agent.deploy-install-step' +}; + +export type AgentAppUpgradeStepKey = 'profile' | 'config' | 'summary'; + +export const AGENT_APP_UPGRADE_STEP_LABELS: Record = { + profile: 'agent.app-upgrade-profile-step', + config: 'agent.app-install-step3', + summary: 'agent.app-install-step4' +}; + +export type AgentAppProfileStepKey = 'type' | 'config' | 'save'; + +export const AGENT_APP_PROFILE_STEP_LABELS: Record = { + type: 'agent.app-install-step1', + config: 'agent.app-install-step3', + save: 'agent.app-profile-step-save' +}; + export interface AgentTypeCard { type: AgentApplicationType; icon: string; diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html index d1b739159f..8c5a8626c6 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html @@ -5,20 +5,21 @@ --> @if (!embedded) { - -
-

{{ (isEdit ? 'agent.edit-profile' : 'agent.add-profile') | translate }}

-
+ +

{{ (isEdit ? 'agent.edit-profile' : 'agent.add-profile') | translate }}

+
-
} +
-
- - +
@@ -106,30 +107,31 @@ - + +
+
+ @if (selectedIndex > 0 || showBack) { + + } + + @if (selectedIndex === 0) { + }
- + +
+ + +
diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss index 46d93884bc..7c9c24d68a 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss @@ -2,32 +2,9 @@ // SPDX-License-Identifier: BUSL-1.1 @use '../../../components/agent/wizard/agent-wizard' as *; -@include wizard-chrome; +@include wizard-stepper-dialog(750px); :host { - display: block; - width: min(750px, 95vw); - min-width: 0; - max-width: 95vw; - - .tb-install-wizard-body.tb-install-wizard-embedded { - padding: 16px 24px 0 !important; - - mat-stepper { - flex: 1 1 auto; - } - - .step-footer { - position: sticky; - bottom: 0; - z-index: 15; - background: #fff; - margin: 16px -24px 0; - padding: 8px; - min-height: 52px; - } - } - // Sibling layout: button lives outside the entity-list's form-field so // clicking it counts as a genuine outside-click and MatAutocomplete closes // its panel naturally — no synthetic-event hacks needed. @@ -38,7 +15,7 @@ gap: 12px; .app-profile-picker-field { - flex: 1; + flex: 1 1 280px; min-width: 0; } diff --git a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.ts b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.ts index 2045dc0d95..af2f2a0050 100644 --- a/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.ts +++ b/ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.ts @@ -9,7 +9,6 @@ import { MediaBreakpoints } from '@shared/models/constants'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { - AgentAppProfile, AgentApplicationType, AgentProfile, AgentProvisionType, @@ -19,10 +18,7 @@ import { import { AgentService } from '@core/http/agent.service'; import { UserPermissionsService } from '@core/http/user-permissions.service'; import { Operation, Resource } from '@shared/models/security.models'; -import { - AgentAppProfileWizardComponent, - AgentAppProfileWizardData -} from '@home/pages/agent/wizard/agent-app-profile-wizard.component'; +import { openAgentAppProfileWizard } from '@home/pages/agent/wizard/agent-app-profile-wizard-dialog'; export interface AgentProfileWizardData { defaults?: Partial; @@ -62,6 +58,7 @@ export class AgentProfileWizardComponent implements OnInit { assignmentsLoadState: 'loading' | 'loaded' | 'failed' = 'loaded'; @ViewChild('stepper', { static: false }) stepper: MatStepper; + selectedIndex = 0; stepperLabelPosition: Observable<'bottom' | 'end'>; @@ -125,7 +122,11 @@ export class AgentProfileWizardComponent implements OnInit { } back() { - this.backClicked.emit(); + if (this.selectedIndex > 0) { + this.stepper.previous(); + } else { + this.backClicked.emit(); + } } canSubmit(): boolean { @@ -162,13 +163,7 @@ export class AgentProfileWizardComponent implements OnInit { } private openAppProfileWizard() { - this.dialog.open( - AgentAppProfileWizardComponent, { - disableClose: true, - panelClass: ['tb-dialog', 'tb-fullscreen-dialog', 'tb-agent-wizard-dialog'], - data: { lockedAppType: this.lockedAppType } - } - ).afterClosed().subscribe(saved => { + openAgentAppProfileWizard(this.dialog, { lockedAppType: this.lockedAppType }).subscribe(saved => { if (saved) { const currentIds: string[] = this.step2Form.value?.appProfileIds ?? []; if (!currentIds.includes(saved.id.id)) { diff --git a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html index a0725ab18b..81de6331b0 100644 --- a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html +++ b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.html @@ -48,15 +48,13 @@
-
- @if (contentData.docker) { - - } @else { -
- -
- } -
+ @if (contentData.docker) { + + } @else { +
+ +
+ }
@@ -67,15 +65,13 @@
-
- @if (contentData.ubuntu) { - - } @else { -
- -
- } -
+ @if (contentData.ubuntu) { + + } @else { +
+ +
+ }
@@ -86,15 +82,13 @@
-
- @if (contentData.centos) { - - } @else { -
- -
- } -
+ @if (contentData.centos) { + + } @else { +
+ +
+ }
diff --git a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss index 1c9578dafb..04403b94ab 100644 --- a/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss +++ b/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.scss @@ -6,8 +6,10 @@ :host { height: 100%; max-height: 100vh; + max-width: 100%; display: grid; grid-template-rows: min-content minmax(auto, 1fr) min-content; + grid-template-columns: minmax(0, 1fr); .tb-loader { display: flex; @@ -49,13 +51,27 @@ } .mat-mdc-dialog-content { - max-height: 80vh; padding: 0 16px 16px 16px; border-top: 16px solid #fff; + display: flex; + flex-direction: column; + overflow: hidden; + + @media #{$mat-gt-xs} { + max-height: 80vh; + } } } :host ::ng-deep { + .mat-mdc-dialog-content > .tb-form-panel, + .mat-mdc-dialog-content > .tb-form-panel > .tb-form-panel, + .mat-mdc-tab-group, + .mat-mdc-tab-body-wrapper { + flex: 1 1 auto; + min-height: 0; + } + .tb-markdown-view { padding: 16px 16px 32px 16px; div { diff --git a/ui-ngx/src/app/modules/home/pages/edge/edge.component.ts b/ui-ngx/src/app/modules/home/pages/edge/edge.component.ts index 91e235400e..c154d9ff11 100644 --- a/ui-ngx/src/app/modules/home/pages/edge/edge.component.ts +++ b/ui-ngx/src/app/modules/home/pages/edge/edge.component.ts @@ -21,12 +21,8 @@ import {EdgeService} from "@core/http/edge.service"; import { Router } from '@angular/router'; import { MatDialog } from '@angular/material/dialog'; import { AgentService } from '@core/http/agent.service'; -import { AgentApplication, AgentAppConfigType, AgentAppEvent } from '@shared/models/agent.models'; -import { - AgentAppInstallWizardComponent, - AgentAppInstallWizardData, - AgentAppInstallWizardResult -} from '@home/components/agent/wizard/agent-app-install-wizard.component'; +import { AgentApplication, AgentAppConfigType } from '@shared/models/agent.models'; +import { openAgentAppInstallWizard } from '@home/components/agent/wizard/agent-app-install-wizard-dialog'; @Component({ selector: 'tb-edge', @@ -218,21 +214,16 @@ export class EdgeComponent extends GroupEntityComponent { if ($event) { $event.stopPropagation(); } if (!this.managedApp) { return; } this.agentService.getAgentApplicationInfoById(this.managedApp.id.id).subscribe(full => { - this.dialog.open( - AgentAppInstallWizardComponent, { - disableClose: false, - panelClass: ['tb-dialog', 'tb-fullscreen-dialog', 'tb-agent-wizard-dialog'], - data: { - agentId: full.agentId?.id, - agent: null, - mode: 'upgrade', - application: full - } - }).afterClosed().subscribe(event => { - if (event && this.entity?.id?.id) { - this.loadManagedApp(this.entity.id.id); - } - }); + openAgentAppInstallWizard(this.dialog, { + agentId: full.agentId?.id, + agent: null, + mode: 'upgrade', + application: full + }).subscribe(event => { + if (event && this.entity?.id?.id) { + this.loadManagedApp(this.entity.id.id); + } + }); }); } diff --git a/ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts b/ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts index 66f09ed6f0..06fe74a7a6 100644 --- a/ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts +++ b/ui-ngx/src/app/modules/home/pages/edge/edges-table-config.resolver.ts @@ -49,10 +49,7 @@ import { CustomerId } from '@shared/models/id/customer-id'; import { UtilsService } from '@core/services/utils.service'; import { AddGroupEntityDialogComponent } from '@home/components/group/add-group-entity-dialog.component'; import { AddGroupEntityDialogData } from '@home/models/group/group-entity-component.models'; -import { - AgentAutoProvisionDialogData, - AgentAutoProvisionDialogComponent -} from '@home/components/agent/dialog/agent-auto-provision-dialog.component'; +import { AgentAutoProvisionDialogService } from '@home/components/agent/dialog/agent-auto-provision-dialog.service'; import { AgentApplicationType } from '@shared/models/agent.models'; import { AiAssistantConfigService } from '@core/services/ai-assistant-config.service'; import { AiAssistantViewType } from '@shared/models/ai-chat.models'; @@ -74,7 +71,8 @@ export class EdgesTableConfigResolver { private utils: UtilsService, private datePipe: DatePipe, private router: Router, - private dialog: MatDialog) { + private dialog: MatDialog, + private autoProvisionDialogService: AgentAutoProvisionDialogService) { } resolve(route: ActivatedRouteSnapshot): Observable> { @@ -297,13 +295,7 @@ export class EdgesTableConfigResolver { if ($event) { $event.stopPropagation(); } - this.dialog.open( - AgentAutoProvisionDialogComponent, { - disableClose: true, - panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], - data: { appType: AgentApplicationType.EDGE } - } - ).afterClosed().subscribe(result => { + this.autoProvisionDialogService.open(AgentApplicationType.EDGE).subscribe(result => { if (result) { config.updateData(); } diff --git a/ui-ngx/src/styles.scss b/ui-ngx/src/styles.scss index 29336612ca..40b9c09f32 100644 --- a/ui-ngx/src/styles.scss +++ b/ui-ngx/src/styles.scss @@ -1127,16 +1127,6 @@ tb-entities-table.white-background { } } - // The agent wizards are opened under the 'tb-agent-wizard-dialog' panelClass and size - // themselves, so the surface must not impose its own min-width floor on small displays. - .tb-agent-wizard-dialog { - .mat-mdc-dialog-surface, - .mdc-dialog__surface { - min-width: 0 !important; - max-width: 95vw !important; - } - } - .tb-fullscreen-dialog-gt-xs { @media #{$mat-gt-xs} { min-height: 100%;