UI: Fixed updated device profiles table after added new profiles
This commit is contained in:
parent
ccd316a91b
commit
1aeb03c0a2
@ -36,7 +36,6 @@ import {
|
|||||||
import { DeviceProfileService } from '@core/http/device-profile.service';
|
import { DeviceProfileService } from '@core/http/device-profile.service';
|
||||||
import { DeviceProfileComponent } from '@home/components/profile/device-profile.component';
|
import { DeviceProfileComponent } from '@home/components/profile/device-profile.component';
|
||||||
import { DeviceProfileTabsComponent } from './device-profile-tabs.component';
|
import { DeviceProfileTabsComponent } from './device-profile-tabs.component';
|
||||||
import { Observable } from 'rxjs';
|
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
import {
|
import {
|
||||||
AddDeviceProfileDialogComponent,
|
AddDeviceProfileDialogComponent,
|
||||||
@ -138,8 +137,8 @@ export class DeviceProfilesTableConfigResolver implements Resolve<EntityTableCon
|
|||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
addDeviceProfile(): Observable<DeviceProfile> {
|
addDeviceProfile() {
|
||||||
return this.dialog.open<AddDeviceProfileDialogComponent, AddDeviceProfileDialogData,
|
this.dialog.open<AddDeviceProfileDialogComponent, AddDeviceProfileDialogData,
|
||||||
DeviceProfile>(AddDeviceProfileDialogComponent, {
|
DeviceProfile>(AddDeviceProfileDialogComponent, {
|
||||||
disableClose: true,
|
disableClose: true,
|
||||||
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
|
panelClass: ['tb-dialog', 'tb-fullscreen-dialog'],
|
||||||
@ -147,7 +146,13 @@ export class DeviceProfilesTableConfigResolver implements Resolve<EntityTableCon
|
|||||||
deviceProfileName: null,
|
deviceProfileName: null,
|
||||||
transportType: null
|
transportType: null
|
||||||
}
|
}
|
||||||
}).afterClosed();
|
}).afterClosed().subscribe(
|
||||||
|
(res) => {
|
||||||
|
if (res) {
|
||||||
|
this.config.table.updateData();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
setDefaultDeviceProfile($event: Event, deviceProfile: DeviceProfile) {
|
setDefaultDeviceProfile($event: Event, deviceProfile: DeviceProfile) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user