Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "7.58.4",
"version": "7.58.5",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,13 @@ export const PLATE_SET_AUDIT_QUERY: AuditQuery = {
value: 'PlateSetEvent',
};

// Events live in the root container, so the grid needs to look outside the current folder to find them
export const SYSTEM_UPGRADE_AUDIT_QUERY: AuditQuery = {
containerFilter: Query.ContainerFilter.allFolders,
label: 'System Upgrade Events',
value: 'SystemUpgradeAuditEvent',
};

export const COMMON_AUDIT_QUERIES: AuditQuery[] = [
ATTACHMENT_AUDIT_QUERY,
DOMAIN_AUDIT_QUERY,
Expand All @@ -153,6 +160,7 @@ export const COMMON_AUDIT_QUERIES: AuditQuery[] = [
QUERY_UPDATE_AUDIT_QUERY,
SAMPLE_TYPE_AUDIT_QUERY,
SAMPLE_TIMELINE_AUDIT_QUERY,
SYSTEM_UPGRADE_AUDIT_QUERY,
USER_AUDIT_QUERY,
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,25 @@ import {
NOTEBOOK_REVIEW_AUDIT_QUERY,
REGISTRY_AUDIT_QUERY,
SOURCE_AUDIT_QUERY,
SYSTEM_UPGRADE_AUDIT_QUERY,
WORKFLOW_AUDIT_QUERY,
} from './constants';

describe('getAuditQueries', () => {
test('LKS starter', () => {
const auditQueries = getAuditQueries(TEST_LKS_STARTER_MODULE_CONTEXT);
expect(auditQueries.length).toBe(15);
expect(auditQueries.length).toBe(16);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(13);
expect(auditQueries.findIndex(entry => entry === SYSTEM_UPGRADE_AUDIT_QUERY)).toBe(14);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === SOURCE_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
});

test('LKSM starter', () => {
const auditQueries = getAuditQueries(TEST_LKSM_STARTER_MODULE_CONTEXT);
expect(auditQueries.length).toBe(13);
expect(auditQueries.length).toBe(14);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(11);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBe(-1);
Expand All @@ -50,7 +52,7 @@ describe('getAuditQueries', () => {

test('LKSM professional', () => {
const auditQueries = getAuditQueries(TEST_LKSM_PROFESSIONAL_MODULE_CONTEXT);
expect(auditQueries.length).toBe(18);
expect(auditQueries.length).toBe(19);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(15);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
Expand Down Expand Up @@ -78,7 +80,7 @@ describe('getAuditQueries', () => {
},
};
const auditQueries = getAuditQueries(moduleContext);
expect(auditQueries.length).toBe(19);
expect(auditQueries.length).toBe(20);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(16);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
Expand Down