fix(monitor): clean up unused updatedAt/updatedLabel after label removal
This commit is contained in:
@@ -60,14 +60,11 @@ import { computed } from 'vue'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import Icon from '@/components/icons/Icon.vue'
|
||||
import AutoRefreshButton from '@/components/common/AutoRefreshButton.vue'
|
||||
import { useChannelMonitorFormat } from '@/composables/useChannelMonitorFormat'
|
||||
|
||||
export type MonitorWindow = '7d' | '15d' | '30d'
|
||||
export type OverallStatus = 'operational' | 'degraded'
|
||||
|
||||
const props = defineProps<{
|
||||
overallStatus: OverallStatus
|
||||
updatedAt: string | null
|
||||
intervalSeconds: number
|
||||
window: MonitorWindow
|
||||
loading: boolean
|
||||
@@ -87,7 +84,6 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const { t } = useI18n()
|
||||
const { formatRelativeTime } = useChannelMonitorFormat()
|
||||
|
||||
const windowOptions = computed<{ value: MonitorWindow; label: string }[]>(() => [
|
||||
{ value: '7d', label: t('channelStatus.windowTab.7d') },
|
||||
@@ -117,8 +113,4 @@ const overallDotClass = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
const updatedLabel = computed(() => {
|
||||
if (!props.updatedAt) return t('monitorCommon.updatedAt', { time: '--' })
|
||||
return t('monitorCommon.updatedAt', { time: formatRelativeTime(props.updatedAt) })
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user