member_webapp/@overflow/alert/component/list/list.component.ts
crusader d59d9379f9 ing
2018-05-24 15:44:13 +09:00

116 lines
2.3 KiB
TypeScript

import { Component, OnInit } from '@angular/core';
import { AlertSystem, AlertMetric } from '../../model';
@Component({
selector: 'of-alert-list',
templateUrl: './list.component.html',
styleUrls: ['./list.component.css']
})
export class ListComponent implements OnInit {
metricAlerts: AlertMetric[] = exampleAlerts;
systemAlerts: AlertSystem[] = exampleSystemAlerts;
bgMap: Map<string, string> = new Map();
constructor() { }
ngOnInit() {
this.bgMap.set('Warn', '#ffc107');
this.bgMap.set('Error', '#f30000');
this.bgMap.set('Down', '#607D8B');
}
}
const exampleSystemAlerts = [
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
{
created: '2018-04-19',
msg: 'Geek 님이 새로운 Probe를 설치했습니다.',
},
];
const exampleAlerts = [
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Down'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Error'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
},
{
created: '2018-04-19',
msg: 'Host 192.168.1.106 disk < 5%',
status: 'Warn'
}
];