Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud-3369296
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
cloud-3369296
Commits
df322616
Commit
df322616
authored
4 years ago
by
baldwinlouie
Committed by
Yas Naoi
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/cloud_service_providers/k8s/src/Plugin/Block/K8sNodeAllocatedResourcesBlock.php
+3
-1
3 additions, 1 deletion
...s/k8s/src/Plugin/Block/K8sNodeAllocatedResourcesBlock.php
with
3 additions
and
1 deletion
modules/cloud_service_providers/k8s/src/Plugin/Block/K8sNodeAllocatedResourcesBlock.php
+
3
−
1
View file @
df322616
...
...
@@ -81,7 +81,7 @@ class K8sNodeAllocatedResourcesBlock extends K8sBaseBlock {
}
}
}
else
if
(
!
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.'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment