fix(ui): drop the log and change-file status captions
This commit is contained in:
1 parent
e9940245a2
commit
a7bb12bd72
3 files changed
+80
-93
No files matched your search
+2
-14
@@ -28,7 +28,6 @@ interface LogHistory {
|
||||
services?:string[];
|
||||
errors?:Record<string,string>;
|
||||
file?: string;
|
||||
truncated?: boolean;
|
||||
/** The process serving the request keeps no durable history. */
|
||||
disabled?: boolean;
|
||||
}
|
||||
@@ -52,7 +51,6 @@ export const streamState = ref<StreamState | "connecting">("connecting");
|
||||
|
||||
const historyEntries = ref<LogEntry[]>([]);
|
||||
const durableUnavailable = ref(false);
|
||||
const truncated = ref(false);
|
||||
const logFile = ref("");
|
||||
|
||||
// Live entries are held in a plain Map so a line the stream repeats is stored
|
||||
@@ -66,17 +64,8 @@ export const entries = computed(() => {
|
||||
return mergeEntries(historyEntries.value, liveEntries, filters);
|
||||
});
|
||||
|
||||
/** What the list is showing. Every string here is a statement about this
|
||||
* process: a failed read, a read in flight, a deployment with no durable
|
||||
* history, or the file the lines came from. */
|
||||
export const meta = computed(() => {
|
||||
if (readError.value) return "Cannot read logs";
|
||||
if (loading.value) return "Refreshing…";
|
||||
if (durableUnavailable.value) return "Live only";
|
||||
if (truncated.value)
|
||||
return "Showing recent matches; older lines are omitted";
|
||||
return logFile.value;
|
||||
});
|
||||
/** A failed read, else the file the lines came from. */
|
||||
export const meta = computed(() => (readError.value ? "Cannot read logs" : logFile.value));
|
||||
|
||||
/** The stream's state as a badge kind. Never `ok` for a stream that is still
|
||||
* connecting, and never `warn` for one that has given up: the two are
|
||||
@@ -112,7 +101,6 @@ export async function loadLogs(): Promise<void> {
|
||||
serviceErrors.value=res.errors??{};
|
||||
componentOptions.value = res.components ?? [];
|
||||
durableUnavailable.value = !!res.disabled;
|
||||
truncated.value = !!res.truncated;
|
||||
logFile.value = res.file ?? "";
|
||||
historyEntries.value = res.entries ?? [];
|
||||
} catch (err) {
|
||||
|
||||
@@ -65,6 +65,5 @@ const total = computed(
|
||||
</TableRow>
|
||||
</TableBody>
|
||||
</Table>
|
||||
<p v-if="capture.truncated" class="mt-2 text-xs text-fg-muted">Showing the first {{ files.length }} of {{ total }} files.</p>
|
||||
</template>
|
||||
</template>
|
||||
Reference in new issue
Block a user