mirror of
https://github.com/crawlab-team/crawlab.git
synced 2026-01-21 17:21:09 +01:00
fix: enhance node metrics handling by checking state before accessing metrics map
This commit is contained in:
@@ -303,7 +303,7 @@ const useNodeList = () => {
|
|||||||
icon: ['fa', 'chart-line'],
|
icon: ['fa', 'chart-line'],
|
||||||
width: '240',
|
width: '240',
|
||||||
value: (row: Node) => {
|
value: (row: Node) => {
|
||||||
if (!row._id) return;
|
if (!row._id || !state.nodeMetricsMap) return;
|
||||||
const currentMetrics = state.nodeMetricsMap[row._id];
|
const currentMetrics = state.nodeMetricsMap[row._id];
|
||||||
return (
|
return (
|
||||||
<ClCurrentMetrics
|
<ClCurrentMetrics
|
||||||
@@ -400,7 +400,7 @@ const useNodeList = () => {
|
|||||||
const opts = getDefaultUseListOptions<Node>(navActions, tableColumns);
|
const opts = getDefaultUseListOptions<Node>(navActions, tableColumns);
|
||||||
|
|
||||||
// init
|
// init
|
||||||
setupListComponent(ns, store, []);
|
setupListComponent(ns, store, true);
|
||||||
|
|
||||||
if (isPro()) {
|
if (isPro()) {
|
||||||
onBeforeMount(() => store.dispatch(`${ns}/getNodeMetrics`));
|
onBeforeMount(() => store.dispatch(`${ns}/getNodeMetrics`));
|
||||||
|
|||||||
Reference in New Issue
Block a user