Browse Source

fix(iot-hub): wait installTimeoutMs before opening solution dialog, minor style fixes

pull/15508/head
Igor Kulikov 6 months ago
parent
commit
745d1e561f
  1. 1
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-install-dialog.component.scss
  2. 20
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-install-dialog.component.ts
  3. 4
      ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.scss

1
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-install-dialog.component.scss

@ -41,6 +41,7 @@
.tb-iot-hub-inline-spinner {
display: inline-block;
margin-right: 8px;
vertical-align: middle;
}
.tb-iot-hub-error-details {

20
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-install-dialog.component.ts

@ -91,12 +91,20 @@ export class TbIotHubInstallDialogComponent extends DialogComponent<TbIotHubInst
next: (result) => {
if (result.success) {
if (result.descriptor?.type === 'SOLUTION_TEMPLATE') {
this.dialogRef.close('installed');
this.dialog.open(SolutionInstallDialogComponent, {
disableClose: true,
panelClass: 'tb-solution-install-dialog-panel',
data: { descriptor: result.descriptor as SolutionTemplateInstalledItemDescriptor }
});
const timeout = this.item.dataDescriptor?.installTimeoutMs;
const openSolutionDialog = () => {
this.dialogRef.close('installed');
this.dialog.open(SolutionInstallDialogComponent, {
disableClose: true,
panelClass: 'tb-solution-install-dialog-panel',
data: { descriptor: result.descriptor as SolutionTemplateInstalledItemDescriptor }
});
};
if (timeout > 0) {
setTimeout(openSolutionDialog, timeout);
} else {
openSolutionDialog();
}
} else {
this.state = 'success';
this.entityDetailsUrl = resolveEntityDetailsUrl(result.descriptor, this.item.type);

4
ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-item-detail-dialog.component.scss

@ -324,6 +324,10 @@
letter-spacing: 0.2px;
color: rgba(0, 0, 0, 0.76);
> h3 {
padding-left: 24px;
}
// Override markdown-view styles to match Design: px-24, pt-16, pb-24, gap-20
::ng-deep tb-markdown .tb-markdown-view {
padding: 16px 24px 24px;

Loading…
Cancel
Save