-
Notifications
You must be signed in to change notification settings - Fork 9
File Content, S3 & WebDav Issues Needs Automation #2579
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
labkey-tchad
merged 4 commits into
release25.7-SNAPSHOT
from
25.7_fb_webDavNeedsAutomation
Jul 28, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
e7f68cd
Issue 51569: Can't customize Files webpart in a container with spaces
labkey-tchad ca4c066
Issue 51815: FileRootMaintenanceTask throws RuntimeException for S3-b…
labkey-tchad 5f75efa
Move server usage methods out of MothershipHelper
labkey-tchad 28340e6
Merge remote-tracking branch 'origin/release25.7-SNAPSHOT' into 25.7_…
labkey-tchad File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package org.labkey.serverapi.util; | ||
|
|
||
| /** | ||
| * org.labkey.api.util.UsageReportingLevel | ||
| */ | ||
| public enum UsageReportingLevel | ||
| { | ||
| NONE, | ||
| ON, | ||
| ON_WITHOUT_UPGRADE_MESSAGE | ||
| } |
47 changes: 47 additions & 0 deletions
47
src/org/labkey/test/pages/admin/ConfigureSystemMaintenancePage.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| package org.labkey.test.pages.admin; | ||
|
|
||
| import org.labkey.test.Locator; | ||
| import org.labkey.test.WebDriverWrapper; | ||
| import org.labkey.test.WebTestHelper; | ||
| import org.labkey.test.pages.LabKeyPage; | ||
| import org.labkey.test.pages.pipeline.PipelineStatusDetailsPage; | ||
| import org.openqa.selenium.WebDriver; | ||
|
|
||
| public class ConfigureSystemMaintenancePage extends LabKeyPage<ConfigureSystemMaintenancePage.ElementCache> | ||
| { | ||
| public ConfigureSystemMaintenancePage(WebDriver driver) | ||
| { | ||
| super(driver); | ||
| } | ||
|
|
||
| public static ConfigureSystemMaintenancePage beginAt(WebDriverWrapper webDriverWrapper) | ||
| { | ||
| webDriverWrapper.beginAt(WebTestHelper.buildURL("admin", "configureSystemMaintenance")); | ||
| return new ConfigureSystemMaintenancePage(webDriverWrapper.getDriver()); | ||
| } | ||
|
|
||
| /** | ||
| * Run the specified maintenance task and switch to the window that opens | ||
| * @param description task description | ||
| */ | ||
| public PipelineStatusDetailsPage runMaintenanceTask(String description) | ||
| { | ||
| click(Locator.tagWithAttribute("input", "type", "checkbox") | ||
| .followingSibling("a").withText(description)); | ||
| getDriver().switchTo().window("systemMaintenance"); | ||
|
|
||
| PipelineStatusDetailsPage pipelineStatusDetailsPage = new PipelineStatusDetailsPage(getDriver()); | ||
| pipelineStatusDetailsPage.waitForComplete(); | ||
| return pipelineStatusDetailsPage; | ||
| } | ||
|
|
||
| @Override | ||
| protected ElementCache newElementCache() | ||
| { | ||
| return new ElementCache(); | ||
| } | ||
|
|
||
| protected class ElementCache extends LabKeyPage<ElementCache>.ElementCache | ||
| { | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| package org.labkey.test.util.core.admin; | ||
|
|
||
| import org.jetbrains.annotations.NotNull; | ||
| import org.jetbrains.annotations.Nullable; | ||
| import org.labkey.remoteapi.CommandException; | ||
| import org.labkey.remoteapi.CommandResponse; | ||
| import org.labkey.remoteapi.Connection; | ||
| import org.labkey.remoteapi.SimpleGetCommand; | ||
| import org.labkey.serverapi.util.UsageReportingLevel; | ||
| import org.labkey.test.WebTestHelper; | ||
| import org.labkey.test.util.data.JSONUtils; | ||
|
|
||
| import java.io.IOException; | ||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
| import java.util.NoSuchElementException; | ||
|
|
||
| public class ServerUsageUtils | ||
| { | ||
| public static Map<String, Object> getUsageReportJson(Connection connection) throws IOException, CommandException | ||
| { | ||
| SimpleGetCommand command = new SimpleGetCommand("admin", "testMothershipReport"); | ||
| command.setParameters(getMothershipReportParams("CheckForUpdates", UsageReportingLevel.ON, false, null)); | ||
| CommandResponse response = command.execute(connection, "/"); | ||
| return response.getParsedData(); | ||
| } | ||
|
|
||
| public static Map<String, Object> getUsageMetrics(Connection connection) throws IOException, CommandException | ||
| { | ||
| return JSONUtils.getProperty("jsonMetrics", getUsageReportJson(connection)); | ||
| } | ||
|
|
||
| public static Map<String, Object> getModuleMetrics(Connection connection, String module) throws IOException, CommandException | ||
| { | ||
| Map<String, Object> modules = JSONUtils.getProperty("jsonMetrics.modules", getUsageReportJson(connection)); | ||
| if (modules.containsKey(module)) | ||
| return JSONUtils.getProperty(module, modules); | ||
| else | ||
| throw new NoSuchElementException("Server metrics for " + module + " module do not exist. Found: " + modules.keySet()); | ||
| } | ||
|
|
||
| @NotNull | ||
| public static String getTestMothershipReportUrl(String type, UsageReportingLevel level, boolean submit, @Nullable String forwardedFor) | ||
| { | ||
| Map<String, Object> params = getMothershipReportParams(type, level, submit, forwardedFor); | ||
| return WebTestHelper.buildURL("admin", "testMothershipReport", params); | ||
| } | ||
|
|
||
| @NotNull | ||
| private static Map<String, Object> getMothershipReportParams(String type, UsageReportingLevel level, boolean submit, @Nullable String forwardedFor) | ||
| { | ||
| Map<String, Object> params = new HashMap<>(); | ||
| params.put("type", type); | ||
| params.put("level", level.toString()); | ||
| params.put("submit", submit); | ||
| params.put("testMode", true); | ||
| if (null != forwardedFor) | ||
| params.put("forwardedFor", forwardedFor); | ||
| return params; | ||
| } | ||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this page need a
waitForPageor awaitAndClickhere?