mirror of
https://github.com/ntop/ntopng.git
synced 2026-05-01 16:30:10 +00:00
Add more column formatter type in table render_type field
This commit is contained in:
parent
96a3117da3
commit
42dc7b306a
1 changed files with 9 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ import { ntopng_utility, ntopng_url_manager } from "../services/context/ntopng_g
|
|||
import NtopUtils from "./ntop-utils.js";
|
||||
import { DataTableRenders } from "../utilities/datatable/sprymedia-datatable-utils.js";
|
||||
import { default as Dropdown } from "../vue//dropdown.vue";
|
||||
import FormatterUtils from "./formatter-utils.js";
|
||||
|
||||
const _i18n = (t) => i18n(t);
|
||||
|
||||
|
|
@ -97,7 +98,14 @@ function get_f_print_html_row(table_def) {
|
|||
return col.render_func(data, row);
|
||||
}
|
||||
if (col.render_type != null) {
|
||||
return DataTableRenders[col.render_type](data, 'display', row, col.zero_is_null);
|
||||
if (FormatterUtils.types[col.render_type] != null) {
|
||||
col.render_func = FormatterUtils.getFormatter(col.render_type);
|
||||
return col.render_func(data);
|
||||
} else if (DataTableRenders[col.render_type] != null) {
|
||||
return DataTableRenders[col.render_type](data, 'display', row, col.zero_is_null);
|
||||
} else {
|
||||
throw `In column ${col.data_field} render_type: ${col.render_type} not found`;
|
||||
}
|
||||
}
|
||||
return data;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue