import {Component, OnInit} from '@angular/core';
import {CommonService} from '../../../shared/common/common.service';

@Component({
    selector: 'smart-switch',
    templateUrl: './switch.component.html',
    styles: []
})
export class SwitchComponent implements OnInit {

    targetFlow = [
        {'label': 'CPU利用率(%)', value: ''},
        {'label': 'Ping延时(ms)', value: ''},
        {'label': '丢包数', value: ''},
        {'label': '内存利用率(%)', value: ''},
        {'label': '总流速(Kbps)', value: ''},
    ];

    timeList = [
        {'label':'最近一小时',value:'0'},
        {'label':'最近一天',value:'1'},
        {'label':'最近三天',value:'3'},
        {'label':'最近一周',value:'4'},
    ];
    timeTarget;
    timeFlow;

    interfaceList = [];  //接口数组
    interface;

    unitList = [
        {'label':'Kbps',value:''},
        {'label':'Mbps',value:''},
        {'label':'Gbps',value:''},
    ];
    unit;

    constructor(private commonSer:CommonService) {
    }

    ngOnInit() {
    }

    /**********指标趋势**************/
    changeTimeTarget(){
        const timeObj = this.commonSer.getTimeByType(this.timeFlow);
    }

    /**********指标趋势**************/

    /**********网卡流量**************/
    changeTimeFlow(){
        const timeObj = this.commonSer.getTimeByType(this.timeFlow);
    }
    /**********网卡流量**************/
}
