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 8973905 commit ba621bc
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ attributetype ( 1.2.40.0.13.1.15.111.3.20 NAME 'dicomuiDeviceName'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

attributetype ( 1.2.40.0.13.1.15.111.3.20 NAME 'dicomuiIgnoreParams'
DESC 'Device Names for UI Dashboard Configuration'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )

attributetype ( 1.2.40.0.13.1.15.111.3.21 NAME 'dcmuiCountAET'
DESC 'UI Dashboard Count AET'
EQUALITY caseExactIA5Match
Expand Down Expand Up @@ -205,7 +210,8 @@ objectclass ( 1.2.40.0.13.1.15.111.4.5 NAME 'dcmuiDashboardConfig'
MAY (
dcmuiQueueName $
dcmuiCountAET $
dicomuiDeviceName ) )
dicomuiDeviceName $
dicomuiIgnoreParams ) )

objectclass ( 1.2.40.0.13.1.15.111.4.6 NAME 'dcmuiElasticsearchConfig'
DESC 'UI Configuration for Elasticsearch'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.20 NAME 'dicomuiDeviceName'
DESC 'Device Names for UI Dashboard Configuration'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.27 NAME 'dicomuiIgnoreParams'
DESC 'Dashboard Ignore params'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.21 NAME 'dcmuiCountAET'
DESC 'UI Dashboard Count AET'
EQUALITY caseExactIA5Match
Expand Down Expand Up @@ -186,7 +190,8 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.111.4.5 NAME 'dcmuiDashboardConfig'
MAY (
dcmuiQueueName $
dcmuiCountAET $
dicomuiDeviceName ) )
dicomuiDeviceName $
dicomuiIgnoreParams ) )
olcObjectClasses: ( 1.2.40.0.13.1.15.111.4.6 NAME 'dcmuiElasticsearchConfig'
DESC 'UI Configuration for Elasticsearch'
SUP top STRUCTURAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.20 NAME 'dicomuiDeviceName'
DESC 'Device Names for UI Dashboard Configuration'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.27 NAME 'dicomuiIgnoreParams'
DESC 'Dashboard Ignore params'
EQUALITY caseExactIA5Match
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
olcAttributeTypes: ( 1.2.40.0.13.1.15.111.3.21 NAME 'dcmuiCountAET'
DESC 'UI Dashboard Count AET'
EQUALITY caseExactIA5Match
Expand Down Expand Up @@ -179,7 +183,8 @@ olcObjectClasses: ( 1.2.40.0.13.1.15.111.4.5 NAME 'dcmuiDashboardConfig'
MAY (
dcmuiQueueName $
dcmuiCountAET $
dicomuiDeviceName ) )
dicomuiDeviceName $
dicomuiIgnoreParams ) )
olcObjectClasses: ( 1.2.40.0.13.1.15.111.4.6 NAME 'dcmuiElasticsearchConfig'
DESC 'UI Configuration for Elasticsearch'
SUP top STRUCTURAL
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public class UIDashboardConfig {
private String[] queueNames = {};
private String[] deviceNames = {};
private String countAet;
private String[] ignoreParams = {};

public UIDashboardConfig() {
}
Expand Down Expand Up @@ -83,4 +84,12 @@ public void setDeviceNames(String[] deviceNames) {
public String getCountAet() { return countAet; }

public void setCountAet(String countAet) { this.countAet = countAet; }

public String[] getIgnoreParams() {
return ignoreParams;
}

public void setIgnoreParams(String[] ignoreParams) {
this.ignoreParams = ignoreParams;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ private void writeUIDashboardConfigs(JsonWriter writer, Collection<UIDashboardCo
writer.writeNotNullOrDef("dcmuiDashboardConfigName", uiDashboardConfig.getName(), null);
writer.writeNotEmpty("dcmuiQueueName", uiDashboardConfig.getQueueNames());
writer.writeNotEmpty("dicomuiDeviceName", uiDashboardConfig.getDeviceNames());
writer.writeNotEmpty("dicomuiIgnoreParams", uiDashboardConfig.getIgnoreParams());
writer.writeNotNullOrDef("dcmuiCountAET", uiDashboardConfig.getCountAet(),null);
writer.writeEnd();
}
Expand Down Expand Up @@ -407,6 +408,9 @@ private void loadUIDashboardConfigs(UIConfig uiConfig, JsonReader reader) {
case "dicomuiDeviceName":
uiDashboardConfig.setDeviceNames(reader.stringArray());
break;
case "dicomuiIgnoreParams":
uiDashboardConfig.setIgnoreParams(reader.stringArray());
break;
case "dcmuiCountAET":
uiDashboardConfig.setCountAet(reader.stringValue());
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ private Attributes storeTo(ConfigurationChanges.ModifiedObject ldapObj, UIDashbo
attrs.put(new BasicAttribute("dcmuiDashboardConfigName", uiDashboardConfig.getName()));
LdapUtils.storeNotEmpty(ldapObj, attrs, "dcmuiQueueName", uiDashboardConfig.getQueueNames());
LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomuiDeviceName", uiDashboardConfig.getDeviceNames());
LdapUtils.storeNotEmpty(ldapObj, attrs, "dicomuiIgnoreParams", uiDashboardConfig.getIgnoreParams());
LdapUtils.storeNotNullOrDef(ldapObj, attrs,"dcmuiCountAET",uiDashboardConfig.getCountAet(),null);
return attrs;
}
Expand Down Expand Up @@ -324,6 +325,7 @@ private void loadDashboardConfigs(UIConfig uiConfig, String uiConfigDN) throws N
uiDashboardConfig.setCountAet(LdapUtils.stringValue(attrs.get("dcmuiCountAET"),null));
uiDashboardConfig.setQueueNames(LdapUtils.stringArray(attrs.get("dcmuiQueueName")));
uiDashboardConfig.setDeviceNames(LdapUtils.stringArray(attrs.get("dicomuiDeviceName")));
uiDashboardConfig.setIgnoreParams(LdapUtils.stringArray(attrs.get("dicomuiIgnoreParams")));
uiConfig.addDashboardConfig(uiDashboardConfig);
}
} finally {
Expand Down Expand Up @@ -569,6 +571,9 @@ private List<ModificationItem> storeDiffs(ConfigurationChanges.ModifiedObject ld
LdapUtils.storeDiff(ldapObj, mods, "dicomuiDeviceName",
prev.getDeviceNames(),
uiDashboardConfig.getDeviceNames());
LdapUtils.storeDiff(ldapObj, mods, "dicomuiIgnoreParams",
prev.getIgnoreParams(),
uiDashboardConfig.getIgnoreParams());
LdapUtils.storeDiffObject(ldapObj, mods,"dcmuiCountAET",
prev.getCountAet(),
uiDashboardConfig.getCountAet(), null);
Expand Down
6 changes: 6 additions & 0 deletions dcm4chee-arc-ui2/src/assets/schema/uiDashboard.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@
"items" : { "type": "string" },
"format": "dicomDeviceName"
},
"dicomuiIgnoreParams": {
"title": "Audit Events Ignore Parameters",
"description": "Set Elasticsearch parameters that should be ignored in the Audit Events. E.g. Source.UserID=TESTVALUE",
"type": "array",
"items" : { "type": "string" }
},
"dcmuiCountAET": {
"title": "Count Aet",
"description": "Selected Aet will be used to get the count of studies in the dashboard",
Expand Down

0 comments on commit ba621bc

Please sign in to comment.