]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/pipes/log-priority.pipe.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / pipes / log-priority.pipe.ts
CommitLineData
11fdf7f2
TL
1import { Pipe, PipeTransform } from '@angular/core';
2
3@Pipe({
4 name: 'logPriority'
5})
6export class LogPriorityPipe implements PipeTransform {
7 transform(value: any): any {
f67539c2
TL
8 if (value === '[DBG]') {
9 return 'debug';
10 } else if (value === '[INF]') {
11fdf7f2
TL
11 return 'info';
12 } else if (value === '[WRN]') {
13 return 'warn';
14 } else if (value === '[ERR]') {
15 return 'err';
16 } else {
17 return ''; // Inherit
18 }
19 }
20}