27 lines
834 B
TypeScript
27 lines
834 B
TypeScript
// What the logs list says when it has nothing to show: a dead stream, a
|
|
// deployment with no durable history, or filters that match nothing.
|
|
|
|
/** logsEmptyTitle names the situation. */
|
|
export function logsEmptyTitle(
|
|
durableUnavailable: boolean,
|
|
streamState: string,
|
|
): string {
|
|
if (streamState === "unavailable") return "Log stream unavailable";
|
|
if (durableUnavailable) return "No logs yet";
|
|
return "Nothing matches";
|
|
}
|
|
|
|
/** The line under the title: what to expect next. */
|
|
export function logsEmptyDetail(
|
|
durableUnavailable: boolean,
|
|
streamState: string,
|
|
): string {
|
|
if (streamState === "unavailable") {
|
|
return "This process is not delivering live daemon logs.";
|
|
}
|
|
if (durableUnavailable) {
|
|
return "This deployment keeps no durable history.";
|
|
}
|
|
return "Try a wider level or clear the search.";
|
|
}
|