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
1240ef2c
Commit
1240ef2c
authored
Nov 15, 2018
by
wangqinghua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
log
parent
cb17f7a7
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
296 additions
and
6 deletions
+296
-6
angular.json
angular.json
+122
-2
alarm.service.ts
src/main/webapp/app/alarm/alarm.service.ts
+25
-0
alarm-group.component.html
...pp/app/alarm/modal/alarm-group/alarm-group.component.html
+3
-0
alarm-group.component.ts
...bapp/app/alarm/modal/alarm-group/alarm-group.component.ts
+15
-0
media-type.component.html
...bapp/app/alarm/modal/media-type/media-type.component.html
+3
-0
media-type.component.ts
...webapp/app/alarm/modal/media-type/media-type.component.ts
+15
-0
send-set.component.html
src/main/webapp/app/alarm/send-set/send-set.component.html
+58
-3
send-set.component.ts
src/main/webapp/app/alarm/send-set/send-set.component.ts
+48
-1
app.main.module.ts
src/main/webapp/app/app.main.module.ts
+4
-0
global.css
src/main/webapp/content/css/global.css
+3
-0
No files found.
angular.json
View file @
1240ef2c
{}
{
\ No newline at end of file
"$schema"
:
"./node_modules/@angular/cli/lib/config/schema.json"
,
"version"
:
1
,
"newProjectRoot"
:
"projects"
,
"projects"
:
{
"bootapp"
:
{
"root"
:
"src/main"
,
"sourceRoot"
:
"src/main/webapp"
,
"projectType"
:
"application"
,
"architect"
:
{
"build"
:
{
"builder"
:
"@angular-devkit/build-angular:browser"
,
"options"
:
{
"outputPath"
:
"build/www/app"
,
"index"
:
"src/main/webapp/index.html"
,
"main"
:
"src/main/webapp/app/app.main.ts"
,
"tsConfig"
:
"src/main/webapp/../../../tsconfig.json"
,
"polyfills"
:
"src/main/webapp/app/polyfills.ts"
,
"assets"
:
[
"src/main/webapp/content"
],
"styles"
:
[
"src/main/webapp/content/css/vendor.css"
,
"src/main/webapp/content/css/global.css"
,
"src/main/webapp/content/less/andt.less"
],
"scripts"
:
[
"src/main/node_modules/echarts/dist/echarts.min.js"
]
},
"configurations"
:
{
"production"
:
{
"optimization"
:
true
,
"outputHashing"
:
"all"
,
"sourceMap"
:
false
,
"extractCss"
:
true
,
"namedChunks"
:
false
,
"aot"
:
true
,
"extractLicenses"
:
true
,
"vendorChunk"
:
false
,
"buildOptimizer"
:
true
}
}
},
"serve"
:
{
"builder"
:
"@angular-devkit/build-angular:dev-server"
,
"options"
:
{
"browserTarget"
:
"bootapp:build"
},
"configurations"
:
{}
},
"extract-i18n"
:
{
"builder"
:
"@angular-devkit/build-angular:extract-i18n"
,
"options"
:
{
"browserTarget"
:
"bootapp:build"
}
},
"test"
:
{
"builder"
:
"@angular-devkit/build-angular:karma"
,
"options"
:
{
"main"
:
"src/main/webapp/src/test/javascript/spec/entry.ts"
,
"karmaConfig"
:
"src/test/javascript/karma.conf.js"
,
"polyfills"
:
"src/main/webapp/app/polyfills.ts"
,
"scripts"
:
[
"src/main/node_modules/echarts/dist/echarts.min.js"
],
"styles"
:
[
"src/main/webapp/content/css/vendor.css"
,
"src/main/webapp/content/css/global.css"
,
"src/main/webapp/content/less/andt.less"
],
"assets"
:
[
"src/main/webapp/content"
]
}
},
"lint"
:
{
"builder"
:
"@angular-devkit/build-angular:tslint"
,
"options"
:
{
"tsConfig"
:
[
"../../../tsconfig.json"
,
"../../../tsconfig-aot.json"
],
"exclude"
:
[]
}
}
}
},
"bootapp-e2e"
:
{
"root"
:
"src/main/e2e"
,
"sourceRoot"
:
"src/main/e2e"
,
"projectType"
:
"application"
}
},
"defaultProject"
:
"bootapp"
,
"cli"
:
{
"packageManager"
:
"yarn"
},
"schematics"
:
{
"@schematics/angular:component"
:
{
"inlineStyle"
:
true
,
"inlineTemplate"
:
false
,
"spec"
:
false
,
"prefix"
:
"smart"
,
"styleext"
:
"css"
},
"@schematics/angular:directive"
:
{
"spec"
:
false
,
"prefix"
:
"smart"
},
"@schematics/angular:guard"
:
{
"spec"
:
false
},
"@schematics/angular:pipe"
:
{
"spec"
:
false
},
"@schematics/angular:service"
:
{
"spec"
:
false
}
}
}
\ No newline at end of file
src/main/webapp/app/alarm/alarm.service.ts
View file @
1240ef2c
...
@@ -24,6 +24,31 @@ export class AlarmService {
...
@@ -24,6 +24,31 @@ export class AlarmService {
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/find'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/find'
,
data
);
}
}
//修改告警推送设置
actionUpdate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
put
(
SERVER_API_URL
+
'/action/update'
,
data
);
}
//创建告警推送设置
actionCreate
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/create'
,
data
);
}
//单个启用或禁用告警推送设置
actionStatus
(
params1
,
params2
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status/'
+
params1
+
'/'
+
params2
,{});
}
//批量启用或禁用告警设置
actionStatusBatch
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/status-batch'
,
data
);
}
//批量删除告警推送设置
actionDelete
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/action/delete'
,
data
);
}
//查询所有告警组
//查询所有告警组
alertGroupFind
(
data
):
Observable
<
any
>
{
alertGroupFind
(
data
):
Observable
<
any
>
{
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/findAll'
,
data
);
return
this
.
http
.
post
(
SERVER_API_URL
+
'/alertGroup/findAll'
,
data
);
...
...
src/main/webapp/app/alarm/modal/alarm-group/alarm-group.component.html
0 → 100644
View file @
1240ef2c
<p>
alarm-group works!
</p>
src/main/webapp/app/alarm/modal/alarm-group/alarm-group.component.ts
0 → 100644
View file @
1240ef2c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-alarm-group'
,
templateUrl
:
'./alarm-group.component.html'
,
styles
:
[]
})
export
class
AlarmGroupComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/main/webapp/app/alarm/modal/media-type/media-type.component.html
0 → 100644
View file @
1240ef2c
<p>
media-type works!
</p>
src/main/webapp/app/alarm/modal/media-type/media-type.component.ts
0 → 100644
View file @
1240ef2c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
@
Component
({
selector
:
'smart-media-type'
,
templateUrl
:
'./media-type.component.html'
,
styles
:
[]
})
export
class
MediaTypeComponent
implements
OnInit
{
constructor
()
{
}
ngOnInit
()
{
}
}
src/main/webapp/app/alarm/send-set/send-set.component.html
View file @
1240ef2c
<p>
<div
nz-row
class=
"breadcrumbs"
>
send-set works!
<div
nz-col
nzSpan=
"16"
>
</p>
<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"
style=
"border-top: none;padding: 0 0 15px 0;"
>
<button
(
click
)="
searchValue
()"
nz-button
nzType=
"default"
><i
class=
"anticon anticon-search"
></i>
新增发送方式
</button>
</div>
<nz-table
#
nzTable
[
nzData
]="
sendList
"
[
nzFrontPagination
]="
false
"
[
nzTotal
]="
totalNum
"
[
nzPageIndex
]="
pageNum
"
[
nzPageSize
]="
pageCount
"
(
nzPageIndexChange
)="
change
($
event
)"
[
nzLoading
]="
loading
"
>
<thead>
<tr>
<th
nzShowSort
>
名称
</th>
<th>
类型
</th>
<th>
用于告警中
</th>
<th
nzWidth=
"15%"
>
细节
</th>
<th
style=
"text-align: center"
>
操作
</th>
</tr>
</thead>
<tbody>
<tr
*
ngFor=
"let data of sendList"
>
<td
class=
"round-tag"
>
<nz-tag
[
nzColor
]="'#
fc0d1b
'"
></nz-tag>
{{data.description}}
</td>
<td>
<span
*
ngIf=
"data.type == 0"
>
邮件
</span>
<span
*
ngIf=
"data.type == 1"
>
脚本
</span>
<span
*
ngIf=
"data.type == 2"
>
SMS
</span>
<span
*
ngIf=
"data.type == 3"
>
Jabber
</span>
<span
*
ngIf=
"data.type == 100"
>
EZ texting
</span>
</td>
<td>
用于告警中
</td>
<td>
细节
</td>
<td
class=
"handle text-center"
>
<span
(
click
)="
editSend
()"
>
编辑
</span>
<span
(
click
)="
deleteSend
(
data
)"
>
删除
</span>
<span>
启用
</span>
<span>
暂停
</span>
</td>
</tr>
</tbody>
</nz-table>
src/main/webapp/app/alarm/send-set/send-set.component.ts
View file @
1240ef2c
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
AlarmService
}
from
'../alarm.service'
;
import
{
NzMessageService
,
NzModalService
}
from
'ng-zorro-antd'
;
@
Component
({
@
Component
({
selector
:
'smart-send-set'
,
selector
:
'smart-send-set'
,
...
@@ -7,9 +9,54 @@ import { Component, OnInit } from '@angular/core';
...
@@ -7,9 +9,54 @@ import { Component, OnInit } from '@angular/core';
})
})
export
class
SendSetComponent
implements
OnInit
{
export
class
SendSetComponent
implements
OnInit
{
constructor
()
{
}
sendList
=
[];
constructor
(
private
alarmSer
:
AlarmService
,
private
modalSer
:
NzModalService
,
private
message
:
NzMessageService
)
{
}
ngOnInit
()
{
ngOnInit
()
{
this
.
getList
();
}
}
getList
(){
this
.
alarmSer
.
mediaTypeFind
({}).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
){
this
.
sendList
=
res
.
data
;
}
}
)
}
//删除发送方式
deleteSend
(
data
){
this
.
modalSer
.
confirm
({
nzTitle
:
'删除'
,
nzContent
:
'<b style="color: red;">确认删除该发送方式吗?</b>'
,
nzOkText
:
'确定'
,
nzOkType
:
'danger'
,
nzOnOk
:
()
=>
{
const
arr
=
{
ids
:[]
};
arr
.
ids
.
push
(
data
.
mediatypeid
);
this
.
alarmSer
.
mediaTypeDelete
(
arr
).
subscribe
(
(
res
)
=>
{
if
(
res
.
errCode
==
10000
)
{
this
.
message
.
info
(
'删除成功'
);
}
else
{
this
.
message
.
info
(
res
.
errMsg
);
}
}
);
},
nzCancelText
:
'取消'
,
nzOnCancel
:
()
=>
console
.
log
(
'Cancel'
)
}
)
}
//编辑
editSend
(){
}
}
}
src/main/webapp/app/app.main.module.ts
View file @
1240ef2c
...
@@ -41,6 +41,8 @@ import {AnalysisService} from './analysis/analysis.service';
...
@@ -41,6 +41,8 @@ import {AnalysisService} from './analysis/analysis.service';
import
{
OperationService
}
from
'./operation/operation.service'
;
import
{
OperationService
}
from
'./operation/operation.service'
;
import
{
SmartService
}
from
'./smart/smart.service'
;
import
{
SmartService
}
from
'./smart/smart.service'
;
import
{
WorkService
}
from
'./work/work.service'
;
import
{
WorkService
}
from
'./work/work.service'
;
import
{
AlarmGroupComponent
}
from
'./alarm/modal/alarm-group/alarm-group.component'
;
import
{
MediaTypeComponent
}
from
'./alarm/modal/media-type/media-type.component'
;
@
NgModule
({
@
NgModule
({
imports
:
[
imports
:
[
...
@@ -83,6 +85,8 @@ import {WorkService} from './work/work.service';
...
@@ -83,6 +85,8 @@ import {WorkService} from './work/work.service';
RoleComponent
,
RoleComponent
,
NeTopologyComponent
,
NeTopologyComponent
,
FlowTrendComponent
,
FlowTrendComponent
,
AlarmGroupComponent
,
MediaTypeComponent
],
],
providers
:[
providers
:[
OverAllService
,
OverAllService
,
...
...
src/main/webapp/content/css/global.css
View file @
1240ef2c
...
@@ -293,6 +293,9 @@ ui bootstrap tweaks
...
@@ -293,6 +293,9 @@ ui bootstrap tweaks
.cursor
{
.cursor
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.text-center
{
text-align
:
center
;
}
.login-form
.ant-form-item-control
{
.login-form
.ant-form-item-control
{
width
:
50%
;
width
:
50%
;
margin
:
0
auto
;
margin
:
0
auto
;
...
...
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