Skip to content

Commit

Permalink
adding the option to not encode the url #4592
Browse files Browse the repository at this point in the history
  • Loading branch information
shral committed Nov 19, 2024
1 parent 93d7093 commit 26a4d16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 9 additions & 3 deletions dcm4chee-arc-ui2/src/app/study/study/study.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1704,6 +1704,9 @@ export class StudyComponent implements OnInit, OnDestroy, AfterContentChecked{
let token;
let url;
const target = this.studyWebService.selectedWebService['IID_URL_TARGET'] || '';
let encodeValue = this.studyWebService.selectedWebService['IID_ENCODE'];
const encodeCheck:boolean = (encodeValue === undefined || encodeValue === "" || (encodeValue && encodeValue == "true") || (encodeValue && encodeValue == "True"));

let configuredUrlString = mode === "study" ? this.studyWebService.selectedWebService['IID_STUDY_URL'] : this.studyWebService.selectedWebService['IID_PATIENT_URL'];
let studyUID = this.service.getStudyInstanceUID(model) || "";
let patientID = this.service.getPatientId(model);
Expand Down Expand Up @@ -1737,12 +1740,15 @@ export class StudyComponent implements OnInit, OnDestroy, AfterContentChecked{
"qidoBaseURL": qidoBaseURL
};
url = replaceDoubleBraces(configuredUrlString, substitutions).trim();
if(encodeCheck){
url = encodeURI(url);
}
console.log("Prepared URL: ", url);
console.groupEnd();
if (target) {
window.open(encodeURI(url), target);
window.open(url, target);
} else {
window.open(encodeURI(url));
window.open(url);
}
});
}catch(e){
Expand Down Expand Up @@ -6820,7 +6826,7 @@ export class StudyComponent implements OnInit, OnDestroy, AfterContentChecked{
webApp.dicomAETitleObject = aet;
}
});
this.service.convertStringLDAPParamToObject(webApp,"dcmProperty",['IID_STUDY_URL', 'IID_PATIENT_URL', 'IID_URL_TARGET']);
this.service.convertStringLDAPParamToObject(webApp,"dcmProperty",['IID_STUDY_URL', 'IID_PATIENT_URL', 'IID_URL_TARGET','IID_ENCODE']);
return webApp;
}),
selectedWebService:_.get(this.studyWebService,"selectedWebService"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ export class DictionaryPickerComponent implements OnInit {
key:"IID_PATIENT_URL=[VIEWER_URL]"
},{
key:"IID_STUDY_URL=[VIEWER_URL]"
},{
key:"IID_ENCODE=false"
},{
key:"IID_URL_TARGET=_self"
},{
Expand Down

0 comments on commit 26a4d16

Please sign in to comment.