@dovetail-v2/refine 0.3.20-alpha.0 → 0.3.20-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ReferenceLink/index.d.ts +2 -0
- package/dist/refine.cjs +34 -2
- package/dist/refine.js +34 -2
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import type { OwnerReference } from 'kubernetes-types/meta/v1';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { PodModel } from '../../models';
|
|
3
4
|
type Props = {
|
|
4
5
|
ownerReference: OwnerReference;
|
|
5
6
|
namespace: string;
|
|
7
|
+
pod: PodModel;
|
|
6
8
|
};
|
|
7
9
|
export declare const ReferenceLink: React.FC<Props>;
|
|
8
10
|
export {};
|
package/dist/refine.cjs
CHANGED
|
@@ -17799,10 +17799,41 @@ const EditButton = () => {
|
|
|
17799
17799
|
);
|
|
17800
17800
|
};
|
|
17801
17801
|
const ReferenceLink = (props) => {
|
|
17802
|
-
const { ownerReference, namespace: namespace2 } = props;
|
|
17802
|
+
const { ownerReference, namespace: namespace2, pod: pod2 } = props;
|
|
17803
17803
|
const configs = React.useContext(ConfigsContext);
|
|
17804
|
+
const { data: deploymentsData } = core.useList({
|
|
17805
|
+
resource: "deployments",
|
|
17806
|
+
meta: {
|
|
17807
|
+
kind: "Deployment",
|
|
17808
|
+
resourceBasePath: "/apis/apps/v1"
|
|
17809
|
+
},
|
|
17810
|
+
pagination: {
|
|
17811
|
+
mode: "off"
|
|
17812
|
+
}
|
|
17813
|
+
});
|
|
17814
|
+
const { data: replicaSetsData } = core.useList({
|
|
17815
|
+
resource: "replicasets",
|
|
17816
|
+
meta: {
|
|
17817
|
+
kind: "ReplicaSet",
|
|
17818
|
+
resourceBasePath: "/apis/apps/v1"
|
|
17819
|
+
},
|
|
17820
|
+
pagination: {
|
|
17821
|
+
mode: "off"
|
|
17822
|
+
}
|
|
17823
|
+
});
|
|
17804
17824
|
if (ownerReference.kind === "ReplicaSet") {
|
|
17805
|
-
|
|
17825
|
+
const deployment = pod2.getBelongToDeployment(
|
|
17826
|
+
(deploymentsData == null ? void 0 : deploymentsData.data) || [],
|
|
17827
|
+
(replicaSetsData == null ? void 0 : replicaSetsData.data) || []
|
|
17828
|
+
);
|
|
17829
|
+
return /* @__PURE__ */ common.jsxRuntimeExports.jsx(
|
|
17830
|
+
ResourceLink,
|
|
17831
|
+
{
|
|
17832
|
+
name: (deployment == null ? void 0 : deployment.name) || "",
|
|
17833
|
+
resourceName: "deployments",
|
|
17834
|
+
namespace: namespace2
|
|
17835
|
+
}
|
|
17836
|
+
);
|
|
17806
17837
|
}
|
|
17807
17838
|
const resource = Object.values(configs).find((c2) => c2.kind === ownerReference.kind);
|
|
17808
17839
|
if (!resource) {
|
|
@@ -19502,6 +19533,7 @@ const PodWorkloadColumnRenderer = (i18n2) => {
|
|
|
19502
19533
|
});
|
|
19503
19534
|
}
|
|
19504
19535
|
return value2.map((o) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(ReferenceLink, {
|
|
19536
|
+
pod: record,
|
|
19505
19537
|
ownerReference: o,
|
|
19506
19538
|
namespace: record.metadata.namespace || "default"
|
|
19507
19539
|
}, o.name));
|
package/dist/refine.js
CHANGED
|
@@ -17780,10 +17780,41 @@ const EditButton = () => {
|
|
|
17780
17780
|
);
|
|
17781
17781
|
};
|
|
17782
17782
|
const ReferenceLink = (props) => {
|
|
17783
|
-
const { ownerReference, namespace: namespace2 } = props;
|
|
17783
|
+
const { ownerReference, namespace: namespace2, pod: pod2 } = props;
|
|
17784
17784
|
const configs = useContext(ConfigsContext);
|
|
17785
|
+
const { data: deploymentsData } = useList({
|
|
17786
|
+
resource: "deployments",
|
|
17787
|
+
meta: {
|
|
17788
|
+
kind: "Deployment",
|
|
17789
|
+
resourceBasePath: "/apis/apps/v1"
|
|
17790
|
+
},
|
|
17791
|
+
pagination: {
|
|
17792
|
+
mode: "off"
|
|
17793
|
+
}
|
|
17794
|
+
});
|
|
17795
|
+
const { data: replicaSetsData } = useList({
|
|
17796
|
+
resource: "replicasets",
|
|
17797
|
+
meta: {
|
|
17798
|
+
kind: "ReplicaSet",
|
|
17799
|
+
resourceBasePath: "/apis/apps/v1"
|
|
17800
|
+
},
|
|
17801
|
+
pagination: {
|
|
17802
|
+
mode: "off"
|
|
17803
|
+
}
|
|
17804
|
+
});
|
|
17785
17805
|
if (ownerReference.kind === "ReplicaSet") {
|
|
17786
|
-
|
|
17806
|
+
const deployment = pod2.getBelongToDeployment(
|
|
17807
|
+
(deploymentsData == null ? void 0 : deploymentsData.data) || [],
|
|
17808
|
+
(replicaSetsData == null ? void 0 : replicaSetsData.data) || []
|
|
17809
|
+
);
|
|
17810
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
17811
|
+
ResourceLink,
|
|
17812
|
+
{
|
|
17813
|
+
name: (deployment == null ? void 0 : deployment.name) || "",
|
|
17814
|
+
resourceName: "deployments",
|
|
17815
|
+
namespace: namespace2
|
|
17816
|
+
}
|
|
17817
|
+
);
|
|
17787
17818
|
}
|
|
17788
17819
|
const resource = Object.values(configs).find((c2) => c2.kind === ownerReference.kind);
|
|
17789
17820
|
if (!resource) {
|
|
@@ -19483,6 +19514,7 @@ const PodWorkloadColumnRenderer = (i18n2) => {
|
|
|
19483
19514
|
});
|
|
19484
19515
|
}
|
|
19485
19516
|
return value2.map((o) => /* @__PURE__ */ jsxRuntimeExports.jsx(ReferenceLink, {
|
|
19517
|
+
pod: record,
|
|
19486
19518
|
ownerReference: o,
|
|
19487
19519
|
namespace: record.metadata.namespace || "default"
|
|
19488
19520
|
}, o.name));
|