<!--添加资源-->
<nz-modal [nzMaskClosable]="false" [nzWidth]="880" [(nzVisible)]="isVisible" [nzTitle]="title" (nzOnCancel)="handleCancel()"
          (nzOnOk)="handleCancel()">
    <form nz-form>
        <div nz-form class="ant-advanced-search-form form-select">
            <div nz-row [nzGutter]="24">
                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">规则名称</nz-form-label>
                        <nz-form-control [nzSpan]="14">
                            {{msgObj?.name}}
                        </nz-form-control>
                    </nz-form-item>
                </div>
                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzSpan]="8" nzFor="title">预警类型</nz-form-label>
                        <nz-form-control [nzSpan]="14">
                            <ng-container *ngIf="msgObj?.type == '1'">资源预警</ng-container>
                            <ng-container *ngIf="msgObj?.type == '2'">业务预警</ng-container>
                            <ng-container *ngIf="msgObj?.type == '3'">工作预警</ng-container>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>

            <div nz-row [nzGutter]="24">
                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">
                            预警级别
                        </nz-form-label>
                        <nz-form-control [nzSpan]="14">
                            <ng-container *ngIf="msgObj?.level == '1'">一般</ng-container>
                            <ng-container *ngIf="msgObj?.level == '9'">严重</ng-container>
                        </nz-form-control>
                    </nz-form-item>
                </div>

                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzSpan]="8" nzFor="serialnoA">预警周期</nz-form-label>
                        <nz-form-control [nzSpan]="14">
                            <ng-container *ngIf="msgObj?.level == 1">每天</ng-container>
                            <ng-container *ngIf="msgObj?.level == 2">每周</ng-container>
                            <ng-container *ngIf="msgObj?.level == 3">每月</ng-container>
                            <ng-container *ngIf="msgObj?.level == 4">每年</ng-container>
                        </nz-form-control>
                    </nz-form-item>
                </div>
            </div>

            <ng-container *ngIf="msgObj?.type == 1">
                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="secondLevelType">
                                监测对象
                            </nz-form-label>
                            <nz-form-control [nzSpan]="4">
                                <span *ngIf="msgObj?.resourceGroupType == '1'">按资源分组</span>
                                <span *ngIf="msgObj?.resourceGroupType == '2'">按设备类型分组</span>
                            </nz-form-control>
                        </nz-form-item>
                    </div>

                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzSpan]="8" nzFor="serialnoA">告警级别</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                <ng-container *ngIf="msgObj?.resourceWarningLevel == '1'">一般</ng-container>
                                <ng-container *ngIf="msgObj?.resourceWarningLevel == '9'">严重</ng-container>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>

                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">监测时长</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                {{msgObj?.resourceDays || '-'}}天
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzSpan]="8" nzFor="title">告警次数</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                {{msgObj?.resourceWarningTims || '-'}}次
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
            </ng-container>

            <ng-container *ngIf="msgObj?.type == 2">
                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">监测数据</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                <ng-container *ngIf="msgObj?.businessDataType == '1'">访问量</ng-container>
                                <ng-container *ngIf="msgObj?.businessDataType == '2'">负载</ng-container>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzSpan]="8" nzFor="title">监测时长</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                {{msgObj?.businessDays}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>

                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">判断条件</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                预警值：
                                <ng-container *ngIf="msgObj?.businessWarningSymbol == '1'">大于</ng-container>
                                <ng-container *ngIf="msgObj?.businessWarningSymbol == '2'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.businessWarningSymbol == '3'">小于</ng-container>
                                <ng-container *ngIf="msgObj?.businessWarningSymbol == '4'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.businessWarningSymbol == '5'">等于</ng-container>
                                {{msgObj?.businessWarningValue}}
                                <br>
                                <ng-container *ngIf="msgObj?.businessThresholdSymbol == '1'">大于</ng-container>
                                <ng-container *ngIf="msgObj?.businessThresholdSymbol == '2'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.businessThresholdSymbol == '3'">小于</ng-container>
                                <ng-container *ngIf="msgObj?.businessThresholdSymbol == '4'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.businessThresholdSymbol == '5'">等于</ng-container>
                                {{msgObj?.businessThresholdValue}}
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
            </ng-container>

            <ng-container *ngIf="msgObj?.type == 3">
                <div nz-row [nzGutter]="24">
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">监测数据</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                <ng-container *ngIf="msgObj?.level == '1'">运维事件</ng-container>
                                <ng-container *ngIf="msgObj?.level == '2'">巡检计划</ng-container>
                                <ng-container *ngIf="msgObj?.level == '3'">系统变更</ng-container>
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                    <div nz-col [nzSpan]="12">
                        <nz-form-item nzFlex>
                            <nz-form-label [nzSpan]="8" nzFor="title">未处理时长</nz-form-label>
                            <nz-form-control [nzSpan]="14">
                                <ng-container *ngIf="msgObj?.jobUntreatedSymbol == '1'">大于</ng-container>
                                <ng-container *ngIf="msgObj?.jobUntreatedSymbol == '2'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.jobUntreatedSymbol == '3'">小于</ng-container>
                                <ng-container *ngIf="msgObj?.jobUntreatedSymbol == '4'">大于等于</ng-container>
                                <ng-container *ngIf="msgObj?.jobUntreatedSymbol == '5'">等于</ng-container>
                                {{msgObj?.jobUntreatedDays || '-'}}天
                            </nz-form-control>
                        </nz-form-item>
                    </div>
                </div>
            </ng-container>

            <div nz-row [nzGutter]="24">
                <div nz-col [nzSpan]="12">
                    <nz-form-item nzFlex>
                        <nz-form-label [nzOffset]="4" [nzSpan]="6" nzFor="title">预警内容</nz-form-label>
                        <nz-form-control [nzSpan]="14">
                            {{msgObj?.content}}
                        </nz-form-control>
                    </nz-form-item>
                </div>

            </div>

        </div>
    </form>

</nz-modal>
