diff --git a/src/components/Grid/Main/ErrLevelRenderer.js b/src/components/Grid/Main/ErrLevelRenderer.js
deleted file mode 100644
index ff80604..0000000
--- a/src/components/Grid/Main/ErrLevelRenderer.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import { VChip } from 'vuetify/components/VChip'
-
-export default {
- template: `
- {{ displayValue }}
- `,
- components: {
- VChip
- },
- setup(props) {
- let displayValue = props.params.value
- let colors = {
- 'error': 'red',
- 'info': 'orange',
- }
- let color = colors[displayValue]
- return {
- displayValue,
- color
- };
- },
-};
\ No newline at end of file
diff --git a/src/components/Grid/Main/MessageWithLevelRenderer.js b/src/components/Grid/Main/MessageWithLevelRenderer.js
new file mode 100644
index 0000000..7176638
--- /dev/null
+++ b/src/components/Grid/Main/MessageWithLevelRenderer.js
@@ -0,0 +1,47 @@
+import { VRow, VCol } from 'vuetify/components/VGrid'
+import { VIcon } from 'vuetify/components/VIcon'
+
+export default {
+ template: `
+
+ {{ icon }}
+ {{ message }}
+
+ `,
+ components: {
+ VRow,
+ VCol,
+ VIcon
+ },
+ setup(props) {
+ let message = props.params.data.message
+ let level = props.params.data.level
+ let icons = {
+ 'emergency': 'mdi-alert-circle',
+ 'alert': 'mdi-alert-circle',
+ 'critical': 'mdi-alert-circle',
+ 'error': 'mdi-alert-circle',
+ 'warning': 'mdi-alert-circle',
+ 'notice': 'mdi-alert-circle',
+ 'info': 'mdi-information',
+ 'debug': 'mdi-information',
+ }
+ let colors = {
+ 'emergency': 'red',
+ 'alert': 'red',
+ 'critical': 'red',
+ 'error': 'red',
+ 'warning': 'orange',
+ 'notice': 'orange',
+ 'info': 'green',
+ 'debug': 'green',
+ }
+ let color = colors[level]
+ let icon = icons[level]
+ return {
+ message,
+ color,
+ icon
+ };
+ },
+};
\ No newline at end of file
diff --git a/src/components/Grid/Main/config.js b/src/components/Grid/Main/config.js
index 18824ca..da89ec1 100644
--- a/src/components/Grid/Main/config.js
+++ b/src/components/Grid/Main/config.js
@@ -49,12 +49,9 @@ const config = {
{
field: 'message',
tooltipValueGetter: (params) => params.value,
+ cellRenderer: 'MessageWithLevelRenderer',
width: 500,
},
- {
- field: 'level',
- cellRenderer: 'ErrLevelRenderer',
- },
],
}
diff --git a/src/components/LogViewer.vue b/src/components/LogViewer.vue
index 0057000..46c55c7 100644
--- a/src/components/LogViewer.vue
+++ b/src/components/LogViewer.vue
@@ -49,7 +49,7 @@ import { VRow, VCol } from 'vuetify/components/VGrid'
import { Resize } from 'vuetify/directives';
import ExamineLogModal from "./Modal/ExamineLogModal.vue";
import ComboboxFilter from "./Grid/Main/Filter/ComboboxFilter.js";
-import ErrLevelRenderer from "./Grid/Main/ErrLevelRenderer";
+import MessageWithLevelRenderer from "./Grid/Main/MessageWithLevelRenderer";
import flattenObj from "../helpers/flattenObj";
import parseEventData from "../helpers/parseEventData";
import {mapActions, mapGetters} from 'vuex';
@@ -63,7 +63,7 @@ export default {
ExamineLogModal,
AgGridVue,
ComboboxFilter,
- ErrLevelRenderer,
+ MessageWithLevelRenderer,
VBtn,
VRow,
VCol,