-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
853 additions
and
1,257 deletions.
There are no files selected for viewing
468 changes: 16 additions & 452 deletions
468
web-app/src/app/routes/monitor/monitor-edit/monitor-edit.component.html
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
139 changes: 139 additions & 0 deletions
139
web-app/src/app/routes/monitor/monitor-form/monitor-form.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,139 @@ | ||
<!-- | ||
~ Licensed to the Apache Software Foundation (ASF) under one | ||
~ or more contributor license agreements. See the NOTICE file | ||
~ distributed with this work for additional information | ||
~ regarding copyright ownership. The ASF licenses this file | ||
~ to you under the Apache License, Version 2.0 (the | ||
~ "License"); you may not use this file except in compliance | ||
~ with the License. You may obtain a copy of the License at | ||
~ | ||
~ http://www.apache.org/licenses/LICENSE-2.0 | ||
~ | ||
~ Unless required by applicable law or agreed to in writing, | ||
~ software distributed under the License is distributed on an | ||
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
~ KIND, either express or implied. See the License for the | ||
~ specific language governing permissions and limitations | ||
~ under the License. | ||
--> | ||
|
||
<nz-spin [nzSpinning]="loading" [nzTip]="loadingTip" nzSize="large"> | ||
<div class="-inner-content"> | ||
<form nz-form #form="ngForm"> | ||
<app-form-item | ||
[item]="{ | ||
field: 'host', | ||
type: 'text', | ||
name: hostName ? hostName : ('monitor.host' | i18n), | ||
required: true, | ||
placeholder: 'monitor.host.tip' | i18n | ||
}" | ||
[(value)]="monitor.host" | ||
(valueChange)="onHostChange($event)" | ||
/> | ||
|
||
<app-form-item | ||
[item]="{ | ||
field: 'name', | ||
type: 'text', | ||
name: 'monitor.name' | i18n, | ||
required: true, | ||
placeholder: 'monitor.name.tip' | i18n | ||
}" | ||
[(value)]="monitor.name" | ||
/> | ||
|
||
<ng-container *ngFor="let paramDefine of paramDefines; let i = index"> | ||
<app-form-item | ||
*ngIf="params[i].display && paramDefine.field !== 'host'" | ||
[item]="paramDefine" | ||
[(value)]="params[i].paramValue" | ||
(valueChange)=" | ||
paramDefine.type === 'boolean' | ||
? onParamBooleanChanged($event, paramDefine.field) | ||
: paramDefine.type === 'radio' | ||
? onDependChanged($event, paramDefine.field) | ||
: null | ||
" | ||
/> | ||
</ng-container> | ||
|
||
<nz-collapse [nzGhost]="true" style="background: ghostwhite; margin-bottom: 24px"> | ||
<ng-template #extraColHeader> | ||
<button style="margin-left: 40%" nz-button nzType="dashed" nz-tooltip [nzTooltipTitle]="'monitors.advanced.tip' | i18n"> | ||
<span>{{ 'monitors.advanced' | i18n }}</span> | ||
<i nz-icon nzType="down-circle" nzTheme="outline"></i> | ||
</button> | ||
</ng-template> | ||
<nz-collapse-panel [nzHeader]="extraColHeader" [nzShowArrow]="false"> | ||
<ng-container *ngFor="let paramDefine of advancedParamDefines; let i = index"> | ||
<app-form-item | ||
*ngIf="advancedParams[i].display && paramDefine.field !== 'host'" | ||
[item]="paramDefine" | ||
[(value)]="advancedParams[i].paramValue" | ||
/> | ||
</ng-container> | ||
</nz-collapse-panel> | ||
</nz-collapse> | ||
|
||
<app-form-item | ||
[item]="{ | ||
field: 'collector', | ||
type: 'collectors-selection', | ||
name: 'monitor.collector' | i18n, | ||
tooltip: 'monitor.collector.tip' | i18n | ||
}" | ||
[extra]="{collectors}" | ||
[(value)]="collector" | ||
/> | ||
|
||
<app-form-item | ||
[item]="{ | ||
field: 'intervals', | ||
type: 'intervals', | ||
name: 'monitor.intervals' | i18n, | ||
tooltip: 'monitor.intervals.tip' | i18n | ||
}" | ||
[extra]="{ interval_type: monitor.app }" | ||
[(value)]="monitor.intervals" | ||
/> | ||
|
||
<app-form-item | ||
[item]="{ | ||
field: 'tags', | ||
type: 'tags-selection', | ||
name: 'tag.bind' | i18n, | ||
tooltip: 'tag.bind.tip' | i18n | ||
}" | ||
[(value)]="monitor.tags" | ||
/> | ||
|
||
<app-form-item | ||
[item]="{ | ||
field: 'description', | ||
type: 'textarea-limit', | ||
name: 'monitor.description' | i18n, | ||
tooltip: 'monitor.description.tip' | i18n | ||
}" | ||
[(value)]="monitor.description" | ||
/> | ||
|
||
<div nz-row> | ||
<div nz-col [nzXs]="{ span: 24 }" [nzLg]="{ span: 8, offset: 7 }" style="text-align: center"> | ||
<button | ||
nz-button | ||
nzType="primary" | ||
type="submit" | ||
nz-tooltip | ||
[nzTooltipTitle]="'monitors.detect.tip' | i18n" | ||
(click)="onDetect(form.form)" | ||
> | ||
{{ 'common.button.detect' | i18n }} | ||
</button> | ||
<button nz-button nzType="primary" type="submit" (click)="onSubmit(form.form)"> {{ 'common.button.ok' | i18n }} </button> | ||
<button nz-button nzType="primary" type="reset" (click)="onCancel()"> {{ 'common.button.cancel' | i18n }} </button> | ||
</div> | ||
</div> | ||
</form> | ||
</div> | ||
</nz-spin> |
Oops, something went wrong.