fix(web): 统一日志筛选与侧边栏按钮
This commit is contained in:
6 files changed
+20
-10
No files matched your search
@@ -67,7 +67,7 @@ function localInputValue(milliseconds: number): string {
|
||||
function selectShortcut(milliseconds: number): void {
|
||||
const now = Math.floor(Date.now() / 1000) * 1000
|
||||
emit('update:from', localInputValue(Math.max(0, now - milliseconds)))
|
||||
emit('update:to', localInputValue(now))
|
||||
emit('update:to', localInputValue(now + 24 * 60 * 60 * 1000))
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -664,12 +664,18 @@ onBeforeUnmount(clearLocalState)
|
||||
<div v-if="editing && base" class="access-key-drawer__delete">
|
||||
<AccessKeyDeleteDialog :access-key="base" :total="total" @deleted="handleDeleted" />
|
||||
</div>
|
||||
<AppButton variant="secondary" :disabled="closeBlocked" @click="setOpen(false)">
|
||||
<AppButton
|
||||
variant="secondary"
|
||||
size="compact"
|
||||
:disabled="closeBlocked"
|
||||
@click="setOpen(false)"
|
||||
>
|
||||
{{ t('common.cancel') }}
|
||||
</AppButton>
|
||||
<AppButton
|
||||
type="submit"
|
||||
form="access-key-drawer-form"
|
||||
size="compact"
|
||||
:busy="pending"
|
||||
:disabled="!editReconciliation && !createOperationActive && (!valid || !dirty)"
|
||||
>
|
||||
|
||||
@@ -411,14 +411,16 @@ function update(field: keyof LogFilterDraft, value: string): void {
|
||||
</form>
|
||||
|
||||
<template #footer>
|
||||
<AppButton variant="ghost" @click="emit('reset')">{{
|
||||
<AppButton variant="secondary" size="compact" @click="emit('reset')">{{
|
||||
t('monitor.logs.filters.reset')
|
||||
}}</AppButton>
|
||||
<span class="logs-advanced__footer-actions">
|
||||
<AppButton variant="secondary" @click="emit('update:open', false)">{{
|
||||
<AppButton variant="secondary" size="compact" @click="emit('update:open', false)">{{
|
||||
t('common.cancel')
|
||||
}}</AppButton>
|
||||
<AppButton @click="emit('apply')">{{ t('monitor.logs.filters.apply') }}</AppButton>
|
||||
<AppButton size="compact" @click="emit('apply')">{{
|
||||
t('monitor.logs.filters.apply')
|
||||
}}</AppButton>
|
||||
</span>
|
||||
</template>
|
||||
</AppDrawer>
|
||||
|
||||
@@ -146,7 +146,7 @@ async function applyAdvanced(): Promise<void> {
|
||||
<span v-if="advancedCount" class="logs-filter__count">{{ advancedCount }}</span>
|
||||
</AppButton>
|
||||
<AppButton type="submit" size="compact">{{ t('monitor.logs.filters.apply') }}</AppButton>
|
||||
<AppButton variant="ghost" size="compact" @click="reset">
|
||||
<AppButton variant="secondary" size="compact" @click="reset">
|
||||
{{ t('monitor.logs.filters.reset') }}
|
||||
</AppButton>
|
||||
</div>
|
||||
|
||||
@@ -114,14 +114,16 @@ function error(field: keyof UsageFilterErrors): string | undefined {
|
||||
</form>
|
||||
|
||||
<template #footer>
|
||||
<AppButton variant="ghost" @click="emit('reset')">
|
||||
<AppButton variant="secondary" size="compact" @click="emit('reset')">
|
||||
{{ t('monitor.usage.filters.reset') }}
|
||||
</AppButton>
|
||||
<span class="usage-filter-drawer__actions">
|
||||
<AppButton variant="secondary" @click="emit('update:open', false)">
|
||||
<AppButton variant="secondary" size="compact" @click="emit('update:open', false)">
|
||||
{{ t('common.cancel') }}
|
||||
</AppButton>
|
||||
<AppButton @click="emit('apply')">{{ t('monitor.usage.filters.apply') }}</AppButton>
|
||||
<AppButton size="compact" @click="emit('apply')">{{
|
||||
t('monitor.usage.filters.apply')
|
||||
}}</AppButton>
|
||||
</span>
|
||||
</template>
|
||||
</AppDrawer>
|
||||
|
||||
@@ -78,7 +78,7 @@ function defaultRange(): Pick<RequestLogFilters, 'from_ms' | 'to_ms'> {
|
||||
const now = Math.floor(Date.now() / 1000) * 1000
|
||||
return {
|
||||
from_ms: Math.max(0, now - 60 * 60 * 1000),
|
||||
to_ms: now,
|
||||
to_ms: now + 24 * 60 * 60 * 1000,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user