Skip to content

Refactor AdminConsole vs. OptionalFeatureService #1091

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
merged 1 commit into from
Jul 15, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/org/labkey/targetedms/TargetedMSModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.labkey.api.security.permissions.AdminPermission;
import org.labkey.api.security.permissions.ApplicationAdminPermission;
import org.labkey.api.settings.AdminConsole;
import org.labkey.api.settings.OptionalFeatureFlag;
import org.labkey.api.settings.OptionalFeatureService;
import org.labkey.api.targetedms.TargetedMSService;
import org.labkey.api.usageMetrics.UsageMetricsService;
Expand Down Expand Up @@ -217,11 +218,6 @@ public TargetedMSModule()
MAX_PRECURSORS_PROPERTY.setDescription("If a document has more than a specified number of precursors AND more than the separate transition/replicate chromatogram limit, Panorama will skip storing them in the database to save space and import time");
MAX_PRECURSORS_PROPERTY.setShowDescriptionInline(true);
addModuleProperty(MAX_PRECURSORS_PROPERTY);

AdminConsole.addOptionalFeatureFlag(new AdminConsole.OptionalFeatureFlag(USE_TEMP_DIR_FOR_SKYD_IMPORT,
"Stage SKYD files to a temporary local file for import purposes",
"When using a non-local file system, the latency for random access requests can be significantly slower than first copying to local storage",
false, false, OptionalFeatureService.FeatureType.Optional));
}

@Override
Expand Down Expand Up @@ -606,6 +602,15 @@ protected void init()
{
folderRegistry.addFactories(new QCFolderWriterFactory(), new QCFolderImporter.Factory());
}

OptionalFeatureService.get().addFeatureFlag(
new OptionalFeatureFlag(
USE_TEMP_DIR_FOR_SKYD_IMPORT,
"Stage SKYD files to a temporary local file for import purposes",
"When using a non-local file system, the latency for random access requests can be significantly slower than first copying to local storage",
false, false, OptionalFeatureService.FeatureType.Optional
)
);
}

@Override
Expand Down