/
githubmirror
/
ydb-embedded-ui
Обзор
Документация
Войти
/
githubmirror
/
ydb-embedded-ui
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/containers/Tenant/Query/Issues/models.ts
16 строк
512 B
Артём Муфазалов
feat: remove unused exports, functions and files (#1750)
12 дек 2024, 17:08
Не верифицирован
12 дек 2024, 17:08
cdf9ebc
Код
Авторство
О чём код?
const SEVERITY_LIST = ['S_FATAL', 'S_ERROR', 'S_WARNING', 'S_INFO'] as const; export type SEVERITY = (typeof SEVERITY_LIST)[number]; // Severity values from ydb/library/yql/public/issue/protos/issue_severity.proto // FATAL = 0; // ERROR = 1; // WARNING = 2; // INFO = 3; function isSeverity(value: number | undefined) { return value ? SEVERITY_LIST[value] !== undefined : false; } export function getSeverity(value: number | undefined) { return isSeverity(value) ? SEVERITY_LIST[value!] : 'S_INFO'; }