Skip to content
Snippets Groups Projects
Commit df322616 authored by baldwinlouie's avatar baldwinlouie Committed by Yas Naoi
Browse files

Issue #3157287 by baldwinlouie, yas: Fix K8s Node Allocated Resources and K8s Node Heatmap blocks

parent 48a86aff
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ class K8sNodeAllocatedResourcesBlock extends K8sBaseBlock {
}
}
}
elseif (!empty($cloud_context)) {
else {
// The following $cloud_context is reference to view.k8s_node.list, not
// entity.k8s_node.collection in out case. See also:
// ...
......@@ -94,6 +94,8 @@ class K8sNodeAllocatedResourcesBlock extends K8sBaseBlock {
// $this->derivatives[$id]['route_name'] = 'view.k8s_node.list';
// ...
// Confirm whether the metrics API can be used or not.
// This method handles cases where there are no cloud_context passed.
// This usually happens when the block is called from a dashboard page.
$metrics_enabled = $this->isMetricsServerEnabled(
$cloud_context ?? '',
$this->t('Node Allocated Resources block requires K8s Metrics Server.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment