All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webclient.js-i2b2.cells.PM.PM_admin_view.js Maven / Gradle / Ivy

 
/**
 * @projectDescription	PM Administration Module
 * @inherits			i2b2
 * @namespace			i2b2.PM
 * @author			Nick Benik, Mike Mendis, Griffin Weber MD PhD
 * @version			1.0
 */
i2b2.PM.model.helpMSGS = {};
i2b2.PM.model.helpMSGS.LOADED = "
i2b2 Administration

" +"Welcome to the i2b2 Administration module of the project management interface.

" + "The pages within i2b2 Admin are designed to assist with workflow and overall ease of use, individuals can easily save data and parameters for the hive, projects and users.

" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "
Manage HiveView domain information and capture cell data and global parameters.
Manage ProjectGeneral information about the project as well as project specific cell data, parameters, and user access and roles.
Manage UsersGeneral information about a user.
Manage ApprovalsCaptures general information used to authorize projects.
Project RequestsView information about submitted project requests.
" +"
The navigation bar on the left side of the page can be used to access individual pages."; i2b2.PM.model.helpMSGS.HIVE = "Hive Configuration
Describe what these functions are for."; i2b2.PM.model.helpMSGS.HIVEDOMAIN = "

Please update hive infomation.

"+ '
'+ ''+ ''+ ''+ ''+ ''+ '
Domain Id:
Help URL:
Domain Name:
Environment:
'; i2b2.PM.model.helpMSGS.PROJECTREQUEST = "

Click on \"Project Request\" in the navigation bar to refresh the list of project requests.
Please select a project request on the left to see it's properties

"; i2b2.PM.model.helpMSGS.PROJECTREQUESTREC = '
empty'; i2b2.PM.model.helpMSGS.APPROVAL = "

Click on \"Approval\" in the navigation bar to refresh the list of approval.
Please select a approval on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.APPROVALREC = "

Please select which approval screen you want to access.

"+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ '
Approval Id:
Approval Name:
Approval Description:
Activation Date:
Expiration Date:
'; i2b2.PM.model.helpMSGS.CELL = "

Click on \"Cell\" in the navigation bar to refresh the list of cell.
Please select a cell on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.CELLREC = "

Please select which cell configuration screen you want to access.

"+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ '
Cell Id:
Cell Name:
Cell URL:
Project Path:
Method:
'; i2b2.PM.model.helpMSGS.PROJECT = "

Click on \"Project\" in the navigation bar to refresh the list of projects.
Please select a project on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.PROJECTREC = "

Please select which project configuration screen you want to access.

"+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Project Id:
Project Name:
Project Wiki:
Project Key:
Project Description:
Project Path:
'; i2b2.PM.model.helpMSGS.USER = "

Click on \"User\" in the navigation bar to refresh the list of users.
Please select a user on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.USERREC = "

Please select which user configuration screen you want to access.

"+ '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
User Name:
User Full Name:
User Email:
User Password:
User Password (verify):
Is Admin:
'; i2b2.PM.model.helpMSGS.PARAM = "

Click on \"Parameter\" in the navigation bar to refresh the list of parameters.
Please select a parameter on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.PARAMREC = "

Please select which parameter screen you want to access.

"+ '
'+ ''+ ''+ ''+ ''+ '
Parameter Name:
Parameter Value:
Parameter Data Type:
'; i2b2.PM.model.helpMSGS.PROJECTUSER = '
' + ''+ '
Admin PathData PathCustom Path
Manager
User
' + '
Protected
De-identified Data
Limited Data Set
Aggregated
Obfuscated
Editor
'; i2b2.PM.model.helpMSGS.PROJECTUSERS = "

Click on \"User\" in the navigation bar to refresh the list of users.
Please select a user on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.DBLOOKUP = "

Click on \"DBLookup\" in the navigation bar to refresh the list of DB Lookup.
Please select a DB Lookup on the left to edit it's properties

"+ '
'+ '
'; i2b2.PM.model.helpMSGS.DBLOOKUPREC = '
'+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ ''+ '
Name:
Project Path:
DB Schema:
JNDI Data Source:
Tooltip:
Comment:
DB Server:
'; i2b2.PM.model.adminButtonsPrimary = {}; i2b2.PM.model.adminButtonsPrimary["HIVEDOMAINS"] = "
"; i2b2.PM.model.adminButtonsPrimary["HIVECELLS"] = "
"; i2b2.PM.model.adminButtonsPrimary["HIVEGLOBALS"] = "
"; i2b2.PM.model.adminButtonsPrimary["USERS"] = "
"; i2b2.PM.model.adminButtonsPrimary["DBLOOKUP"] = "
"; i2b2.PM.model.adminButtonsPrimary["APPROVALS"] = "
"; i2b2.PM.model.adminButtonsPrimary["PROJECTREC-PARAMS"] = "
"; i2b2.PM.model.adminButtonsPrimary["PROJECTREC-CELLS"] = "
"; i2b2.PM.model.adminButtonsPrimary["PROJECTREC-USERS"] = "
"; i2b2.PM.model.adminColumnDef = {}; i2b2.PM.model.adminColumnDef["HIVEDOMAINS"] = [ {key:"domain_id",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"active",sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:["Active"],disableBtns:true})}, {key:"environment", sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:["DEVELOPMENT","PRODUCTION", "TEST"],disableBtns:true})}, {key:"domain_name",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"helpURL",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["HIVECELLS"] = [ {key:"id", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"method",sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:["SOAP","REST","OTHER"],disableBtns:true})}, {key:"url",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"project_path",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["HIVEGLOBALS"] = [ {key:"name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"datatype", sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:[{label:"Text", value:"T"}, {label:"Reference Text", value:"M"}, {label:"Reference Binary", value:"C"},{label:"Numeric", value:"N"},{label:"Date", value:"D"}, {label:"Integer", value:"I"}, {label:"Boolean", value:"B"}, {label:"RTF", value:"RTF"}, {label:"Excel", value:"XLS"}, {label:"XML", value:"XML"}, {label:"Word", value:"Doc"}],disableBtns:true})}, {key:"value",sortable:true, resizeable:true,editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["USERPARAMS"] = [ {key:"name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"datatype", sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:[{label:"Text", value:"T"}, {label:"Reference Text", value:"M"}, {label:"Reference Binary", value:"C"},{label:"Numeric", value:"N"},{label:"Date", value:"D"}, {label:"Integer", value:"I"}, {label:"Boolean", value:"B"}, {label:"RTF", value:"RTF"}, {label:"Excel", value:"XLS"}, {label:"XML", value:"XML"}, {label:"Word", value:"Doc"}],disableBtns:true})}, {key:"value",sortable:true, resizeable:true,editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["PROJPARAMS"] = [ {key:"name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"datatype", sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:[{label:"Text", value:"T"}, {label:"Reference Text", value:"M"}, {label:"Reference Binary", value:"C"},{label:"Numeric", value:"N"},{label:"Date", value:"D"}, {label:"Integer", value:"I"}, {label:"Boolean", value:"B"}, {label:"RTF", value:"RTF"}, {label:"Excel", value:"XLS"}, {label:"XML", value:"XML"}, {label:"Word", value:"Doc"}],disableBtns:true})}, {key:"value",sortable:true, resizeable:true,editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["HIVECELLPARAMS"] = [ {key:"name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"datatype", sortable:true, resizeable:true, editor: new YAHOO.widget.RadioCellEditor({radioOptions:[{label:"Text", value:"T"}, {label:"Reference Text", value:"M"}, {label:"Reference Binary", value:"C"},{label:"Numeric", value:"N"},{label:"Date", value:"D"}, {label:"Integer", value:"I"}, {label:"Boolean", value:"B"}, {label:"RTF", value:"RTF"}, {label:"Excel", value:"XLS"}, {label:"XML", value:"XML"}, {label:"Word", value:"Doc"}],disableBtns:true})}, {key:"value",sortable:true, resizeable:true,editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["PROJECTREQUESTS"] = [ {key:"id", sortable:true, resizeable:true}, {key:"project_id",sortable:true, resizeable:true}, {key:"title",sortable:true, resizeable:true}, {key:"entry_date",sortable:true, resizeable:true, formatter:YAHOO.widget.DataTable.formatDate}, {key:"submit_char",sortable:true, resizeable:true}, {key:"request_xml",sortable:true, resizeable:true} ]; i2b2.PM.model.adminColumnDef["PROJECTS"] = [ {key:"id", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"name",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"description",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"key",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"wiki",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"path",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["APPROVALS"] = [ {key:"id", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"name",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"description",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"activation_date",sortable:true, resizeable:true, formatter:"myDate", editor: new YAHOO.widget.DateCellEditor()}, {key:"expiration_date",sortable:true, resizeable:true,formatter:"myDate", editor: new YAHOO.widget.DateCellEditor()} ]; i2b2.PM.model.adminColumnDef["USERS"] = [ {key:"full_name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"user_name",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"email",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"is_admin",sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; i2b2.PM.model.adminColumnDef["DBLOOKUP"] = [ {key:"db_nicename", label:"Name", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"db_fullschema", label:"DB Schema", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"db_datasource", label:"JNDI Data Source", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"db_servertype", label:"DB Server", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"owner_id", label:"Owner ID", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, {key:"project_path", label:"Project Path", sortable:true, resizeable:true, editor: new YAHOO.widget.TextboxCellEditor({disableBtns:true})} ]; // build the columndef for project-user dynamically var t = i2b2.PM.cfg.config.authRoles; var l = t.length; var codes = []; for (var i=0; i"; i2b2.PM.model.adminButtonsSecondary["HIVECELLS"] = "
"; i2b2.PM.model.adminButtonsSecondary["HIVEDOMAINS"] = "
"; i2b2.PM.model.adminButtonsSecondary["PROJECTREC-CELLS"] = "
"; i2b2.PM.model.adminButtonsSecondary["PROJECTREC-USERS"] = "
"; // visual screen configuration // -------------------------------------------------------------------------------------------------------------------- i2b2.PM.view.admin.showInfoPanel = function(infoID) { if (!infoID) { $('pmAdminHelp').hide(); } else { if (i2b2.PM.model.helpMSGS[infoID]) { $('pmAdminHelp').innerHTML = i2b2.PM.model.helpMSGS[infoID]; } else { $('pmAdminHelp').innerHTML = "Could not find help message ["+infoID+"]"; } $('pmAdminHelp').show(); } }; i2b2.PM.view.admin.onCheckedChange = function(items) { var items = items; if (items == "MANAGER") { document.getElementById("RoleMANAGER").checked = true; document.getElementById("RoleUSER").checked = true; } else if (items == "USER") { document.getElementById("RoleMANAGER").checked = false; document.getElementById("RoleUSER").checked = true; } else if (items == "DATA_PROT") { document.getElementById("RoleDATA_PROT").checked = true; document.getElementById("RoleDATA_DEID").checked = true; document.getElementById("RoleDATA_LDS").checked = true; document.getElementById("RoleDATA_AGG").checked = true; document.getElementById("RoleDATA_OBFSC").checked = true; } else if (items == "DATA_DEID") { document.getElementById("RoleDATA_PROT").checked = false; document.getElementById("RoleDATA_DEID").checked = true; document.getElementById("RoleDATA_LDS").checked = true; document.getElementById("RoleDATA_AGG").checked = true; document.getElementById("RoleDATA_OBFSC").checked = true; } else if (items == "DATA_LDS") { document.getElementById("RoleDATA_PROT").checked = false; document.getElementById("RoleDATA_DEID").checked = false; document.getElementById("RoleDATA_LDS").checked = true; document.getElementById("RoleDATA_AGG").checked = true; document.getElementById("RoleDATA_OBFSC").checked = true; } else if (items == "DATA_AGG") { document.getElementById("RoleDATA_PROT").checked = false; document.getElementById("RoleDATA_DEID").checked = false; document.getElementById("RoleDATA_LDS").checked = false; document.getElementById("RoleDATA_AGG").checked = true; document.getElementById("RoleDATA_OBFSC").checked = true; } else if (items == "DATA_OBFSC") { document.getElementById("RoleDATA_PROT").checked = false; document.getElementById("RoleDATA_DEID").checked = false; document.getElementById("RoleDATA_LDS").checked = false; document.getElementById("RoleDATA_AGG").checked = false; document.getElementById("RoleDATA_OBFSC").checked = true; } }; i2b2.PM.view.admin.configScreenDispay = function(dispLevel) { var configScreen = i2b2.PM.view.admin.configScreen; switch(dispLevel) { case 0: // no config Element.hide('pmAdminMainTableview'); Element.hide('pmAdminTableviewButtons'); Element.hide('pmAdminParamTableview'); Element.hide('pmAdminParamTableviewButtons'); break; case 1: // only the main grid $('pmAdminMainTableview').show(); // display action buttons for main grid /* if (i2b2.PM.model.adminButtonsPrimary[configScreen]) { $('pmAdminTableviewButtons').innerHTML = i2b2.PM.model.adminButtonsPrimary[configScreen]; Element.show('pmAdminTableviewButtons'); } else { Element.hide('pmAdminTableviewButtons'); } */ Element.hide('pmAdminParamTableview'); Element.hide('pmAdminParamTableviewButtons'); break; case 2: // main grid and parameters grid Element.show('pmAdminMainTableview'); // display action buttons for main grid /* if (i2b2.PM.model.adminButtonsPrimary[configScreen]) { $('pmAdminTableviewButtons').innerHTML = i2b2.PM.model.adminButtonsPrimary[configScreen]; Element.show('pmAdminTableviewButtons'); } else { Element.hide('pmAdminTableviewButtons'); } */ Element.show('pmAdminParamTableview'); if (i2b2.PM.model.adminButtonsSecondary[configScreen]) { $('pmAdminParamTableviewButtons').innerHTML = i2b2.PM.model.adminButtonsSecondary[configScreen]; Element.show('pmAdminParamTableviewButtons'); } else { Element.hide('pmAdminParamTableviewButtons'); } break; } }; //i2b2.PM.view.admin.ProjectRequestViewer = { // show: function(request_xml) { i2b2.PM.view.admin.ProjectRequestViewer = function(request_xml) { var docXML = i2b2.h.parseXml(request_xml); var c = docXML.getElementsByTagName('project_request'); // YAHOO.DataType.XML.parse(request_xml); //loadXMLString(request_xml); var l = c.length; for (var i=0; iTitle:
" + "
" + i2b2.h.getXNodeVal(c[i], "title") + "
" + "
" + "
Approval:
" + "
" + i2b2.h.getXNodeVal(c[i], "approval") + "
" + "
" + "
" + "
Users:
" + "
" + "
"; // include cases var c2 = i2b2.h.XPath(c[i], '//users/user'); var l2 = c2.length; for (var i2=0; i2"; } s = s + "
UserData RoleAdmin Role
" + i2b2.h.getXNodeVal(c2[i2], "username") + "" + i2b2.h.getXNodeVal(c2[i2], "data_role") + "" + i2b2.h.getXNodeVal(c2[i2], "admin_role") + "
"; // include cases var c2 = i2b2.h.XPath(c[i], '//cases/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Included cases:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/description") + " - " + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/result_instance_id") + "
"; } if (l2 > 0) s = s + "
"; // excluded patient cases var c2 = i2b2.h.XPath(c[i], '//exclude_cases/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Exclude these patients from the cases:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/description") + " - " + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/result_instance_id") + "
"; } if (l2 > 0) s = s + " "; // include patient controls var c2 = i2b2.h.XPath(c[i], '//controls/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Identify controls:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/description") + " - " + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/result_instance_id") + "
"; } if (l2 > 0) s = s + " "; // excluded patient controls var c2 = i2b2.h.XPath(c[i], '//exclude_controls/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Exclude these patients from the controls:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/description") + " - " + i2b2.h.getXNodeVal(c2[i2], "query_result_instance/result_instance_id") + "
"; } if (l2 > 0) s = s + " "; // Concept Included var c2 = i2b2.h.XPath(c[i], '//concept_include/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Identify Concepts to be Included:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "concept/name") + " - " + i2b2.h.getXNodeVal(c2[i2], "concept/dimcode") + "
"; } if (l2 > 0) s = s + " "; //Concept Excluded var c2 = i2b2.h.XPath(c[i], '//concept_exclude/item'); var l2 = c2.length; if (l2 > 0) s = s + "
" + "
Exclude these concepts:
" + "
"; for (var i2=0; i2" + i2b2.h.getXNodeVal(c2[i2], "concept/name") + " - " + i2b2.h.getXNodeVal(c2[i2], "concept/dimcode") + "
"; } if (l2 > 0) s = s + " "; s = s +" " + " "; } $('pmAdminHelp').innerHTML = s; //"
" + request_xml + "
"; // load the help page //new Ajax.Updater('help-viewer-body', 'help/default.htm', {method: 'get', parameters: { cell: 'CORE', page:'ROOT' }}); // } //, //hide: function() { // try { // i2b2.PM.view.admin.ProjectRequestViewer.yuiPanel.hide(); // } catch (e) {} // } }; // data retreval and display i2b2.PM.view.admin.showProjectUsers = function() { var proj_data = i2b2.PM.view.admin.currentProject; $('pmMainTitle').innerHTML = 'Project > "'+proj_data.label+'" > Users > "' + proj_data.i2b2NodeUsername +'" > Roles'; i2b2.PM.view.admin.showInfoPanel(false); //i2b2.PM.view.admin.configScreenDispay(1); // get data var recList = i2b2.PM.ajax.getAllRoleUser("PM:Admin", {id: proj_data.i2b2NodeKey, proj_path:"/"+proj_data.i2b2NodeKey, username:proj_data.i2b2NodeUsername}); i2b2.PM.view.admin.showInfoPanel("PROJECTUSER"); i2b2.PM.view.admin.configScreenDispay(0); // custom parse functionality //var tmpRoles = {}; var c = i2b2.h.XPath(recList.refXML, "//role[user_name and role]"); var l = c.length; for (var i=0; i"+usrname+""}); recList.parse(usrname); var tmp = recList.model; // create datasource i2b2.PM.admin.dsSecondary = new YAHOO.util.DataSource(tmp); i2b2.PM.admin.dsSecondary.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; i2b2.PM.admin.dsSecondary.responseType.responseSchema = { fields: ["name","datatype","value"] }; delete recList.model; delete recList; // create grid i2b2.PM.admin.grdSecondaryColumnDefs = i2b2.PM.model.adminColumnDef.USERPARAMS; if (l > 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminParamTableview", i2b2.PM.admin.grdSecondaryColumnDefs, i2b2.PM.admin.dsSecondary, oConfigs); i2b2.PM.view.admin.yuiControls.secondaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.paramgridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showCellParams = function(cellName, path) { if (undefined == path) { path = "/"; } // show the secondary grid i2b2.PM.view.admin.configScreenDispay(2); // get data var recList = i2b2.PM.ajax.getAllParam("PM:Admin", {table:"cell", param_xml: " id='"+cellName+"' ", id_xml:""+path+""}); // custom parse functionality var tmp = []; var c = i2b2.h.XPath(recList.refXML, "//param[@name and @id]"); var l = c.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminParamTableview", i2b2.PM.admin.grdSecondaryColumnDefs, i2b2.PM.admin.dsSecondary, oConfigs); i2b2.PM.view.admin.yuiControls.secondaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.paramgridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showDomainParams = function(DomainID) { // show the secondary grid i2b2.PM.view.admin.configScreenDispay(2); // get data var recList = i2b2.PM.ajax.getAllParam("PM:Admin", {table:"hive", id_xml:DomainID}); // custom parse functionality var tmp = []; var c = i2b2.h.XPath(recList.refXML, "//param[@name and @id]"); var l = c.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminParamTableview", i2b2.PM.admin.grdSecondaryColumnDefs, i2b2.PM.admin.dsSecondary, oConfigs); i2b2.PM.view.admin.yuiControls.secondaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.paramgridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showProjectCells = function() { var proj_data = i2b2.PM.view.admin.currentProject; $('pmMainTitle').innerHTML = 'Project > "'+proj_data.label+'" > Cells'; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // create the filtered DataSource i2b2.PM.admin.refreshCellListData(); var tmp = []; for (var idx in i2b2.PM.model.admin.CellList) { if (i2b2.PM.model.admin.CellList[idx].project_path == "/"+proj_data.i2b2NodeKey) { tmp.push(i2b2.PM.model.admin.CellList[idx]); } } i2b2.PM.admin.dsPrimary = new YAHOO.util.DataSource(tmp); i2b2.PM.admin.dsPrimary.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; i2b2.PM.admin.dsPrimary.responseType.responseSchema = { fields: ["id","method","name","url"] }; // create the grid i2b2.PM.admin.grdPrimaryColumnDefs = i2b2.PM.model.adminColumnDef.HIVECELLS; if (l > 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showProjectDBLookup = function() { // var proj_data = i2b2.PM.view.admin.currentDBLookup; // $('pmMainTitle').innerHTML = 'Project > "'+proj_data.label+'" > Cells'; //i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // create the filtered DataSource //i2b2.PM.admin.refreshDBLookupListData(); var tmp = []; for (var idx in i2b2.PM.model.admin.DBLookupList) { // if (i2b2.PM.model.admin.DBLookupList[idx].project_path == "/"+proj_data.i2b2NodeKey) { tmp.push(i2b2.PM.model.admin.DBLookupList[idx]); // } } i2b2.PM.admin.dsPrimary = new YAHOO.util.DataSource(tmp); i2b2.PM.admin.dsPrimary.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; i2b2.PM.admin.dsPrimary.responseType.responseSchema = { fields: ["db_nicename","db_datasource","db_fullschema","db_servicetype","owner_id","project_path"] }; // create the grid i2b2.PM.admin.grdPrimaryColumnDefs = i2b2.PM.model.adminColumnDef.DBLOOKUP; if (l > 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showProjectParams = function() { var proj_data = i2b2.PM.view.admin.currentProject; $('pmMainTitle').innerHTML = 'Project > "'+proj_data.label+'" > Params'; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get data var recList = i2b2.PM.ajax.getAllParam("PM:Admin", {table:'project', id_xml:proj_data.i2b2NodeKey}); // custom parse functionality var tmp = []; var c = i2b2.h.XPath(recList.refXML, "//param[@name and @id]"); var l = c.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showProjectRequests = function() { $('pmMainTitle').innerHTML = "Project Requests"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get a list of user info var usrList = i2b2.PM.ajax.getAllProjectRequest("PM:Admin", {}); usrList.parse(); var tmp = []; var l = usrList.model.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); t.hideColumn("request_xml"); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; var myDateParser = function (sDate) { // break up the date components and return a date object //var t = YAHOO.widget.DateMath.add(new Date(sDate), YAHOO.widget.DateMath.DAY, 1);new Date(sDate); //return t; //alert(sDate); //var t = YAHOO.widget.DateMath.add(new Date(sDate), YAHOO.widget.DateMath.DAY, 1);new Date(sDate); //alert(sDate); //2010-10-20 //1234567890 if (!Object.isUndefined(sDate)) { //alert(sDate.substring(0,4) + ":" + sDate.substring(5,7) + ":" + sDate.substring(8,10)); var t = new Date(sDate.substring(0,4), sDate.substring(5,7)-1, sDate.substring(8,10), 12,0,0,0); return t; } else { return new Date(sDate); } //return new Date(); }; i2b2.PM.view.admin.showApprovals = function() { $('pmMainTitle').innerHTML = "Manage Approvals"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get a list of user info var usrList = i2b2.PM.ajax.getAllApproval("PM:Admin", {}); usrList.parse(); var tmp = []; var l = usrList.model.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showProjects = function() { $('pmMainTitle').innerHTML = "Manage Projects"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get a list of user info var usrList = i2b2.PM.ajax.getAllProject("PM:Admin", {}); usrList.parse(); var tmp = []; var l = usrList.model.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showUsers = function() { $('pmMainTitle').innerHTML = "Manage Users"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get a list of user info var usrList = i2b2.PM.ajax.getAllUser("PM:Admin", {}); usrList.parse(); var tmp = []; var l = usrList.model.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showHiveDomains = function() { $('pmMainTitle').innerHTML = "Hive > Domains"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get data var recList = i2b2.PM.ajax.getAllHive("PM:Admin", {}); recList.parse(); var tmp = recList.model; var l = tmp.length; for (var i=0;i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showHiveCells = function() { $('pmMainTitle').innerHTML = "Cells"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // refresh data i2b2.PM.admin.refreshCellListData(); var l = 0; // create the filtered DataSource var tmp = []; for (var idx in i2b2.PM.model.admin.CellList) { //if (i2b2.PM.model.admin.CellList[idx].project_path == "/") { tmp.push(i2b2.PM.model.admin.CellList[idx]); l++; //} } i2b2.PM.admin.dsPrimary = new YAHOO.util.DataSource(tmp); i2b2.PM.admin.dsPrimary.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; i2b2.PM.admin.dsPrimary.responseType.responseSchema = { fields: ["id","method","name","url","project_path"] }; // create the grid i2b2.PM.admin.grdPrimaryColumnDefs = i2b2.PM.model.adminColumnDef.HIVECELLS; if (l > 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; //t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); //t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); //t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); //t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showGlobals = function() { $('pmMainTitle').innerHTML = "Hive > Global Parameters"; i2b2.PM.view.admin.showInfoPanel(false); i2b2.PM.view.admin.configScreenDispay(1); // get data var recList = i2b2.PM.ajax.getAllGlobal("PM:Admin", {});i2b2.PM.model.admin.CellList recList.parse(); var tmp = recList.model; // create datasource i2b2.PM.admin.dsPrimary = new YAHOO.util.DataSource(tmp); i2b2.PM.admin.dsPrimary.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; i2b2.PM.admin.dsPrimary.responseType.responseSchema = {fields: ["name","value"]}; delete recList.model; delete recList; // create grid i2b2.PM.admin.grdPrimaryColumnDefs = i2b2.PM.model.adminColumnDef.HIVEGLOBALS; if (l > 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminMainTableview", i2b2.PM.admin.grdPrimaryColumnDefs, i2b2.PM.admin.dsPrimary, oConfigs); i2b2.PM.view.admin.yuiControls.primaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.gridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); }; i2b2.PM.view.admin.showUserProjParams = function(username, project) { i2b2.PM.view.admin.configScreenDispay(2); // get data var recList = i2b2.PM.ajax.getAllParam("PM:Admin", {table:"project_user", param_xml:' id="'+project+'"', id_xml:""+username+""}); // custom parse functionality var tmp = []; var c = i2b2.h.XPath(recList.refXML, "//param[@name and @id]"); var l = c.length; for (var i=0; i 10) var oConfigs = { paginator: new YAHOO.widget.Paginator({ rowsPerPage: 10 }), initialRequest: "results=" + l }; var t = new YAHOO.widget.DataTable("pmAdminParamTableview", i2b2.PM.admin.grdSecondaryColumnDefs, i2b2.PM.admin.dsSecondary, oConfigs); i2b2.PM.view.admin.yuiControls.secondaryGrid = t; t.isDirty = false; t.subscribe("rowMouseoverEvent", t.onEventHighlightCell); t.subscribe("rowMouseoutEvent", t.onEventUnhighlightCell); t.subscribe("cellClickEvent", i2b2.PM.view.admin.paramgridClickHandler); t.subscribe("editorSaveEvent", i2b2.PM.view.admin.editorSaved); };




© 2015 - 2024 Weber Informatics LLC | Privacy Policy