Commit 133fa0a1 authored by wangqinghua's avatar wangqinghua

update

parent 0ba933d8
...@@ -65,7 +65,7 @@ export class ResourceAlarmComponent implements OnInit { ...@@ -65,7 +65,7 @@ export class ResourceAlarmComponent implements OnInit {
//获取分组 //获取分组
getGroup() { getGroup() {
this.overAllSer.getgroups({}).subscribe( this.overAllSer.findGroup().subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.groupList = res.data; this.groupList = res.data;
......
...@@ -46,7 +46,7 @@ export class ResourceUsabilComponent implements OnInit { ...@@ -46,7 +46,7 @@ export class ResourceUsabilComponent implements OnInit {
//获取分组 //获取分组
getGroup() { getGroup() {
this.overAllSer.getgroups({}).subscribe( this.overAllSer.findGroup().subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.groupList = res.data; this.groupList = res.data;
......
...@@ -125,10 +125,9 @@ export class BasicEditComponent implements OnInit { ...@@ -125,10 +125,9 @@ export class BasicEditComponent implements OnInit {
this.validateForm.tls_issuer = data.tls_issuer + ''; this.validateForm.tls_issuer = data.tls_issuer + '';
this.validateForm.tls_subject = data.tls_subject + ''; this.validateForm.tls_subject = data.tls_subject + '';
this.validateForm.tls_psk = data.tls_psk + ''; this.validateForm.tls_psk = data.tls_psk + '';
this.validateForm.inventoryExtend = data.inventory;
this.validateForm.hostExtend = data.hostExtend; //模版对象
this.validateForm.groups = data.groups; if (data.parentTemplates) {
if (data.parentTemplates) { //模版对象
let tempArr = []; let tempArr = [];
tempArr = data.parentTemplates.map(res => { tempArr = data.parentTemplates.map(res => {
return res.templateid; return res.templateid;
...@@ -136,34 +135,52 @@ export class BasicEditComponent implements OnInit { ...@@ -136,34 +135,52 @@ export class BasicEditComponent implements OnInit {
this.validateForm.templates = tempArr; this.validateForm.templates = tempArr;
this.templatesResoure = tempArr; this.templatesResoure = tempArr;
} }
this.interfaceslist = data.interfaces;
this.interfaceslist.forEach(res => { //接口对象
res.main = res.main + '';
res.type = res.type + '';
});
//接口对象
if(data.interfaces){
this.interfaceslist = data.interfaces;
this.interfaceslist.forEach(res => {
res.main = res.main + '';
res.type = res.type + '';
});
}
//主机对象
this.hostTypeChildrenList = []; this.hostTypeChildrenList = [];
this.hostTypeList.forEach(res => { //主机对象 if(data.hostExtend){
if (this.validateForm.hostExtend.equipmentTypeid == res.id) { this.validateForm.hostExtend = data.hostExtend;
this.hostTypeChildrenList = res.childs; this.hostTypeList.forEach(res => {
} if (this.validateForm.hostExtend.equipmentTypeid == res.id) {
}); this.hostTypeChildrenList = res.childs;
}
});
}
if (data.macros) { //红对象 //宏对象
if (data.macros) {
this.macroList1 = data.macros; this.macroList1 = data.macros;
} }
if(data.inventory){ //资产对象
//资产对象
if(data.inventory){
this.validateForm.inventoryExtend = data.inventory;
this.isInVentory = false; this.isInVentory = false;
this.isYesInVentory = 'default'; this.isYesInVentory = 'default';
this.isNOInVentory = 'primary'; this.isNOInVentory = 'primary';
} }
for (let i = 0; i < this.validateForm.groups.length; i++) { //分组对象
for (let j = 0; j < this.groupList.length; j++) { //分组对象
if (this.validateForm.groups[i].groupid == this.groupList[j].value) { if(data.groups){
this.groupList[j].checked = true; this.validateForm.groups = data.groups;
for (let i = 0; i < this.validateForm.groups.length; i++) {
for (let j = 0; j < this.groupList.length; j++) {
if (this.validateForm.groups[i].groupid == this.groupList[j].value) {
this.groupList[j].checked = true;
}
} }
} }
} }
} }
); );
} }
......
...@@ -95,7 +95,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy { ...@@ -95,7 +95,7 @@ export class FlowTrendComponent implements OnInit, OnDestroy {
//获取分组 //获取分组
getGroup() { getGroup() {
this.overAllSer.getgroups({}).subscribe( this.overAllSer.findGroup().subscribe(
(res) => { (res) => {
if (res.errCode == 10000) { if (res.errCode == 10000) {
this.groupList = res.data; this.groupList = res.data;
......
...@@ -9,6 +9,21 @@ export class OverAllService { ...@@ -9,6 +9,21 @@ export class OverAllService {
constructor(private http: HttpClient) { constructor(private http: HttpClient) {
} }
//资源列表--资源分组 ---主机组下拉框
findGroup(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getAll');
}
//获取分组信息 --编辑
getgroups(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/groups/getgroups', data);
}
//查询模板组-----
getTemplateGroups(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getTemplateGroups');
}
//资源列表--所有类型 //资源列表--所有类型
find(data): Observable<any> { find(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/host/find', data); return this.http.post(SERVER_API_URL + '/host/find', data);
...@@ -24,11 +39,6 @@ export class OverAllService { ...@@ -24,11 +39,6 @@ export class OverAllService {
return this.http.post(SERVER_API_URL + '/host/batchStopOrOpen', data); return this.http.post(SERVER_API_URL + '/host/batchStopOrOpen', data);
} }
//资源列表--资源分组
findGroup(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getAll');
}
//资源列表--设备类型 //资源列表--设备类型
findType(): Observable<any> { findType(): Observable<any> {
return this.http.get(SERVER_API_URL + '/hostType/selectAllEquipmentType'); return this.http.get(SERVER_API_URL + '/hostType/selectAllEquipmentType');
...@@ -114,11 +124,6 @@ export class OverAllService { ...@@ -114,11 +124,6 @@ export class OverAllService {
return this.http.post(SERVER_API_URL + '/host/create', data); return this.http.post(SERVER_API_URL + '/host/create', data);
} }
//获取分组信息
getgroups(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/groups/getgroups', data);
}
//模版信息 //模版信息
templates(): Observable<any> { templates(): Observable<any> {
return this.http.get(SERVER_API_URL + '/templates'); return this.http.get(SERVER_API_URL + '/templates');
...@@ -339,11 +344,6 @@ export class OverAllService { ...@@ -339,11 +344,6 @@ export class OverAllService {
return this.http.post(SERVER_API_URL + '/templates/find',data); return this.http.post(SERVER_API_URL + '/templates/find',data);
} }
//查询模板组
getTemplateGroups(): Observable<any> {
return this.http.get(SERVER_API_URL + '/groups/getTemplateGroups');
}
//添加主机自动发现 //添加主机自动发现
createLldrule(data): Observable<any> { createLldrule(data): Observable<any> {
return this.http.post(SERVER_API_URL + '/lldrule/create',data); return this.http.post(SERVER_API_URL + '/lldrule/create',data);
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<tr *ngFor="let data of basicTable.data"> <tr *ngFor="let data of basicTable.data">
<td>{{data.createUserName}}</td> <td>{{data.createUserName}}</td>
<td>{{data.moduleName}}</td> <td>{{data.moduleName}}</td>
<td>{{data.content}}</td> <td>{{data.operation}}</td>
<td>{{data.content}}</td> <td>{{data.content}}</td>
<td>{{data.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td> <td>{{data.createTime | date:'yyyy-MM-dd HH:mm:ss'}}</td>
</tr> </tr>
......
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