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
b2acf8c5
Commit
b2acf8c5
authored
Jan 14, 2019
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
单位
parent
8c185dd3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
138 additions
and
119 deletions
+138
-119
alarm-modal.component.ts
...ain/webapp/app/modal/alarm-modal/alarm-modal.component.ts
+14
-0
basic-detail.component.html
...pp/overAll/basic/basic-detail/basic-detail.component.html
+122
-113
basic-detail.component.ts
.../app/overAll/basic/basic-detail/basic-detail.component.ts
+2
-6
No files found.
src/main/webapp/app/modal/alarm-modal/alarm-modal.component.ts
View file @
b2acf8c5
...
...
@@ -347,6 +347,20 @@ export class AlarmModalComponent implements OnInit {
this
.
message
.
error
(
"请输入发送信息"
);
return
false
;
}
if
(
this
.
isEvent
==
'1'
){
if
(
!
this
.
validateForm
.
event
.
title
){
this
.
message
.
error
(
"请输入事件标题"
);
return
false
;
}
if
(
!
this
.
validateForm
.
event
.
eventTypeId
){
this
.
message
.
error
(
"请选择事件分类"
);
return
false
;
}
if
(
this
.
operatorList
.
length
==
0
){
this
.
message
.
error
(
"请选择事件负责人"
);
return
false
;
}
}
let
number
=
true
;
this
.
sendInfoList
.
map
(
e
=>
{
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.html
View file @
b2acf8c5
<div
nz-row
class=
"breadcrumbs"
>
<div
nz-col
nzSpan=
"16"
>
<nz-breadcrumb
class=
"padding-8-0"
>
...
...
@@ -32,23 +31,29 @@
<div
#
colorEle
class=
"checkTags tag-form"
>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'正常'}"
(
click
)="
changeState
('正常')"
>
<nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.normal && checkStatus.normal !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.normal}}
<i
*
ngIf=
"!checkStatus.normal && checkStatus.normal !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.normal}}
</span>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'告警'}"
(
click
)="
changeState
('告警')"
>
<nz-tag
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.warning && checkStatus.warning !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'告警'}"
(
click
)="
changeState
('告警')"
>
<nz-tag
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.warning && checkStatus.warning !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.warning}}
</span>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'严重'}"
(
click
)="
changeState
('严重')"
>
<nz-tag
[
nzColor
]="
color
.
red
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.high && checkStatus.high !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'严重'}"
(
click
)="
changeState
('严重')"
>
<nz-tag
[
nzColor
]="
color
.
red
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.high && checkStatus.high !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.high}}
</span>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'禁用'}"
(
click
)="
changeState
('禁用')"
>
<nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.disabled && checkStatus.disabled !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
<span
[
ngClass
]="{'
select-border
'
:
changeStates =
=
'禁用'}"
(
click
)="
changeState
('禁用')"
>
<nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
<i
*
ngIf=
"!checkStatus.disabled && checkStatus.disabled !=0"
class=
"anticon anticon-spin anticon-loading"
style=
"font-size: 15px;"
></i>
{{checkStatus.disabled}}
</span>
</div>
<nz-tabset
[
nzSelectedIndex
]="
tabNum
"
class=
"tabs-smart"
>
<nz-tab
nzTitle=
"资源详情"
>
<section>
<p
class=
"padding-8-0"
>
资源显示名称
</p>
...
...
@@ -59,14 +64,16 @@
[
nzDisabled
]="
panel1
.
disabled
"
>
<div
nz-row
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<div
echarts
[
options
]="
chartOption1
"
style=
"height: 220px;width: 100%"
></div>
<div
echarts
[
options
]="
chartOption1
"
style=
"height: 220px;width: 100%"
></div>
<div
class=
"posiabsolutStr"
>
<p>
{{responseTimeStr}}
</p>
<p>
ms
</p>
</div>
</div>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<div
echarts
[
options
]="
chartOption2
"
style=
"height: 220px;width: 100%;"
></div>
<div
echarts
[
options
]="
chartOption2
"
style=
"height: 220px;width: 100%;"
></div>
<div
class=
"posiabsolutStr"
>
<p>
{{losedStr}}
</p>
<p>
%
</p>
...
...
@@ -82,14 +89,16 @@
[
nzDisabled
]="
panel2
.
disabled
"
>
<div
nz-row
>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<div
echarts
[
options
]="
chartOption3
"
style=
"height: 220px;width: 100%;"
></div>
<div
echarts
[
options
]="
chartOption3
"
style=
"height: 220px;width: 100%;"
></div>
<div
class=
"posiabsolutStr"
>
<p>
{{cpuUsedStr}}
</p>
<p>
%
</p>
</div>
</div>
<div
class=
"releative"
nz-col
nzSpan=
"12"
>
<div
echarts
[
options
]="
chartOption4
"
style=
"height: 220px;width: 100%"
></div>
<div
echarts
[
options
]="
chartOption4
"
style=
"height: 220px;width: 100%"
></div>
<div
class=
"posiabsolutStr"
>
<p>
{{usedStr}}
</p>
<p>
%
</p>
...
...
@@ -108,114 +117,113 @@
<div
echarts
[
options
]="
secondOptionLeft
"
class=
"demo-chart"
></div>
</div>
<!--<div nz-col nzSpan="8">-->
<!--<div echarts [options]="secondOptionRight" class="demo-chart"></div>-->
<!--<div echarts [options]="secondOptionRight" class="demo-chart"></div>-->
<!--</div>-->
</nz-collapse-panel>
</nz-collapse>
</div>
<!--<div nz-row>-->
<!--<nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNumInOut" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changeInoutInfo($event)" [nzLoading]="inOutLoading">-->
<!--<thead>-->
<!--<tr>-->
<!--<th>状态</th>-->
<!--<th>接口</th>-->
<!--<th>进流量</th>-->
<!--<th>出流量</th>-->
<!--<th>状态变更时间</th>-->
<!--<!–<th nzWidth="150px">图表</th>–>-->
<!--</tr>-->
<!--</thead>-->
<!--<tbody>-->
<!--<tr *ngFor="let data of basicTable.data">-->
<!--<td>{{data.state}}</td>-->
<!--<td>{{data.name}}</td>-->
<!--<td>{{data.in}}</td>-->
<!--<td>{{data.out}}</td>-->
<!--<td>{{data.changeState}}</td>-->
<!--<!–<td>图表</td>–>-->
<!--</tr>-->
<!--</tbody>-->
<!--</nz-table>-->
<!--<nz-table #basicTable [nzData]="dataSet" [nzFrontPagination]="false" [nzTotal]="totalNumInOut" [nzPageIndex]="pageNum" [nzPageSize]="pageCount" (nzPageIndexChange)="changeInoutInfo($event)" [nzLoading]="inOutLoading">-->
<!--<thead>-->
<!--<tr>-->
<!--<th>状态</th>-->
<!--<th>接口</th>-->
<!--<th>进流量</th>-->
<!--<th>出流量</th>-->
<!--<th>状态变更时间</th>-->
<!--<!–<th nzWidth="150px">图表</th>–>-->
<!--</tr>-->
<!--</thead>-->
<!--<tbody>-->
<!--<tr *ngFor="let data of basicTable.data">-->
<!--<td>{{data.state}}</td>-->
<!--<td>{{data.name}}</td>-->
<!--<td>{{data.in}}</td>-->
<!--<td>{{data.out}}</td>-->
<!--<td>{{data.changeState}}</td>-->
<!--<!–<td>图表</td>–>-->
<!--</tr>-->
<!--</tbody>-->
<!--</nz-table>-->
<!--</div>-->
</section>
</nz-tab>
<nz-tab
nzTitle=
"监测点列表"
>
<div
nz-row
>
<div
class=
"padding-8-0"
>
<input
(
keyup
.
enter
)="
getCheckList
()"
style=
"width: 200px;"
type=
"text"
nz-input
[(
ngModel
)]="
searchName
"
placeholder=
"输入监测点名称"
>
<button
(
click
)="
getCheckList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
搜索
</button>
</div>
<div
class=
"padding-15-0"
>
<nz-radio-group
[(
ngModel
)]="
itemTypeValue
"
[
nzButtonStyle
]="'
solid
'"
>
<label
*
ngFor=
"let item of itemTypeList"
(
click
)="
changeType
(
item
)"
nz-radio-button
nzValue=
"{{item.applicationid}}"
>
{{item.name}}
</label>
</nz-radio-group>
</div>
<nz-table
#
checkTable
[
nzData
]="
checkList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th
nzWidth=
"10%"
>
最新数据
</th>
<th
nzWidth=
"15%"
>
最新数据时间
</th>
<th
nzWidth=
"10%"
>
监测点分类
</th>
<th
nzWidth=
"10%"
>
更新时间间隔
</th>
<th
nzWidth=
"5%"
>
图表
</th>
<th
nzWidth=
"15%"
>
状态
</th>
<th
nzWidth=
"5%"
>
信息
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of checkTable.data"
>
<td
class=
"tag-form"
>
<ng-container
*
ngIf=
"data.status == 0"
>
<nz-tag
*
ngIf=
"data.priority == 4 || data.priority == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
<nz-tag
*
ngIf=
"data.priority == 2 || data.priority == 3"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<ng-container
*
ngIf=
"data.priority != 2 && data.priority != 3 && data.priority != 4 && data.priority != 5"
>
<nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"data.status == 1"
>
<nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
</ng-container>
{{data.name}}
</td>
<td>
<span
title=
"123123"
>
{{data.lastvalue}}
</span>
</td>
<td>
{{data.lastclock}}
</td>
<td>
{{data.itemType}}
</td>
<td>
{{data.delay}}
</td>
<td
class=
"main-color cursor main-color"
>
<span
*
ngIf=
"data.value_type == 0 || data.value_type == 3"
(
click
)="
showImageModal
(
data
)"
>
图表
</span>
</td>
<td
class=
"handle cursor main-color"
>
<ng-container
*
ngIf=
"!data.flags"
>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑监测点
</span>
<span
(
click
)="
deleteCheckItem
(
data
)"
>
删除监测点
</span>
<br>
<span
*
ngIf=
"data.triggerCount == 0"
(
click
)="
showAddThresholdModal
(
data
)"
>
添加阈值
</span>
<span
*
ngIf=
"data.triggerCount > 0"
(
click
)="
showEditThresholdModal
(
data
)"
>
编辑阈值
</span>
</ng-container>
<span
*
ngIf=
"data.status == 0 && data.state==0"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: green"
>
已启用
</span>
<span
*
ngIf=
"data.status == 0 && data.state==1"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: red"
>
不支持的
</span>
<span
*
ngIf=
"data.status == 1 && data.state==0"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
style=
"color: red"
>
停用的
</span>
<span
*
ngIf=
"data.status == 1 && data.state==1"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
style=
"color: green"
>
停用的
</span>
</td>
<td>
<ng-container
*
ngIf=
"data.error"
>
<nz-tooltip
[
nzTitle
]="
data
.
error
"
>
<span
class=
"color-red"
nz-tooltip
><i
class=
"anticon anticon-warning"
></i></span>
</nz-tooltip>
</ng-container>
<ng-container
*
ngIf=
"data.info"
>
<nz-tooltip
[
nzTitle
]="
data
.
info
"
>
<span
class=
"color-yellow"
nz-tooltip
><i
class=
"anticon anticon-warning"
></i></span>
</nz-tooltip>
</ng-container>
</td>
</tr>
</tbody>
</nz-table>
<nz-tab
nzTitle=
"监测点列表"
>
<div
class=
"padding-8-0"
>
<input
(
keyup
.
enter
)="
getCheckList
()"
style=
"width: 200px;"
type=
"text"
nz-input
[(
ngModel
)]="
searchName
"
placeholder=
"输入监测点名称"
>
<button
(
click
)="
getCheckList
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
style=
"color: #6097b7"
></i>
搜索
</button>
</div>
<div
class=
"padding-15-0"
>
<nz-radio-group
[(
ngModel
)]="
itemTypeValue
"
[
nzButtonStyle
]="'
solid
'"
>
<label
*
ngFor=
"let item of itemTypeList"
(
click
)="
changeType
(
item
)"
nz-radio-button
[
nzValue
]="
item
.
applicationid
"
>
{{item.name}}
</label>
</nz-radio-group>
</div>
<nz-table
#
checkTable
[
nzData
]="
checkList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageIndex
"
[
nzPageSize
]="
pageSize
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzWidth=
"20%"
>
监测点名称
</th>
<th
nzWidth=
"10%"
>
最新数据
</th>
<th
nzWidth=
"15%"
>
最新数据时间
</th>
<th
nzWidth=
"10%"
>
监测点分类
</th>
<th
nzWidth=
"10%"
>
更新时间间隔
</th>
<th
nzWidth=
"5%"
>
图表
</th>
<th
nzWidth=
"15%"
>
状态
</th>
<th
nzWidth=
"5%"
>
信息
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of checkTable.data"
>
<td
class=
"tag-form"
>
<ng-container
*
ngIf=
"data.status == 0"
>
<nz-tag
*
ngIf=
"data.priority == 4 || data.priority == 5"
[
nzColor
]="
color
.
red
"
></nz-tag>
<nz-tag
*
ngIf=
"data.priority == 2 || data.priority == 3"
[
nzColor
]="
color
.
yellow
"
></nz-tag>
<ng-container
*
ngIf=
"data.priority != 2 && data.priority != 3 && data.priority != 4 && data.priority != 5"
>
<nz-tag
[
nzColor
]="
color
.
green
"
></nz-tag>
</ng-container>
</ng-container>
<ng-container
*
ngIf=
"data.status == 1"
>
<nz-tag
[
nzColor
]="
color
.
gray
"
></nz-tag>
</ng-container>
{{data.name}}
</td>
<td>
<span>
{{data.lastvalue}}
</span>
</td>
<td>
{{data.lastclock}}
</td>
<td>
{{data.itemType}}
</td>
<td>
{{data.delay}}
</td>
<td
class=
"main-color cursor main-color"
>
<span
*
ngIf=
"data.value_type == 0 || data.value_type == 3"
(
click
)="
showImageModal
(
data
)"
>
图表
</span>
</td>
<td
class=
"handle cursor main-color"
>
<ng-container
*
ngIf=
"!data.flags"
>
<span
(
click
)="
showEditModal
(
data
)"
>
编辑监测点
</span>
<span
(
click
)="
deleteCheckItem
(
data
)"
>
删除监测点
</span>
<br>
<span
*
ngIf=
"data.triggerCount == 0"
(
click
)="
showAddThresholdModal
(
data
)"
>
添加阈值
</span>
<span
*
ngIf=
"data.triggerCount > 0"
(
click
)="
showEditThresholdModal
(
data
)"
>
编辑阈值
</span>
</ng-container>
<span
*
ngIf=
"data.status == 0 && data.state==0"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: green"
>
已启用
</span>
<span
*
ngIf=
"data.status == 0 && data.state==1"
(
click
)="
updateItem
(
data
.
itemid
,
1
)"
style=
"color: red"
>
不支持的
</span>
<span
*
ngIf=
"data.status == 1 && data.state==0"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
style=
"color: red"
>
停用的
</span>
<span
*
ngIf=
"data.status == 1 && data.state==1"
(
click
)="
updateItem
(
data
.
itemid
,
0
)"
style=
"color: green"
>
停用的
</span>
</td>
<td>
<ng-container
*
ngIf=
"data.error"
>
<nz-tooltip
[
nzTitle
]="
data
.
error
"
>
<span
class=
"color-red"
nz-tooltip
><i
class=
"anticon anticon-warning"
></i></span>
</nz-tooltip>
</ng-container>
<ng-container
*
ngIf=
"data.info"
>
<nz-tooltip
[
nzTitle
]="
data
.
info
"
>
<span
class=
"color-yellow"
nz-tooltip
><i
class=
"anticon anticon-warning"
></i></span>
</nz-tooltip>
</ng-container>
</td>
</tr>
</tbody>
</nz-table>
</nz-tab>
<nz-tab
#
thirdTabs
nzTitle=
"历史告警"
>
<smart-warn-list
#
warnList
></smart-warn-list>
...
...
@@ -234,7 +242,8 @@
<nz-modal
[
nzFooter
]="
null
"
nzWidth=
"1080"
[(
nzVisible
)]="
isGrapha
"
nzTitle=
""
(
nzOnCancel
)="
handleImageCancel
()"
>
<div
class=
"releative"
>
<div
class=
"time-select"
>
<nz-date-picker
[(
ngModel
)]="
imageSelectDate
"
(
ngModelChange
)="
getGraphDate
()"
[
nzSize
]="
size
"
></nz-date-picker>
<nz-date-picker
[(
ngModel
)]="
imageSelectDate
"
(
ngModelChange
)="
getGraphDate
()"
[
nzSize
]="
size
"
></nz-date-picker>
</div>
<div
echarts
[
options
]="
chartOptionGrapha
"
style=
"height: 520px;width: 100%"
></div>
</div>
...
...
src/main/webapp/app/overAll/basic/basic-detail/basic-detail.component.ts
View file @
b2acf8c5
...
...
@@ -36,11 +36,6 @@ import {ThresholdComponent} from '../../../modal/threshold/threshold.component';
:host ::ng-deep .tabs-smart .ant-tabs-nav-scroll div.ant-tabs-tab:nth-child(3){
margin-right: 180px !important;
}
:host ::ng-deep .ant-tooltip-inner{
background-color: #fff;
border: 1px solid #ddd;
color: red;
}
`
]
})
...
...
@@ -76,7 +71,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
//监控点
isBasicEdit
;
itemTypeValue
=
""
;
itemTypeValue
;
interfaceList
:
any
[];
itemTypeList
:
any
[];
...
...
@@ -839,6 +834,7 @@ export class BasicDetailComponent implements OnInit, AfterViewInit {
if
(
null
!=
res
.
data
){
this
.
itemTypeList
.
unshift
(
data
);
}
this
.
itemTypeValue
=
''
;
}
);
...
...
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