新增接口

dev
TANGWY 5 months ago
parent 408210d66e
commit b641f2b610
  1. 20
      src/app/routes/config/layout/manage/manage.component.ts
  2. 59
      src/app/routes/config/service/https/notice.service.ts

@ -241,19 +241,17 @@ export class ManageComponent implements OnInit {
}
convertKeys<Raw = any, Target = any>(excelData: Raw[], keysMap: Record<string, string>): Target[] {
return excelData.map(excelItem => {
return Object.entries(excelItem).reduce((prev: any, curt) => {
const [curtKey, curtValue] = curt;
// 更新 key
const mappedKey = keysMap[curtKey];
if (mappedKey) {
prev[mappedKey] = curtValue;
} else {
prev[curtKey] = curtValue;
const reorderedItem: any = {};
// 按照keysMap中定义的顺序重建对象
Object.entries(keysMap).forEach(([originalKey, newKey]) => {
if (excelItem.hasOwnProperty(originalKey)) {
reorderedItem[newKey] = excelItem[originalKey];
}
});
return prev;
}, {});
})
return reorderedItem;
});
}
mockData={

@ -213,7 +213,7 @@ export class NoticeService {
// 400000
// ]
// }
const url = '/ditingEngine/diting/global/whitelist_add';
const url = '/ditingEngine/diting/global/whitelist_add/';
return this.httpService.post(url,{}, params);
}
@ -239,4 +239,61 @@ export class NoticeService {
const url = '/ditingEngine/diting/global/whitelist_add';
return this.httpService.post(url,{}, params);
}
// 添加白名单灰名单默认类型
getDefaultRule(){
// {
// "white_list": {
// "ip": [
// 400000,
// 400001
// ],
// "account": [
// 400000,
// 400001
// ],
// "interface": [
// 400000,
// 400001
// ],
// "menu": [
// 400000,
// 400001
// ]
// },
// "grey_list": {
// "ip": [
// 400000,
// 400001
// ],
// "account": [
// 400000,
// 400001
// ],
// "interface": [
// 400000,
// 400001
// ],
// "menu": [
// 400000,
// 400001
// ]
// }
// }
const url = '/uebaMetricsAnalysis/ueba_metrics/get_default_rule/';
return this.httpService.get(url);
}
// 写审计日志
writeAuditlog(param){
// {
// "action":"add whitelist",
// "params":{
// "name":"xx",
// "adg":21
// }
// }
const url = '/uebaMetricsAnalysis/ueba_metrics/write_audit_log/';
return this.httpService.post(url,{},param);
}
}

Loading…
Cancel
Save