Add Superuser Logging Dashboard
This commit is contained in:
0
resources/adminer/plugins/.gitignore
vendored
Normal file
0
resources/adminer/plugins/.gitignore
vendored
Normal file
@@ -21,6 +21,10 @@ import {
|
||||
FwbFooterLinkGroup,
|
||||
} from 'flowbite-vue';
|
||||
|
||||
import { Link, usePage } from '@inertiajs/vue3'
|
||||
|
||||
const isAuth = computed(() => page.props.auth.user)
|
||||
|
||||
import Multiselect from "vue-multiselect";
|
||||
import { settingsStore } from '../settingsStore.js';
|
||||
const menu = ref([])
|
||||
@@ -33,6 +37,7 @@ const currencyHash = ref([])
|
||||
|
||||
const ccountry = ref([])
|
||||
|
||||
|
||||
const ccountry_list = computed(() => {
|
||||
let computed_list = settingsStore.ccountry_list.filter((c) => (c.offline == (settingsStore.online ? 'N' : 'Y')) || settingsStore.online == true);
|
||||
console.log('COMPUTED_LIST',computed_list);
|
||||
@@ -221,6 +226,13 @@ onMounted(fetch_menu);
|
||||
<fwb-navbar-link :link="route(menu[0].route_or_url)">
|
||||
Home
|
||||
</fwb-navbar-link>
|
||||
<fwb-navbar-link v-if="$page.props.user" :link="route('profile.show')">
|
||||
Profile
|
||||
</fwb-navbar-link>
|
||||
<fwb-navbar-link v-if="!$page.props.user" :link="route('login')">
|
||||
Login
|
||||
</fwb-navbar-link>
|
||||
|
||||
<fwb-mega-menu link="#">
|
||||
<template #default>{{ tsettings }}</template>
|
||||
</fwb-mega-menu>
|
||||
|
||||
@@ -404,6 +404,7 @@ const showRow = async (item) => {
|
||||
currency: settingsStore.currency,
|
||||
online: settingsStore.online,
|
||||
text: settingsStore.text,
|
||||
country: settingsStore.country.code,
|
||||
});
|
||||
|
||||
products.value = response.data.products;
|
||||
|
||||
115
resources/js/Pages/Superuser/Activity/Logging.vue
Normal file
115
resources/js/Pages/Superuser/Activity/Logging.vue
Normal file
@@ -0,0 +1,115 @@
|
||||
<script setup>
|
||||
import DashboardLayout from '@/Layouts/DashboardLayout.vue';
|
||||
import Card from '@/Components/Card.vue';
|
||||
import Icon from '@/Components/Icon.vue';
|
||||
import Builder from '@/Components/DataTable/Builder.vue';
|
||||
import Th from '@/Components/DataTable/Th.vue';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<DashboardLayout
|
||||
title="Logging Activity"
|
||||
>
|
||||
<Card class="bg-white dark:bg-gray-700 dark:text-gray-200">
|
||||
<template #header>
|
||||
<div class="flex items-center space-x-2 bg-gray-200 dark:bg-gray-800 p-2">
|
||||
<p class="lowercase first-letter:capitalize font-semibold">
|
||||
Logging
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template #body>
|
||||
<Builder
|
||||
:url="route('superuser.activity.logging')"
|
||||
>
|
||||
<template #thead="table">
|
||||
<tr class="bg-gray-200 dark:bg-gray-800 border-gray-300 dark:border-gray-900">
|
||||
<Th
|
||||
:table="table"
|
||||
:sort="false"
|
||||
name="id"
|
||||
class="border p-2 text-center"
|
||||
>
|
||||
ID
|
||||
</Th>
|
||||
|
||||
<Th
|
||||
:table="table"
|
||||
:sort="true"
|
||||
name="level_name"
|
||||
class="border px-3 py-2 text-center whitespace-nowrap"
|
||||
>
|
||||
Level Name
|
||||
</Th>
|
||||
|
||||
<Th
|
||||
:table="table"
|
||||
:sort="true"
|
||||
name="message"
|
||||
class="border px-3 py-2 text-center whitespace-nowrap"
|
||||
>
|
||||
Message
|
||||
</Th>
|
||||
|
||||
<Th
|
||||
:table="table"
|
||||
:sort="true"
|
||||
name="context"
|
||||
class="border px-3 py-2 text-center whitespace-nowrap"
|
||||
>
|
||||
Context
|
||||
</Th>
|
||||
|
||||
<Th
|
||||
:table="table"
|
||||
:sort="true"
|
||||
name="logged_at"
|
||||
class="border px-3 py-2 text-center whitespace-nowrap"
|
||||
>
|
||||
Logged At
|
||||
</Th>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
<template #tbody="{ data }">
|
||||
<TransitionGroup
|
||||
enterActiveClass="transition-all duration-100"
|
||||
leaveActiveClass="transition-all duration-50"
|
||||
enterFromClass="opacity-0 -scale-y-100"
|
||||
leaveToClass="opacity-0 -scale-y-100"
|
||||
>
|
||||
<tr
|
||||
v-for="(rec, i) in data"
|
||||
:key="i"
|
||||
class="dark:hover:bg-gray-600 dark:border-gray-800 transition-all duration-300"
|
||||
>
|
||||
<td class="px-2 py-1 border border-inherit text-center">
|
||||
{{ rec.id }}
|
||||
</td>
|
||||
|
||||
<td class="px-2 py-1 border border-inherit uppercase">
|
||||
{{ rec.level_name }}
|
||||
</td>
|
||||
|
||||
<td class="px-2 py-1 border border-inherit uppercase">
|
||||
{{ rec.message }}
|
||||
</td>
|
||||
|
||||
<td class="px-2 py-1 border border-inherit uppercase">
|
||||
{{ rec.context }}
|
||||
</td>
|
||||
|
||||
<td class="px-2 py-1 border border-inherit uppercase">
|
||||
{{ rec.logged_at }}
|
||||
</td>
|
||||
</tr>
|
||||
</TransitionGroup>
|
||||
</template>
|
||||
</Builder>
|
||||
</template>
|
||||
</Card>
|
||||
</DashboardLayout>
|
||||
</template>
|
||||
Reference in New Issue
Block a user