Skip to content

Commit

Permalink
UI: Adding Elasticsearch Ignore parameter in Configurator #1388
Browse files Browse the repository at this point in the history
  • Loading branch information
shral committed May 11, 2018
1 parent 6aaac79 commit 6c61581
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,14 @@ export class DashboardComponent implements OnInit,OnDestroy {
getAuditEvents(){
let $this = this;
// this.rangeDay.from.setDate(1);
this.statisticsService.getAuditEvents(this.rangeDay, this.url)
console.log("this.appService.global.uiConfig",this.mainservice.global.uiConfig);
let ignoreParams;
try{
ignoreParams = this.mainservice.global["uiConfig"]["dcmuiDashboardConfig"][0]["dicomuiIgnoreParams"];
}catch (e){
console.log("No Ignore params found");
}
this.statisticsService.getAuditEvents(this.rangeDay, this.url, ignoreParams)
.takeUntil(this.destroyed$)
.subscribe((res)=>{
$this.auditEventsOriginal = res.hits.hits.map((audit)=>{
Expand Down
22 changes: 14 additions & 8 deletions dcm4chee-arc-ui2/src/app/pro/statistics/statistics.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,24 @@ export class StatisticsService {
this.setRangeToParams(params,convertedRange,"Setting time range failed on Queries Counts ");
return this.queryGet(params, url);
}
getAuditEvents(range, url){
getAuditEvents(range, url, ignoreParams?){
let convertedRange = this.getRangeConverted(range);
let params = Globalvar.AUDITEVENTS_PARAMETERS;
this.setRangeToParams(params,convertedRange,"Setting time range failed on Audit Event ");
//TODO
/* params.query.bool['must_not'] = [
{
"wildcard": {
"Source.UserID": "HEALTHCHECK"
if(ignoreParams){
params.query.bool['must_not'] = [];
ignoreParams.forEach(param =>{
const regex = /(.*)=(.*)/g;
let m;
if ((m = regex.exec(param)) !== null) {
params.query.bool['must_not'].push({
"wildcard": {
[m[1]]: m[2]
}
});
}
}
];*/
});
}
return this.queryGet(params, url);
}
getAuthenticationAuditEvents(range, url){
Expand Down

0 comments on commit 6c61581

Please sign in to comment.