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1<73|10p5`AXFbYA;rq_Ht8827x@BXTZ8>Rq+RDZ%Tb)Qe?(iZjW_sn58JqD4
z2fcX1)sISOSN`ys>BN3hyMbqf!M#hOkq_UzU04)t{QTJqh_wwSayZTUZDAD0}{&u*AN
zN^o;Q#yyb!o7LHv35DF899~H_QV49?`@T27
zx3IUk_d{=4FRZsRI?E~}@AUbqy6DkpVR4wpb!x?ZScv>sNO)i}Yk1g4%y!C$@a_UM
z*?s@b{PvwYI+t_~lZ60Mu)qHs#|w5dbu)7_|Bq^L%Ho2f8_}Zxu(vX@XbQRy_VCsC
zkiQ7R9s8R)fLOe*Uz>Nv!CZ@?>HlSQD&ji}K{YPW6w+l22r_;5Pr7uve7aJ)TDm5+
zK^ay9Q?96~I3qUX_~gpWK*=v)p-R1G7
zI%v**cS*_r`kXY+UvHA6m56B_C#oX-M77&=ACUTHc=}Ud+yBDF)l4V%%H@^=|A4kh
zXAnm#&@uR>dlFMonl++5VLX@KoFz!=PfVYh2IgtR^EUKV4lEG
zTD;@>j-RZoU$5wnLr{ZP*A1XYyu4JTlnIxJXY9xmPXO$ePg`a-q{bxYjUT{bj6_<*gA@|oh=s1HmLFMP`dqO8NN
zl~-FYptG%U;yV#i|FcayMD3iGIT!E5B=WCGu}>x^{)5-QDSZb09@YJ2iM#TN7|M$D?JOXc6nAC?k6C|)$L83zGU%FjQ$m&
z<%y|@&HWeZ-}GC>x&Dk{y{w@+2$Qk=ZhZNj$VwCMXyv}(p;srjd6KJ70sDmG_D$m(
J$m
+ import('../../../Extensibility/ExtensibilityInjections'),
+);
+
export default function ClusterStats({ nodesData }) {
const { t } = useTranslation();
@@ -99,7 +103,7 @@ export default function ClusterStats({ nodesData }) {
...spacing.sapUiMediumMarginTopBottom,
}}
>
- {t('cluster-overview.statistics.title')}
+ {t('common.headers.monitoring-and-health')}
@@ -282,6 +286,7 @@ export default function ClusterStats({ nodesData }) {
/>
)}
+
>
);
diff --git a/src/components/Extensibility/ExtensibilityDetails.js b/src/components/Extensibility/ExtensibilityDetails.js
index 8984a5c060..c3912908c8 100644
--- a/src/components/Extensibility/ExtensibilityDetails.js
+++ b/src/components/Extensibility/ExtensibilityDetails.js
@@ -68,9 +68,11 @@ export const ExtensibilityDetailsCore = ({
}
const header = resMetaData?.details?.header || [];
+ const health = resMetaData?.details?.health || [];
const status = resMetaData?.details?.status || [];
const body = resMetaData?.details?.body || [];
const dataSources = resMetaData?.dataSources || {};
+ const general = resMetaData?.general || {};
return (
(
+
+ ),
+ ]
+ : []
+ }
description={description}
createResourceForm={ExtensibilityCreate}
resourceSchema={resMetaData}
diff --git a/src/components/Extensibility/ExtensibilityInjections.js b/src/components/Extensibility/ExtensibilityInjections.js
index 610b0da0d8..db2a7d8125 100644
--- a/src/components/Extensibility/ExtensibilityInjections.js
+++ b/src/components/Extensibility/ExtensibilityInjections.js
@@ -39,6 +39,7 @@ export const ExtensibilityInjectionCore = ({ resMetaData, root }) => {
}
const dataSources = resMetaData?.dataSources || {};
+ const general = resMetaData?.general || {};
const injection = resMetaData?.injection;
const injectionName = injection?.name;
const filter = injection?.target.filter || injection?.filter || null;
@@ -58,9 +59,11 @@ export const ExtensibilityInjectionCore = ({ resMetaData, root }) => {
structure={injection}
schema={schema}
dataSources={dataSources}
+ general={general}
originalResource={filteredItems}
embedResource={root}
inlineContext={true}
+ context={injection.target}
/>
);
};
diff --git a/src/components/Extensibility/components/ConditionList.js b/src/components/Extensibility/components/ConditionList.js
index 8270ddc588..810e297397 100644
--- a/src/components/Extensibility/components/ConditionList.js
+++ b/src/components/Extensibility/components/ConditionList.js
@@ -1,6 +1,6 @@
import { ConditionList as ConditionListComponent } from 'shared/components/ConditionList/ConditionList';
-export const ConditionList = ({ value, structure }) => {
+export const ConditionList = ({ value }) => {
if (!Array.isArray(value) || value?.length === 0) {
return null;
}
diff --git a/src/components/Extensibility/components/StatisticalCard.js b/src/components/Extensibility/components/StatisticalCard.js
new file mode 100644
index 0000000000..ce41147e2d
--- /dev/null
+++ b/src/components/Extensibility/components/StatisticalCard.js
@@ -0,0 +1,60 @@
+import { CountingCard } from 'shared/components/CountingCard/CountingCard';
+import { useJsonata } from '../hooks/useJsonata';
+import { useGetTranslation } from '../helpers';
+import { EMPTY_TEXT_PLACEHOLDER } from 'shared/constants';
+
+export function StatisticalCard({
+ structure,
+ value,
+ originalResource,
+ general,
+ context,
+}) {
+ const jsonata = useJsonata({
+ resource: originalResource,
+ value,
+ });
+ const { t } = useGetTranslation();
+
+ const extraInfo = structure.children?.map(child => {
+ const [childValue, err] = jsonata(child.source, {
+ resource: value,
+ });
+ if (err) {
+ return t('extensibility.configuration-error', {
+ error: err.message,
+ });
+ }
+
+ return {
+ title: child.name,
+ value: childValue !== undefined ? childValue : EMPTY_TEXT_PLACEHOLDER,
+ };
+ });
+
+ const [mainValue, err] = jsonata(structure?.mainValue?.source, {
+ resource: value,
+ });
+ if (err) {
+ return t('extensibility.configuration-error', {
+ error: err.message,
+ });
+ }
+
+ return (
+
+
+
+ );
+}
+
+StatisticalCard.array = true;
diff --git a/src/components/Extensibility/components/index.js b/src/components/Extensibility/components/index.js
index 97528e682f..bc1d923758 100644
--- a/src/components/Extensibility/components/index.js
+++ b/src/components/Extensibility/components/index.js
@@ -23,6 +23,7 @@ import { FeaturedCard } from './FeaturedCard/FeaturedCard';
import { APIRuleHost } from './APIRules/APIRuleHost';
import { PendingWrapper } from './PendingWrapper';
+import { StatisticalCard } from './StatisticalCard';
export const widgets = {
Null: () => '',
@@ -44,6 +45,7 @@ export const widgets = {
ResourceLink,
ResourceList,
ResourceRefs,
+ StatisticalCard,
Table,
Tabs,
Text,
diff --git a/src/components/Extensibility/hooks/useJsonata.ts b/src/components/Extensibility/hooks/useJsonata.ts
index 93ac60e32d..f42ff7282d 100644
--- a/src/components/Extensibility/hooks/useJsonata.ts
+++ b/src/components/Extensibility/hooks/useJsonata.ts
@@ -1,12 +1,12 @@
-import { useState, useEffect, useContext } from 'react';
+import { useContext, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { last, mapValues } from 'lodash';
import { jsonataWrapper } from '../helpers/jsonataWrapper';
import {
- Resource,
- DataSourcesContextType,
DataSourcesContext,
+ DataSourcesContextType,
+ Resource,
} from '../contexts/DataSources';
type JsonataValue = [string, Error | null];
@@ -15,7 +15,7 @@ type JsonataFunction = {
(
query: string,
extras: { [key: string]: any },
- defaultValue: any,
+ defaultValue?: any,
): JsonataValue;
async: (
query: string,
diff --git a/src/resources/Namespaces/NamespaceDetails.js b/src/resources/Namespaces/NamespaceDetails.js
index 7a0234f625..ed1644386b 100644
--- a/src/resources/Namespaces/NamespaceDetails.js
+++ b/src/resources/Namespaces/NamespaceDetails.js
@@ -15,7 +15,6 @@ import NamespaceCreate from './NamespaceCreate';
import { AllNamespacesDetails } from './AllNamespacesDetails';
import { useSetRecoilState } from 'recoil';
-import { spacing } from '@ui5/webcomponents-react-base';
import { ResourceDescription } from 'resources/Namespaces';
export function NamespaceDetails(props) {
@@ -90,11 +89,11 @@ export function NamespaceDetails(props) {
windowTitle={t('namespaces.overview.title')}
customColumns={customColumns}
headerActions={headerActions}
+ customHealthCards={[
+ () => ,
+ () => ,
+ ]}
>
-
-
-
-
{LimitrangesList}
{ResourceQuotasList}
{Events}
diff --git a/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloads.js b/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloads.js
index 535fd27cfa..547988b68f 100644
--- a/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloads.js
+++ b/src/resources/Namespaces/NamespaceWorkloads/NamespaceWorkloads.js
@@ -36,44 +36,52 @@ export function NamespaceWorkloads({ namespace }) {
return (
<>
{(podsData || deploymentsData) && (
-
+ <>
{podsData && (
-
+
+
+
)}
{deploymentsData && (
-
+
+
+
)}
-
+ >
)}
>
);
diff --git a/src/resources/Namespaces/ResourcesUsage.js b/src/resources/Namespaces/ResourcesUsage.js
index a3eba5bdd6..bb144aa6db 100644
--- a/src/resources/Namespaces/ResourcesUsage.js
+++ b/src/resources/Namespaces/ResourcesUsage.js
@@ -128,28 +128,34 @@ export const ResourcesUsage = ({ namespace }) => {
return (
<>
-
- }
- >
-
-
-
- }
- >
-
-
+
+
+ }
+ >
+
+
+
+
+
+ }
+ >
+
+
+
>
);
};
diff --git a/src/resources/ReplicaSets/ReplicaSetDetails.js b/src/resources/ReplicaSets/ReplicaSetDetails.js
index 92efcf3504..9244203dce 100644
--- a/src/resources/ReplicaSets/ReplicaSetDetails.js
+++ b/src/resources/ReplicaSets/ReplicaSetDetails.js
@@ -102,27 +102,30 @@ export function ReplicaSetsDetails(props) {
);
- const customOverview = resource => {
+ const ReplicasOverview = resource => {
return (
-
+
+
+
);
};
@@ -140,7 +143,7 @@ export function ReplicaSetsDetails(props) {
statusConditions={statusConditions}
description={ResourceDescription}
createResourceForm={ReplicaSetCreate}
- customOverview={customOverview}
+ customHealthCards={[ReplicasOverview]}
{...props}
/>
);
diff --git a/src/shared/components/CountingCard/CountingCard.tsx b/src/shared/components/CountingCard/CountingCard.tsx
index 07033e41a3..61e6e39040 100644
--- a/src/shared/components/CountingCard/CountingCard.tsx
+++ b/src/shared/components/CountingCard/CountingCard.tsx
@@ -12,22 +12,29 @@ import './CountingCard.scss';
type CountingCardProps = {
value: number;
- extraInfo: any;
+ extraInfo: [ExtraInfo];
title: string;
subTitle: string;
- resourceUrl: string;
- isClusterResource: boolean;
- className: string;
+ resourceUrl?: string;
+ isClusterResource?: boolean;
+ allNamespaceURL?: boolean;
+ className?: string;
additionalContent?: React.ReactNode;
};
+type ExtraInfo = {
+ value: string;
+ title: string;
+};
+
export const CountingCard = ({
value,
extraInfo,
title,
- subTitle = ' ',
+ subTitle = '',
resourceUrl,
isClusterResource = false,
+ allNamespaceURL = true,
className = '',
additionalContent,
}: CountingCardProps) => {
@@ -73,9 +80,10 @@ export const CountingCard = ({
url={
isClusterResource
? clusterUrl(resourceUrl)
- : namespaceUrl(resourceUrl, {
- namespace: '-all-',
- })
+ : namespaceUrl(
+ resourceUrl,
+ allNamespaceURL ? { namespace: '-all-' } : {},
+ )
}
className="counting-card__link"
>
diff --git a/src/shared/components/ResourceDetails/ResourceDetails.js b/src/shared/components/ResourceDetails/ResourceDetails.js
index db28be6bdd..7cf2d31983 100644
--- a/src/shared/components/ResourceDetails/ResourceDetails.js
+++ b/src/shared/components/ResourceDetails/ResourceDetails.js
@@ -25,6 +25,7 @@ import { Tooltip } from '../Tooltip/Tooltip';
import YamlUploadDialog from 'resources/Namespaces/YamlUpload/YamlUploadDialog';
import { createPortal } from 'react-dom';
import ResourceDetailsCard from './ResourceDetailsCard';
+import { ResourceHealthCard } from '../ResourceHealthCard/ResourceHealthCard';
import { ResourceStatusCard } from '../ResourceStatusCard/ResourceStatusCard';
import { EMPTY_TEXT_PLACEHOLDER } from '../../constants';
import { ReadableElapsedTimeFromNow } from '../ReadableElapsedTimeFromNow/ReadableElapsedTimeFromNow';
@@ -67,7 +68,7 @@ ResourceDetails.propTypes = {
showYamlTab: PropTypes.bool,
layoutCloseCreateUrl: PropTypes.string,
layoutNumber: PropTypes.string,
- customOverviewCard: PropTypes.node,
+ customHealthCards: PropTypes.node,
};
ResourceDetails.defaultProps = {
@@ -169,7 +170,7 @@ function Resource({
disableDelete,
statusBadge,
customStatusColumns,
- customOverview,
+ customHealthCards,
statusConditions,
headerContent,
}) {
@@ -394,7 +395,9 @@ function Resource({
/>
);
- const customOverviewCard = customOverview && customOverview(resource);
+ const customOverviewCard = (customHealthCards || []).map(healthCard =>
+ healthCard(resource),
+ );
return (
@@ -433,9 +436,7 @@ function Resource({
{resourceDetailsCard}
{resourceStatusCard && resourceStatusCard}
-
- {customOverviewCard && customOverviewCard}
-
+
>
)}
}>
diff --git a/src/shared/components/ResourceHealthCard/ResourceHealthCard.js b/src/shared/components/ResourceHealthCard/ResourceHealthCard.js
new file mode 100644
index 0000000000..ffa40d30d6
--- /dev/null
+++ b/src/shared/components/ResourceHealthCard/ResourceHealthCard.js
@@ -0,0 +1,24 @@
+import { Title } from '@ui5/webcomponents-react';
+import { useTranslation } from 'react-i18next';
+import { spacing } from '@ui5/webcomponents-react-base';
+
+export function ResourceHealthCard({ customHealthCards }) {
+ const { t } = useTranslation();
+ if (!customHealthCards?.length) return null;
+ return (
+ <>
+
+ {t('common.headers.monitoring-and-health')}
+
+
+ {customHealthCards}
+
+ >
+ );
+}