mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Add metrics package
This commit is contained in:
1 parent
121a50ecf3
commit
4b2b4ad399
11 files changed
+11234
No files matched your search
@@ -331,6 +331,7 @@
|
||||
"peerDependencies": {
|
||||
"@k8slens/application": "^6.5.0-alpha.0",
|
||||
"@k8slens/application-for-electron-main": "^6.5.0-alpha.0",
|
||||
"@k8slens/metrics": "^6.5.0-alpha.0",
|
||||
"@k8slens/run-many": "^1.0.0-alpha.1",
|
||||
"@k8slens/test-utils": "^1.0.0-alpha.1",
|
||||
"@k8slens/utilities": "^1.0.0-alpha.1",
|
||||
|
||||
@@ -28,6 +28,8 @@ import podStoreInjectable from "../+workloads-pods/store.injectable";
|
||||
import eventStoreInjectable from "../+events/store.injectable";
|
||||
import nodeStoreInjectable from "../+nodes/store.injectable";
|
||||
import enabledMetricsInjectable from "../../api/catalog/entity/metrics-enabled.injectable";
|
||||
import type { ClusterOverviewUIBlock } from "@k8slens/metrics";
|
||||
import { clusterOverviewUIBlockInjectionToken } from "@k8slens/metrics";
|
||||
|
||||
interface Dependencies {
|
||||
subscribeStores: SubscribeStores;
|
||||
@@ -36,6 +38,7 @@ interface Dependencies {
|
||||
eventStore: EventStore;
|
||||
nodeStore: NodeStore;
|
||||
clusterMetricsAreVisible: IComputedValue<boolean>;
|
||||
uiBlocks: ClusterOverviewUIBlock[];
|
||||
}
|
||||
|
||||
@observer
|
||||
@@ -77,6 +80,10 @@ class NonInjectedClusterOverview extends React.Component<Dependencies> {
|
||||
return (
|
||||
<>
|
||||
<ClusterMetrics/>
|
||||
{this.props.uiBlocks.map((block) => (
|
||||
<block.component key={block.id} />
|
||||
))}
|
||||
lol
|
||||
<ClusterPieCharts/>
|
||||
</>
|
||||
);
|
||||
@@ -117,5 +124,6 @@ export const ClusterOverview = withInjectables<Dependencies>(NonInjectedClusterO
|
||||
podStore: di.inject(podStoreInjectable),
|
||||
eventStore: di.inject(eventStoreInjectable),
|
||||
nodeStore: di.inject(nodeStoreInjectable),
|
||||
uiBlocks: di.injectMany(clusterOverviewUIBlockInjectionToken),
|
||||
}),
|
||||
});
|
||||
Reference in new issue
Block a user