Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
smart
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangqinghua
smart
Commits
6ebceaa7
Commit
6ebceaa7
authored
Nov 03, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
告警模块
parent
3a805664
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
160 additions
and
90 deletions
+160
-90
app.module.ts
src/main/webapp/app/app.module.ts
+2
-0
app.route.ts
src/main/webapp/app/app.route.ts
+14
-14
basi-check.component.html
...ain/webapp/app/modal/basi-check/basi-check.component.html
+68
-38
basi-check.component.ts
src/main/webapp/app/modal/basi-check/basi-check.component.ts
+70
-30
basic.component.ts
src/main/webapp/app/overAll/basic/basic.component.ts
+1
-5
loginGuard.ts
src/main/webapp/app/shared/common/loginGuard.ts
+1
-0
login.component.ts
src/main/webapp/app/shared/login/login.component.ts
+4
-3
No files found.
src/main/webapp/app/app.module.ts
View file @
6ebceaa7
...
...
@@ -48,6 +48,7 @@ import {BasicComponent} from './overAll/basic/basic.component';
import
{
NewTypeComponent
}
from
'./modal/new-type/new-type.component'
;
import
{
BasicDetailComponent
}
from
'./overAll/basic/basic-detail/basic-detail.component'
;
import
{
BasicKeyComponent
}
from
'./modal/basic-key/basic-key.component'
;
import
{
BasicEditComponent
}
from
'./modal/basic-edit/basic-edit.component'
;
@
NgModule
({
imports
:
[
...
...
@@ -82,6 +83,7 @@ import {BasicKeyComponent} from './modal/basic-key/basic-key.component';
BasicDetailComponent
,
BasiCheckComponent
,
BasicKeyComponent
,
BasicEditComponent
,
CreateGroupComponent
,
NewTypeComponent
,
AppComponent
...
...
src/main/webapp/app/app.route.ts
View file @
6ebceaa7
...
...
@@ -27,20 +27,20 @@ export const route: Routes = [
{
path
:
'main'
,
component
:
JhiMainComponent
,
canActivate
:[
LoginGuard
],
children
:
[
{
path
:
'basic'
,
component
:
BasicComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'basic-detail'
,
component
:
BasicDetailComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'monitor'
,
component
:
MonitorComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'security'
,
component
:
SecurityComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'audit'
,
component
:
AuditComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'examine'
,
component
:
ExamineComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'group'
,
component
:
GroupComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'power'
,
component
:
PowerComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'alarmList'
,
component
:
AlarmListComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'alarmLog'
,
component
:
AlarmLogComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'alarmManage'
,
component
:
AlarmManageComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'alarmSet'
,
component
:
AlarmSetComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'nowAlarm'
,
component
:
NowAlarmComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'sendSet'
,
component
:
SendSetComponent
,
canActivate
:[
LoginGuard
]
},
{
path
:
'basic'
,
component
:
BasicComponent
},
{
path
:
'basic-detail'
,
component
:
BasicDetailComponent
},
{
path
:
'monitor'
,
component
:
MonitorComponent
},
{
path
:
'security'
,
component
:
SecurityComponent
},
{
path
:
'audit'
,
component
:
AuditComponent
},
{
path
:
'examine'
,
component
:
ExamineComponent
},
{
path
:
'group'
,
component
:
GroupComponent
},
{
path
:
'power'
,
component
:
PowerComponent
},
{
path
:
'alarmList'
,
component
:
AlarmListComponent
},
{
path
:
'alarmLog'
,
component
:
AlarmLogComponent
},
{
path
:
'alarmManage'
,
component
:
AlarmManageComponent
},
{
path
:
'alarmSet'
,
component
:
AlarmSetComponent
},
{
path
:
'nowAlarm'
,
component
:
NowAlarmComponent
},
{
path
:
'sendSet'
,
component
:
SendSetComponent
},
]
},
]
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.html
View file @
6ebceaa7
<section>
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isCheck
"
nzTitle=
"添加检测点"
(
nzOnCancel
)="
handleCheckCancel
()"
(
nzOnOk
)="
handleCheckOk
()"
>
<nz-modal
[
nzWidth
]="
880
"
[(
nzVisible
)]="
isCheck
"
nzTitle=
"添加检测点"
(
nzOnCancel
)="
handleCheckCancel
()"
(
nzOnOk
)="
handleCheckOk
()"
>
<form
nz-form
>
<div
style=
"padding: 16px;font-size: 18px;"
>
基本属性
</div>
<nz-form-item>
...
...
@@ -37,14 +38,16 @@
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"interfaceid"
>
主机接口
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"interfaceid"
[(
ngModel
)]="
validateForm
.
interfaceid
"
>
<nz-option
*
ngFor=
"let item of interfaceList"
nzValue=
"{{item.interfaceid}}"
nzLabel=
"{{item.ip}}:{{item.port}}"
></nz-option>
<nz-option
*
ngFor=
"let item of interfaceList"
nzValue=
"{{item.interfaceid}}"
nzLabel=
"{{item.ip}}:{{item.port}}"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"key_"
>
键值
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"key_"
style=
"width: 85%;display: inline-block"
placeholder=
"输入键值"
type=
"text"
name=
"key_"
nz-input
[(
ngModel
)]="
validateForm
.
key_
"
>
<input
id=
"key_"
style=
"width: 85%;display: inline-block"
placeholder=
"输入键值"
type=
"text"
name=
"key_"
nz-input
[(
ngModel
)]="
validateForm
.
key_
"
>
<button
nz-button
nzType=
"primary"
(
click
)="
showKeymodal
()"
>
选择
</button>
</nz-form-control>
</nz-form-item>
...
...
@@ -63,8 +66,11 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"datatype"
>
数据类型
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
name=
"datatype"
[(
ngModel
)]="
validateForm
.
itemExtend
.
datatype
"
>
<nz-option
nzValue=
"1"
nzLabel=
"十进位数字"
></nz-option>
<nz-select
name=
"datatype"
[(
ngModel
)]="
validateForm
.
data_type
"
>
<nz-option
nzValue=
"0"
nzLabel=
"十进制"
></nz-option>
<nz-option
nzValue=
"1"
nzLabel=
"八进制"
></nz-option>
<nz-option
nzValue=
"2"
nzLabel=
"二进制"
></nz-option>
<nz-option
nzValue=
"3"
nzLabel=
"布尔"
></nz-option>
</nz-select>
</nz-form-control>
</nz-form-item>
...
...
@@ -78,16 +84,19 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"itemtype"
>
监测点分类
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<nz-select
style=
"width: 80%;display: inline-block"
nzPlaceHolder=
"选择监测点分类"
name=
"itemtype"
[(
ngModel
)]="
validateForm
.
itemExtend
.
itemtype
"
>
<nz-option
*
ngFor=
"let item of checkList"
nzValue=
"{{item.applicationid}}"
nzLabel=
"{{item.name}}"
></nz-option>
<nz-select
style=
"width: 80%;display: inline-block"
nzPlaceHolder=
"选择监测点分类"
name=
"itemtype"
[(
ngModel
)]="
validateForm
.
applicationids
"
>
<nz-option
*
ngFor=
"let item of checkList"
nzValue=
"{{item.applicationid}}"
nzLabel=
"{{item.name}}"
></nz-option>
</nz-select>
<button
nz-button
nzType=
"primary"
(
click
)="
showTypeModal
()"
>
新建分类
</button>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"multiple"
>
使用自定义倍数
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"multiple"
>
使用自定义倍数
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"multiple"
name=
"multiple"
type=
"text"
placeholder=
"输入倍数"
nz-input
[(
ngModel
)]="
validateForm
.
itemExtend
.
multiple
"
>
<input
id=
"multiple"
name=
"multiple"
type=
"text"
placeholder=
"输入倍数"
nz-input
[(
ngModel
)]="
validateForm
.
formula
"
>
<!--<nz-form-explain *ngIf="validateForm.get('note').dirty && validateForm.get('note').errors">Please input your username!</nz-form-explain>-->
</nz-form-control>
</nz-form-item>
...
...
@@ -95,7 +104,8 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzRequired
nzFor=
"delay"
>
数据更新间隔
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"delay"
name=
"delay"
type=
"text"
placeholder=
"输入数据更新间隔"
nz-input
[(
ngModel
)]="
validateForm
.
delay
"
>
<input
id=
"delay"
name=
"delay"
type=
"text"
placeholder=
"输入数据更新间隔"
nz-input
[(
ngModel
)]="
validateForm
.
delay
"
>
<!--<nz-form-explain *ngIf="validateForm.get('note').dirty && validateForm.get('note').errors">Please input your username!</nz-form-explain>-->
</nz-form-control>
</nz-form-item>
...
...
@@ -103,39 +113,53 @@
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
nzFor=
"interval"
>
自定义时间间隔
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
id=
"interval1"
name=
"interval1"
placeholder=
"输入自定义时间间隔"
type=
"text"
nz-input
[(
ngModel
)]="
interval
"
>
<input
id=
"interval1"
name=
"interval1"
placeholder=
"输入自定义时间间隔"
type=
"text"
nz-input
[(
ngModel
)]="
interval
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
历史数据保留时长(单位天)
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
历史数据保留时长(单位天)
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
nzFor=
"history"
>
<input
type=
"text"
name=
"history"
id=
"history"
placeholder=
"输入历史数据保留时长"
nz-input
[(
ngModel
)]="
validateForm
.
history
"
>
<input
type=
"text"
name=
"history"
id=
"history"
placeholder=
"输入历史数据保留时长"
nz-input
[(
ngModel
)]="
validateForm
.
history
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
趋势数据存储周期(单位天)
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
趋势数据存储周期(单位天)
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
type=
"text"
name=
"trends"
nz-input
[(
ngModel
)]="
validateForm
.
trends
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
存储值
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
存储值
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
type=
"text"
name=
"storagevalue"
nz-input
[(
ngModel
)]="
validateForm
.
itemExtend
.
storagevalue
"
>
<input
type=
"text"
name=
"storagevalue"
nz-input
[(
ngModel
)]="
validateForm
.
delta
"
>
</nz-form-control>
</nz-form-item>
<nz-form-item>
<nz-form-label
[
nzSpan
]="
6
"
>
查看值
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
>
查看值
</nz-form-label>
<nz-form-control
[
nzSpan
]="
14
"
>
<input
type=
"text"
nz-input
name=
"valuemapid"
[(
ngModel
)]="
validateForm
.
valuemapid
"
>
</nz-form-control>
</nz-form-item>
</form>
<div
style=
"padding: 16px;font-size: 18px;"
>
阀值设置
</div>
<div
style=
"padding: 16px;font-size: 18px;"
>
阈值设置
</div>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<nz-radio-group
[(
ngModel
)]="
conditionType
"
>
<label
nz-radio-button
nzValue=
"commonly"
><span>
常规
</span></label>
<label
nz-radio-button
nzValue=
"high"
><span>
高级
</span></label>
</nz-radio-group>
</nz-form-control>
</nz-form-item>
<ng-container
*
ngIf=
"conditionType == 'commonly'"
>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of faultConditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
危险阀
值
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
危险阈
值
</nz-form-label>
<nz-form-label
nzOffset=
"3"
[
nzSpan
]="
3
"
*
ngIf=
"fault.and"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
"&"
nzLabel=
"并且"
></nz-option>
...
...
@@ -143,24 +167,21 @@
</nz-select>
</nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"返回码"
[(
ngModel
)]="
fault
.
code
"
>
<nz-option
nzValue=
"1"
nzLabel=
"返回码"
></nz-option>
</nz-select>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
">="
nzLabel=
">="
></nz-option>
<nz-option
nzValue=
"<="
nzLabel=
"<="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addFault
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteFault
(
i
)"
>
删除条件
</button>
</nz-form-control>
...
...
@@ -169,7 +190,7 @@
</nz-form-item>
<nz-form-item
class=
"form-select"
*
ngFor=
"let fault of conditionList;let i = index;"
>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
故障阀
值
</nz-form-label>
<nz-form-label
[
nzSpan
]="
6
"
*
ngIf=
"!fault.and"
>
故障阈
值
</nz-form-label>
<nz-form-label
nzOffset=
"3"
[
nzSpan
]="
3
"
*
ngIf=
"fault.and"
>
<nz-select
name=
"interfaces_main"
[(
ngModel
)]="
fault
.
and
"
>
<nz-option
nzValue=
"&"
nzLabel=
"并且"
></nz-option>
...
...
@@ -177,30 +198,39 @@
</nz-select>
</nz-form-label>
<nz-form-control
[
nzSpan
]="
18
"
class=
"form-select"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<div
nz-row
[
nzGutter
]="
12
"
>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"返回码"
[(
ngModel
)]="
fault
.
code
"
>
<nz-option
nzValue=
"1"
nzLabel=
"返回码"
></nz-option>
</nz-select>
<button
class=
"tag-button"
nz-button
nzType=
"default"
>
返回值
</button>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<nz-select
name=
"interfaces_main"
nzPlaceHolder=
"选择接口类型"
[(
ngModel
)]="
fault
.
equal
"
>
<nz-option
nzValue=
">="
nzLabel=
">="
></nz-option>
<nz-option
nzValue=
"<="
nzLabel=
"<="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
<nz-option
nzValue=
"="
nzLabel=
"="
></nz-option>
<nz-option
nzValue=
">"
nzLabel=
">"
></nz-option>
<nz-option
nzValue=
"<"
nzLabel=
"<"
></nz-option>
</nz-select>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
6
"
>
<input
type=
"text"
placeholder=
"值"
nz-input
name=
"value"
[(
ngModel
)]="
fault
.
value
"
>
</nz-form-control>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<nz-form-control
nz-col
[
nzSpan
]="
3
"
>
<button
*
ngIf=
"i == 0"
nz-button
nzType=
"primary"
(
click
)="
addcondition
()"
>
添加条件
</button>
<button
*
ngIf=
"i > 0"
nz-button
nzType=
"primary"
(
click
)="
deleteCondition
(
i
)"
>
删除条件
</button>
</nz-form-control>
</div>
</nz-form-control>
</nz-form-item>
</ng-container>
<ng-container
*
ngIf=
"conditionType == 'high'"
>
<nz-form-item
nzFlex
>
<nz-form-control
[
nzOffset
]="
4
"
[
nzSpan
]="
14
"
>
<p>
危险阈值
</p>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
validateForm
.
condition_high
"
></textarea>
<p>
故障阈值
</p>
<textarea
rows=
"4"
nz-input
[(
ngModel
)]="
validateForm
.
faultCondition_high
"
></textarea>
</nz-form-control>
</nz-form-item>
</ng-container>
</nz-modal>
</section>
...
...
src/main/webapp/app/modal/basi-check/basi-check.component.ts
View file @
6ebceaa7
...
...
@@ -12,7 +12,16 @@ import {NewTypeComponent} from '../new-type/new-type.component';
@
Component
({
selector
:
'smart-basi-check'
,
templateUrl
:
'./basi-check.component.html'
,
styles
:
[]
styles
:
[
`.tag-button[disabled],
.tag-button {
width: 80%;
height: 30px;
color: rgba(0, 0, 0, 0.65);
background-color: #fff;
border-color: #d9d9d9;
}`
]
})
export
class
BasiCheckComponent
implements
OnInit
{
@
ViewChild
(
'basicKey'
)
basicKey
:
BasicKeyComponent
;
...
...
@@ -23,18 +32,19 @@ export class BasiCheckComponent implements OnInit {
validateForm
;
checkList
;
//监测点分类
interval
;
//间隔时长
conditionType
=
'commonly'
;
faultConditionList
=
[
{
code
:
'1'
,
equal
:
'
>
='
,
value
:
'
400
'
,
equal
:
'='
,
value
:
''
,
}
];
//危险阀值list
conditionList
=
[
{
code
:
'1'
,
equal
:
'
>
='
,
value
:
'
400
'
,
equal
:
'='
,
value
:
''
,
}
];
//故障list
constructor
(
private
overAllSer
:
OverAllService
,
private
fb
:
FormBuilder
,
...
...
@@ -43,24 +53,24 @@ export class BasiCheckComponent implements OnInit {
ngOnInit
()
{
this
.
validateForm
=
{
itemExtend
:
{
datatype
:
null
,
itemtype
:
null
,
multiple
:
null
,
storagevalue
:
null
,
},
hostid
:
this
.
hostId
,
name
:
null
,
interfaceid
:
null
,
key_
:
null
,
value_type
:
null
,
type
:
null
,
data_type
:
null
,
units
:
null
,
history
:
null
,
trends
:
null
,
valuemapid
:
null
,
interval1
:
null
,
delay
:
null
,
condition_commonly
:
null
,
//故障
condition_high
:
null
,
//故障
faultCondition_commonly
:
null
,
//危险
faultCondition_high
:
null
,
//危险
delta
:
null
,
formula
:
null
};
}
...
...
@@ -69,24 +79,25 @@ export class BasiCheckComponent implements OnInit {
this
.
isCheck
=
true
;
this
.
hostId
=
hostId
;
this
.
validateForm
=
{
itemExtend
:
{
datatype
:
null
,
itemtype
:
null
,
multiple
:
null
,
storagevalue
:
null
,
},
hostid
:
this
.
hostId
,
name
:
null
,
interfaceid
:
null
,
key_
:
null
,
value_type
:
null
,
type
:
null
,
data_type
:
null
,
units
:
null
,
history
:
null
,
trends
:
null
,
valuemapid
:
null
,
interval1
:
null
,
delay
:
null
,
condition_commonly
:
null
,
//故障
condition_high
:
null
,
//故障
faultCondition_commonly
:
null
,
//危险
faultCondition_high
:
null
,
//危险
delta
:
null
,
formula
:
null
,
applicationids
:
null
};
//主机接口
...
...
@@ -102,9 +113,8 @@ export class BasiCheckComponent implements OnInit {
getItemType
()
{
//监测点分类
const
data
=
{
'hostids'
:
[]
'hostids'
:
[
this
.
hostId
]
};
data
.
hostids
.
push
(
this
.
hostId
);
this
.
overAllSer
.
findItemType
(
data
).
subscribe
(
(
res
)
=>
{
this
.
checkList
=
res
.
data
;
...
...
@@ -114,8 +124,41 @@ export class BasiCheckComponent implements OnInit {
//添加
handleCheckOk
():
void
{
console
.
log
(
this
.
validateForm
);
this
.
overAllSer
.
create
(
this
.
validateForm
).
subscribe
(
const
data
=
{
hostid
:
this
.
hostId
,
name
:
this
.
validateForm
.
name
,
interfaceid
:
this
.
validateForm
.
interfaceid
,
key_
:
this
.
validateForm
.
key_
,
value_type
:
Number
(
this
.
validateForm
.
value_type
),
type
:
Number
(
this
.
validateForm
.
type
),
data_type
:
Number
(
this
.
validateForm
.
data_type
),
units
:
this
.
validateForm
.
units
,
history
:
this
.
validateForm
.
history
+
'd'
,
trends
:
this
.
validateForm
.
trends
+
'd'
,
valuemapid
:
this
.
validateForm
.
valuemapid
,
delay
:
this
.
validateForm
.
delay
,
condition
:
''
,
//故障
faultCondition
:
''
,
//危险
delta
:
Number
(
this
.
validateForm
.
delta
),
formula
:
this
.
validateForm
.
formula
,
applicationids
:
[
this
.
validateForm
.
applicationids
]
};
if
(
this
.
conditionType
==
'commonly'
)
{
//常规
this
.
conditionList
.
forEach
(
res
=>
{
data
.
condition
+=
'{'
+
this
.
validateForm
.
name
+
':'
+
this
.
validateForm
.
key_
+
'.last}'
+
res
.
equal
+
''
+
res
.
value
;
});
this
.
faultConditionList
.
forEach
(
res
=>
{
data
.
faultCondition
+=
'{'
+
this
.
validateForm
.
name
+
':'
+
this
.
validateForm
.
key_
+
'.last}'
+
res
.
equal
+
''
+
res
.
value
;
});
}
else
{
//高级
data
.
condition
=
this
.
validateForm
.
condition_high
;
data
.
faultCondition
=
this
.
validateForm
.
faultCondition_high
;
}
console
.
log
(
this
.
conditionList
);
console
.
log
(
this
.
faultConditionList
);
console
.
log
(
data
);
this
.
overAllSer
.
create
(
data
).
subscribe
(
(
res
)
=>
{
if
(
res
==
10000
)
{
this
.
isCheck
=
false
;
...
...
@@ -144,7 +187,6 @@ export class BasiCheckComponent implements OnInit {
//添加分类
addItemType
(
data
)
{
console
.
log
(
data
);
const
obj
=
{
hostid
:
this
.
hostId
,
name
:
data
...
...
@@ -166,8 +208,8 @@ export class BasiCheckComponent implements OnInit {
const
demo
=
{
and
:
'&'
,
code
:
'1'
,
equal
:
'
>
='
,
value
:
'
400
'
,
equal
:
'='
,
value
:
''
,
};
this
.
faultConditionList
.
push
(
demo
);
}
...
...
@@ -177,8 +219,8 @@ export class BasiCheckComponent implements OnInit {
const
demo
=
{
and
:
'&'
,
code
:
'1'
,
equal
:
'
>
='
,
value
:
'
400
'
,
equal
:
'='
,
value
:
''
,
};
this
.
conditionList
.
push
(
demo
);
}
...
...
@@ -196,6 +238,4 @@ export class BasiCheckComponent implements OnInit {
getKey
(
keyValue
):
void
{
this
.
validateForm
.
key_
=
keyValue
;
}
}
src/main/webapp/app/overAll/basic/basic.component.ts
View file @
6ebceaa7
...
...
@@ -278,15 +278,11 @@ export class BasicComponent implements OnInit {
//查看详情
goDetail
(
item
){
let
type
;
let
type
=
0
;
if
(
item
.
hostExtend
){
if
(
item
.
hostExtend
.
equipmentType
==
'交换机'
){
type
=
1
;
}
else
{
type
=
0
;
}
}
else
{
type
=
0
;
}
this
.
router
.
navigate
([
'app/main/basic-detail'
],{
queryParams
:{
...
...
src/main/webapp/app/shared/common/loginGuard.ts
View file @
6ebceaa7
...
...
@@ -9,6 +9,7 @@ export class LoginGuard implements CanActivate {
}
canActivate
(
route
:
ActivatedRouteSnapshot
,
state
:
RouterStateSnapshot
):
boolean
{
console
.
log
(
'canActivite'
);
let
isLogin
:
boolean
;
// 判断用户是否登入
const
user
=
this
.
localStorage
.
retrieve
(
'accessToken'
);
...
...
src/main/webapp/app/shared/login/login.component.ts
View file @
6ebceaa7
...
...
@@ -86,9 +86,10 @@ export class JhiLoginModalComponent implements AfterViewInit,OnInit {
password
:
this
.
password
,
rememberMe
:
true
}).
then
(()
=>
{
console
.
log
(
'login success'
);
this
.
authenticationError
=
false
;
this
.
activeModal
.
dismiss
(
'login success'
);
this
.
isSpinning
=
false
;
this
.
router
.
navigate
([
'app/main/basic'
]);
// this.authenticationError = false;
// this.activeModal.dismiss('login success');
// if (this.router.url === '/register' || (/^\/activate\//.test(this.router.url)) ||
// (/^\/reset\//.test(this.router.url))) {
// this.router.navigate(['app/main/basic']);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment