Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
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
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
if: github.repository == 'BimberLabInternal/LabDevKitModules'
runs-on: ubuntu-latest
steps:
# Note: use slight delay in case there are associated commits across repos
- name: "Sleep for 30 seconds"
run: sleep 30s
shell: bash

- name: "Build DISCVR"
uses: bimberlabinternal/DevOps/githubActions/discvr-build@master
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,14 @@ protected Map<String, Object> updateRow(User user, Container container, Map<Stri
protected int truncateRows(User user, Container container)
{
SimpleFilter filter = new SimpleFilter(FieldKey.fromString(_filterColumn), _filterValue, CompareType.EQUAL);

if (getContainerFieldKey() != null)
{
filter.addClause(new ContainerFilter.CurrentOrParentAndWorkbooks(container, user).createFilterClause(getSchema(), getContainerFieldKey()));
}

return Table.delete(getDbTable(), filter);
}

}

protected class ValuesManager
Expand Down
15 changes: 4 additions & 11 deletions LDK/resources/web/LDK/panel/TabbedReportPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1071,8 +1071,8 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
return filter ? Ext4.apply({}, filter) : null;
},

getFiltersFromUrl: function(){
var context = {};
getFiltersFromUrl: function(context){
context = context || {};

if (document.location.hash){
var token = document.location.hash.split('#');
Expand Down Expand Up @@ -1302,18 +1302,11 @@ Ext4.define('LDK.panel.TabbedReportPanel', {
if (report)
this.silentlySetActiveTab(report);
}
else if (this.defaultTab) {
var tab = tabPanel.down('#' + this.defaultTab);
tabPanel.suspendEvents();
tab.suspendEvents();
tabPanel.setActiveTab(tab);
tab.resumeEvents();
tabPanel.resumeEvents();
}

//populate initial fields
var shouldChange = true;
this.initialContext = this.getFiltersFromUrl();

this.initialContext = this.getFiltersFromUrl(this.initialContext);
var filterType = this.initialContext.inputType;
if (filterType){
var radio = this.down('#inputType');
Expand Down
14 changes: 14 additions & 0 deletions LDK/src/org/labkey/ldk/LDKModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
import org.labkey.api.security.permissions.ReadPermission;
import org.labkey.api.settings.AdminConsole;
import org.labkey.api.util.PageFlowUtil;
import org.labkey.api.view.DeveloperMenuNavTrees;
import org.labkey.api.view.NavTree;
import org.labkey.api.view.PopupDeveloperView;
import org.labkey.api.view.WebPartFactory;
import org.labkey.ldk.notification.NotificationServiceImpl;
import org.labkey.ldk.notification.SiteSummaryNotification;
Expand Down Expand Up @@ -84,6 +87,17 @@ protected void init()
protected void doStartupAfterSpringConfig(ModuleContext moduleContext)
{
AdminConsole.addLink(AdminConsole.SettingsLinkType.Management, "notification service admin", DetailsURL.fromString("/ldk/notificationSiteAdmin.view").getActionURL(), AdminOperationsPermission.class);
PopupDeveloperView.registerMenuProvider((c, user, trees) -> {
if (c.isRoot() & user.hasSiteAdminPermission())
{
trees.add(DeveloperMenuNavTrees.Section.tools, new NavTree("Notification Service Admin", DetailsURL.fromString("ldk/notificationSiteAdmin.view", c).getActionURL()));
}
else if (!c.isRoot() & c.hasPermission(user, AdminPermission.class))
{
trees.add(DeveloperMenuNavTrees.Section.tools, new NavTree("Notification Service Admin", DetailsURL.fromString("ldk/notificationAdmin.view", c).getActionURL()));
}
});

AdminConsole.addLink(AdminConsole.SettingsLinkType.Management, "file root usage summary", DetailsURL.fromString("/ldk/folderSizeSummary.view").getActionURL(), ReadPermission.class);

if (isSqlServer())
Expand Down
34 changes: 26 additions & 8 deletions LDK/src/org/labkey/ldk/query/DefaultTableCustomizer.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,19 @@ private void setDetailsUrl(AbstractTableInfo ti)
}

String schemaName = ti.getUserSchema().getSchemaName();
assert schemaName != null;

String queryName = ti.getPublicName();
assert queryName != null;
if (queryName == null)
{
_log.error("TableInfo.getPublicName() was null", new Exception());
return;
}

List<String> keyFields = ti.getPkColumnNames();
assert !keyFields.isEmpty() : "No key fields found for the table: " + ti.getPublicSchemaName() + "." + ti.getPublicName();
if (keyFields.isEmpty())
{
_log.debug("No key fields found for the table, cannot set details URL: " + ti.getPublicSchemaName() + "." + ti.getPublicName());
return;
}

if (_settings.getPrimaryKeyField() != null)
{
Expand Down Expand Up @@ -169,13 +175,25 @@ else if (_settings.isSetEditLinkOverrides())
{
//otherwise apply custom urls
String schemaName = ti.getUserSchema().getSchemaName();
assert schemaName != null;

String queryName = ti.getPublicName();
assert queryName != null;
if (queryName == null)
{
_log.error("TableInfo.getPublicName() was null", new Exception());
return;
}

List<String> keyFields = ti.getPkColumnNames();
assert !keyFields.isEmpty() : "No key fields found for the table: " + ti.getPublicSchemaName() + "." + ti.getPublicName();
if (keyFields.isEmpty())
{
// There does not seem to be a more direct test for 'is editable'
if (ti.getUpdateService() == null)
{
return;
}

_log.debug("No key fields found for the table, cannot customize edit UI: " + ti.getPublicSchemaName() + "." + ti.getPublicName());
return;
}

if (_settings.getPrimaryKeyField() != null)
{
Expand Down
Loading