From cce8dda41189adfa7c1613cccf6bae4e45887956 Mon Sep 17 00:00:00 2001 From: Grady Ward Date: Sun, 21 Jan 2024 13:54:56 -0700 Subject: [PATCH 1/2] Finishes Audit Log Interface --- frontend/assets/css/overrides.css | 39 +- .../components/CalendarRangeWithISOModel.vue | 62 ++ frontend/components/standard/FullWidth.vue | 21 + frontend/lang/en.json | 10 +- frontend/lib/auditlogquery/index.ts | 8 +- frontend/package-lock.json | 14 +- frontend/package.json | 2 +- frontend/pages/audit-logs.vue | 656 +++++++++++++----- frontend/plugins/primevue.ts | 20 +- 9 files changed, 626 insertions(+), 206 deletions(-) create mode 100644 frontend/components/CalendarRangeWithISOModel.vue create mode 100644 frontend/components/standard/FullWidth.vue diff --git a/frontend/assets/css/overrides.css b/frontend/assets/css/overrides.css index a0dded6..e769930 100644 --- a/frontend/assets/css/overrides.css +++ b/frontend/assets/css/overrides.css @@ -1,21 +1,21 @@ .h-0 { - height: 0; + height: 0; } .text-success { - color: #4a7747; + color: #4a7747; } div.p-toast { - opacity: 1; + opacity: 1; } .p-button.p-button-icon-only.p-button.p-button-xs, .p-button.p-button-xs { - padding: 0.25rem 0.5rem; - font-size: 0.875rem; - font-weight: 600; - width: auto; + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + font-weight: 600; + width: auto; } .code, .code-block { @@ -30,4 +30,27 @@ div.p-toast { .p-message-wrapper .p-message-icon, .p-message-wrapper .p-message-close { flex-shrink: 0; -} \ No newline at end of file +} + +.p-inputwrapper-filled.p-inputwrapper.p-multiselect.p-multiselect-chip +.p-multiselect-label { + display: flex; + flex-wrap: wrap; + gap: .25rem; + padding: .25rem .5rem; +} + +.p-inputwrapper-filled.p-inputwrapper.p-multiselect.p-multiselect-chip +.p-multiselect-label +.p-multiselect-token { + margin-right: 0; +} + +div.p-chips .p-chips-multiple-container { + gap: .25rem; + padding: .25rem .5rem; +} + +div.p-chips .p-chips-multiple-container .p-chips-token { + margin-right: 0; +} diff --git a/frontend/components/CalendarRangeWithISOModel.vue b/frontend/components/CalendarRangeWithISOModel.vue new file mode 100644 index 0000000..fcf1198 --- /dev/null +++ b/frontend/components/CalendarRangeWithISOModel.vue @@ -0,0 +1,62 @@ + + + diff --git a/frontend/components/standard/FullWidth.vue b/frontend/components/standard/FullWidth.vue new file mode 100644 index 0000000..6e0e117 --- /dev/null +++ b/frontend/components/standard/FullWidth.vue @@ -0,0 +1,21 @@ + + + diff --git a/frontend/lang/en.json b/frontend/lang/en.json index 9feec45..3becc2a 100644 --- a/frontend/lang/en.json +++ b/frontend/lang/en.json @@ -426,7 +426,15 @@ "Secondary Target": "Secondary Target", "Secondary Target ID": "Secondary Target ID", "Secondary Target Owner": "Secondary Target Owner", - "Secondary Target Type": "Secondary Target Type" + "Secondary Target Type": "Secondary Target Type", + "Filter To Specific Values": "Values To Include", + "Columns": "Columns", + "Column Selection": "Column Selection", + "Select or Remove Columns To Display": "Select or Remove Columns to Display", + "Reset": "Reset", + "Done": "Done", + "DescriptionParagraph1": "RMI takes the security of your data with the utmost care. To that end, we have implemented a robust audit logging system that tracks all changes to your data, and who made those changes. This audit log is available to you at any time, and can be filtered by time, user, or action. Hopefully this will give you some peace of mind that your sensitive data is being appropriately handled.", + "DescriptionParagraph2": "If you have any questions about the audit log, or if you think that something is missing, or you would like to learn more, please contact us." }, "pages/index": { "Heading": "PACTA for Investors", diff --git a/frontend/lib/auditlogquery/index.ts b/frontend/lib/auditlogquery/index.ts index 5b690c5..6297d02 100644 --- a/frontend/lib/auditlogquery/index.ts +++ b/frontend/lib/auditlogquery/index.ts @@ -47,9 +47,9 @@ const encodeAuditLogQueryWheres = (wheres: AuditLogQueryWhere[]): string => { } else if (where.inTargetOwnerId) { components.push(`TargetOwnerId:${where.inTargetOwnerId.join('|')}`) } else if (where.minCreatedAt) { - components.push(`MinCreatedAt:${where.minCreatedAt}`) + components.push(`MinCreatedAt:${where.minCreatedAt.replaceAll(':', '_')}`) } else if (where.maxCreatedAt) { - components.push(`MaxCreatedAt:${where.maxCreatedAt}`) + components.push(`MaxCreatedAt:${where.maxCreatedAt.replaceAll(':', '_')}`) } else { console.warn(new Error(`Unknown where: ${JSON.stringify(where)}`)) } @@ -108,12 +108,12 @@ const decodeAudtLogQueryWheres = (wheres: string): AuditLogQueryWhere[] => { break case 'MinCreatedAt': result.push({ - minCreatedAt: value, + minCreatedAt: value.replaceAll('_', ':'), }) break case 'MaxCreatedAt': result.push({ - maxCreatedAt: value, + maxCreatedAt: value.replaceAll('_', ':'), }) break default: diff --git a/frontend/package-lock.json b/frontend/package-lock.json index e38fa00..37b4169 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -11,7 +11,7 @@ "jszip": "^3.10.1", "primeflex": "^3.3.1", "primeicons": "^6.0.1", - "primevue": "^3.32.0", + "primevue": "^3.32.1", "serialize-error": "^11.0.3", "uuid": "^9.0.0", "vue-i18n": "^9.5.0" @@ -14546,9 +14546,9 @@ "integrity": "sha512-KDeO94CbWI4pKsPnYpA1FPjo79EsY9I+M8ywoPBSf9XMXoe/0crjbUK7jcQEDHuc0ZMRIZsxH3TYLv4TUtHmAA==" }, "node_modules/primevue": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.32.0.tgz", - "integrity": "sha512-ndZgA+Hg8P6iR74JnT5JZe7OAqQR/u/OA9D/cKZP7mj5hLBHNtrKuJToy3TZ0f3bXa1DIiwcV05afdTR1BiCyg==", + "version": "3.32.1", + "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.32.1.tgz", + "integrity": "sha512-SXeakYM2ZrRm7JHJ3pCqI0Nw2lHwZGXelt8oEsaG00uzHP+E2bDc2dLL2DrcHG5eLtp0E4ZSFmIYW4+q5joJFw==", "peerDependencies": { "vue": "^3.0.0" } @@ -29549,9 +29549,9 @@ "integrity": "sha512-KDeO94CbWI4pKsPnYpA1FPjo79EsY9I+M8ywoPBSf9XMXoe/0crjbUK7jcQEDHuc0ZMRIZsxH3TYLv4TUtHmAA==" }, "primevue": { - "version": "3.32.0", - "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.32.0.tgz", - "integrity": "sha512-ndZgA+Hg8P6iR74JnT5JZe7OAqQR/u/OA9D/cKZP7mj5hLBHNtrKuJToy3TZ0f3bXa1DIiwcV05afdTR1BiCyg==", + "version": "3.32.1", + "resolved": "https://registry.npmjs.org/primevue/-/primevue-3.32.1.tgz", + "integrity": "sha512-SXeakYM2ZrRm7JHJ3pCqI0Nw2lHwZGXelt8oEsaG00uzHP+E2bDc2dLL2DrcHG5eLtp0E4ZSFmIYW4+q5joJFw==", "requires": {} }, "proc-log": { diff --git a/frontend/package.json b/frontend/package.json index cdefa09..04b1609 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -44,7 +44,7 @@ "jszip": "^3.10.1", "primeflex": "^3.3.1", "primeicons": "^6.0.1", - "primevue": "^3.32.0", + "primevue": "^3.32.1", "serialize-error": "^11.0.3", "uuid": "^9.0.0", "vue-i18n": "^9.5.0" diff --git a/frontend/pages/audit-logs.vue b/frontend/pages/audit-logs.vue index 0a6abbe..9eac219 100644 --- a/frontend/pages/audit-logs.vue +++ b/frontend/pages/audit-logs.vue @@ -1,7 +1,8 @@