Browse Source

Agents: fixed form layouts, back navigation and installing applications without templates (#16701)

* Fixed Agent UI layout issues and app install type availability

* Additional fixes

* Fixed notes after merge with lts-4.4

* Additional fixes

* Fix agent UI back navigation, layout and arguments state

* Fixed PR comments

* Agents: merge responses of a previous selection are ignored, back from agent tabs goes to the Agents list

---------

Co-authored-by: Vladyslav_Prykhodko <vprykhodko@thingsboard.io>
pull/16756/head
Maksym Tsymbarov 3 weeks ago
committed by GitHub
parent
commit
aa1b0de2e9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      ui-ngx/angular.json
  2. 5
      ui-ngx/src/app/modules/home/components/agent/wizard/_agent-wizard.scss
  3. 28
      ui-ngx/src/app/modules/home/components/agent/wizard/agent-app-install-flow.component.html
  4. 94
      ui-ngx/src/app/modules/home/components/agent/wizard/agent-app-install-flow.component.ts
  5. 7
      ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rules-table.component.scss
  6. 1
      ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rules-table.component.ts
  7. 7
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.scss
  8. 1
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.ts
  9. 6
      ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts
  10. 3
      ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts
  11. 5
      ui-ngx/src/app/modules/home/pages/agent/agent-app-profile.component.html
  12. 2
      ui-ngx/src/app/modules/home/pages/agent/agent-application.component.html
  13. 4
      ui-ngx/src/app/modules/home/pages/agent/agent-applications-table-config.resolver.ts
  14. 4
      ui-ngx/src/app/modules/home/pages/agent/agent-events-page.component.ts
  15. 30
      ui-ngx/src/app/modules/home/pages/agent/agent-profile.component.html
  16. 18
      ui-ngx/src/app/modules/home/pages/agent/agent-routing.module.ts
  17. 2
      ui-ngx/src/app/modules/home/pages/agent/agent.component.html
  18. 3
      ui-ngx/src/app/modules/home/pages/agent/component/agent-app-arguments.component.ts
  19. 3
      ui-ngx/src/app/modules/home/pages/agent/metrics/agent-application-details-page.component.scss
  20. 4
      ui-ngx/src/app/modules/home/pages/agent/metrics/agent-metrics-strip.component.html
  21. 2
      ui-ngx/src/app/modules/home/pages/agent/table/agent-app-event-table.component.ts
  22. 2
      ui-ngx/src/app/modules/home/pages/agent/table/agent-app-unit-table.component.ts
  23. 14
      ui-ngx/src/app/modules/home/pages/agent/util/agent-route-params.ts
  24. 74
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.html
  25. 9
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss
  26. 39
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts
  27. 51
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard-loader.service.ts
  28. 12
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html
  29. 6
      ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss
  30. 2
      ui-ngx/src/assets/locale/locale.constant-en_US.json
  31. 4
      ui-ngx/src/styles.scss

5
ui-ngx/angular.json

@ -72,6 +72,11 @@
"input": "./node_modules/ace-builds/src-noconflict/",
"output": "/"
},
{
"glob": "worker-yaml.js",
"input": "./node_modules/ace-builds/src-noconflict/",
"output": "/"
},
{
"glob": "worker-tbel.js",
"input": "./src/app/shared/models/ace/tbel/",

5
ui-ngx/src/app/modules/home/components/agent/wizard/_agent-wizard.scss

@ -165,7 +165,10 @@
transition: border-color 0.2s, background 0.2s;
&:hover { border-color: var(--tb-primary-400); background: color-mix(in srgb, var(--tb-primary-500) 4%, transparent); }
&.selected { border-color: var(--tb-primary-500); background: color-mix(in srgb, var(--tb-primary-500) 8%, transparent); }
&.locked-out, &:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }
&.locked-out, &:disabled {
cursor: not-allowed; pointer-events: none;
mat-icon, h4 { opacity: 0.35; }
}
mat-icon { font-size: 36px; width: 36px; height: 36px; color: var(--tb-primary-500); margin-bottom: 8px; }
h4 { font-size: 16px; font-weight: 500; margin: 0 0 4px; }
p { font-size: 13px; color: $agent-text-secondary; margin: 0; }

28
ui-ngx/src/app/modules/home/components/agent/wizard/agent-app-install-flow.component.html

@ -12,9 +12,7 @@
</button>
}
<div class="tb-install-wizard-toolbar-content">
<h2>{{ 'agent.app-install-title' | translate }}@if (agent) {
:
}</h2>
<h2>{{ 'agent.app-install-title' | translate }}@if (agent) {:}</h2>
@if (agent) {
<span class="flex-1">
{{ 'agent.app-install-on-agent' | translate: { name: agent?.name } }}
@ -90,11 +88,12 @@
@for (card of typeCards; track card.type) {
<button type="button" class="type-card"
[class.selected]="selectedType === card.type"
[disabled]="isTypeDisabled(card.type)"
[attr.aria-pressed]="selectedType === card.type"
(click)="selectType(card.type)">
<mat-icon>{{ card.icon }}</mat-icon>
<h4>{{ card.labelKey | translate }}</h4>
<p>{{ card.descKey | translate }}</p>
<p>{{ (unavailableTypes.has(card.type) ? 'agent.app-type-unavailable' : card.descKey) | translate }}</p>
</button>
}
</div>
@ -146,6 +145,12 @@
(relatedEntityNameChange)="onRelatedEntityName($event)">
</tb-agent-related-entity-autocomplete>
}
@if (useProfile && typesWithoutTemplates.has(selectedType)) {
<div class="tb-form-hint tb-primary-fill tb-form-hint-warning mb-4">
<mat-icon>warning_amber</mat-icon>
<span translate>agent.app-no-templates</span>
</div>
}
@if (useProfile) {
<mat-form-field class="mat-block" appearance="outline" [formGroup]="profileSelectFormGroup">
<mat-label translate>agent.app-install-select-profile</mat-label>
@ -160,7 +165,7 @@
<mat-icon class="material-icons">close</mat-icon>
</button>
}
@if (!profileSelectFormGroup.get('profile').value && canCreateAppProfile) {
@if (!profileSelectFormGroup.get('profile').value && canCreateProfileForType) {
<button
mat-button color="primary" matSuffix type="button"
(mousedown)="$event.preventDefault()"
@ -221,7 +226,18 @@
</ng-template>
</mat-expansion-panel>
}
@if (!useProfile) {
@if (mergeError) {
<div class="error-state">
<mat-icon>error_outline</mat-icon>
<span>{{ mergeError }}</span>
</div>
}
@if (!useProfile && !template && loadError) {
<div class="error-state">
<mat-icon>error_outline</mat-icon>
<span>{{ loadError }}</span>
</div>
} @else if (!useProfile) {
@if (composeTypeKeys.length > 1) {
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.app-compose-template-select</mat-label>

94
ui-ngx/src/app/modules/home/components/agent/wizard/agent-app-install-flow.component.ts

@ -6,8 +6,8 @@ import { Router } from '@angular/router';
import { MatDialog } from '@angular/material/dialog';
import { MatStepper, StepperOrientation } from '@angular/material/stepper';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { BehaviorSubject, combineLatest, forkJoin, Observable, of } from 'rxjs';
import { catchError, map, share, startWith } from 'rxjs/operators';
import { BehaviorSubject, combineLatest, EMPTY, forkJoin, Observable, of, Subscription } from 'rxjs';
import { catchError, map, share, shareReplay, startWith, switchMap, take } from 'rxjs/operators';
import { PageComponent } from '@shared/components/page.component';
import { TranslateService } from '@ngx-translate/core';
import { AgentService } from '@core/http/agent.service';
@ -101,6 +101,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
composeTypeKeys: string[] = [];
loadingTemplate = false;
loadError = '';
mergeError = '';
private advanceAfterTypeSelect = false;
appName = '';
@ -112,6 +113,13 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
useProfile = true;
selectedProfile: AgentAppProfile | null = null;
loadingProfiles = false;
typesWithoutTemplates = new Set<AgentApplicationType>();
// No templates and no existing profiles: nothing can be installed for the type.
unavailableTypes = new Set<AgentApplicationType>();
detectingTypes = true;
private typeAvailability$: Observable<void>;
private typeLoadSubscription: Subscription | null = null;
private mergeSubscription: Subscription | null = null;
profileSelectFormGroup: UntypedFormGroup;
filteredProfiles: Observable<AgentAppProfile[]>;
@ -153,6 +161,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private pendingCustomCompose: string | null = null;
readonly canCreateAppProfile: boolean;
private readonly canReadAppProfiles: boolean;
constructor(private router: Router,
private translate: TranslateService,
@ -166,6 +175,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private destroyRef: DestroyRef) {
super();
this.canCreateAppProfile = this.userPermissionsService.hasGenericPermission(Resource.AGENT_APP_PROFILE, Operation.CREATE);
this.canReadAppProfiles = this.userPermissionsService.hasGenericPermission(Resource.AGENT_APP_PROFILE, Operation.READ);
this.profileSelectFormGroup = this.fb.group({ profile: [null] });
const text$ = this.profileSelectFormGroup.get('profile').valueChanges.pipe(
startWith(this.profileSelectFormGroup.get('profile').value),
@ -217,22 +227,57 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
}
});
}
this.loader.prewarmTemplates(this.typeCards.map(card => card.type));
const types = this.lockedType ? [this.lockedType] : this.typeCards.map(card => card.type);
this.detectTypeAvailability(types);
this.loader.prewarmTemplates(types, this.destroyRef);
if (this.lockedType) {
this.selectType(this.lockedType);
}
}
private detectTypeAvailability(types: AgentApplicationType[]) {
this.typeAvailability$ = forkJoin(types.map(type => forkJoin([
this.loader.loadTemplatesByType(type).pipe(catchError(() => of(null))),
this.canReadAppProfiles ? this.loader.loadProfiles(type).pipe(catchError(() => of(null))) : of([])
]))).pipe(
map(results => {
results.forEach(([templates, profiles], index) => {
if (templates && !this.edgeTemplateCompatibility.filterTemplates(templates).length) {
this.typesWithoutTemplates.add(types[index]);
if (profiles && !this.edgeTemplateCompatibility.filterProfiles(profiles).length) {
this.unavailableTypes.add(types[index]);
}
}
});
}),
shareReplay({ bufferSize: 1, refCount: true })
);
this.typeAvailability$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {
this.detectingTypes = false;
});
}
isTypeDisabled(type: AgentApplicationType): boolean {
return this.detectingTypes || this.unavailableTypes.has(type);
}
get canCreateProfileForType(): boolean {
return this.canCreateAppProfile && !this.typesWithoutTemplates.has(this.selectedType);
}
selectType(type: AgentApplicationType) {
if (this.selectedType === type) {
return;
}
this.selectedType = type;
this.typeLoadSubscription?.unsubscribe();
this.mergeSubscription?.unsubscribe();
this.template = null;
this.composeType = null;
this.composeTypeKeys = [];
this.composeYaml = '';
this.mergedApp = null;
this.loadingTemplate = false;
this.selectedProfile = null;
this.profileSelectFormGroup.get('profile').patchValue(null, { emitEvent: false });
this.availableProfiles = [];
@ -241,6 +286,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
this.pendingCustomCompose = null;
this.appName = this.defaultAppName(type);
this.loadError = '';
this.mergeError = '';
this.advanceAfterTypeSelect = !this.lockedType;
if (this.useProfile) {
@ -266,12 +312,16 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
this.savedProfile = this.selectedProfile;
}
this.useProfile = value;
this.typeLoadSubscription?.unsubscribe();
this.mergeSubscription?.unsubscribe();
this.selectedProfile = null;
this.profileSelectFormGroup.get('profile').patchValue(null, { emitEvent: false });
this.template = null;
this.composeYaml = '';
this.mergedApp = null;
this.loadingTemplate = false;
this.loadError = '';
this.mergeError = '';
this.credentialValues = {};
if (this.selectedType) {
if (value) {
@ -322,6 +372,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
selectProfile(profile: AgentAppProfile) {
if (!profile) { return; }
this.selectedProfile = profile;
this.mergeSubscription?.unsubscribe();
this.profileSelectFormGroup.get('profile').patchValue(profile, { emitEvent: false });
this.composeYaml = dumpCompose(profile);
this.initCredentialValues();
@ -413,7 +464,9 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
const draft = buildRelatedMergeDraft(
this.agentId, this.selectedType!, this.appName, tpl,
this.composeYaml, dockerComposeConfig(this.mergedApp)?.compose);
this.loader.merge(
this.mergeError = '';
this.mergeSubscription?.unsubscribe();
this.mergeSubscription = this.loader.merge(
tpl.currentVersion, tpl.appType, draft, this.useProfile ? undefined : (this.composeType || undefined),
this.relatedEntityId || undefined, undefined, true
).subscribe({
@ -430,7 +483,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
}
},
error: () => {
this.loadError = this.translate.instant('agent.app-install-merge-failed');
this.mergeError = this.translate.instant('agent.app-install-merge-failed');
}
});
}
@ -454,6 +507,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private clearProfileSelection() {
this.selectedProfile = null;
this.mergeSubscription?.unsubscribe();
this.composeYaml = '';
this.credentialValues = {};
this.template = null;
@ -463,14 +517,16 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private loadProfilesForType(type: AgentApplicationType) {
this.loadingProfiles = true;
const templates$: Observable<AgentAppTemplate[]> = VIRTUAL_APP_TYPES.includes(type) && this.canCreateAppProfile
const templates$: Observable<AgentAppTemplate[]> = this.canCreateAppProfile
? this.loader.loadTemplatesByType(type).pipe(catchError(() => of([])))
: of([]);
forkJoin([this.loader.loadProfiles(type), templates$]).subscribe({
const profiles$: Observable<AgentAppProfile[]> = this.canReadAppProfiles ? this.loader.loadProfiles(type) : of([]);
this.typeLoadSubscription = forkJoin([profiles$, templates$]).subscribe({
next: ([allProfiles, allTemplates]) => {
const profiles = this.edgeTemplateCompatibility.filterProfiles(allProfiles);
const templates = this.edgeTemplateCompatibility.filterTemplates(allTemplates);
this.availableProfiles = [...profiles, ...buildVirtualAppProfiles(templates, allProfiles)];
const virtualProfiles = VIRTUAL_APP_TYPES.includes(type) ? buildVirtualAppProfiles(templates, allProfiles) : [];
this.availableProfiles = [...profiles, ...virtualProfiles];
this.loadingProfiles = false;
this.advanceFromTypeStep();
},
@ -483,7 +539,18 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private loadTemplateForType(type: AgentApplicationType) {
this.loadingTemplate = true;
this.loader.loadTemplate(type).subscribe({
this.typeLoadSubscription = this.typeAvailability$.pipe(
take(1),
switchMap(() => {
if (this.typesWithoutTemplates.has(type)) {
this.loadingTemplate = false;
this.loadError = this.translate.instant('agent.app-no-templates');
return EMPTY;
}
return this.loader.loadTemplate(type);
}),
takeUntilDestroyed(this.destroyRef)
).subscribe({
next: tpl => this.applyTemplate(tpl),
error: () => {
this.loadError = this.translate.instant('agent.app-install-template-failed');
@ -528,7 +595,9 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
private runMergeForPreview(tpl: AgentAppTemplate) {
const draft = buildInstallMergeDraft(this.agentId, this.selectedType!, this.appName, tpl);
this.loader.merge(tpl.currentVersion, tpl.appType, draft, this.composeType || undefined, this.relatedEntityId || undefined, undefined, true).subscribe({
this.mergeError = '';
this.mergeSubscription?.unsubscribe();
this.mergeSubscription = this.loader.merge(tpl.currentVersion, tpl.appType, draft, this.composeType || undefined, this.relatedEntityId || undefined, undefined, true).subscribe({
next: merged => {
this.mergedApp = merged;
if (!this.useProfile) {
@ -541,7 +610,7 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
}
},
error: () => {
this.loadError = this.translate.instant('agent.app-install-merge-failed');
this.mergeError = this.translate.instant('agent.app-install-merge-failed');
}
});
}
@ -609,6 +678,9 @@ export class AgentAppInstallFlowComponent extends PageComponent implements OnIni
}
canSubmit(): boolean {
if (this.mergeError) {
return false;
}
if (this.relatedEntityRequired && !this.relatedEntityId?.id) {
return false;
}

7
ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rules-table.component.scss

@ -1,7 +0,0 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
:host ::ng-deep {
.white-background {
--mat-sidenav-content-background-color: white;
}
}

1
ui-ngx/src/app/modules/home/components/alarm-rules/alarm-rules-table.component.ts

@ -30,7 +30,6 @@ import { IotHubActionsService } from '@home/components/iot-hub/iot-hub-actions.s
@Component({
selector: 'tb-alarm-rules-table',
templateUrl: './alarm-rules-table.component.html',
styleUrls: ['./alarm-rules-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [EntityDebugSettingsService],
standalone: false

7
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.scss

@ -1,7 +0,0 @@
// SPDX-FileCopyrightText: Copyright The ThingsBoard Authors
// SPDX-License-Identifier: Apache-2.0
:host ::ng-deep {
.white-background {
--mat-sidenav-content-background-color: white;
}
}

1
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table.component.ts

@ -31,7 +31,6 @@ import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'tb-calculated-fields-table',
templateUrl: './calculated-fields-table.component.html',
styleUrls: ['./calculated-fields-table.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
providers: [EntityDebugSettingsService],
standalone: false

6
ui-ngx/src/app/modules/home/components/entity/entities-table.component.ts

@ -203,7 +203,11 @@ export class EntitiesTableComponent extends PageComponent implements IEntitiesTa
}
goBack(): void {
this.router.navigate(this.entitiesTableConfig.backNavigationCommands, { relativeTo: this.route });
if (isDefinedAndNotNull(this.entitiesTableConfig.backNavigationUrl)) {
this.router.navigateByUrl(this.entitiesTableConfig.backNavigationUrl);
} else {
this.router.navigate(this.entitiesTableConfig.backNavigationCommands, { relativeTo: this.route });
}
}
private init(entitiesTableConfig: EntityTableConfig<BaseData<HasId>>) {

3
ui-ngx/src/app/modules/home/models/entity/entities-table-config.models.ts

@ -187,6 +187,7 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
customerId: string;
backNavigationCommands?: any[];
backNavigationUrl?: string;
constructor(public groupParams?: EntityGroupParams) {
this.customerId = groupParams?.customerId;
@ -194,7 +195,7 @@ export class EntityTableConfig<T extends BaseData<HasId>, P extends PageLink = P
}
displayBackButton(): boolean {
return isDefinedAndNotNull(this.backNavigationCommands);
return isDefinedAndNotNull(this.backNavigationUrl) || isDefinedAndNotNull(this.backNavigationCommands);
}
private table: IEntitiesTableComponent = null;

5
ui-ngx/src/app/modules/home/pages/agent/agent-app-profile.component.html

@ -68,14 +68,13 @@
<fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="1" rows="1"></textarea>
</mat-form-field>
</fieldset>
</form>
<div [formGroup]="entityForm">
<tb-agent-app-arguments class="tb-app-arguments-section"
formControlName="arguments"
[disabled]="!isEdit">
formControlName="arguments">
</tb-agent-app-arguments>
</div>
<label class="tb-mat-label" translate>agent.app-compose</label>

2
ui-ngx/src/app/modules/home/pages/agent/agent-application.component.html

@ -207,7 +207,7 @@
}
<tb-agent-app-arguments class="tb-app-arguments-section"
formControlName="arguments"
[disabled]="!isEdit || isProfileManaged">
[readonly]="isProfileManaged">
</tb-agent-app-arguments>
@if (isEdit && relatedEntity) {

4
ui-ngx/src/app/modules/home/pages/agent/agent-applications-table-config.resolver.ts

@ -4,6 +4,8 @@ import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, Router } from '@angular/router';
import {
agentEntityUrl,
agentsListUrl,
agentTabsBackUrl,
currentAgentRouteSnapshot,
resolveAgentIdParam
} from '@home/pages/agent/util/agent-route-params';
@ -106,7 +108,7 @@ export class AgentApplicationsTableConfigResolver {
map(agent => {
this.agent = agent;
this.config.tableTitle = agent.name + ': ' + this.translate.instant('agent.applications');
this.config.backNavigationCommands = [agentEntityUrl(route, this.agentId)];
this.config.backNavigationUrl = agentTabsBackUrl(route) ?? agentsListUrl(route, this.agentId);
this.config.componentsData = { agentId: this.agentId, agent };
this.config.columns = this.configureColumns();
this.config.cellActionDescriptors = this.configureCellActions();

4
ui-ngx/src/app/modules/home/pages/agent/agent-events-page.component.ts

@ -10,7 +10,7 @@ import { TranslateService } from '@ngx-translate/core';
import { AgentService } from '@core/http/agent.service';
import { DialogService } from '@core/services/dialog.service';
import { AgentEventsTableConfig } from '@home/pages/agent/table/agent-events-table-config';
import { agentEntityUrl, resolveAgentIdParam } from '@home/pages/agent/util/agent-route-params';
import { agentEntityUrl, agentsListUrl, agentTabsBackUrl, resolveAgentIdParam } from '@home/pages/agent/util/agent-route-params';
@Component({
selector: 'tb-agent-events-page',
@ -74,6 +74,6 @@ export class AgentEventsPageComponent implements OnInit {
this.viewContainerRef,
agentUrl
);
this.tableConfig.backNavigationCommands = [agentUrl];
this.tableConfig.backNavigationUrl = agentTabsBackUrl(this.route.snapshot) ?? agentsListUrl(this.route.snapshot, agentId);
}
}

30
ui-ngx/src/app/modules/home/pages/agent/agent-profile.component.html

@ -47,10 +47,6 @@
</mat-error>
}
</mat-form-field>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.provisioning-strategy</mat-label>
<mat-select formControlName="provisionType">
@ -61,20 +57,24 @@
}
</mat-select>
</mat-form-field>
</fieldset>
<div class="tb-form-hint tb-primary-fill mb-3">
<mat-icon>info_outline</mat-icon>
<div>
<div class="font-medium">
{{ 'agent.provisioning-strategy-label' | translate: {
strategy: agentProvisionTypeTranslationMap.get(entityForm.get('provisionType').value) | translate
} }}
</div>
<div class="tb-form-hint tb-primary-fill mb-3">
<mat-icon>info_outline</mat-icon>
<div>
{{ agentProvisionTypeDescriptionMap.get(entityForm.get('provisionType').value) | translate }}
<div class="font-medium">
{{ 'agent.provisioning-strategy-label' | translate: {
strategy: agentProvisionTypeTranslationMap.get(entityForm.get('provisionType').value) | translate
} }}
</div>
<div>
{{ agentProvisionTypeDescriptionMap.get(entityForm.get('provisionType').value) | translate }}
</div>
</div>
</div>
</div>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="1" rows="1"></textarea>
</mat-form-field>
</fieldset>
@if (!standalone && entity?.id?.id
&& entity?.provisionType && entity?.provisionType !== AgentProvisionType.DISABLED) {

18
ui-ngx/src/app/modules/home/pages/agent/agent-routing.module.ts

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: BUSL-1.1
import { inject, NgModule } from '@angular/core';
import { ActivatedRouteSnapshot, ResolveFn, Route, RouterModule, Routes } from '@angular/router';
import { ActivatedRouteSnapshot, ResolveFn, Route, Router, RouterModule, Routes } from '@angular/router';
import { of } from 'rxjs';
import { catchError } from 'rxjs/operators';
import { EntitiesTableComponent } from '@home/components/entity/entities-table.component';
@ -12,7 +12,7 @@ import { entityDetailsPageBreadcrumbLabelFunction } from '@home/pages/home-pages
import { BreadCrumbConfig, BreadCrumbLabelFunction } from '@shared/components/breadcrumb';
import { AgentService } from '@core/http/agent.service';
import { AgentInfo } from '@shared/models/agent.models';
import { resolveAgentIdParam } from '@home/pages/agent/util/agent-route-params';
import { isAgentsSectionPath, resolveAgentIdParam } from '@home/pages/agent/util/agent-route-params';
import { MenuId } from '@core/services/menu.models';
import { AgentsTableConfigResolver } from '@home/pages/agent/agents-table-config.resolver';
import { AgentProfilesTableConfigResolver } from '@home/pages/agent/agent-profiles-table-config.resolver';
@ -47,6 +47,17 @@ const agentInfoBreadcrumbResolver: ResolveFn<AgentInfo | null> = (route) => {
: of(null);
};
const agentTabsBackUrlResolver: ResolveFn<string | null> = () => {
const router = inject(Router);
const previousUrl = router.currentNavigation()?.previousNavigation?.finalUrl;
if (!previousUrl) {
return null;
}
const url = router.serializeUrl(previousUrl);
const path = url.split(/[?#]/)[0];
return isAgentsSectionPath(path) ? url : null;
};
const agentTabsBreadcrumbLabelFunction: BreadCrumbLabelFunction<RouterTabsComponent> =
(route, translate, component, data, utils) => {
const name = (route?.data?.agent as AgentInfo)?.name ?? '';
@ -78,7 +89,8 @@ const agentTabsChildren = (entitiesTableConfig: any): Route => ({
} as BreadCrumbConfig<RouterTabsComponent>
},
resolve: {
agent: agentInfoBreadcrumbResolver
agent: agentInfoBreadcrumbResolver,
agentTabsBackUrl: agentTabsBackUrlResolver
},
children: [
{

2
ui-ngx/src/app/modules/home/pages/agent/agent.component.html

@ -155,7 +155,7 @@
<fieldset [disabled]="(isLoading$ | async) || !isEdit">
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="1" rows="1"></textarea>
</mat-form-field>
</fieldset>
</form>

3
ui-ngx/src/app/modules/home/pages/agent/component/agent-app-arguments.component.ts

@ -26,7 +26,6 @@ import {
AgentAppArgument,
AgentAppArgumentFormat,
agentAppArgumentFormatTranslationMap,
AgentAppArgumentSource,
agentAppArgumentSourceTranslationMap,
AgentAppArgumentValueType
} from '@shared/models/agent.models';
@ -51,7 +50,7 @@ import {
export class AgentAppArgumentsComponent implements ControlValueAccessor, OnDestroy {
@Input()
set disabled(value: boolean) {
set readonly(value: boolean) {
this.inputDisabled = value;
}

3
ui-ngx/src/app/modules/home/pages/agent/metrics/agent-application-details-page.component.scss

@ -41,7 +41,8 @@
flex: 1 1 auto;
min-height: 0;
position: relative;
display: block;
display: flex;
flex-direction: column;
}
.tb-app-details-page-drawer {

4
ui-ngx/src/app/modules/home/pages/agent/metrics/agent-metrics-strip.component.html

@ -29,10 +29,11 @@
<span class="tb-agent-metrics-strip-value">{{ volumeLabel }}</span>
</span>
}
@if (showChartsButton && !chartsActive) {
@if (showChartsButton) {
<button mat-stroked-button
type="button"
class="tb-agent-metrics-strip-toggle lt-xl:!hidden"
[class.invisible]="chartsActive"
(click)="onToggleCharts($event)">
<mat-icon>show_chart</mat-icon>
<span translate>agent.metrics-show-charts</span>
@ -40,6 +41,7 @@
<button mat-icon-button
type="button"
class="tb-agent-metrics-strip-toggle xl:!hidden"
[class.invisible]="chartsActive"
[matTooltip]="'agent.metrics-show-charts' | translate"
matTooltipPosition="above"
(click)="onToggleCharts($event)">

2
ui-ngx/src/app/modules/home/pages/agent/table/agent-app-event-table.component.ts

@ -14,7 +14,7 @@ import { AgentAppEventTableConfig } from './agent-app-event-table-config';
@Component({
selector: 'tb-agent-app-event-table',
template: '<tb-entities-table [entitiesTableConfig]="tableConfig"></tb-entities-table>',
template: '<tb-entities-table class="white-background" [entitiesTableConfig]="tableConfig"></tb-entities-table>',
styles: [`
:host { display: block; height: 100%; }
:host ::ng-deep mat-row:has(.tb-agent-app-event-inflight) {

2
ui-ngx/src/app/modules/home/pages/agent/table/agent-app-unit-table.component.ts

@ -14,7 +14,7 @@ import { AgentAppUnitTableConfig } from './agent-app-unit-table-config';
@Component({
selector: 'tb-agent-app-unit-table',
template: '<tb-entities-table [entitiesTableConfig]="tableConfig"></tb-entities-table>',
template: '<tb-entities-table class="white-background" [entitiesTableConfig]="tableConfig"></tb-entities-table>',
styles: [':host { display: block; height: 100%; }'],
standalone: false
})

14
ui-ngx/src/app/modules/home/pages/agent/util/agent-route-params.ts

@ -45,6 +45,20 @@ export function agentEntityUrl(route: ActivatedRouteSnapshot, agentId: string, .
return '/' + [url, ...tail].join('/');
}
const AGENTS_SECTION_PATH = /\/edgeManagement\/agents\/(all|(groups|shared)\/[^/]+)\/?$/;
export function isAgentsSectionPath(path: string): boolean {
return AGENTS_SECTION_PATH.test(path);
}
export function agentsListUrl(route: ActivatedRouteSnapshot, agentId: string): string {
return agentEntityUrl(route, agentId).replace(/\/[^/]+$/, '');
}
export function agentTabsBackUrl(route: ActivatedRouteSnapshot): string | null {
return route.pathFromRoot.find(r => r.data?.agentTabsBackUrl)?.data.agentTabsBackUrl ?? null;
}
// Deepest activated route snapshot — for callers (dialogs, table configs) that
// only have a Router and need the scope of the page currently displayed.
export function currentAgentRouteSnapshot(router: Router): ActivatedRouteSnapshot {

74
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.html

@ -14,9 +14,9 @@
</button>
</mat-toolbar>
<div mat-dialog-content class="tb-install-wizard-body">
<div mat-dialog-content class="tb-install-wizard-body flex min-h-[50vh] flex-col">
<mat-stepper linear #stepper
<mat-stepper class="flex-1" linear #stepper
[orientation]="(stepperOrientation | async)"
[labelPosition]="(stepperLabelPosition | async)">
@ -57,6 +57,12 @@
<span translate>agent.app-install-loading-template</span>
</div>
}
@if (selectedType && !loadingTemplates && !loadError && !availableTemplates.length) {
<div class="tb-form-hint tb-primary-fill tb-form-hint-warning">
<mat-icon>warning_amber</mat-icon>
<span translate>agent.app-no-templates</span>
</div>
}
@if (loadError) {
<div class="error-state">
<mat-icon>error_outline</mat-icon>
@ -64,13 +70,6 @@
</div>
}
</div>
<div class="step-footer">
<button mat-button (click)="cancel()">{{ 'action.cancel' | translate }}</button>
<button mat-raised-button color="primary" matStepperNext [disabled]="!canProceedFromType()">
{{ 'action.next' | translate }}
<mat-icon iconPositionEnd>chevron_right</mat-icon>
</button>
</div>
</div>
</mat-step>
}
@ -90,7 +89,7 @@
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.app-profile-description</mat-label>
<input matInput formControlName="description">
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="1" rows="1"></textarea>
</mat-form-field>
</form>
@ -127,22 +126,6 @@
<tb-agent-compose-diff [left]="proposedYaml" [right]="currentYaml"
[syncScroll]="diffSyncScroll" (rightChange)="composeYaml = $event"></tb-agent-compose-diff>
<p class="diff-hint" translate>agent.app-install-diff-hint</p>
<div class="step-footer">
@if (!editMode) {
<button mat-button matStepperPrevious [disabled]="submitting">
<mat-icon>chevron_left</mat-icon>
{{ 'action.back' | translate }}
</button>
}
<button mat-button (click)="cancel()" [disabled]="submitting">
{{ 'action.cancel' | translate }}
</button>
<button mat-raised-button color="primary" matStepperNext [disabled]="!canSubmit()">
{{ 'action.next' | translate }}
<mat-icon iconPositionEnd>chevron_right</mat-icon>
</button>
</div>
</div>
</mat-step>
@ -182,22 +165,33 @@
<span translate>agent.app-profile-wizard-confirm-info</span>
</div>
</div>
<div class="step-footer">
<button mat-button matStepperPrevious [disabled]="submitting">
<mat-icon>chevron_left</mat-icon>
{{ 'action.back' | translate }}
</button>
<button mat-button (click)="cancel()" [disabled]="submitting">
{{ 'action.cancel' | translate }}
</button>
<button mat-raised-button color="primary" (click)="submit()" [disabled]="!canSubmit()">
<mat-icon>save</mat-icon>
<span>{{ 'action.save' | translate }}</span>
</button>
</div>
</div>
</mat-step>
</mat-stepper>
<div class="step-footer">
@let stepIndex = stepper?.selectedIndex;
@if (stepIndex > 0) {
<button mat-button type="button" (click)="stepper.previous()" [disabled]="submitting">
<mat-icon>chevron_left</mat-icon>
{{ 'action.back' | translate }}
</button>
}
<button mat-button type="button" (click)="cancel()" [disabled]="submitting">
{{ 'action.cancel' | translate }}
</button>
@if (stepIndex === stepper?.steps.length - 1) {
<button mat-raised-button color="primary" type="button" (click)="submit()" [disabled]="!canSubmit()">
<mat-icon>save</mat-icon>
<span>{{ 'action.save' | translate }}</span>
</button>
} @else {
<button mat-raised-button color="primary" type="button" (click)="stepper.next()"
[disabled]="!stepper?.selected?.completed">
{{ 'action.next' | translate }}
<mat-icon iconPositionEnd>chevron_right</mat-icon>
</button>
}
</div>
</div>

9
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.scss

@ -9,15 +9,10 @@
@include wizard-summary;
:host {
.tb-install-wizard-body {
min-height: 50vh;
}
.step-content {
display: flex;
flex-direction: column;
gap: 16px;
min-height: calc(50vh - 140px);
.hint,
.type-cards {
@ -31,10 +26,6 @@
justify-content: center;
gap: 16px;
}
.step-footer {
margin-top: auto;
}
}
.summary-section {

39
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-profile-wizard.component.ts

@ -13,7 +13,7 @@ import { AgentService } from '@core/http/agent.service';
import { StepperOrientation } from '@angular/material/stepper';
import { BreakpointObserver } from '@angular/cdk/layout';
import { MediaBreakpoints } from '@shared/models/constants';
import { Observable } from 'rxjs';
import { Observable, Subscription } from 'rxjs';
import { map } from 'rxjs/operators';
import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms';
import {
@ -32,6 +32,7 @@ import {
} from '@home/pages/agent/util/agent-compose-yaml';
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';
export interface AgentAppProfileWizardData {
profile?: AgentAppProfile;
@ -50,6 +51,7 @@ interface TypeCard {
selector: 'tb-agent-app-profile-wizard',
templateUrl: './agent-app-profile-wizard.component.html',
styleUrls: ['./agent-app-profile-wizard.component.scss'],
providers: [AgentAppWizardLoaderService],
standalone: false
})
export class AgentAppProfileWizardComponent
@ -78,7 +80,8 @@ export class AgentAppProfileWizardComponent
availableTemplates: AgentAppTemplate[] = [];
selectedTemplateVersion: string | null = null;
loadingTemplates = false;
private templatesByTypeCache = new Map<AgentApplicationType, AgentAppTemplate[]>();
private templatesSubscription: Subscription | null = null;
private previewSubscription: Subscription | null = null;
profileForm: UntypedFormGroup;
composeYaml = '';
@ -109,6 +112,7 @@ export class AgentAppProfileWizardComponent
protected router: Router,
protected translate: TranslateService,
private agentService: AgentService,
private loader: AgentAppWizardLoaderService,
private breakpointObserver: BreakpointObserver,
private edgeTemplateCompatibility: EdgeTemplateCompatibilityService,
private fb: UntypedFormBuilder,
@ -126,12 +130,9 @@ export class AgentAppProfileWizardComponent
}
ngOnInit() {
// Prefetch templates for all types so type selection is instant.
this.typeCards.forEach(card => {
this.agentService.getAgentAppTemplatesByAppType(card.type).subscribe({
next: templates => this.templatesByTypeCache.set(card.type, templates),
error: () => {}
});
const prefetchTypes = this.lockedAppType ? [this.lockedAppType] : this.typeCards.map(card => card.type);
prefetchTypes.forEach(type => {
this.loader.loadTemplatesByType(type).subscribe({ error: () => {} });
});
if (this.editMode) {
this.initForEdit(this.data.profile);
@ -191,6 +192,8 @@ export class AgentAppProfileWizardComponent
return;
}
this.selectedType = type;
this.previewSubscription?.unsubscribe();
this.previewSubscription = null;
this.template = null;
this.composeType = null;
this.composeTypeKeys = [];
@ -200,17 +203,13 @@ export class AgentAppProfileWizardComponent
this.loadTemplatesForType(type);
}
// A finished request replays synchronously, so a prefetched type shows no loading state.
// Drops the previous type's request, so its late response cannot apply its template to the newly selected type.
private loadTemplatesForType(type: AgentApplicationType) {
const cached = this.templatesByTypeCache.get(type);
if (cached) {
this.availableTemplates = orderTemplatesNewestFirst(this.supportedTemplates(cached));
this.selectLatestTemplate();
return;
}
this.templatesSubscription?.unsubscribe();
this.loadingTemplates = true;
this.agentService.getAgentAppTemplatesByAppType(type).subscribe({
this.templatesSubscription = this.loader.loadTemplatesByType(type).subscribe({
next: templates => {
this.templatesByTypeCache.set(type, templates);
this.availableTemplates = orderTemplatesNewestFirst(this.supportedTemplates(templates));
this.loadingTemplates = false;
this.selectLatestTemplate();
@ -275,10 +274,13 @@ export class AgentAppProfileWizardComponent
}
private rebuildComposePreview() {
this.previewSubscription?.unsubscribe();
this.previewSubscription = null;
const tpl = this.template;
if (!tpl) {
return;
}
const composeType = this.composeType;
this.proposedYaml = dumpRawTemplateCompose(tpl, this.composeType);
this.currentYaml = this.proposedYaml;
this.composeYaml = this.currentYaml;
@ -287,8 +289,11 @@ export class AgentAppProfileWizardComponent
appType: this.selectedType,
templateVersion: tpl.currentVersion
};
this.agentService.mergeProfileForPreview(tpl.currentVersion, draft, this.composeType || undefined, undefined, !this.editMode).subscribe({
this.previewSubscription = this.agentService.mergeProfileForPreview(tpl.currentVersion, draft, composeType || undefined, undefined, !this.editMode).subscribe({
next: merged => {
if (this.template !== tpl || this.composeType !== composeType) {
return;
}
const compose: any = dockerComposeConfig(merged)?.compose;
if (compose) {
this.currentYaml = dumpYaml(compose, 0).trimEnd() + '\n';

51
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-app-wizard-loader.service.ts

@ -1,8 +1,9 @@
// SPDX-FileCopyrightText: Copyright ThingsBoard, Inc.
// SPDX-License-Identifier: BUSL-1.1
import { Injectable } from '@angular/core';
import { DestroyRef, Injectable } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { Observable, of, throwError } from 'rxjs';
import { map, mergeMap, tap } from 'rxjs/operators';
import { filter, map, mergeMap, shareReplay, tap } from 'rxjs/operators';
import { AgentService } from '@core/http/agent.service';
import { EntityId } from '@shared/models/id/entity-id';
import {
@ -40,19 +41,26 @@ export class AgentAppWizardLoaderService {
private templateCache = new Map<AgentApplicationType, AgentAppTemplate>();
private templateByVersionCache = new Map<string, AgentAppTemplate>();
private templatesByTypeCache = new Map<AgentApplicationType, AgentAppTemplate[]>();
private profilesCache = new Map<AgentApplicationType, AgentAppProfile[]>();
private templatesByTypeCache = new Map<AgentApplicationType, Observable<AgentAppTemplate[]>>();
private profilesCache = new Map<AgentApplicationType, Observable<AgentAppProfile[]>>();
constructor(private agentService: AgentService) {}
// Warm the per-type template cache so the first type-card click in install
// mode doesn't flash a "Loading template…" state.
prewarmTemplates(types: AgentApplicationType[]): void {
// mode doesn't flash a "Loading template…" state. Background-only: a failed `latest`
// request is silent (the shared per-type list request may still toast), and the
// requests are cancelled when `destroyRef` is destroyed.
prewarmTemplates(types: AgentApplicationType[], destroyRef: DestroyRef): void {
types.forEach(type => {
if (this.templateCache.has(type)) {
return;
}
this.agentService.getLatestAgentAppTemplate(type, AgentAppConfigType.DOCKER_COMPOSE).subscribe({
this.loadTemplatesByType(type).pipe(
filter(templates => templates.length > 0),
mergeMap(() => this.agentService.getLatestAgentAppTemplate(type, AgentAppConfigType.DOCKER_COMPOSE,
{ ignoreErrors: true, ignoreLoading: true })),
takeUntilDestroyed(destroyRef)
).subscribe({
next: tpl => this.templateCache.set(type, tpl),
error: () => { /* swallow — loadTemplate retries on demand */ }
});
@ -81,14 +89,16 @@ export class AgentAppWizardLoaderService {
);
}
// Caches the request itself, so concurrent callers share one in-flight call;
// shareReplay drops a failed request, so the next caller retries, and cancels it
// once every caller has unsubscribed (e.g. the wizard was closed).
loadTemplatesByType(type: AgentApplicationType): Observable<AgentAppTemplate[]> {
const cached = this.templatesByTypeCache.get(type);
if (cached) {
return of(cached);
let templates$ = this.templatesByTypeCache.get(type);
if (!templates$) {
templates$ = this.agentService.getAgentAppTemplatesByAppType(type).pipe(shareReplay({ bufferSize: 1, refCount: true }));
this.templatesByTypeCache.set(type, templates$);
}
return this.agentService.getAgentAppTemplatesByAppType(type).pipe(
tap(templates => this.templatesByTypeCache.set(type, templates))
);
return templates$;
}
materializeProfile(profile: VirtualAgentAppProfile): Observable<AgentAppProfile> {
@ -96,17 +106,18 @@ export class AgentAppWizardLoaderService {
}
loadProfiles(type: AgentApplicationType): Observable<AgentAppProfile[]> {
const cached = this.profilesCache.get(type);
if (cached) {
return of(cached);
let profiles$ = this.profilesCache.get(type);
if (!profiles$) {
profiles$ = (this.agentService.getAgentAppProfilesByAppType(type) as Observable<AgentAppProfile[]>).pipe(
shareReplay({ bufferSize: 1, refCount: true })
);
this.profilesCache.set(type, profiles$);
}
return this.agentService.getAgentAppProfilesByAppType(type).pipe(
tap(profiles => this.profilesCache.set(type, profiles))
) as Observable<AgentAppProfile[]>;
return profiles$;
}
cacheProfiles(type: AgentApplicationType, profiles: AgentAppProfile[]): void {
this.profilesCache.set(type, profiles);
this.profilesCache.set(type, of(profiles));
}
// Reads the linked profile via the info-by-id endpoint, which is gated by

12
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.html

@ -16,9 +16,9 @@
</mat-toolbar>
}
<div mat-dialog-content class="tb-install-wizard-body" [class.tb-install-wizard-embedded]="embedded">
<div mat-dialog-content class="tb-install-wizard-body flex min-h-[50vh] flex-col" [class.tb-install-wizard-embedded]="embedded">
<mat-stepper linear #stepper [labelPosition]="(stepperLabelPosition | async)">
<mat-stepper class="flex-1" linear #stepper [labelPosition]="(stepperLabelPosition | async)">
<mat-step [stepControl]="step1Form" [label]="'agent.add-profile-step-details' | translate">
<form [formGroup]="step1Form" autocomplete="off">
@ -32,10 +32,6 @@
</mat-error>
}
</mat-form-field>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" rows="2"></textarea>
</mat-form-field>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.provisioning-strategy</mat-label>
<mat-select formControlName="provisionType">
@ -59,6 +55,10 @@
</div>
</div>
</div>
<mat-form-field class="mat-block" appearance="outline">
<mat-label translate>agent.description</mat-label>
<textarea matInput formControlName="description" cdkTextareaAutosize cdkAutosizeMinRows="1" rows="1"></textarea>
</mat-form-field>
</form>
</mat-step>

6
ui-ngx/src/app/modules/home/pages/agent/wizard/agent-profile-wizard.component.scss

@ -10,13 +10,7 @@
min-width: 0;
max-width: 95vw;
.tb-install-wizard-body {
min-height: 50vh;
}
.tb-install-wizard-body.tb-install-wizard-embedded {
display: flex;
flex-direction: column;
padding: 16px 24px 0 !important;
mat-stepper {

2
ui-ngx/src/assets/locale/locale.constant-en_US.json

@ -3758,6 +3758,8 @@
"copy-profile-id": "Copy Profile Id",
"profile-id-copied-message": "Profile Id has been copied to clipboard",
"app-profile-wizard-title": "Create Application Profile",
"app-no-templates": "No templates available for this application type.",
"app-type-unavailable": "No templates or application profiles available",
"app-profile-wizard-edit-title": "Update Application Profile",
"app-update-current-config": "Current application configuration",
"app-update-future-config": "Future application configuration",

4
ui-ngx/src/styles.scss

@ -258,6 +258,10 @@ pre.tb-highlight {
}
}
tb-entities-table.white-background {
--mat-sidenav-content-background-color: white;
}
.ace_editor {
font-size: 16px !important;
letter-spacing: normal;

Loading…
Cancel
Save