mirror of
https://github.com/skooner-k8s/skooner.git
synced 2026-08-24 04:16:18 +00:00
fix some types
This commit is contained in:
@@ -2,9 +2,9 @@ import _ from 'lodash';
|
||||
import React from 'react';
|
||||
import Chart from './chart';
|
||||
import LoadingChart from './loadingChart';
|
||||
import {TODO} from "../utils/types";
|
||||
import {TODO, Node} from "../utils/types";
|
||||
|
||||
export default function NodeStatusChart({items}: {items: TODO[]}) {
|
||||
export default function NodeStatusChart({items}: {items: Node[]}) {
|
||||
const readyCount = _.sumBy(items, x => getReadyStatus(x) === 'True' ? 1 : 0); // eslint-disable-line no-confusing-arrow
|
||||
|
||||
return (
|
||||
|
||||
@@ -2,15 +2,15 @@ import _ from 'lodash';
|
||||
import React from 'react';
|
||||
import Chart from './chart';
|
||||
import LoadingChart from './loadingChart';
|
||||
import {TODO} from "../utils/types";
|
||||
import {Pod} from "../utils/types";
|
||||
|
||||
export default function PodStatusChart({items}: {items: TODO[]}) {
|
||||
export default function PodStatusChart({items}: {items?: Pod[]}) {
|
||||
const available = items && items.length;
|
||||
const count = _.sumBy(items, x => x.status.phase === 'Running' ? 1 : 0); // eslint-disable-line no-confusing-arrow
|
||||
|
||||
return (
|
||||
<div className='charts_item'>
|
||||
{items ? (
|
||||
{items && available ? (
|
||||
<Chart used={count} pending={available - count} available={available} />
|
||||
) : (
|
||||
<LoadingChart />
|
||||
|
||||
@@ -6,14 +6,14 @@ import LoadingEllipsis from './loadingEllipsis';
|
||||
import {MetadataHeaders, MetadataColumns, TableBody} from './listViewHelpers';
|
||||
import {unparseRam, unparseCpu} from '../utils/unitHelpers';
|
||||
import {getPodResourcePercent, getPodUsage, getPodResourceValue} from '../utils/metricsHelpers';
|
||||
import {TODO} from "../utils/types";
|
||||
import {Pod, TODO} from "../utils/types";
|
||||
|
||||
interface PodsPanelProps {
|
||||
metrics: TODO;
|
||||
pods: TODO[];
|
||||
items: TODO[];
|
||||
sort: TODO;
|
||||
filter: TODO;
|
||||
pods?: TODO[];
|
||||
items?: Pod[];
|
||||
sort?: TODO;
|
||||
filter?: TODO;
|
||||
skipNamespace: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,6 +14,9 @@ interface Metadata {
|
||||
}
|
||||
|
||||
interface Container {
|
||||
name?: string;
|
||||
image?: string;
|
||||
args?: string[];
|
||||
resources?: {
|
||||
requests?: {
|
||||
cpu?: string;
|
||||
|
||||
Reference in New Issue
Block a user