@dovetail-v2/refine 0.3.18-alpha.0 → 0.3.19-alpha.0
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.
|
@@ -36,8 +36,8 @@ export type InternalTableProps<Data extends {
|
|
|
36
36
|
}>;
|
|
37
37
|
empty?: string;
|
|
38
38
|
showMenuColumn?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
nonNsResource?: boolean;
|
|
40
|
+
customFilterBar?: React.ReactNode;
|
|
41
41
|
onClearSearchKeyword?: () => void;
|
|
42
42
|
};
|
|
43
43
|
declare function Table<Data extends {
|
|
@@ -6,7 +6,7 @@ interface ListPageProps<T extends ResourceModel> {
|
|
|
6
6
|
tableProps: InternalTableProps<T>;
|
|
7
7
|
contentClassName?: string;
|
|
8
8
|
belowToolBarContent?: React.ReactNode;
|
|
9
|
-
|
|
9
|
+
customFilterBar?: React.ReactNode;
|
|
10
10
|
isSearching?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
package/dist/refine.cjs
CHANGED
|
@@ -10203,7 +10203,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10203
10203
|
case ServiceTypeEnum.NodePort:
|
|
10204
10204
|
if (!breakLine) {
|
|
10205
10205
|
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p) => [/* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.Link, {
|
|
10206
|
-
href:
|
|
10206
|
+
href: `http://${clusterVip}:${p.nodePort}`,
|
|
10207
10207
|
target: "_blank",
|
|
10208
10208
|
className: common.cx_default(LinkStyle$2, eagle.Typo.Label.l4_regular_title),
|
|
10209
10209
|
children: `${clusterVip}:${p.nodePort}`
|
|
@@ -10222,7 +10222,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10222
10222
|
}
|
|
10223
10223
|
content = (_b = spec.ports) == null ? void 0 : _b.filter((v) => !!v).map((p) => /* @__PURE__ */ common.jsxRuntimeExports.jsx(eagle.OverflowTooltip, {
|
|
10224
10224
|
content: /* @__PURE__ */ common.jsxRuntimeExports.jsxs(eagle.Link, {
|
|
10225
|
-
href:
|
|
10225
|
+
href: `http://${clusterVip}:${p.nodePort}`,
|
|
10226
10226
|
target: "_blank",
|
|
10227
10227
|
className: common.cx_default(eagle.Typo.Label.l4_regular_title, BreakLineStyle, LinkStyle$2),
|
|
10228
10228
|
children: [clusterVip, ":", p.nodePort]
|
|
@@ -10258,7 +10258,8 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10258
10258
|
}
|
|
10259
10259
|
return /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
|
|
10260
10260
|
style: {
|
|
10261
|
-
whiteSpace: "pre-wrap"
|
|
10261
|
+
whiteSpace: "pre-wrap",
|
|
10262
|
+
color: "#0080ff"
|
|
10262
10263
|
},
|
|
10263
10264
|
children: content || "-"
|
|
10264
10265
|
});
|
|
@@ -14411,7 +14412,7 @@ const useNamespacesFilter = () => {
|
|
|
14411
14412
|
resource
|
|
14412
14413
|
} = core.useResource();
|
|
14413
14414
|
const configs = React.useContext(ConfigsContext);
|
|
14414
|
-
if ((resource == null ? void 0 : resource.name) && configs[resource == null ? void 0 : resource.name].
|
|
14415
|
+
if ((resource == null ? void 0 : resource.name) && configs[resource == null ? void 0 : resource.name].nonNsResource) {
|
|
14415
14416
|
return {
|
|
14416
14417
|
value: []
|
|
14417
14418
|
};
|
|
@@ -14593,7 +14594,7 @@ function ListPage(props) {
|
|
|
14593
14594
|
tableProps,
|
|
14594
14595
|
contentClassName,
|
|
14595
14596
|
belowToolBarContent,
|
|
14596
|
-
|
|
14597
|
+
customFilterBar,
|
|
14597
14598
|
isSearching
|
|
14598
14599
|
} = props;
|
|
14599
14600
|
const {
|
|
@@ -14619,12 +14620,12 @@ function ListPage(props) {
|
|
|
14619
14620
|
})]
|
|
14620
14621
|
}) : void 0, /* @__PURE__ */ common.jsxRuntimeExports.jsxs("div", {
|
|
14621
14622
|
className: common.cx_default(ListContentStyle, contentClassName),
|
|
14622
|
-
style: config.
|
|
14623
|
+
style: !config.customFilterBar && config.nonNsResource ? {
|
|
14623
14624
|
paddingTop: 0
|
|
14624
14625
|
} : {},
|
|
14625
|
-
children: [
|
|
14626
|
+
children: [customFilterBar || config.customFilterBar || !config.nonNsResource && /* @__PURE__ */ common.jsxRuntimeExports.jsx(NamespacesFilter, {
|
|
14626
14627
|
className: NamespaceFilterStyle
|
|
14627
|
-
})
|
|
14628
|
+
}), /* @__PURE__ */ common.jsxRuntimeExports.jsx("div", {
|
|
14628
14629
|
className: TableStyle,
|
|
14629
14630
|
children: /* @__PURE__ */ common.jsxRuntimeExports.jsx(Table, {
|
|
14630
14631
|
tableProps: {
|
package/dist/refine.js
CHANGED
|
@@ -10184,7 +10184,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10184
10184
|
case ServiceTypeEnum.NodePort:
|
|
10185
10185
|
if (!breakLine) {
|
|
10186
10186
|
content = (_a = spec.ports) == null ? void 0 : _a.filter((v) => !!v).map((p) => [/* @__PURE__ */ jsxRuntimeExports.jsx(Link$1, {
|
|
10187
|
-
href:
|
|
10187
|
+
href: `http://${clusterVip}:${p.nodePort}`,
|
|
10188
10188
|
target: "_blank",
|
|
10189
10189
|
className: cx_default(LinkStyle$2, Typo.Label.l4_regular_title),
|
|
10190
10190
|
children: `${clusterVip}:${p.nodePort}`
|
|
@@ -10203,7 +10203,7 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10203
10203
|
}
|
|
10204
10204
|
content = (_b = spec.ports) == null ? void 0 : _b.filter((v) => !!v).map((p) => /* @__PURE__ */ jsxRuntimeExports.jsx(OverflowTooltip, {
|
|
10205
10205
|
content: /* @__PURE__ */ jsxRuntimeExports.jsxs(Link$1, {
|
|
10206
|
-
href:
|
|
10206
|
+
href: `http://${clusterVip}:${p.nodePort}`,
|
|
10207
10207
|
target: "_blank",
|
|
10208
10208
|
className: cx_default(Typo.Label.l4_regular_title, BreakLineStyle, LinkStyle$2),
|
|
10209
10209
|
children: [clusterVip, ":", p.nodePort]
|
|
@@ -10239,7 +10239,8 @@ const ServiceOutClusterAccessComponent = ({
|
|
|
10239
10239
|
}
|
|
10240
10240
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
10241
10241
|
style: {
|
|
10242
|
-
whiteSpace: "pre-wrap"
|
|
10242
|
+
whiteSpace: "pre-wrap",
|
|
10243
|
+
color: "#0080ff"
|
|
10243
10244
|
},
|
|
10244
10245
|
children: content || "-"
|
|
10245
10246
|
});
|
|
@@ -14392,7 +14393,7 @@ const useNamespacesFilter = () => {
|
|
|
14392
14393
|
resource
|
|
14393
14394
|
} = useResource();
|
|
14394
14395
|
const configs = useContext(ConfigsContext);
|
|
14395
|
-
if ((resource == null ? void 0 : resource.name) && configs[resource == null ? void 0 : resource.name].
|
|
14396
|
+
if ((resource == null ? void 0 : resource.name) && configs[resource == null ? void 0 : resource.name].nonNsResource) {
|
|
14396
14397
|
return {
|
|
14397
14398
|
value: []
|
|
14398
14399
|
};
|
|
@@ -14574,7 +14575,7 @@ function ListPage(props) {
|
|
|
14574
14575
|
tableProps,
|
|
14575
14576
|
contentClassName,
|
|
14576
14577
|
belowToolBarContent,
|
|
14577
|
-
|
|
14578
|
+
customFilterBar,
|
|
14578
14579
|
isSearching
|
|
14579
14580
|
} = props;
|
|
14580
14581
|
const {
|
|
@@ -14600,12 +14601,12 @@ function ListPage(props) {
|
|
|
14600
14601
|
})]
|
|
14601
14602
|
}) : void 0, /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
14602
14603
|
className: cx_default(ListContentStyle, contentClassName),
|
|
14603
|
-
style: config.
|
|
14604
|
+
style: !config.customFilterBar && config.nonNsResource ? {
|
|
14604
14605
|
paddingTop: 0
|
|
14605
14606
|
} : {},
|
|
14606
|
-
children: [
|
|
14607
|
+
children: [customFilterBar || config.customFilterBar || !config.nonNsResource && /* @__PURE__ */ jsxRuntimeExports.jsx(NamespacesFilter, {
|
|
14607
14608
|
className: NamespaceFilterStyle
|
|
14608
|
-
})
|
|
14609
|
+
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
14609
14610
|
className: TableStyle,
|
|
14610
14611
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Table, {
|
|
14611
14612
|
tableProps: {
|
package/dist/types/resource.d.ts
CHANGED
|
@@ -171,10 +171,10 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
171
171
|
displayName?: string;
|
|
172
172
|
/** 是否隐藏列表页的工具栏。会连标题和描述一起去掉 */
|
|
173
173
|
hideListToolBar?: boolean;
|
|
174
|
-
/**
|
|
175
|
-
|
|
176
|
-
/**
|
|
177
|
-
|
|
174
|
+
/** 非命名空间资源,不展示默认的 NsFilter,并且禁用根据 ns 筛选的逻辑 */
|
|
175
|
+
nonNsResource?: boolean;
|
|
176
|
+
/** 自定义过滤栏 */
|
|
177
|
+
customFilterBar?: React.ReactNode;
|
|
178
178
|
/** 是否隐藏编辑功能。会隐藏 Dropdown 和详情中的编辑按钮 */
|
|
179
179
|
hideEdit?: boolean;
|
|
180
180
|
/** 是否隐藏创建功能 */
|