diff --git a/i18n/fr/messages.fr.xlf b/i18n/fr/messages.fr.xlf index 3a87ce84db85bcf689d19558bb0934e81a60043c..04e783c5ebdef6f8fb68dbbc174f6ad590b992a2 100644 --- a/i18n/fr/messages.fr.xlf +++ b/i18n/fr/messages.fr.xlf @@ -371,6 +371,10 @@ ../src/app/frontend/common/components/resourcelist/statefulset/template.html 87 + + ../src/app/frontend/resource/cluster/node/detail/template.html + 160 + ../src/app/frontend/resource/workloads/deployment/detail/template.html 247 @@ -2117,18 +2121,6 @@ ../src/app/frontend/common/components/resourcelist/persistentvolumeclaim/template.html 95 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 157 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 189 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 211 - ../src/app/frontend/resource/cluster/persistentvolume/detail/template.html 82 @@ -4219,57 +4211,21 @@ ../src/app/frontend/resource/cluster/node/detail/template.html 128 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 206 - - - CPU allocation (cores) - Allocation de CPU (coeurs) + + CPU + CPU ../src/app/frontend/resource/cluster/node/detail/template.html - 140 - - - - Requests - Requêtes - - ../src/app/frontend/resource/cluster/node/detail/template.html - 143 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 175 - - - - Limits - Limites - - ../src/app/frontend/resource/cluster/node/detail/template.html - 150 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 182 - - - - Memory allocation (bytes) - Allocation mémoire (octets) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 172 + 136 - - Pods allocation - Allocation de pods + + Memory + Memory ../src/app/frontend/resource/cluster/node/detail/template.html - 203 + 148 diff --git a/i18n/ja/messages.ja.xlf b/i18n/ja/messages.ja.xlf index b44350ddf95edb8252045e530eb66d973a0f7192..0c728e68ad64f62c3fdb7a51b1dc494e1d068062 100644 --- a/i18n/ja/messages.ja.xlf +++ b/i18n/ja/messages.ja.xlf @@ -1373,6 +1373,10 @@ ../src/app/frontend/common/components/resourcelist/statefulset/template.html 87 + + ../src/app/frontend/resource/cluster/node/detail/template.html + 160 + ../src/app/frontend/resource/workloads/deployment/detail/template.html 247 @@ -1972,18 +1976,6 @@ ../src/app/frontend/common/components/resourcelist/persistentvolumeclaim/template.html 95 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 157 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 189 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 211 - ../src/app/frontend/resource/cluster/persistentvolume/detail/template.html 82 @@ -4193,57 +4185,21 @@ ../src/app/frontend/resource/cluster/node/detail/template.html 128 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 206 - - - - CPU allocation (cores) - CPU 割り当て (コア数) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 140 - - - - Requests - 要求 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 143 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 175 - - - Limits - 上限 + + CPU + CPU ../src/app/frontend/resource/cluster/node/detail/template.html - 150 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 182 - - - - Memory allocation (bytes) - メモリー割り当て (バイト) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 172 + 136 - - Pods allocation - ポッド割り当て + + Memory + Memory ../src/app/frontend/resource/cluster/node/detail/template.html - 203 + 148 diff --git a/i18n/ko/messages.ko.xlf b/i18n/ko/messages.ko.xlf index 3fc77b7fb076a4eba6f4a8b412a0212ad193c214..d2b7e12e5ebdbd596db816d5676f491bf6716637 100644 --- a/i18n/ko/messages.ko.xlf +++ b/i18n/ko/messages.ko.xlf @@ -425,6 +425,10 @@ ../src/app/frontend/common/components/resourcelist/statefulset/template.html 87 + + ../src/app/frontend/resource/cluster/node/detail/template.html + 160 + ../src/app/frontend/resource/workloads/deployment/detail/template.html 247 @@ -2087,18 +2091,6 @@ ../src/app/frontend/common/components/resourcelist/persistentvolumeclaim/template.html 95 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 157 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 189 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 211 - ../src/app/frontend/resource/cluster/persistentvolume/detail/template.html 82 @@ -3346,6 +3338,9 @@ + + + ../src/app/frontend/create/from/form/template.html 54 @@ -4356,57 +4351,21 @@ ../src/app/frontend/resource/cluster/node/detail/template.html 128 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 206 - - - - CPU allocation (cores) - CPU 할당(cores) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 140 - - - - Requests - 요청 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 143 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 175 - - - Limits - 상한 + + CPU + CPU ../src/app/frontend/resource/cluster/node/detail/template.html - 150 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 182 - - - - Memory allocation (bytes) - 메모리 할당(bytes) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 172 + 136 - - Pods allocation - 파드 할당 + + Memory + Memory ../src/app/frontend/resource/cluster/node/detail/template.html - 203 + 148 diff --git a/i18n/messages.xlf b/i18n/messages.xlf index c575ae9219fe257d637ac8602812e8842c1d4235..169ec58c2ab9a4e53b48cbb9400faa14fd8252ff 100644 --- a/i18n/messages.xlf +++ b/i18n/messages.xlf @@ -368,6 +368,10 @@ ../src/app/frontend/common/components/resourcelist/statefulset/template.html 87 + + ../src/app/frontend/resource/cluster/node/detail/template.html + 160 + ../src/app/frontend/resource/workloads/deployment/detail/template.html 247 @@ -1912,18 +1916,6 @@ ../src/app/frontend/common/components/resourcelist/persistentvolumeclaim/template.html 95 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 157 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 189 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 211 - ../src/app/frontend/resource/cluster/persistentvolume/detail/template.html 82 @@ -3779,52 +3771,19 @@ ../src/app/frontend/resource/cluster/node/detail/template.html 128 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 206 - - - CPU allocation (cores) + + CPU ../src/app/frontend/resource/cluster/node/detail/template.html - 140 - - - - Requests - - ../src/app/frontend/resource/cluster/node/detail/template.html - 143 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 175 - - - - Limits - - ../src/app/frontend/resource/cluster/node/detail/template.html - 150 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 182 - - - - Memory allocation (bytes) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 172 + 136 - - Pods allocation + + Memory ../src/app/frontend/resource/cluster/node/detail/template.html - 203 + 148 diff --git a/i18n/zh/messages.zh.xlf b/i18n/zh/messages.zh.xlf index 168cbc353e02566a91bf1e97ee24d3dba63e7b03..4627720c8f4bade97edc3aaa9b8cb5eb7e425f73 100644 --- a/i18n/zh/messages.zh.xlf +++ b/i18n/zh/messages.zh.xlf @@ -425,6 +425,10 @@ ../src/app/frontend/common/components/resourcelist/statefulset/template.html 87 + + ../src/app/frontend/resource/cluster/node/detail/template.html + 160 + ../src/app/frontend/resource/workloads/deployment/detail/template.html 247 @@ -2087,18 +2091,6 @@ ../src/app/frontend/common/components/resourcelist/persistentvolumeclaim/template.html 95 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 157 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 189 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 211 - ../src/app/frontend/resource/cluster/persistentvolume/detail/template.html 82 @@ -4327,57 +4319,21 @@ ../src/app/frontend/resource/cluster/node/detail/template.html 128 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 206 - - - CPU allocation (cores) - CPU allocation (cores) + + CPU + CPU ../src/app/frontend/resource/cluster/node/detail/template.html - 140 - - - - Requests - 请求 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 143 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 175 - - - - Limits - 范围 - - ../src/app/frontend/resource/cluster/node/detail/template.html - 150 - - - ../src/app/frontend/resource/cluster/node/detail/template.html - 182 - - - - Memory allocation (bytes) - Memory 分配 (bytes) - - ../src/app/frontend/resource/cluster/node/detail/template.html - 172 + 136 - - Pods allocation - Pods 分配 + + Memory + Memory ../src/app/frontend/resource/cluster/node/detail/template.html - 203 + 148 diff --git a/src/app/frontend/common/components/allocationchart/component.ts b/src/app/frontend/common/components/allocationchart/component.ts deleted file mode 100644 index 85fd563fdd871e398005d0fe03672922e97e2994..0000000000000000000000000000000000000000 --- a/src/app/frontend/common/components/allocationchart/component.ts +++ /dev/null @@ -1,154 +0,0 @@ -// Copyright 2017 The Kubernetes Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import {Component, Input, OnChanges} from '@angular/core'; -import {ChartAPI, generate} from 'c3'; -import {BaseType, select, Selection} from 'd3'; - -interface PieChartData { - key?: string; - value: number; - color?: string; -} - -type ChartType = 'pie' | 'donut'; - -@Component({ - selector: 'kd-allocation-chart', - templateUrl: './template.html', -}) -export class AllocationChartComponent implements OnChanges { - @Input() data: PieChartData[]; - @Input() colorPalette: string[]; - @Input() outerPercent: number; - @Input() outerColor: string; - @Input() innerPercent: number; - @Input() innerColor: string; - @Input() type: ChartType = 'donut'; - @Input() enableTooltips = false; - @Input() size = 280; - @Input() id: string; - - private allocated_: Set; - - ngOnChanges(): void { - this.allocated_ = new Set(); - setTimeout(() => this.generateGraph_(), 0); - } - - initPieChart_( - svg: Selection, - data: PieChartData[], - padding: number, - labelFunc: (d: {}, i: number, values: {}) => string | null = this.formatLabel_, - ): ChartAPI { - const colors: {[key: string]: string} = {}; - const columns: Array> = []; - - data.forEach((x, i) => { - if (x.value > 0) { - const key = x.key || x.value; - colors[key] = x.color || this.colorPalette[i]; - columns.push([key, x.value]); - - if (i === 0) { - this.allocated_.add(key); - } - } - }); - - return generate({ - bindto: svg, - size: { - width: this.size, - height: this.size, - }, - legend: { - show: false, - }, - tooltip: { - show: this.enableTooltips, - }, - transition: {duration: 350}, - donut: { - label: { - format: labelFunc, - }, - }, - data: { - columns, - type: this.type, - colors, - }, - padding: {top: padding, right: padding, bottom: padding, left: padding}, - }); - } - - /** - * Generates graph using provided requests and limits bindings. - */ - generateGraph_(): void { - let svg = select(`#${this.id}`); - - if (!this.data) { - svg = svg - .append('svg') - .attr('width', this.size) - .attr('height', this.size); - - if (this.outerPercent !== undefined) { - this.outerColor = this.outerColor ? this.outerColor : '#00c752'; - this.initPieChart_( - svg.append('g'), - [ - {value: this.outerPercent, color: this.outerColor}, - {value: 100 - this.outerPercent, color: '#ddd'}, - ], - 0, - this.displayOnlyAllocated_.bind(this), - ); - } - - if (this.innerPercent !== undefined) { - this.innerColor = this.innerColor ? this.innerColor : '#326de6'; - this.initPieChart_( - svg.append('g'), - [ - {value: this.innerPercent, color: this.innerColor}, - {value: 100 - this.innerPercent, color: '#ddd'}, - ], - 45, - this.displayOnlyAllocated_.bind(this), - ); - } - } else { - // Initializes a pie chart with multiple entries in a single ring - this.initPieChart_(svg, this.data, 0); - } - } - - /** - * Displays label only for allocated resources - */ - private displayOnlyAllocated_(value: number, _: number, id: string | number): string { - return this.allocated_.has(id) ? `${Math.round(value)}%` : ''; - } - - /** - * Formats percentage label to display in fixed format. - */ - private formatLabel_(value: number): string { - return `${Math.round(value)}%`; - } -} diff --git a/src/app/frontend/common/components/allocationchart/template.html b/src/app/frontend/common/components/allocationchart/template.html deleted file mode 100644 index bf2f51be44483316228d1d633e0321802c0b0fb8..0000000000000000000000000000000000000000 --- a/src/app/frontend/common/components/allocationchart/template.html +++ /dev/null @@ -1,19 +0,0 @@ - - -
- -
diff --git a/src/app/frontend/common/components/graph/helper.ts b/src/app/frontend/common/components/graph/helper.ts index 1087f92aa8645df3866268739826f6fbe82e630e..c9d619532e6674a84237d8c52b3dcf93cde18217 100644 --- a/src/app/frontend/common/components/graph/helper.ts +++ b/src/app/frontend/common/components/graph/helper.ts @@ -58,6 +58,21 @@ export function coresFilter(value: number): string { return suffix ? `${formatted} ${suffix}` : formatted; } +export function coresFilterDivider(value: number): number { + // Convert millicores to cores. + value = value / 1000; + + let divider = 1; + let power = 0; + + while (value / divider > memoryBase && power < memoryPowerSuffixes.length - 1) { + divider *= memoryBase; + power += 1; + } + + return divider; +} + /** Base for binary prefixes */ const memoryBase = 1024; @@ -86,3 +101,15 @@ export function memoryFilter(value: number): string { const suffix = memoryPowerSuffixes[power]; return suffix ? `${formatted} ${suffix}` : formatted; } + +export function memoryFilterDivider(value: number): number { + let divider = 1; + let power = 0; + + while (value / divider > memoryBase && power < memoryPowerSuffixes.length - 1) { + divider *= memoryBase; + power += 1; + } + + return divider; +} diff --git a/src/app/frontend/common/components/module.ts b/src/app/frontend/common/components/module.ts index 63ff09641fb7688bd4b7182877fca29f8ad7c65a..f95b8558cd9cac7d4457e51f7d5033499d9de09c 100644 --- a/src/app/frontend/common/components/module.ts +++ b/src/app/frontend/common/components/module.ts @@ -32,7 +32,6 @@ import {LogsScaleDefaultActionbar} from './actionbars/logsscaledefault/component import {ScaleDefaultActionbar} from './actionbars/scaledefault/component'; import {TriggerDefaultActionbar} from './actionbars/triggerdefault/component'; import {PinDefaultActionbar} from './actionbars/pindefault/component'; -import {AllocationChartComponent} from './allocationchart/component'; import {BreadcrumbsComponent} from './breadcrumbs/component'; import {CardComponent} from './card/component'; import {ChipDialog} from './chips/chipdialog/dialog'; @@ -102,7 +101,6 @@ const components = [ ActionbarDetailExecComponent, ActionbarDetailPinComponent, ActionbarComponent, - AllocationChartComponent, ActionbarDetailTriggerComponent, BreadcrumbsComponent, diff --git a/src/app/frontend/common/components/workloadstatus/component.spec.ts b/src/app/frontend/common/components/workloadstatus/component.spec.ts index 744b38bbca0d3822e60e1bf841d9a76b9b4a79ca..c3238eaa4b2d39351ca874072e7bef3990b5d210 100644 --- a/src/app/frontend/common/components/workloadstatus/component.spec.ts +++ b/src/app/frontend/common/components/workloadstatus/component.spec.ts @@ -23,7 +23,6 @@ import {AppConfig} from '@api/backendapi'; import {ResourcesRatio} from '@api/frontendapi'; import {ConfigService} from '../../services/global/config'; -import {AllocationChartComponent} from '../allocationchart/component'; import {CardComponent} from '../card/component'; import {WorkloadStatusComponent} from './component'; @@ -67,7 +66,7 @@ describe('WorkloadStatusComponent', () => { beforeEach(async(() => { TestBed.configureTestingModule({ - declarations: [CardComponent, AllocationChartComponent, WorkloadStatusComponent], + declarations: [CardComponent, WorkloadStatusComponent], imports: [ MatIconModule, MatCardModule, diff --git a/src/app/frontend/overview/component.spec.ts b/src/app/frontend/overview/component.spec.ts index 0dc6813a40e38e1fc44a73b0bc6d92f2c0ff2398..e44697dfad9d5fad3d9efcb9516df89e9a9c832e 100644 --- a/src/app/frontend/overview/component.spec.ts +++ b/src/app/frontend/overview/component.spec.ts @@ -20,7 +20,6 @@ import {MatCardModule, MatDividerModule, MatIconModule, MatTooltipModule} from ' import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {AppConfig, CronJobList, DaemonSetList, PodList} from '@api/backendapi'; -import {AllocationChartComponent} from '../common/components/allocationchart/component'; import {CardComponent} from '../common/components/card/component'; import {ListGroupIdentifier, ListIdentifier} from '../common/components/resourcelist/groupids'; import { @@ -71,7 +70,6 @@ describe('OverviewComponent', () => { CardComponent, OverviewComponent, MockDaemonSetListComponent, - AllocationChartComponent, WorkloadStatusComponent, ], imports: [ diff --git a/src/app/frontend/resource/cluster/node/detail/component.ts b/src/app/frontend/resource/cluster/node/detail/component.ts index 20709f76eec8faee4e901ab4c1eda62183cd6868..a13cc17dc61a2008c221aecbc67fb8714e53315b 100644 --- a/src/app/frontend/resource/cluster/node/detail/component.ts +++ b/src/app/frontend/resource/cluster/node/detail/component.ts @@ -21,11 +21,17 @@ import {ActionbarService, ResourceMeta} from '../../../../common/services/global import {NotificationsService} from '../../../../common/services/global/notifications'; import {EndpointManager, Resource} from '../../../../common/services/resource/endpoint'; import {ResourceService} from '../../../../common/services/resource/resource'; +import {RatioItem} from '@api/frontendapi'; +import { + coresFilter, + coresFilterDivider, + memoryFilter, + memoryFilterDivider, +} from '../../../../common/components/graph/helper'; @Component({ selector: 'kd-node-detail', templateUrl: './template.html', - styleUrls: ['./style.scss'], }) export class NodeDetailComponent implements OnInit, OnDestroy { private nodeSubscription_: Subscription; @@ -34,6 +40,18 @@ export class NodeDetailComponent implements OnInit, OnDestroy { isInitialized = false; podListEndpoint: string; eventListEndpoint: string; + cpuLabel = 'Cores'; + cpuCapacity = 0; + cpuAllocation: RatioItem[] = []; + memoryLabel = 'B'; + memoryCapacity = 0; + memoryAllocation: RatioItem[] = []; + podsAllocation: RatioItem[] = []; + customColors = [ + {name: 'Requests', value: '#00c752'}, + {name: 'Limits', value: '#ffad20'}, + {name: 'Allocation', value: '#00c752'}, + ]; constructor( private readonly node_: ResourceService, @@ -52,6 +70,7 @@ export class NodeDetailComponent implements OnInit, OnDestroy { .get(this.endpoint_.detail(), resourceName) .subscribe((d: NodeDetail) => { this.node = d; + this._getAllocation(); this.notifications_.pushErrors(d.errors); this.actionbar_.onInit.emit(new ResourceMeta('Node', d.objectMeta, d.typeMeta)); this.isInitialized = true; @@ -63,6 +82,36 @@ export class NodeDetailComponent implements OnInit, OnDestroy { this.actionbar_.onDetailsLeave.emit(); } + private _getAllocation(): void { + const minCpu = Math.min( + this.node.allocatedResources.cpuRequests, + this.node.allocatedResources.cpuLimits, + ); + const minCpuDivider = coresFilterDivider(minCpu) * 1000; + const formattedMinCpu = coresFilter(minCpu).split(' '); + this.cpuLabel = formattedMinCpu.length > 1 ? `${formattedMinCpu[1]}cores` : 'Cores'; + this.cpuCapacity = this.node.allocatedResources.cpuCapacity / minCpuDivider; + this.cpuAllocation = [ + {name: 'Requests', value: this.node.allocatedResources.cpuRequests / minCpuDivider}, + {name: 'Limits', value: this.node.allocatedResources.cpuLimits / minCpuDivider}, + ]; + + const minMemory = Math.min( + this.node.allocatedResources.memoryRequests, + this.node.allocatedResources.memoryLimits, + ); + const minMemoryDivider = memoryFilterDivider(minMemory); + const formattedMinMemory = memoryFilter(minMemory).split(' '); + this.memoryLabel = formattedMinMemory.length > 1 ? `${formattedMinMemory[1]}B` : 'B'; + this.memoryCapacity = this.node.allocatedResources.memoryCapacity / minMemoryDivider; + this.memoryAllocation = [ + {name: 'Requests', value: this.node.allocatedResources.memoryRequests / minMemoryDivider}, + {name: 'Limits', value: this.node.allocatedResources.memoryLimits / minMemoryDivider}, + ]; + + this.podsAllocation = [{name: 'Allocation', value: this.node.allocatedResources.allocatedPods}]; + } + getAddresses(): string[] { return this.node.addresses.map((address: NodeAddress) => `${address.type}: ${address.address}`); } diff --git a/src/app/frontend/resource/cluster/node/detail/style.scss b/src/app/frontend/resource/cluster/node/detail/style.scss deleted file mode 100644 index 9eda6c924e6d28ef6ee777dc475f463b61037e78..0000000000000000000000000000000000000000 --- a/src/app/frontend/resource/cluster/node/detail/style.scss +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2017 The Kubernetes Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -@import '../../../../variables'; - -.kd-allocated-resources { - display: flex; - flex-flow: row wrap; - justify-content: center; -} - -.kd-graph-container { - flex: auto; - text-align: center; -} - -.kd-graph-legend { - padding-bottom: 2 * $baseline-grid; -} - -.kd-graph-legend-title { - font-size: $subhead-font-size-base-lg; - padding-bottom: $baseline-grid; - text-align: center; -} - -.kd-graph-legend-entry { - display: flex; - margin: 0 auto; - padding: $baseline-grid; - text-align: left; - width: 30 * $baseline-grid; -} - -.kd-graph-legend-placeholder { - width: 2.75 * $baseline-grid; -} - -.kd-graph-legend-value { - flex: 1 auto; - text-align: right; -} - -.kd-graph-title { - font-size: $subhead-font-size-base; - padding-bottom: 2 * $baseline-grid; -} diff --git a/src/app/frontend/resource/cluster/node/detail/template.html b/src/app/frontend/resource/cluster/node/detail/template.html index 0d34d3f5205c626f80b1f1c9b2b150545535d06e..6697969afaee1facab0a4f88c3da27c7cd2af9f3 100644 --- a/src/app/frontend/resource/cluster/node/detail/template.html +++ b/src/app/frontend/resource/cluster/node/detail/template.html @@ -129,91 +129,42 @@ limitations under the License.
-
- - -
-
CPU allocation (cores)
-
- stop - Requests - - {{node?.allocatedResources.cpuRequests | kdCores}} - -
-
- stop - Limits - - {{node?.allocatedResources.cpuLimits | kdCores}} - -
-
-
- Capacity - - {{node?.allocatedResources.cpuCapacity | kdCores}} - -
-
+
CPU
+ +
-
- - -
-
Memory allocation (bytes)
-
- stop - Requests - - {{node?.allocatedResources.memoryRequests | kdMemory}} - -
-
- stop - Limits - - {{node?.allocatedResources.memoryLimits | kdMemory}} - -
-
-
- Capacity - - {{node?.allocatedResources.memoryCapacity | kdMemory}} - -
-
+
Memory
+ +
-
- - -
-
Pods allocation
-
- stop - Allocation - {{node?.allocatedResources.allocatedPods}} -
-
-
- Capacity - {{node?.allocatedResources.podCapacity}} -
-
+
Pods
+ +
-