From d2bdf8b20d4a81719625e56951c6008a4ff5af10 Mon Sep 17 00:00:00 2001 From: Emma Booker Date: Thu, 28 Mar 2019 08:33:05 -0300 Subject: [PATCH] 1.7.0 - Added basic user audit log --- CHANGELOG | 3 + package.json | 2 +- src/App.vue | 2 + src/components/sidebar.vue | 8 ++ src/panels/AuditLog.vue | 249 +++++++++++++++++++++++++++++++++ src/panels/PermissionsList.vue | 4 +- src/types/audit.d.ts | 22 +++ 7 files changed, 287 insertions(+), 3 deletions(-) create mode 100644 src/panels/AuditLog.vue create mode 100644 src/types/audit.d.ts diff --git a/CHANGELOG b/CHANGELOG index 6c67b2a..879fd49 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +1.7.0 +- Added basic user audit log + 1.6.1 - Reverting debugging changes diff --git a/package.json b/package.json index 26124d4..19b55e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "kiera-web", - "version": "1.6.1", + "version": "1.7.0", "description": "Web portal for kiera-bot", "main": "index.js", "author": "Emma (RileyIO)", diff --git a/src/App.vue b/src/App.vue index 0771576..6b4a07f 100644 --- a/src/App.vue +++ b/src/App.vue @@ -80,6 +80,7 @@ import Login from "./components/login.vue"; import Sidebar from "./components/sidebar.vue"; // Panels +import AuditPanel from "./panels/AuditLog.vue"; import DecisionsPanel from "./panels/DecisionsList.vue"; import PermissionsPanel from "./panels/PermissionsList.vue"; import ServerNotificationsPanel from "./panels/ServerNotifications.vue"; @@ -101,6 +102,7 @@ export const routes: { [key: string]: any } = { Login, Sidebar, // Panels + AuditPanel, DecisionsPanel, PermissionsPanel, ServerNotificationsPanel, diff --git a/src/components/sidebar.vue b/src/components/sidebar.vue index f770cc9..8a1ed41 100644 --- a/src/components/sidebar.vue +++ b/src/components/sidebar.vue @@ -48,6 +48,14 @@ Decisions Manager + + + + Audit Log + diff --git a/src/panels/AuditLog.vue b/src/panels/AuditLog.vue new file mode 100644 index 0000000..0e6d354 --- /dev/null +++ b/src/panels/AuditLog.vue @@ -0,0 +1,249 @@ + + + + + + +; \ No newline at end of file diff --git a/src/panels/PermissionsList.vue b/src/panels/PermissionsList.vue index 4d4b2a5..593002f 100644 --- a/src/panels/PermissionsList.vue +++ b/src/panels/PermissionsList.vue @@ -29,7 +29,7 @@ @@ -266,7 +266,7 @@ i.header-icon.el-icon-info { line-height: 1em; } -.permissin-example { +.row-example { display: block; font-size: 11px; color: #909090; diff --git a/src/types/audit.d.ts b/src/types/audit.d.ts new file mode 100644 index 0000000..a96c8c3 --- /dev/null +++ b/src/types/audit.d.ts @@ -0,0 +1,22 @@ +export type AuditEntryType = '<>' + | 'discord.message.delete' + | 'discord.user.join' + | 'discord.user.leave' + | 'discord.user.nickname' + | 'bot.command' + | 'bot.maintenance' + +export type AuditEntryWhere = 'Unknown' | 'Discord' | 'API' + +export interface AuditEntry { + name: string + details: string + error: string + guild: { id: string, name: string, channel?: string } + owner: string + runtime: number + successful: boolean + timestamp: string + type: AuditEntryType + where: AuditEntryWhere +} \ No newline at end of file