From 61d71ae554c2c8b826a0c066f65425f2843389d4 Mon Sep 17 00:00:00 2001 From: Binal Date: Mon, 6 Jul 2020 12:56:06 -0700 Subject: [PATCH 01/11] Merge from wnprc18.3 svn r.64261-64312 --- LDK/resources/web/LDK/StoreUtils.js | 12 ++++- .../web/LDK/panel/TabbedReportPanel.js | 54 ++++++++++++++----- LDK/resources/web/LDK/ux/DateTimeField.js | 6 +++ 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/LDK/resources/web/LDK/StoreUtils.js b/LDK/resources/web/LDK/StoreUtils.js index f22fd5d3..60342944 100644 --- a/LDK/resources/web/LDK/StoreUtils.js +++ b/LDK/resources/web/LDK/StoreUtils.js @@ -60,6 +60,7 @@ LDK.StoreUtils = new function(){ * @param config.fileName * @param config.labelProperty * @param config.skippedColumns + * @param config.includeDescription */ createExcelTemplate: function(config){ Ext4.applyIf(config, { @@ -72,7 +73,16 @@ LDK.StoreUtils = new function(){ if (config.skippedColumns && Ext4.Array.contains(config.skippedColumns, field.name)) return; - header.push(field[config.labelProperty]); + //Sending label property and comment in case of including description + if (config.includeDescription){ + header.push({ + value: field[config.labelProperty], + cellComment: field['description'] + }); + } + else{ + header.push(field[config.labelProperty]); + } } }, this); diff --git a/LDK/resources/web/LDK/panel/TabbedReportPanel.js b/LDK/resources/web/LDK/panel/TabbedReportPanel.js index af1dfda2..a0db1e2e 100644 --- a/LDK/resources/web/LDK/panel/TabbedReportPanel.js +++ b/LDK/resources/web/LDK/panel/TabbedReportPanel.js @@ -548,7 +548,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', { }, this); } } - + return subjects; }, @@ -764,19 +764,34 @@ Ext4.define('LDK.panel.TabbedReportPanel', { scope: this }; - //special case these two properties because they are common - if (tab.report.viewName){ - queryConfig.viewName = tab.report.viewName; - } - - if (tab.report.containerPath){ - queryConfig.containerPath = tab.report.containerPath; - } - - //allow any other supported properties to be applied through here - if (tab.report.queryConfig){ - Ext4.apply(queryConfig, tab.report.queryConfig); - } + // + // Define a list of configuration options. These can be set on the report tab to override default values. + // This list can be obtained by going to the URL for the + // LABKEY.QueryWebPart API, and looking in the config summary table. If you'd like to get it programatically, // https://www.labkey.org/download/clientapi_docs/javascript-api/symbols/LABKEY.QueryWebPart.html#constructor + // run the function commented out to the right of this message (you'll need to load jQuery first). It will // + // output an array of configuration options. //getConfigOptions = function() { + // // var summaryTable = jQuery('table.summaryTable') + var configOptions = [ // // Filter for the table with the config object + "aggregates", "allowChooseQuery", "allowChooseView", "bodyClass", // .filter(function(index,element){ return jQuery(element).attr("summary").match(/config object/); }); + "buttonBar", "buttonBarPosition", "containerFilter", "containerPath", // + "dataRegionName", "deleteURL", "detailsURL", "errorType", // var options = []; + "failure", "filters", "frame", "importURL", // + "insertURL", "linkTarget", "maskEl", "maxRows", // var configRegex = /^config\./; + "metadata", "offset", "parameters", "queryName", // summaryTable.find('td.nameDescription a').each(function(index,element){ + "removeableFilters", "removeableSort", "renderTo", "reportId", // var configOption = jQuery(element).text(); + "schemaName", "scope", "shadeAlternatingRows", "showBorders", // + "showDeleteButton", "showDetailsColumn", "showExportButtons", "showInsertNewButton", // + "showPagination", "showRecordSelectors", "showReports", "showRows", // if (configOption.match(configRegex)) { + "showSurroundingBorder", "showUpdateColumn", "showViewPanel", "sort", // options.push(configOption.replace(configRegex, '')); + "sql", "success", "suppressRenderErrors", "timeout", // } + "title", "titleHref", "updateURL", "viewName" // }); + ]; // + + Ext.each(configOptions, function(option, index, list) { + if (option in tab.report) { + queryConfig[option] = tab.report[option]; + } + }); tab.add({ xtype: 'ldk-querycmp', @@ -1203,6 +1218,17 @@ Ext4.define('LDK.panel.TabbedReportPanel', { return; } + //if there is only one category, simplify the output + if (this.getDistinctCategories().length == 1){ + if (tabPanel.rendered){ + tabPanel.down('tabbar').setVisible(false); + } + else { + tabPanel.tabBar = tabPanel.tabBar || {}; + tabPanel.tabBar.hidden = true; + } + } + var items = []; Ext4.each(this.reports, function(report){ if (!report || !report.category) diff --git a/LDK/resources/web/LDK/ux/DateTimeField.js b/LDK/resources/web/LDK/ux/DateTimeField.js index c49e3bba..9f713373 100644 --- a/LDK/resources/web/LDK/ux/DateTimeField.js +++ b/LDK/resources/web/LDK/ux/DateTimeField.js @@ -165,6 +165,12 @@ Ext4.define('Ext.ux.form.field.DateTime', { }, me.timeConfig)); me.items.push(me.timeField); + // Allow times in the style of "1423" to be accepted by the time field, instead of requiring colons + // for 24 hour fields. + var formats = me.timeField.altFormats.split("|"); + formats.push("Hi"); + me.timeField.altFormats = formats.join("|"); + for (; i < me.items.length; i++) { if(me.items[i].xtype == 'splitter') continue; From 2341f8e12f1f5fe9579977d23c81685cac33d0cd Mon Sep 17 00:00:00 2001 From: Binal Date: Mon, 6 Jul 2020 13:21:26 -0700 Subject: [PATCH 02/11] Merge from wnprc18.3 svn r.64313-64598 --- LDK/resources/web/LDK/Utils.js | 10 +++- .../web/LDK/panel/TabbedReportPanel.js | 11 ---- .../external/labModules/LabModuleHelper.java | 59 +++++++++++++++++++ .../laboratory/panel/AbstractAssayPanel.js | 13 +++- .../laboratory/panel/AssayTemplatePanel.js | 15 ++++- 5 files changed, 92 insertions(+), 16 deletions(-) diff --git a/LDK/resources/web/LDK/Utils.js b/LDK/resources/web/LDK/Utils.js index a051b2b2..a4701adb 100644 --- a/LDK/resources/web/LDK/Utils.js +++ b/LDK/resources/web/LDK/Utils.js @@ -538,11 +538,15 @@ LDK.Utils = new function(){ window.location = LABKEY.ActionURL.buildURL('ldk', 'updateQuery', null, params); }, - splitIds: function(subjectArray, unsorted){ + splitIds: function(subjectArray, unsorted, removeDuplicates){ if (!subjectArray){ return []; } + if (removeDuplicates==null){ + removeDuplicates = true; + } + subjectArray = Ext4.String.trim(subjectArray); subjectArray = subjectArray.replace(/[\s,;]+/g, ';'); subjectArray = subjectArray.replace(/(^;|;$)/g, ''); @@ -556,7 +560,9 @@ LDK.Utils = new function(){ } if (subjectArray.length > 0) { - subjectArray = Ext4.unique(subjectArray); + if (removeDuplicates) { + subjectArray = Ext4.unique(subjectArray); + } if (!unsorted) { subjectArray.sort(); } diff --git a/LDK/resources/web/LDK/panel/TabbedReportPanel.js b/LDK/resources/web/LDK/panel/TabbedReportPanel.js index a0db1e2e..5fcc6698 100644 --- a/LDK/resources/web/LDK/panel/TabbedReportPanel.js +++ b/LDK/resources/web/LDK/panel/TabbedReportPanel.js @@ -1218,17 +1218,6 @@ Ext4.define('LDK.panel.TabbedReportPanel', { return; } - //if there is only one category, simplify the output - if (this.getDistinctCategories().length == 1){ - if (tabPanel.rendered){ - tabPanel.down('tabbar').setVisible(false); - } - else { - tabPanel.tabBar = tabPanel.tabBar || {}; - tabPanel.tabBar.hidden = true; - } - } - var items = []; Ext4.each(this.reports, function(report){ if (!report || !report.category) diff --git a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java index 57ce1386..e85cf9b5 100644 --- a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java +++ b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java @@ -30,6 +30,7 @@ import java.io.File; import java.text.SimpleDateFormat; import java.util.List; +import java.util.Map; import java.util.Random; import static org.junit.Assert.assertEquals; @@ -50,9 +51,21 @@ public class LabModuleHelper public static final String NEG_COLOR = "rgb(255, 255, 0)"; public static final String STD_COLOR = "rgb(0, 128, 0)"; + public static final int VIRAL_BATCH_FIELDS = 0; + public static final int VIRAL_RUN_FIELDS = 1; + public static final int VIRAL_RESULT_FIELDS = 2; + public LabModuleHelper(BaseWebDriverTest test) { _test = test; + + Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); + _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); + l.findElement(_test.getDriver()).sendKeys(label + "\t"); + _test.setFormElement(l, label); + Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); + _test.setFormElement(desc, "This is an assay"); + _test.log(l.findElement(_test.getDriver()).getAttribute("value")); } public void defineAssay(String provider, String label) @@ -426,4 +439,50 @@ public void initiatePipelineJob(String importAction, List files, String _test._fileBrowserHelper.selectImportDataAction(importAction); } + + public void defineViralAssayWithAdditionalFields(String provider, String label, Map batchFields, Map runFields, Map resultFields) + { + _test.log("Defining a test assay at the project level"); + //define a new assay at the project level + //the pipeline must already be setup + _test.goToProjectHome(); + + //copied from old test + _test.goToManageAssays(); + _test.clickButton("New Assay Design"); + _test.checkCheckbox(Locator.radioButtonByNameAndValue("providerName", provider)); + _test.clickButton("Next"); + + Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); + _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); + _test.setFormElement(l, label); + Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); + _test.setFormElement(desc, "This is an assay"); + _test.log(l.findElement(_test.getDriver()).getAttribute("value")); + + _test.waitForText("Result Fields"); + + addViralAssayFields(batchFields, VIRAL_BATCH_FIELDS); + addViralAssayFields(runFields, VIRAL_RUN_FIELDS); + addViralAssayFields(resultFields, VIRAL_RESULT_FIELDS); + + _test.sleep(1000); + _test.clickButton("Save", 0); + _test.waitForText(20000, "Save successful."); + _test.assertTextNotPresent("Unknown"); + } + + private void addViralAssayFields(Map fields, int section) + { + if (fields != null) + { + for (Map.Entry entry : fields.entrySet()) + { + _test.clickButtonByIndex("Add Field", section, 0); + String name = entry.getKey(); + String type = entry.getValue(); + _test.getDriver().switchTo().activeElement().sendKeys(name + "\t" + name + "\t" + type); + } + } + } } diff --git a/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js b/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js index 07a012e1..4d11e318 100644 --- a/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js +++ b/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js @@ -197,6 +197,17 @@ Ext4.define('Laboratory.panel.AbstractAssayPanel', { } } + if (fieldObj.getInitialValue){ + try { + if (!Ext4.isFunction(fieldObj.getInitialValue)) + fieldObj.getInitialValue = eval('(' + fieldObj.getInitialValue + ')'); + } + catch (error) { + LDK.Utils.logToServer({message: "unable to parse getInitialValue() for field: " + fieldObj.name}); + console.error(error); + } + } + return fieldObj; }, @@ -584,7 +595,7 @@ Ext4.define('Laboratory.panel.AbstractAssayPanel', { importMethodToggle: importMethod }); - imf.fireEvent('change', this, imf.getValues, current); + imf.fireEvent('change', this, imf.getValue(), current); } var target = this.down('#templatePreviewPanel'); diff --git a/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js b/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js index 7f03e240..050aed3b 100644 --- a/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js +++ b/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js @@ -267,8 +267,19 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', { scope: this, failure: LDK.Utils.getErrorCallback(), success: function(results){ - if (results.rows.length) - this.setTemplate(results.rows[0], true); + if (results.rows.length) { + var row = results.rows[0]; + if (row.importMethod) + { + this.selectedMethod = this.getImportMethodByName(row.importMethod); + var field = this.down('#templateImportMethod'); + if (field) { + field.setValue(this.selectedMethod.name); + } + this.toggleImportMethod(); + } + this.setTemplate(row, true); + } } }) }, From 46cb48c6c4565eddde6c36d4ac5dd3f9beba6aea Mon Sep 17 00:00:00 2001 From: Binal Date: Mon, 6 Jul 2020 21:32:30 -0700 Subject: [PATCH 03/11] Fix merge. --- .../external/labModules/LabModuleHelper.java | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java index e85cf9b5..00050a14 100644 --- a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java +++ b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java @@ -21,7 +21,6 @@ import org.labkey.test.Locator; import org.labkey.test.util.DataRegionTable; import org.labkey.test.util.Ext4Helper; -import org.labkey.test.util.UIAssayHelper; import org.labkey.test.util.ext4cmp.Ext4CmpRef; import org.labkey.test.util.ext4cmp.Ext4ComboRef; import org.labkey.test.util.ext4cmp.Ext4FieldRef; @@ -58,14 +57,6 @@ public class LabModuleHelper public LabModuleHelper(BaseWebDriverTest test) { _test = test; - - Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); - _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); - l.findElement(_test.getDriver()).sendKeys(label + "\t"); - _test.setFormElement(l, label); - Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); - _test.setFormElement(desc, "This is an assay"); - _test.log(l.findElement(_test.getDriver()).getAttribute("value")); } public void defineAssay(String provider, String label) @@ -75,8 +66,25 @@ public void defineAssay(String provider, String label) //the pipeline must already be setup _test.goToProjectHome(); + //copied from old test _test.goToManageAssays(); - new UIAssayHelper(_test).createAssayDesignWithDefaults(provider, label); + _test.clickButton("New Assay Design"); + _test.checkCheckbox(Locator.radioButtonByNameAndValue("providerName", provider)); + _test.clickButton("Next"); + + Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); + _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); + _test.setFormElement(l, label); + Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); + _test.setFormElement(desc, "This is an assay"); + _test.log(l.findElement(_test.getDriver()).getAttribute("value")); + + _test.waitForText("Result Fields"); + + _test.sleep(1000); + _test.clickButton("Save", 0); + _test.waitForText(20000, "Save successful."); + _test.assertTextNotPresent("Unknown"); } public static Locator getNavPanelItem(String label, @Nullable String itemText) @@ -203,7 +211,6 @@ public void addRecordsToAssayTemplate(String[][] data, List expectedColu } _test.waitForText("Sample Information"); - _test._ext4Helper.waitForMaskToDisappear(); _test.waitAndClick(Ext4Helper.Locators.ext4Button("Add From Spreadsheet")); _test.waitForElement(Ext4Helper.Locators.window("Spreadsheet Import")); From c0c1b99b2e9b3d5bb5acfd51ad36f13949e13430 Mon Sep 17 00:00:00 2001 From: Binal Date: Mon, 6 Jul 2020 21:38:31 -0700 Subject: [PATCH 04/11] Remove duplicate code. --- .../web/laboratory/panel/AbstractAssayPanel.js | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js b/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js index 4d11e318..c0b49398 100644 --- a/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js +++ b/laboratory/resources/web/laboratory/panel/AbstractAssayPanel.js @@ -197,17 +197,6 @@ Ext4.define('Laboratory.panel.AbstractAssayPanel', { } } - if (fieldObj.getInitialValue){ - try { - if (!Ext4.isFunction(fieldObj.getInitialValue)) - fieldObj.getInitialValue = eval('(' + fieldObj.getInitialValue + ')'); - } - catch (error) { - LDK.Utils.logToServer({message: "unable to parse getInitialValue() for field: " + fieldObj.name}); - console.error(error); - } - } - return fieldObj; }, From 44d461377da6be17bcc9caab85d5826e37ba1f35 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sat, 15 Aug 2020 17:19:42 -0700 Subject: [PATCH 05/11] Various test fixes, including: Customize source_material query directly instead of trying to mutate a locked FK lookup table Update to use new assay designer UI Migrate syntax --- .../external/labModules/LabModuleHelper.java | 58 +++++-------------- 1 file changed, 15 insertions(+), 43 deletions(-) diff --git a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java index 00050a14..af346bb3 100644 --- a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java +++ b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java @@ -19,8 +19,12 @@ import org.jetbrains.annotations.Nullable; import org.labkey.test.BaseWebDriverTest; import org.labkey.test.Locator; +import org.labkey.test.components.domain.DomainFormPanel; +import org.labkey.test.pages.ReactAssayDesignerPage; +import org.labkey.test.params.FieldDefinition; import org.labkey.test.util.DataRegionTable; import org.labkey.test.util.Ext4Helper; +import org.labkey.test.util.UIAssayHelper; import org.labkey.test.util.ext4cmp.Ext4CmpRef; import org.labkey.test.util.ext4cmp.Ext4ComboRef; import org.labkey.test.util.ext4cmp.Ext4FieldRef; @@ -68,23 +72,7 @@ public void defineAssay(String provider, String label) //copied from old test _test.goToManageAssays(); - _test.clickButton("New Assay Design"); - _test.checkCheckbox(Locator.radioButtonByNameAndValue("providerName", provider)); - _test.clickButton("Next"); - - Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); - _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); - _test.setFormElement(l, label); - Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); - _test.setFormElement(desc, "This is an assay"); - _test.log(l.findElement(_test.getDriver()).getAttribute("value")); - - _test.waitForText("Result Fields"); - - _test.sleep(1000); - _test.clickButton("Save", 0); - _test.waitForText(20000, "Save successful."); - _test.assertTextNotPresent("Unknown"); + new UIAssayHelper(_test).createAssayDesignWithDefaults(provider, label); } public static Locator getNavPanelItem(String label, @Nullable String itemText) @@ -447,7 +435,7 @@ public void initiatePipelineJob(String importAction, List files, String _test._fileBrowserHelper.selectImportDataAction(importAction); } - public void defineViralAssayWithAdditionalFields(String provider, String label, Map batchFields, Map runFields, Map resultFields) + public void defineViralAssayWithAdditionalFields(String provider, String label, Map batchFields, Map runFields, Map resultFields) { _test.log("Defining a test assay at the project level"); //define a new assay at the project level @@ -456,39 +444,23 @@ public void defineViralAssayWithAdditionalFields(String provider, String label, //copied from old test _test.goToManageAssays(); - _test.clickButton("New Assay Design"); - _test.checkCheckbox(Locator.radioButtonByNameAndValue("providerName", provider)); - _test.clickButton("Next"); - - Locator l = Locator.xpath("//input[@id='AssayDesignerName']"); - _test.waitForElement(l, BaseWebDriverTest.WAIT_FOR_JAVASCRIPT); - _test.setFormElement(l, label); - Locator desc = Locator.xpath("//textarea[@id='AssayDesignerDescription']"); - _test.setFormElement(desc, "This is an assay"); - _test.log(l.findElement(_test.getDriver()).getAttribute("value")); - - _test.waitForText("Result Fields"); + ReactAssayDesignerPage designerPage = new UIAssayHelper(_test).createAssayDesign(provider, label); - addViralAssayFields(batchFields, VIRAL_BATCH_FIELDS); - addViralAssayFields(runFields, VIRAL_RUN_FIELDS); - addViralAssayFields(resultFields, VIRAL_RESULT_FIELDS); + addViralAssayFields(batchFields, designerPage.goToBatchFields()); + addViralAssayFields(runFields, designerPage.goToRunFields()); + // This assay uses "Result" instead of "Results" for its domain name + addViralAssayFields(resultFields, designerPage.expandFieldsPanel("Result")); - _test.sleep(1000); - _test.clickButton("Save", 0); - _test.waitForText(20000, "Save successful."); - _test.assertTextNotPresent("Unknown"); + designerPage.clickFinish(); } - private void addViralAssayFields(Map fields, int section) + private void addViralAssayFields(Map fields, DomainFormPanel section) { if (fields != null) { - for (Map.Entry entry : fields.entrySet()) + for (Map.Entry entry : fields.entrySet()) { - _test.clickButtonByIndex("Add Field", section, 0); - String name = entry.getKey(); - String type = entry.getValue(); - _test.getDriver().switchTo().activeElement().sendKeys(name + "\t" + name + "\t" + type); + section.addField(new FieldDefinition(entry.getKey(), entry.getValue())); } } } From f887fc4a33077a3acb8c7708814f3419591f827b Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sun, 16 Aug 2020 09:07:36 -0700 Subject: [PATCH 06/11] Use ExtJS4 instead of 3 --- LDK/resources/web/LDK/panel/TabbedReportPanel.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LDK/resources/web/LDK/panel/TabbedReportPanel.js b/LDK/resources/web/LDK/panel/TabbedReportPanel.js index 5fcc6698..a9e6bb95 100644 --- a/LDK/resources/web/LDK/panel/TabbedReportPanel.js +++ b/LDK/resources/web/LDK/panel/TabbedReportPanel.js @@ -787,7 +787,7 @@ Ext4.define('LDK.panel.TabbedReportPanel', { "title", "titleHref", "updateURL", "viewName" // }); ]; // - Ext.each(configOptions, function(option, index, list) { + Ext4.each(configOptions, function(option, index, list) { if (option in tab.report) { queryConfig[option] = tab.report[option]; } From 2a04bd680f9b4ffa5a6342bb5c2ad9fc1d84ef2d Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sun, 16 Aug 2020 11:55:02 -0700 Subject: [PATCH 07/11] Cascade user delete though ehr_billing.dataaccess Move code from LabModuleHelper to only place that uses it, ViralLoadAssayTest Fix rate import codepath in WNPRC_EHRTest --- .../external/labModules/LabModuleHelper.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java index af346bb3..ccb1f28f 100644 --- a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java +++ b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java @@ -434,34 +434,4 @@ public void initiatePipelineJob(String importAction, List files, String _test._fileBrowserHelper.selectImportDataAction(importAction); } - - public void defineViralAssayWithAdditionalFields(String provider, String label, Map batchFields, Map runFields, Map resultFields) - { - _test.log("Defining a test assay at the project level"); - //define a new assay at the project level - //the pipeline must already be setup - _test.goToProjectHome(); - - //copied from old test - _test.goToManageAssays(); - ReactAssayDesignerPage designerPage = new UIAssayHelper(_test).createAssayDesign(provider, label); - - addViralAssayFields(batchFields, designerPage.goToBatchFields()); - addViralAssayFields(runFields, designerPage.goToRunFields()); - // This assay uses "Result" instead of "Results" for its domain name - addViralAssayFields(resultFields, designerPage.expandFieldsPanel("Result")); - - designerPage.clickFinish(); - } - - private void addViralAssayFields(Map fields, DomainFormPanel section) - { - if (fields != null) - { - for (Map.Entry entry : fields.entrySet()) - { - section.addField(new FieldDefinition(entry.getKey(), entry.getValue())); - } - } - } } From ec53ef11fe5a809ba69efe2246d550d354f5be43 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Sun, 16 Aug 2020 14:01:09 -0700 Subject: [PATCH 08/11] Remove other parts of the merge --- .../test/util/external/labModules/LabModuleHelper.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java index ccb1f28f..90711493 100644 --- a/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java +++ b/LDK/test/src/org/labkey/test/util/external/labModules/LabModuleHelper.java @@ -54,10 +54,6 @@ public class LabModuleHelper public static final String NEG_COLOR = "rgb(255, 255, 0)"; public static final String STD_COLOR = "rgb(0, 128, 0)"; - public static final int VIRAL_BATCH_FIELDS = 0; - public static final int VIRAL_RUN_FIELDS = 1; - public static final int VIRAL_RESULT_FIELDS = 2; - public LabModuleHelper(BaseWebDriverTest test) { _test = test; @@ -70,7 +66,6 @@ public void defineAssay(String provider, String label) //the pipeline must already be setup _test.goToProjectHome(); - //copied from old test _test.goToManageAssays(); new UIAssayHelper(_test).createAssayDesignWithDefaults(provider, label); } From 5f152b93e74a7e4010aa83f500e70be869e67e7e Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Mon, 17 Aug 2020 18:09:56 -0700 Subject: [PATCH 09/11] Flip meaning of argument at controls de-duplication of IDs Fix up handling of drop-downs in WNPRC misc charges entry --- LDK/resources/web/LDK/Utils.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/LDK/resources/web/LDK/Utils.js b/LDK/resources/web/LDK/Utils.js index a4701adb..43a2d027 100644 --- a/LDK/resources/web/LDK/Utils.js +++ b/LDK/resources/web/LDK/Utils.js @@ -538,15 +538,11 @@ LDK.Utils = new function(){ window.location = LABKEY.ActionURL.buildURL('ldk', 'updateQuery', null, params); }, - splitIds: function(subjectArray, unsorted, removeDuplicates){ + splitIds: function(subjectArray, unsorted, preserveDuplicates){ if (!subjectArray){ return []; } - if (removeDuplicates==null){ - removeDuplicates = true; - } - subjectArray = Ext4.String.trim(subjectArray); subjectArray = subjectArray.replace(/[\s,;]+/g, ';'); subjectArray = subjectArray.replace(/(^;|;$)/g, ''); @@ -560,7 +556,7 @@ LDK.Utils = new function(){ } if (subjectArray.length > 0) { - if (removeDuplicates) { + if (!preserveDuplicates) { subjectArray = Ext4.unique(subjectArray); } if (!unsorted) { From cf425d27be853851eca63640071978111b56db96 Mon Sep 17 00:00:00 2001 From: bbimber Date: Tue, 18 Aug 2020 09:22:49 -0700 Subject: [PATCH 10/11] Update AssayTemplatePanel.js Consistent line spacing for parentheses --- .../resources/web/laboratory/panel/AssayTemplatePanel.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js b/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js index 050aed3b..a2f4d60d 100644 --- a/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js +++ b/laboratory/resources/web/laboratory/panel/AssayTemplatePanel.js @@ -79,13 +79,13 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', { }, this); }, - appendDownloadMenuItems: function(){ + appendDownloadMenuItems: function() { var btn = this.down('#downloadBtn'); if(!this.templateMetadata.hideDownloadBtn) btn.setVisible(true); }, - validateForm: function(){ + validateForm: function() { var title = this.down('#templateTitle').getValue(); if (!title){ Ext4.Msg.alert('Error', 'Must choose a name for this run'); @@ -269,8 +269,7 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', { success: function(results){ if (results.rows.length) { var row = results.rows[0]; - if (row.importMethod) - { + if (row.importMethod) { this.selectedMethod = this.getImportMethodByName(row.importMethod); var field = this.down('#templateImportMethod'); if (field) { @@ -467,4 +466,4 @@ Ext4.define('Laboratory.panel.AssayTemplatePanel', { resultFields.setVisible(false); } }, -}); \ No newline at end of file +}); From ecdb1dcab304d3c9225d60b3def5b184a5c95871 Mon Sep 17 00:00:00 2001 From: labkey-jeckels Date: Fri, 28 Aug 2020 14:00:18 -0700 Subject: [PATCH 11/11] Fix ViralLoadAssayTest - restore WNPRC test code, updated to new DOM in 20.x line, and avoiding WNPRC_EHR query metadata if the module is deployed but not enabled in the container --- .../resources/web/laboratory/panel/WellLayoutPanel.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/laboratory/resources/web/laboratory/panel/WellLayoutPanel.js b/laboratory/resources/web/laboratory/panel/WellLayoutPanel.js index 9998d84e..4acf4177 100644 --- a/laboratory/resources/web/laboratory/panel/WellLayoutPanel.js +++ b/laboratory/resources/web/laboratory/panel/WellLayoutPanel.js @@ -50,13 +50,14 @@ Ext4.define('Laboratory.ext.WellLayoutPanel', { }, drawWell: function(){ - if (!this.store.getCount()){ + var platePanel = this.down('#plate'); + var legendPanel = this.down('#legend'); + + if (!this.store.getCount() || !platePanel || !legendPanel){ this.store.on('load', this.drawWell, this, {single: true}); return; } - var platePanel = this.down('#plate'); - var legendPanel = this.down('#legend'); var notAssigned = 0; var unknownWells = [];