Commit 1240ef2c authored by wangqinghua's avatar wangqinghua

log

parent cb17f7a7
{}
\ 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
......@@ -24,6 +24,31 @@ export class AlarmService {
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>{
return this.http.post(SERVER_API_URL + '/alertGroup/findAll',data);
......
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-alarm-group',
templateUrl: './alarm-group.component.html',
styles: []
})
export class AlarmGroupComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'smart-media-type',
templateUrl: './media-type.component.html',
styles: []
})
export class MediaTypeComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}
<p>
send-set works!
</p>
<div nz-row class="breadcrumbs" >
<div nz-col nzSpan="16">
<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>
import { Component, OnInit } from '@angular/core';
import {AlarmService} from '../alarm.service';
import {NzMessageService, NzModalService} from 'ng-zorro-antd';
@Component({
selector: 'smart-send-set',
......@@ -7,9 +9,54 @@ import { Component, OnInit } from '@angular/core';
})
export class SendSetComponent implements OnInit {
constructor() { }
sendList = [];
constructor(private alarmSer:AlarmService,private modalSer:NzModalService,
private message:NzMessageService) { }
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(){
}
}
......@@ -41,6 +41,8 @@ import {AnalysisService} from './analysis/analysis.service';
import {OperationService} from './operation/operation.service';
import {SmartService} from './smart/smart.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({
imports: [
......@@ -83,6 +85,8 @@ import {WorkService} from './work/work.service';
RoleComponent,
NeTopologyComponent,
FlowTrendComponent,
AlarmGroupComponent,
MediaTypeComponent
],
providers:[
OverAllService,
......
......@@ -293,6 +293,9 @@ ui bootstrap tweaks
.cursor{
cursor: pointer;
}
.text-center{
text-align: center;
}
.login-form .ant-form-item-control{
width: 50%;
margin: 0 auto;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment