Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 0e28a39

Browse files
committed
Merge branch '0909-dicomUploaderDashboard-yuzheng'
* 0909-dicomUploaderDashboard-yuzheng: BUG: Refs #0909. Dicom uploader module is currently not supported in Windows. Show this information to Windows users.
2 parents ddfdc9e + 9ac121b commit 0e28a39

File tree

6 files changed

+30
-6
lines changed

6 files changed

+30
-6
lines changed

modules/dicomuploader/constant/module.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
// Uploader status
1414
define("MIDAS_DICOM_UPLOADER_IS_RUNNING", "running");
1515
define("MIDAS_DICOM_UPLOADER_NOT_RUNNING", "not running");
16+
define("MIDAS_DICOM_UPLOADER_NOT_SUPPORTED", "This module is currently not supported in Windows.");
1617

1718
?>

modules/dicomuploader/controllers/components/ApiComponent.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,15 @@ function status($args)
183183
}
184184

185185
$ret = array();
186-
$ret['status'] = MIDAS_DICOM_UPLOADER_NOT_RUNNING;
186+
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
187+
{ // currently not supported in windows
188+
$ret['status'] = MIDAS_DICOM_UPLOADER_NOT_SUPPORTED;
189+
return $ret;
190+
}
191+
else
192+
{
193+
$ret['status'] = MIDAS_DICOM_UPLOADER_NOT_RUNNING;
194+
}
187195
$ps_cmd = 'ps';
188196
$cmd_params = array();
189197
$cmd_params[] = 'ax';

modules/dicomuploader/controllers/components/UploaderComponent.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ public function isDICOMUploaderWorking()
3838
$status_results = $apiComponent->status($status_args);
3939
if ($status_results['status'] == MIDAS_DICOM_UPLOADER_IS_RUNNING)
4040
{
41-
$ret['Status'] = array(true, MIDAS_DICOM_UPLOADER_IS_RUNNING);
41+
$ret['Status'] = array(true, $status_results['status']);
4242
}
4343
else
4444
{
45-
$ret['Status'] = array(false, MIDAS_DICOM_UPLOADER_NOT_RUNNING);
45+
$ret['Status'] = array(false, $status_results['status']);
4646
}
4747

4848
return $ret;

modules/dicomuploader/public/css/config/config.index.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ span#not_running_status{
88
color: #C80000;
99
}
1010

11+
span#not_supported_status{
12+
font-weight: bold;
13+
color: #C80000;
14+
}
15+
1116
textarea#apicall_failure_reason{
1217
font-weight: bold;
1318
color: #C80000;

modules/dicomuploader/public/js/config/config.index.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,17 +111,26 @@ midas.dicomuploader.checkStatus = function () {
111111
args: 'storescp_cmd=' + storescp_val,
112112
log: $('<p></p>'),
113113
success: function (retVal) {
114-
if(retVal.data.status === 'running') {
114+
if(retVal.data.status === 'running') {
115115
$('span#not_running_status').hide();
116116
$('span#running_status').show();
117117
$('span#span_start_uploader_user').html(retVal.data.user_email);
118118
$('div#start_uploader_user').show();
119119
}
120-
else {
120+
else if(retVal.data.status === 'not running') {
121121
$('span#running_status').hide();
122122
$('span#not_running_status').show();
123123
$('div#start_uploader_user').hide();
124124
}
125+
else { // this module is not supported
126+
$('span#running_status').hide();
127+
$('span#not_running_status').hide();
128+
$('span#not_supported_status').show();
129+
$('div#startUploader').hide();
130+
$('div#stopUploader').hide();
131+
$('div#start_uploader_user').hide();
132+
$('div#manualCommandsWrapper').hide();
133+
}
125134
},
126135
error: function (XMLHttpRequest, textStatus, errorThrown) {
127136
midas.createNotice(XMLHttpRequest.message, 3000, 'error');

modules/dicomuploader/views/config/index.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ $this->headScript()->appendFile($this->moduleWebroot . '/public/js/config/config
104104
<h3>Status:
105105
<span class="running_status" id="running_status" style="display:none">Running</span>
106106
<span class="not_running_status" id="not_running_status" style="display:none">Not Running</span>
107+
<span class="not_supported_status" id="not_supported_status" style="display:none">This module is currently not supported in Windows</span>
107108
</h3>
108109
</div>
109110
<div id="start_uploader_user" class="start_uploader_user" style="display:none">
@@ -115,8 +116,8 @@ $this->headScript()->appendFile($this->moduleWebroot . '/public/js/config/config
115116
<textarea id="apicall_failure_reason" rows="5" cols="80" readonly> </textarea>
116117
</div>
117118
</div>
119+
<div class="manualCommandsWrapper" id="manualCommandsWrapper" style="display: none">
118120
In some platforms, the above start/stop buttons may not work because the web server user is lack of permissions. The following commands can be used to start/stop DICOM Uploader in command line.
119-
<div class="manualCommandsWrapper" style="display: none">
120121
<h3 class="sectionHeader"><a href="#">Start/Stop DICOM Uploader in command line</a></h3>
121122
<ul>
122123
<li>

0 commit comments

Comments
 (0)