From d3a0b726d4ec6aa6a9af756cebd27d6ca9211806 Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Thu, 29 Jun 2023 15:05:23 -0700 Subject: [PATCH] UI - Update Processes with new selection features (#154) * Add download as JSON, working on CSV * Implement CSV, fix JSON exports * Update GUI - radio button to select file type * Update button, fix "Show All" for long stdouts * Add DataTables js utility & use on history page * update DT, refine history page, finish deployments * Update css for datatables * remove unnecessary info below table * add DataTable to processes table * update history to fix loading issue * Fix sorting on history page * Fix history not displaying all log rows * Removing paging for test suite support * Update processes page to fix select feature * Fixed double sorting icon * Add moment.js and DataTables integration - filter * Update where table is drawn to speed up page load * Update REST to return all processes * Defer renderings * Update processes page to only load 5000 at first * Increase search delay to increase performance * Attempt at fixing snippets test * Update xpath for new filter button * Update sleep timer * Update sleep, change from id to xpath * Update to "waitForElementXPath" * Copy from Selenium IDE, add sleep * wait even longer * Wait for process page to load * Revert, increase waiting * Change how we wait for add button * Update xpath for elements * Add wait for ajax spinner to dissappear * Fix duration * Need to wait even longer * Try using search bar instead of builder * Try to get console output * Fix qstring missing ? * Update to get # of procs loaded * reduce sleep, fix merge error * FINALLY fixed test errors - updating rest of them * Missed where process page is loaded indirectly * Add open selected in new tab, copy selected URL * Add process duration to end time field * Fix "hide subproc button" never showing subproc * Add ability to download selected rows' logs (JSON) * FIx deployments state * Update message about loading more rows * Remove unused CSV code * Add worker IP to processes table * Added download as CSV * Get logs from failed test * Remove extra logging, fix worker ip field * Add ability to download list view of proc page --- .../test/integration/ui/HistoryTestIT.java | 6 + .../cws/test/integration/ui/WebTestIT.java | 1 + install/cws-ui/deployments.ftl | 43 +- install/cws-ui/processes.ftl | 753 +++++++++++++++++- 4 files changed, 762 insertions(+), 41 deletions(-) diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java index 4d322fbd..94579758 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java @@ -3,6 +3,8 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; +import java.util.List; +import java.util.Set; import org.junit.Ignore; import org.junit.Test; @@ -10,6 +12,9 @@ import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; +import org.openqa.selenium.logging.LogEntries; +import org.openqa.selenium.logging.LogEntry; +import org.openqa.selenium.logging.LogType; import org.openqa.selenium.support.ui.Select; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -94,6 +99,7 @@ && findOnPage("Command 'rmdir Test' exit code: 0")) { System.out.println(e.toString()); scriptPass = false; } + screenShot("HistoryTestIT-runResultsTest"); assertTrue("Deployments Page Test reported unexpected success value (scriptPass="+scriptPass+")", scriptPass); } diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java index c104ecd2..a6e6fca5 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java @@ -202,6 +202,7 @@ public void runHelloWorldTest() { // Wait for Finish sleep(90000); + if(findOnPage("completed")) { goToProcesses(); sleep(1000); diff --git a/install/cws-ui/deployments.ftl b/install/cws-ui/deployments.ftl index 0edfcf87..a9388a8d 100644 --- a/install/cws-ui/deployments.ftl +++ b/install/cws-ui/deployments.ftl @@ -15,6 +15,13 @@ .dataTables_wrapper .mylength .dataTables_length{float:right} + + + @@ -16,12 +19,13 @@