Page MenuHomec4science

No OneTemporary

File Metadata

Created
Mon, Jan 27, 07:32
diff --git a/shrine-webclient/src/main/js/client/js-i2b2/cells/SHRINE/shrine.plugin.js b/shrine-webclient/src/main/js/client/js-i2b2/cells/SHRINE/shrine.plugin.js
index ff465857c..a03eab537 100644
--- a/shrine-webclient/src/main/js/client/js-i2b2/cells/SHRINE/shrine.plugin.js
+++ b/shrine-webclient/src/main/js/client/js-i2b2/cells/SHRINE/shrine.plugin.js
@@ -1,150 +1,148 @@
/**
* @todo: This logic could be designed to handle all views.
*/
(function () {
'use strict';
var pluginId = 'shrinePlugin';
//var tabId = 'shrineTab';
var contentIds = [
'infoQueryStatusText',
'infoQueryStatusChart',
'infoQueryStatusReport',
'infoDownloadStatusData',
pluginId
];
// -- add plugin to i2b2 namespace -- //
i2b2.SHRINE.plugin = new i2b2Base_cellViewController(i2b2.SHRINE, pluginId);
i2b2.SHRINE.plugin.showDisplay = showDisplay;
i2b2.SHRINE.plugin.hideDisplay = hideDisplay;
i2b2.SHRINE.plugin.ZoomView = zoomView;
i2b2.SHRINE.plugin.navigateTo = navigateTo;
i2b2.SHRINE.plugin.errorDetail = errorDetail;
function zoomView() {
const height = jQuery('#infoQueryStatusText').css('height');
jQuery('#shrinePlugin').css('height', height);
}
function showDisplay(route) {
clearAllTabs();
setShrineTabActive(route);
hideContent();
$(pluginId).show();
}
function clearAllTabs() {
$(pluginId).parentNode.parentNode
.select('DIV.tabBox.active')
.each(function (el) {
el.removeClassName('active');
});
/* IE is no fun! .each(el => el.removeClassName('active'));*/
}
function setShrineTabActive(route) {
// set us as active
$(pluginId)
.parentNode
.parentNode
.select('DIV.tabBox.' + route)[0]
.addClassName('active');
}
function hideContent() {
contentIds
.each(function (id) {
$(id).hide();
})
/*@ie no fun! .each(id => $(id).hide());*/
}
function hideDisplay() {
$(pluginId).hide(e);
}
function mailTo() {
i2b2.CRC.view.status.selectTab('shrine');
}
function queryViewer() {
i2b2.CRC.view.status.selectTab('shrine');
}
function navigateTo(route) {
i2b2.CRC.view.status.selectTab('shrine');
showDisplay(route);
window.frames['shrine-plugin'].window.postMessage(route, '*');
}
function errorDetail(data) {
var j$ = jQuery;
j$('body').append(j$(getDialogHTML(data)))
var pluginErrorDetail = new YAHOO.widget.SimpleDialog("pluginErrorDetail", {
width: "820px",
fixedcenter: true,
constraintoviewport: true,
modal: true,
zindex: 700,
buttons: [{
text: "Done",
handler: function() {this.cancel();},
isDefault: true
}]
});
//$ = prototype.js
$('pluginErrorDetail').show();
pluginErrorDetail.validate = function () {
return true;
};
pluginErrorDetail.render(document.body);
// / display the dialoge
pluginErrorDetail.center();
pluginErrorDetail.show();
}
// ES5 :(
function getDialogHTML(data) {
- return
- '<div id="pluginErrorDetail" style="display:none;">' +
+ var html = '<div id="pluginErrorDetail" style="display:none;">' +
'<div class="hd" style="background:#6677AA;">SHRINE Result Status</div>' +
'<div class="bd">' +
'<br />' +
- '<button>More Detail </button>' +
- '<button style="display: none">Less Detail</button>' +
'<div style="border: 1px solid #C0C0C0; max-height: 450px;' +
'background-color: #FFFFFF; overflow: scroll; word-wrap: break-word; padding: 10px 5px;"' +
- 'id="pluginErrorDetail" class="StatusBoxText">' +
+ 'class="StatusBoxText">' +
'<div><b>Summary:</b></div>' +
'<div>' + data.status + '</div><br/>' +
'<div><b>Description:</b></div>' +
'<div><p>' + data.statusMessage + '</p></div><br/>' +
- '<span id="pluginMoreDetail" style="display:none">' +
+ '<span id="pluginMoreDetail">' +
'<div><b>Codec:</b></div>' +
- '<div>' + data.problemDigest && data.problemDigest.codec? data.problemDigest.codec : 'not available' + '</div><br/>' +
+ '<div>' + (data.problemDigest && data.problemDigest.codec? data.problemDigest.codec : 'not available') + '</div><br/>' +
'<div><b>Stamp:</b></div>' +
- '<div>' + data.problemDigest && data.problemDigest.stampText? data.problemDigest.stampText : 'not available' + '</div><br/>' +
+ '<div>' + (data.problemDigest && data.problemDigest.stampText? data.problemDigest.stampText : 'not available') + '</div><br/>' +
'<div><b>Stack Trace Name:</b></div>' +
- '<div>' + data.problemDigest && data.problemDigest.codec? data.problemDigest.codec : 'not available' + '</div><br/>' +
+ '<div>' + (data.problemDigest && data.problemDigest.codec? data.problemDigest.codec : 'not available') + '</div><br/>' +
'<div><b>Stack Trace Message:</b></div>' +
- '<div>' + data.problemDigest && data.problemDigest.description? data.problemDigest.description : 'not available' + '</div><br/>' +
+ '<div>' + (data.problemDigest && data.problemDigest.description? data.problemDigest.description : 'not available') + '</div><br/>' +
'<div><b>Stack Trace Details:</b></div>' +
- '<div>' + data.problemDigest && data.problemDigest.detailsString? data.problemDigest.detailsString.split(',').join(',\n') : 'not available' + '</div><br/>' +
+ '<div>' + (data.problemDigest && data.problemDigest.detailsString? data.problemDigest.detailsString.split(',').join(',<br/>') : 'not available') + '</div><br/>' +
'</span>'
'</div>' +
'</div>' +
'</div>';
+ return html;
}
})();
\ No newline at end of file
diff --git a/shrine-webclient/src/main/js/server/data/query-result.js b/shrine-webclient/src/main/js/server/data/query-result.js
index 80cd4fccc..8201bb142 100644
--- a/shrine-webclient/src/main/js/server/data/query-result.js
+++ b/shrine-webclient/src/main/js/server/data/query-result.js
@@ -1,217 +1,135 @@
module.exports = {
"results": [
{
- "count": 1185,
+ "count": 0,
"networkQueryId": 2421519216383772200,
- "statusMessage": "FINISHED",
+ "statusMessage": "No results available",
+ statusDescription: undefined,
"changeDate": 1501001608958,
- "instanceId": 221,
- "resultId": 367,
- "status": "FINISHED",
- "resultType": {
- "isBreakdown": false,
- "name": "PATIENT_COUNT_XML",
- "id": 4,
- "i2b2Options": {
- "description": "Number of patients",
- "displayType": "CATNUM"
- }
- },
+ "instanceId": 0,
+ "resultId": 0,
+ "status": "ERROR",
"adapterNode": "shrine-dev1",
"breakdowns": [
- {
- resultType: {
- i2b2Options: {
- description: "Race Patient Breakdown",
- displayType: "CATNUM"
- },
- isBreakdown: true,
- name: "PATIENT_RACE_COUNT_XML",
- },
- "results": [
- { changeDate: 1502294526455, value: -1, dataKey: "Other" },
- { changeDate: 1502294526455, value: -1, dataKey: "Asian Pacific Islander" },
- { changeDate: 1502294526455, value: -1, dataKey: "Middle Eastern" },
- { changeDate: 1502294526455, value: -1, dataKey: "Not recorded" },
- { changeDate: 1502294526455, value: -1, dataKey: "Eskimo" },
- { changeDate: 1502294526455, value: -1, dataKey: "American Indian" },
- { changeDate: 1502294526455, value: 80, dataKey: "White" },
- { changeDate: 1502294526455, value: -1, dataKey: "Native American" },
- { changeDate: 1502294526455, value: 370, dataKey: "Black" },
- { changeDate: 1502294526455, value: -1, dataKey: "Multiracial" },
- { changeDate: 1502294526455, value: 170, dataKey: "Hispanic" },
- { changeDate: 1502294526455, value: 95, dataKey: "Indian" },
- { changeDate: 1502294526455, value: -1, dataKey: "Aleutian" },
- { changeDate: 1502294526455, value: 105, dataKey: "Asian" },
- { changeDate: 1502294526455, value: -1, dataKey: "Oriental" },
- { changeDate: 1502294526455, value: -1, dataKey: "Navajo" }
- ]
- },
- {
- resultType: {
- i2b2Options: {
- description: "Age patient breakdown",
- displayType: "CATNUM"
- },
- isBreakdown: true,
- name: "PATIENT_AGE_COUNT_XML",
- },
- results: [
- { changeDate: 1502294526455, value: 290, dataKey: " 18-34 years old" },
- { changeDate: 1502294526455, value: -1, dataKey: "Not recorded" },
- { changeDate: 1502294526455, value: 80, dataKey: " 45-54 years old" },
- { changeDate: 1502294526455, value: -1, dataKey: " 0-9 years old" },
- { changeDate: 1502294526455, value: 235, dataKey: " 35-44 years old" },
- { changeDate: 1502294526455, value: 45, dataKey: " 75-84 years old" },
- { changeDate: 1502294526455, value: 35, dataKey: ">= 85 years old" },
- { changeDate: 1502294526455, value: 65, dataKey: " 65-74 years old" },
- { changeDate: 1502294526455, value: 150, dataKey: ">= 65 years old" },
- { changeDate: 1502294526455, value: -1, dataKey: " 10-17 years old" },
- { changeDate: 1502294526455, value: 45, dataKey: " 55-64 years old" }
- ]
- },
- {
- resultType: {
- i2b2Options: {
- description: "Gender patient breakdown",
- displayType: "CATNUM"
- },
- isBreakdown: true,
- name: "PATIENT_COUNT_COUNT_XML",
- },
- results: [
- { changeDate: 1502294526455, value: 1180, dataKey: "Female" },
- { changeDate: 1502294526455, value: -1, dataKey: "Male" },
- { changeDate: 1502294526455, value: -1, dataKey: "Unknown" }
- ]
- },
- {
- resultType: {
- i2b2Options: {
- description: "Vital Status patient breakdown",
- displayType: "CATNUM"
- },
- isBreakdown: true,
- name: "PATIENT_VITALSTATS_COUNT_XML",
- },
- results: [
- { changeDate: 1502294526455, value: 25, dataKey: "Deceased" },
- { changeDate: 1502294526455, value: -1, dataKey: "Deferred" },
- { changeDate: 1502294526455, value: 1155, dataKey: "Living" },
- { changeDate: 1502294526455, value: -1, dataKey: "Not recorded" }
- ]
- }
- ]
+ ],
+ "problemDigest": {
+ "codec":"net.shrine.adapter.QueryNotFound",
+ "description":"No query with id 8252740983617941467 found on shrine-dev1.catalyst",
+ "detailsString":"line1,lin2,line3",
+ "epoch":0,
+ "stampText":"Wed Sep 06 12:45:32 EDT 2017 on shrine-dev1.catalyst Adapter",
+ "summary":"Query not found"
+ }
},
{
"count": 1795,
"networkQueryId": 2421519216383772200,
"statusMessage": "FINISHED",
"changeDate": 1501001608966,
"instanceId": 174,
"resultId": 320,
"status": "FINISHED",
"resultType": {
"isBreakdown": false,
"name": "PATIENT_COUNT_XML",
"id": 4,
"i2b2Options": {
"description": "Number of patients",
"displayType": "CATNUM"
}
},
"adapterNode": "shrine-dev2",
"breakdowns": [
{
resultType: {
i2b2Options: {
description: "Race Patient Breakdown",
displayType: "CATNUM"
},
isBreakdown: true,
name: "PATIENT_RACE_COUNT_XML",
},
"results": [
{ changeDate: 1502294526455, value: -1, dataKey: "Other" },
{ changeDate: 1502294526455, value: -1, dataKey: "Asian Pacific Islander" },
{ changeDate: 1502294526455, value: -1, dataKey: "Middle Eastern" },
{ changeDate: 1502294526455, value: -1, dataKey: "Not recorded" },
{ changeDate: 1502294526455, value: -1, dataKey: "Eskimo" },
{ changeDate: 1502294526455, value: -1, dataKey: "American Indian" },
{ changeDate: 1502294526455, value: 80, dataKey: "White" },
{ changeDate: 1502294526455, value: -1, dataKey: "Native American" },
{ changeDate: 1502294526455, value: 370, dataKey: "Black" },
{ changeDate: 1502294526455, value: -1, dataKey: "Multiracial" },
{ changeDate: 1502294526455, value: 170, dataKey: "Hispanic" },
{ changeDate: 1502294526455, value: 95, dataKey: "Indian" },
{ changeDate: 1502294526455, value: -1, dataKey: "Aleutian" },
{ changeDate: 1502294526455, value: 105, dataKey: "Asian" },
{ changeDate: 1502294526455, value: -1, dataKey: "Oriental" },
{ changeDate: 1502294526455, value: -1, dataKey: "Navajo" }
]
},
{
resultType: {
i2b2Options: {
description: "Age patient breakdown",
displayType: "CATNUM"
},
isBreakdown: true,
name: "PATIENT_AGE_COUNT_XML",
},
results: [
{ changeDate: 1502294526455, value: 290, dataKey: " 18-34 years old" },
{ changeDate: 1502294526455, value: -1, dataKey: "Not recorded" },
{ changeDate: 1502294526455, value: 80, dataKey: " 45-54 years old" },
{ changeDate: 1502294526455, value: -1, dataKey: " 0-9 years old" },
{ changeDate: 1502294526455, value: 235, dataKey: " 35-44 years old" },
{ changeDate: 1502294526455, value: 45, dataKey: " 75-84 years old" },
{ changeDate: 1502294526455, value: 35, dataKey: ">= 85 years old" },
{ changeDate: 1502294526455, value: 65, dataKey: " 65-74 years old" },
{ changeDate: 1502294526455, value: 150, dataKey: ">= 65 years old" },
{ changeDate: 1502294526455, value: -1, dataKey: " 10-17 years old" },
{ changeDate: 1502294526455, value: 45, dataKey: " 55-64 years old" }
]
},
{
resultType: {
i2b2Options: {
description: "Gender patient breakdown",
displayType: "CATNUM"
},
isBreakdown: true,
name: "PATIENT_COUNT_COUNT_XML",
},
results: [
{ changeDate: 1502294526455, value: 1180, dataKey: "Female" },
{ changeDate: 1502294526455, value: -1, dataKey: "Male" },
{ changeDate: 1502294526455, value: -1, dataKey: "Unknown" }
]
},
{
resultType: {
i2b2Options: {
description: "Vital Status patient breakdown",
displayType: "CATNUM"
},
isBreakdown: true,
name: "PATIENT_VITALSTATS_COUNT_XML",
},
results: [
{ changeDate: 1502294526455, value: 25, dataKey: "Deceased" },
{ changeDate: 1502294526455, value: -1, dataKey: "Deferred" },
{ changeDate: 1502294526455, value: 1155, dataKey: "Living" },
{ changeDate: 1502294526455, value: -1, dataKey: "Not recorded" }
]
}
]
}
],
"query": {
"queryName": "Female@12:53:25",
"changeDate": 1501001607335,
"networkId": "2421519216383772161",
"queryXml": "<runQuery><projectId>SHRINE</projectId><waitTimeMs>180000</waitTimeMs><authenticationInfo><domain>i2b2demo</domain><username>shrine</username><credential isToken=\"true\">SessionKey:HUTBEZkgsz9XyADXjDEO</credential></authenticationInfo><queryId>2421519216383772161</queryId><topicId>3</topicId><topicName>Test dev1 approved</topicName><outputTypes><resultType><id>4</id><name>PATIENT_COUNT_XML</name><isBreakdown>false</isBreakdown><description>Number of patients</description><displayType>CATNUM</displayType></resultType></outputTypes><queryDefinition><name>Female@12:53:25</name><expr><term>\\\\SHRINE\\SHRINE\\Demographics\\Gender\\Female\\</term></expr></queryDefinition></runQuery>",
"dateCreated": 1501001607334
}
};
\ No newline at end of file

Event Timeline