import {Component, OnInit} from '@angular/core';
import {TopologyService} from '../topology.service';
import {NzMessageService} from 'ng-zorro-antd';

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

    iconList;
    constructor(private topologySer: TopologyService,private message:NzMessageService) {
    }

    ngOnInit() {
        this.getList();
    }

    getList() {
        const data = {};
        this.topologySer.iconFindAll(data).subscribe(
            (res) => {
                if(res.errCode == 10000){
                    this.iconList = res.data;
                }else{
                    this.message.create('error',`${res.errMsg}`);
                }
            }
        );
    }
}
