|
|
@ -1,4 +1,4 @@
|
|
|
|
import {ChangeDetectorRef, Component, Input, OnInit} from '@angular/core';
|
|
|
|
import { Component, Input, Output, OnInit, EventEmitter} from '@angular/core';
|
|
|
|
import * as moment from "moment";
|
|
|
|
import * as moment from "moment";
|
|
|
|
import {takeUntil} from "rxjs/operators";
|
|
|
|
import {takeUntil} from "rxjs/operators";
|
|
|
|
import {AppConfig} from "app/core/config/app.config";
|
|
|
|
import {AppConfig} from "app/core/config/app.config";
|
|
|
@ -16,7 +16,7 @@ import {DashboardDeviceDeleteDialogComponent} from "app/layout/common/dashboard-
|
|
|
|
export class DashboardDeviceComponent implements OnInit {
|
|
|
|
export class DashboardDeviceComponent implements OnInit {
|
|
|
|
@Input() deviceSummary: any;
|
|
|
|
@Input() deviceSummary: any;
|
|
|
|
@Input() deviceWWN: string;
|
|
|
|
@Input() deviceWWN: string;
|
|
|
|
deleted = false;
|
|
|
|
@Output() deviceDeleted = new EventEmitter<string>();
|
|
|
|
|
|
|
|
|
|
|
|
config: AppConfig;
|
|
|
|
config: AppConfig;
|
|
|
|
|
|
|
|
|
|
|
@ -25,7 +25,6 @@ export class DashboardDeviceComponent implements OnInit {
|
|
|
|
constructor(
|
|
|
|
constructor(
|
|
|
|
private _configService: TreoConfigService,
|
|
|
|
private _configService: TreoConfigService,
|
|
|
|
public dialog: MatDialog,
|
|
|
|
public dialog: MatDialog,
|
|
|
|
private cdRef: ChangeDetectorRef,
|
|
|
|
|
|
|
|
) {
|
|
|
|
) {
|
|
|
|
// Set the private defaults
|
|
|
|
// Set the private defaults
|
|
|
|
this._unsubscribeAll = new Subject();
|
|
|
|
this._unsubscribeAll = new Subject();
|
|
|
@ -97,8 +96,9 @@ export class DashboardDeviceComponent implements OnInit {
|
|
|
|
|
|
|
|
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
|
|
console.log('The dialog was closed', result);
|
|
|
|
console.log('The dialog was closed', result);
|
|
|
|
this.deleted = result.success
|
|
|
|
if(result.success){
|
|
|
|
this.cdRef.detectChanges()
|
|
|
|
this.deviceDeleted.emit(this.deviceWWN)
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|