Skip to content
monitor.component.html 7.29 KiB
Newer Older
wangqinghua's avatar
wangqinghua committed
<div nz-row class="breadcrumbs" >
    <div nz-col nzSpan="16">
        <nz-breadcrumb class="padding-8-0">
            <nz-breadcrumb-item>
                首页
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                <a>综合监控</a>
            </nz-breadcrumb-item>
            <nz-breadcrumb-item>
                基础资源监控
            </nz-breadcrumb-item>
        </nz-breadcrumb>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <button nz-button nzType="primary"><i class="anticon anticon-search"></i></button>
        <button nz-button nzType="primary"><i class="anticon anticon-sync"></i></button>
        <button nz-button nzType="primary"><i class="anticon anticon-arrows-alt"></i></button>
    </div>
</div>

<div nz-row class="search-form">
    <div nz-col nzSpan="16">
        <span>监控设备数:120</span>
        <span>设备状态:
      <span> <nz-tag [nzColor]="'#64ad58'"></nz-tag>110 </span>
      <span> <nz-tag [nzColor]="'#ed9e2e'"></nz-tag>120 </span>
      <span> <nz-tag [nzColor]="'#dd4127'"></nz-tag>119 </span>
      <span> <nz-tag [nzColor]="'#aaaaaa'"></nz-tag>112 </span>

    </span>
        <nz-select style="width: 200px;" nzShowSearch nzAllowClear nzPlaceHolder="按组分开">
            <nz-option nzLabel="A" nzValue="A"></nz-option>
            <nz-option nzLabel="B" nzValue="B"></nz-option>
            <nz-option nzLabel="C" nzValue="C"></nz-option>
        </nz-select>
    </div>
    <div nz-col nzSpan="8" class="text-right">
        <button nz-button nzType="default"><i class="anticon anticon-pause-circle-o"></i>关闭监控</button>
        <button nz-button nzType="default"><i class="anticon anticon-play-circle-o"></i>开启监控</button>
        <button nz-button nzType="default"><i class="anticon anticon-close-circle"></i>删除资源</button>
    </div>
</div>

<nz-table #nzTable [nzData]="data" nzSingleSort>
    <thead>
    <tr>
        <th nzShowCheckbox></th>
        <th nzShowSort>名称</th>
        <th nzShowSort nzWidth="20%">状态</th>
        <th nzShowSort>类型</th>
        <th nzShowSort>监控点</th>
        <th nzShowSort>CPU利用率</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <ng-template ngFor let-data [ngForOf]="nzTable.data">
        <ng-template ngFor let-item [ngForOf]="expandDataCache[data.key]">
            <tr *ngIf="(item.parent&&item.parent.expand)||!(item.parent)">
                <td nzShowCheckbox [(nzChecked)]="data.checked" (nzCheckedChange)="refreshStatus($event)"></td>
                <td [nzIndentSize]="item.level*20" [nzShowExpand]="!!item.children" [(nzExpand)]="item.expand" (nzExpandChange)="collapse(expandDataCache[data.key],item,$event)">
                    {{item.key1}}
                </td>
                <td>{{item.key2}}</td>
                <td>{{item.key3}}</td>
                <td>{{item.key4}}</td>
                <td>{{item.key5}}</td>
                <td>
          <span *ngIf="!item.level">
             <span (click)="showBasicEditModal()">添加资源</span>
             <span>编辑</span>
             <span>删除</span>
          </span>
                    <span *ngIf="item.level">
             <span>添加检测点</span>
             <span>编辑</span>
             <span>删除</span>
             <span class="table-operation">
               <nz-dropdown>
                    <a nz-dropdown class="operation">
                         更多 <i class="anticon anticon-down"></i>
                          </a>
                          <ul nz-menu>
                            <li nz-menu-item>
                              <a>Action 1</a>
                            </li>
                            <li nz-menu-item>
                              <a>Action 2</a>
                            </li>
                          </ul>
                    </nz-dropdown>
             </span>
          </span>
                </td>
            </tr>
        </ng-template>
    </ng-template>
    </tbody>
</nz-table>
<nz-modal [nzWidth]="780" [(nzVisible)]="isBasicEdit" nzTitle="添加检测点" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()">
    <form nz-form [nzLayout]="'vertical'" [formGroup]="validateForm" (ngSubmit)="submitForm()">
        <div>
            基本属性
            <label nz-checkbox></label>
            <div nz-row>
                <div nz-col [nzSpan]="12">
                    <nz-form-item [nzFlex]="true">
                        <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="email1">监测点名称</nz-form-label>
                        <nz-form-control [nzSm]="16" [nzXs]="24">
                            <input nz-input  >
                            <!--<nz-form-explain *ngIf="validateForm.get('email').dirty && validateForm.get('email').errors">The input is not valid E-mail!</nz-form-explain>-->
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col [nzSpan]="12">
                    <nz-form-item [nzFlex]="true">
                        <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="email1">类型</nz-form-label>
                        <nz-form-control [nzSm]="16" [nzXs]="24">
                            <nz-select name="select-error">
                                <nz-option nzValue="number" nzLabel="数字"></nz-option>
                                <nz-option nzValue="Option 2" nzLabel="Option 2"></nz-option>
                            </nz-select>
                            <!--<nz-form-explain *ngIf="validateForm.get('email').dirty && validateForm.get('email').errors">The input is not valid E-mail!</nz-form-explain>-->
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
            <div nz-row>
                <div nz-col [nzSpan]="12">
                    <nz-form-item [nzFlex]="true">
                        <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="email2">信息类型</nz-form-label>
                        <nz-form-control [nzSm]="16" [nzXs]="24">
                            <nz-select name="select-error">
                                <nz-option nzValue="number" nzLabel="数字"></nz-option>
                                <nz-option nzValue="Option 2" nzLabel="Option 2"></nz-option>
                            </nz-select>
                            <!--<nz-form-explain *ngIf="validateForm.get('email').dirty && validateForm.get('email').errors">The input is not valid E-mail!</nz-form-explain>-->
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col [nzSpan]="12">
                    <nz-form-item [nzFlex]="true">
                        <nz-form-label [nzSm]="8" [nzXs]="24" nzRequired nzFor="email3">单位</nz-form-label>
                        <nz-form-control [nzSm]="16" [nzXs]="24">
                            <input nz-input >
                            <!--<nz-form-explain *ngIf="validateForm.get('email').dirty && validateForm.get('email').errors">The input is not valid E-mail!</nz-form-explain>-->
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>
        </div>
        <div>
            阀值设置
            <label nz-checkbox></label>
        </div>
    </form>
</nz-modal>