62 lines
1.8 KiB
TypeScript
62 lines
1.8 KiB
TypeScript
import { Component, OnInit, Inject } from '@angular/core';
|
|
import {MatDialog, MatDialogRef, MAT_DIALOG_DATA} from '@angular/material';
|
|
import { AddDashboardDialogComponent } from 'app/pages/overview/add-dashboard-dialog/add-dashboard-dialog.component';
|
|
|
|
@Component({
|
|
selector: 'of-page-overview',
|
|
templateUrl: './overview-page.component.html',
|
|
styleUrls: ['./overview-page.component.scss']
|
|
})
|
|
export class OverviewPageComponent implements OnInit {
|
|
|
|
public dashCard = [
|
|
{ colorDark: '#5C6BC0', colorLight: '#7986CB', number: 1000, title: 'HOSTS', icon: 'devices_other' },
|
|
{ colorDark: '#42A5F5', colorLight: '#64B5F6', number: 2000, title: 'APPLICATIONS', icon: 'apps' },
|
|
{ colorDark: '#26A69A', colorLight: '#4DB6AC', number: 3000, title: 'SENSORS', icon: 'memory' },
|
|
// { colorDark: '#66BB6A', colorLight: '#81C784', number: 1221, title: 'BANKING', icon: 'account_balance' }
|
|
];
|
|
|
|
public messages = [
|
|
{
|
|
from: '존버왕김단타',
|
|
content: 'pac코인 여태 안 탄 혹우 있냐',
|
|
date: '2017-01-01'
|
|
},
|
|
{
|
|
from: '코인왕박손절',
|
|
content: '큉텀이 낳냐 아다가 낳냐',
|
|
date: '2017-01-01'
|
|
},
|
|
{
|
|
from: '존버왕김단타',
|
|
content: 'pac코인 여태 안 탄 혹우 있냐',
|
|
date: '2017-01-01'
|
|
},
|
|
{
|
|
from: '코인왕박손절',
|
|
content: '큉텀이 낳냐 아다가 낳냐',
|
|
date: '2017-01-01'
|
|
},
|
|
];
|
|
|
|
constructor(public dialog: MatDialog) { }
|
|
|
|
ngOnInit() {
|
|
}
|
|
|
|
handleActivityClick(message: any) {
|
|
alert(message.content);
|
|
}
|
|
|
|
openDialog() {
|
|
const dialogRef = this.dialog.open(AddDashboardDialogComponent, {
|
|
width: '350px',
|
|
data: { }
|
|
});
|
|
|
|
dialogRef.afterClosed().subscribe(result => {
|
|
console.log('The dialog was closed');
|
|
});
|
|
}
|
|
}
|