forked from FoundKeyGang/FoundKey
コントロールパネルでログ見れるように
This commit is contained in:
parent
f24f7f14c3
commit
3461f0ffc9
2 changed files with 15 additions and 7 deletions
|
@ -43,6 +43,7 @@
|
||||||
<FormGroup>
|
<FormGroup>
|
||||||
<template #label>{{ $ts.info }}</template>
|
<template #label>{{ $ts.info }}</template>
|
||||||
<FormLink :active="page === 'database'" replace to="/instance/database"><template #icon><i class="fas fa-database"></i></template>{{ $ts.database }}</FormLink>
|
<FormLink :active="page === 'database'" replace to="/instance/database"><template #icon><i class="fas fa-database"></i></template>{{ $ts.database }}</FormLink>
|
||||||
|
<FormLink :active="page === 'logs'" replace to="/instance/logs"><template #icon><i class="fas fa-stream"></i></template>{{ $ts.logs }}</FormLink>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
</FormBase>
|
</FormBase>
|
||||||
</div>
|
</div>
|
||||||
|
@ -105,6 +106,7 @@ export default defineComponent({
|
||||||
case 'announcements': return defineAsyncComponent(() => import('./announcements.vue'));
|
case 'announcements': return defineAsyncComponent(() => import('./announcements.vue'));
|
||||||
case 'ads': return defineAsyncComponent(() => import('./ads.vue'));
|
case 'ads': return defineAsyncComponent(() => import('./ads.vue'));
|
||||||
case 'database': return defineAsyncComponent(() => import('./database.vue'));
|
case 'database': return defineAsyncComponent(() => import('./database.vue'));
|
||||||
|
case 'logs': return defineAsyncComponent(() => import('./logs.vue'));
|
||||||
case 'abuses': return defineAsyncComponent(() => import('./abuses.vue'));
|
case 'abuses': return defineAsyncComponent(() => import('./abuses.vue'));
|
||||||
case 'settings': return defineAsyncComponent(() => import('./settings.vue'));
|
case 'settings': return defineAsyncComponent(() => import('./settings.vue'));
|
||||||
case 'files-settings': return defineAsyncComponent(() => import('./files-settings.vue'));
|
case 'files-settings': return defineAsyncComponent(() => import('./files-settings.vue'));
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
<span>{{ $ts.domain }}</span>
|
<span>{{ $ts.domain }}</span>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkSelect v-model:value="logLevel">
|
<MkSelect v-model:value="logLevel">
|
||||||
<template #label>{{ $ts.level }}</template>
|
<template #label>Level</template>
|
||||||
<option value="all">{{ $ts.levels.all }}</option>
|
<option value="all">All</option>
|
||||||
<option value="info">{{ $ts.levels.info }}</option>
|
<option value="info">Info</option>
|
||||||
<option value="success">{{ $ts.levels.success }}</option>
|
<option value="success">Success</option>
|
||||||
<option value="warning">{{ $ts.levels.warning }}</option>
|
<option value="warning">Warning</option>
|
||||||
<option value="error">{{ $ts.levels.error }}</option>
|
<option value="error">Error</option>
|
||||||
<option value="debug">{{ $ts.levels.debug }}</option>
|
<option value="debug">Debug</option>
|
||||||
</MkSelect>
|
</MkSelect>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -45,6 +45,8 @@ export default defineComponent({
|
||||||
MkTextarea,
|
MkTextarea,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
emits: ['info'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
[symbols.PAGE_INFO]: {
|
[symbols.PAGE_INFO]: {
|
||||||
|
@ -72,6 +74,10 @@ export default defineComponent({
|
||||||
this.fetchLogs();
|
this.fetchLogs();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.$emit('info', this[symbols.PAGE_INFO]);
|
||||||
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchLogs() {
|
fetchLogs() {
|
||||||
os.api('admin/logs', {
|
os.api('admin/logs', {
|
||||||
|
|
Loading…
Reference in a new issue