@dovetail-v2/refine 0.0.7 → 0.0.9

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.
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntime } from "./index.b720212a.js";
1
+ import { j as jsxRuntime } from "./index.5ba25b92.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "@refinedev/core";
@@ -8514,6 +8514,55 @@ class PodModel extends WorkloadModel {
8514
8514
  return `${(_b = (_a = this.rawYaml.status) == null ? void 0 : _a.containerStatuses) == null ? void 0 : _b.filter((c) => c.ready).length}/${(_c = this.rawYaml.spec) == null ? void 0 : _c.containers.length}`;
8515
8515
  }
8516
8516
  }
8517
+ class PodMetricsModel extends ResourceModel {
8518
+ constructor(data2) {
8519
+ super(data2);
8520
+ __publicField(this, "usage");
8521
+ this.data = data2;
8522
+ let cpuUsageNum = 0;
8523
+ let memoryUsageNum = 0;
8524
+ for (const container2 of data2.containers) {
8525
+ cpuUsageNum += parseSi(container2.usage.cpu || "0");
8526
+ memoryUsageNum += parseSi(container2.usage.memory || "0");
8527
+ }
8528
+ this.usage = {
8529
+ cpu: {
8530
+ value: cpuUsageNum,
8531
+ si: formatSi(1e3 * cpuUsageNum, {
8532
+ suffix: "m",
8533
+ maxPrecision: 0
8534
+ })
8535
+ },
8536
+ memory: {
8537
+ value: memoryUsageNum,
8538
+ si: formatSi(memoryUsageNum, {
8539
+ suffix: "i",
8540
+ maxPrecision: 0
8541
+ })
8542
+ }
8543
+ };
8544
+ }
8545
+ }
8546
+ class CronJobModel extends WorkloadModel {
8547
+ constructor(data2) {
8548
+ super(data2);
8549
+ this.data = data2;
8550
+ }
8551
+ suspend() {
8552
+ const newOne = cloneDeep(this.data);
8553
+ if (this.data.kind === "CronJob") {
8554
+ set(newOne, "spec.suspend", true);
8555
+ }
8556
+ return newOne;
8557
+ }
8558
+ resume() {
8559
+ const newOne = cloneDeep(this.data);
8560
+ if (this.data.kind === "CronJob") {
8561
+ set(newOne, "spec.suspend", false);
8562
+ }
8563
+ return newOne;
8564
+ }
8565
+ }
8517
8566
  const ErrorContent_1t51xnx = "";
8518
8567
  const ErrorWrapper = "eckm4od";
8519
8568
  const ErrorContent = "e1hl982n";
@@ -9557,6 +9606,59 @@ function WorkloadDropdown(props) {
9557
9606
  }
9558
9607
  ) });
9559
9608
  }
9609
+ const index_3lw8k1 = "";
9610
+ const ListPageStyle = "laykzsq";
9611
+ const TableStyle = "t1ng0psc";
9612
+ function ListPage(props) {
9613
+ const {
9614
+ title,
9615
+ selectedKeys,
9616
+ tableProps
9617
+ } = props;
9618
+ return /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
9619
+ className: ListPageStyle,
9620
+ children: [/* @__PURE__ */ jsxRuntime.exports.jsx(TableToolBar, {
9621
+ title,
9622
+ selectedKeys
9623
+ }), /* @__PURE__ */ jsxRuntime.exports.jsx(Table, {
9624
+ ...tableProps,
9625
+ className: TableStyle,
9626
+ scroll: {
9627
+ y: "calc(100% - 48px)"
9628
+ }
9629
+ })]
9630
+ });
9631
+ }
9632
+ function ResourceList(props) {
9633
+ const { formatter, name: name2, columns, Dropdown } = props;
9634
+ const { i18n: i18n2 } = useTranslation();
9635
+ const { tableProps, selectedKeys } = useEagleTable({
9636
+ useTableParams: {},
9637
+ columns: [
9638
+ PhaseColumnRenderer(i18n2),
9639
+ NameColumnRenderer(i18n2),
9640
+ NameSpaceColumnRenderer(i18n2),
9641
+ ...columns
9642
+ ],
9643
+ tableProps: {
9644
+ currentSize: 10
9645
+ },
9646
+ formatter,
9647
+ Dropdown
9648
+ });
9649
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
9650
+ }
9651
+ function ResourceShow(props) {
9652
+ const { formatter, filedGroups, Dropdown } = props;
9653
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(
9654
+ PageShow,
9655
+ {
9656
+ fieldGroups: filedGroups,
9657
+ formatter,
9658
+ Dropdown
9659
+ }
9660
+ );
9661
+ }
9560
9662
  const index_12sfrn = "";
9561
9663
  const Style = "s1bsn3us";
9562
9664
  const Separator = () => {
@@ -9565,7 +9667,7 @@ const Separator = () => {
9565
9667
  });
9566
9668
  };
9567
9669
  const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
9568
- const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.e4468695.js"));
9670
+ const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.19d01417.js"));
9569
9671
  const YamlEditorComponent = forwardRef(
9570
9672
  function YamlEditorComponent2(props, ref) {
9571
9673
  const {
@@ -9931,59 +10033,6 @@ const ResourceForm = ({ config }) => {
9931
10033
  }
9932
10034
  );
9933
10035
  };
9934
- const index_3lw8k1 = "";
9935
- const ListPageStyle = "laykzsq";
9936
- const TableStyle = "t1ng0psc";
9937
- function ListPage(props) {
9938
- const {
9939
- title,
9940
- selectedKeys,
9941
- tableProps
9942
- } = props;
9943
- return /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
9944
- className: ListPageStyle,
9945
- children: [/* @__PURE__ */ jsxRuntime.exports.jsx(TableToolBar, {
9946
- title,
9947
- selectedKeys
9948
- }), /* @__PURE__ */ jsxRuntime.exports.jsx(Table, {
9949
- ...tableProps,
9950
- className: TableStyle,
9951
- scroll: {
9952
- y: "calc(100% - 48px)"
9953
- }
9954
- })]
9955
- });
9956
- }
9957
- function ResourceList(props) {
9958
- const { formatter, name: name2, columns, Dropdown } = props;
9959
- const { i18n: i18n2 } = useTranslation();
9960
- const { tableProps, selectedKeys } = useEagleTable({
9961
- useTableParams: {},
9962
- columns: [
9963
- PhaseColumnRenderer(i18n2),
9964
- NameColumnRenderer(i18n2),
9965
- NameSpaceColumnRenderer(i18n2),
9966
- ...columns
9967
- ],
9968
- tableProps: {
9969
- currentSize: 10
9970
- },
9971
- formatter,
9972
- Dropdown
9973
- });
9974
- return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
9975
- }
9976
- function ResourceShow(props) {
9977
- const { formatter, filedGroups, Dropdown } = props;
9978
- return /* @__PURE__ */ jsxRuntime.exports.jsx(
9979
- PageShow,
9980
- {
9981
- fieldGroups: filedGroups,
9982
- formatter,
9983
- Dropdown
9984
- }
9985
- );
9986
- }
9987
10036
  const ResourceCRUD = (props) => {
9988
10037
  const { configs, urlPrefix } = props;
9989
10038
  const { i18n: i18n2 } = useTranslation();
@@ -11685,55 +11734,64 @@ var RESOURCE_GROUP = /* @__PURE__ */ ((RESOURCE_GROUP2) => {
11685
11734
  return RESOURCE_GROUP2;
11686
11735
  })(RESOURCE_GROUP || {});
11687
11736
  export {
11688
- ShowContent as $,
11737
+ DataField as $,
11689
11738
  AgeColumnRenderer as A,
11690
11739
  Breadcrumb as B,
11691
11740
  CommonSorter as C,
11692
11741
  DurationColumnRenderer as D,
11693
- ResourceUsageBar as E,
11694
- WorkloadReplicas as F,
11695
- CronjobJobsTable as G,
11696
- KeyValue as H,
11742
+ ResourceCRUD as E,
11743
+ WorkloadPodsTable as F,
11744
+ CronJobDropdown as G,
11745
+ ResourceUsageBar as H,
11697
11746
  ImageNames as I,
11698
- DeleteButton as J,
11747
+ WorkloadReplicas as J,
11699
11748
  KeyValueListWidget as K,
11700
- Layout as L,
11749
+ CronjobJobsTable as L,
11701
11750
  MetadataForm as M,
11702
11751
  NameColumnRenderer as N,
11703
- ImageField as O,
11752
+ KeyValue as O,
11704
11753
  PhaseColumnRenderer as P,
11705
- ReplicaField as Q,
11754
+ DeleteButton as Q,
11706
11755
  ReplicasColumnRenderer as R,
11707
11756
  Separator as S,
11708
- ConditionsField as T,
11709
- PodsField as U,
11710
- JobsField as V,
11757
+ Layout as T,
11758
+ ImageField as U,
11759
+ ReplicaField as V,
11711
11760
  WorkloadImageColumnRenderer as W,
11712
- DataField as X,
11761
+ ConditionsField as X,
11713
11762
  YamlEditorComponent as Y,
11714
- SecretDataField as Z,
11715
- StartTimeField as _,
11763
+ PodsField as Z,
11764
+ JobsField as _,
11716
11765
  useDeleteModal as a,
11717
- DeleteManyButton as a0,
11718
- StateTag as a1,
11719
- DrawerShow as a2,
11720
- Menu as a3,
11721
- EditButton as a4,
11722
- NS_STORE_KEY as a5,
11723
- ALL_NS as a6,
11724
- useNamespacesFilter as a7,
11725
- NamespacesFilter as a8,
11726
- Tags as a9,
11727
- BASE_INIT_VALUE as aa,
11728
- DEPLOYMENT_INIT_VALUE as ab,
11729
- CRONJOB_INIT_VALUE as ac,
11730
- DAEMONSET_INIT_VALUE as ad,
11731
- JOB_INIT_VALUE as ae,
11732
- STATEFULSET_INIT_VALUE as af,
11733
- POD_INIT_VALUE as ag,
11734
- TIMESTAMP_LABEL as ah,
11735
- Dovetail as ai,
11736
- RESOURCE_GROUP as aj,
11766
+ SecretDataField as a0,
11767
+ StartTimeField as a1,
11768
+ ShowContent as a2,
11769
+ DeleteManyButton as a3,
11770
+ StateTag as a4,
11771
+ DrawerShow as a5,
11772
+ Menu as a6,
11773
+ EditButton as a7,
11774
+ NS_STORE_KEY as a8,
11775
+ ALL_NS as a9,
11776
+ useNamespacesFilter as aa,
11777
+ NamespacesFilter as ab,
11778
+ Tags as ac,
11779
+ BASE_INIT_VALUE as ad,
11780
+ DEPLOYMENT_INIT_VALUE as ae,
11781
+ CRONJOB_INIT_VALUE as af,
11782
+ DAEMONSET_INIT_VALUE as ag,
11783
+ JOB_INIT_VALUE as ah,
11784
+ STATEFULSET_INIT_VALUE as ai,
11785
+ POD_INIT_VALUE as aj,
11786
+ TIMESTAMP_LABEL as ak,
11787
+ JobModel as al,
11788
+ PodModel as am,
11789
+ PodMetricsModel as an,
11790
+ ResourceModel as ao,
11791
+ WorkloadModel as ap,
11792
+ CronJobModel as aq,
11793
+ Dovetail as ar,
11794
+ RESOURCE_GROUP as as,
11737
11795
  NameSpaceColumnRenderer as b,
11738
11796
  NodeNameColumnRenderer as c,
11739
11797
  RestartCountColumnRenderer as d,
@@ -11756,7 +11814,7 @@ export {
11756
11814
  useSchema as u,
11757
11815
  WorkloadDropdown as v,
11758
11816
  CreateButton as w,
11759
- ResourceCRUD as x,
11760
- WorkloadPodsTable as y,
11761
- CronJobDropdown as z
11817
+ ResourceList as x,
11818
+ ResourceShow as y,
11819
+ ResourceForm as z
11762
11820
  };
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a6, A, aa, B, ac, f, C, e, T, s, w, z, G, ad, ab, X, J, a0, ai, a2, D, a4, O, I, ae, V, H, K, L, a3, M, a5, N, k, b, o, a8, c, ag, q, P, t, U, aj, Q, R, x, E, d, af, Z, S, $, _, a1, ah, a9, v, W, y, F, Y, l, p, n, m, r, a, h, g, i, a7, u } from "./index.b720212a.js";
1
+ import { a9, A, ad, B, af, f, C, e, X, s, w, G, aq, L, ag, ae, $, Q, a3, ar, a5, D, a7, U, I, ah, al, _, O, K, T, a6, M, a8, N, k, b, o, ab, c, aj, q, P, t, an, am, Z, as, V, R, E, z, x, ao, y, H, d, ai, a0, S, a2, a1, a4, ak, ac, v, W, ap, F, J, Y, l, p, n, m, r, a, h, g, i, aa, u } from "./index.5ba25b92.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "js-yaml";
@@ -16,67 +16,76 @@ import "ky";
16
16
  import "mitt";
17
17
  import "i18next";
18
18
  export {
19
- a6 as ALL_NS,
19
+ a9 as ALL_NS,
20
20
  A as AgeColumnRenderer,
21
- aa as BASE_INIT_VALUE,
21
+ ad as BASE_INIT_VALUE,
22
22
  B as Breadcrumb,
23
- ac as CRONJOB_INIT_VALUE,
23
+ af as CRONJOB_INIT_VALUE,
24
24
  f as ColumnKeys,
25
25
  C as CommonSorter,
26
26
  e as CompletionsCountColumnRenderer,
27
- T as ConditionsField,
27
+ X as ConditionsField,
28
28
  s as ConditionsTable,
29
29
  w as CreateButton,
30
- z as CronJobDropdown,
31
- G as CronjobJobsTable,
32
- ad as DAEMONSET_INIT_VALUE,
33
- ab as DEPLOYMENT_INIT_VALUE,
34
- X as DataField,
35
- J as DeleteButton,
36
- a0 as DeleteManyButton,
37
- ai as Dovetail,
38
- a2 as DrawerShow,
30
+ G as CronJobDropdown,
31
+ aq as CronJobModel,
32
+ L as CronjobJobsTable,
33
+ ag as DAEMONSET_INIT_VALUE,
34
+ ae as DEPLOYMENT_INIT_VALUE,
35
+ $ as DataField,
36
+ Q as DeleteButton,
37
+ a3 as DeleteManyButton,
38
+ ar as Dovetail,
39
+ a5 as DrawerShow,
39
40
  D as DurationColumnRenderer,
40
- a4 as EditButton,
41
- O as ImageField,
41
+ a7 as EditButton,
42
+ U as ImageField,
42
43
  I as ImageNames,
43
- ae as JOB_INIT_VALUE,
44
- V as JobsField,
45
- H as KeyValue,
44
+ ah as JOB_INIT_VALUE,
45
+ al as JobModel,
46
+ _ as JobsField,
47
+ O as KeyValue,
46
48
  K as KeyValueListWidget,
47
- L as Layout,
48
- a3 as Menu,
49
+ T as Layout,
50
+ a6 as Menu,
49
51
  M as MetadataForm,
50
- a5 as NS_STORE_KEY,
52
+ a8 as NS_STORE_KEY,
51
53
  N as NameColumnRenderer,
52
54
  k as NameInputWidget,
53
55
  b as NameSpaceColumnRenderer,
54
56
  o as NamespaceSelectWidget,
55
- a8 as NamespacesFilter,
57
+ ab as NamespacesFilter,
56
58
  c as NodeNameColumnRenderer,
57
- ag as POD_INIT_VALUE,
59
+ aj as POD_INIT_VALUE,
58
60
  q as PageShow,
59
61
  P as PhaseColumnRenderer,
60
62
  t as PodContainersTable,
61
- U as PodsField,
62
- aj as RESOURCE_GROUP,
63
- Q as ReplicaField,
63
+ an as PodMetricsModel,
64
+ am as PodModel,
65
+ Z as PodsField,
66
+ as as RESOURCE_GROUP,
67
+ V as ReplicaField,
64
68
  R as ReplicasColumnRenderer,
65
- x as ResourceCRUD,
66
- E as ResourceUsageBar,
69
+ E as ResourceCRUD,
70
+ z as ResourceForm,
71
+ x as ResourceList,
72
+ ao as ResourceModel,
73
+ y as ResourceShow,
74
+ H as ResourceUsageBar,
67
75
  d as RestartCountColumnRenderer,
68
- af as STATEFULSET_INIT_VALUE,
69
- Z as SecretDataField,
76
+ ai as STATEFULSET_INIT_VALUE,
77
+ a0 as SecretDataField,
70
78
  S as Separator,
71
- $ as ShowContent,
72
- _ as StartTimeField,
73
- a1 as StateTag,
74
- ah as TIMESTAMP_LABEL,
75
- a9 as Tags,
79
+ a2 as ShowContent,
80
+ a1 as StartTimeField,
81
+ a4 as StateTag,
82
+ ak as TIMESTAMP_LABEL,
83
+ ac as Tags,
76
84
  v as WorkloadDropdown,
77
85
  W as WorkloadImageColumnRenderer,
78
- y as WorkloadPodsTable,
79
- F as WorkloadReplicas,
86
+ ap as WorkloadModel,
87
+ F as WorkloadPodsTable,
88
+ J as WorkloadReplicas,
80
89
  Y as YamlEditorComponent,
81
90
  l as dnsSubDomainRules,
82
91
  p as namespaceRules,
@@ -87,6 +96,6 @@ export {
87
96
  h as useDownloadYAML,
88
97
  g as useEagleTable,
89
98
  i as useEdit,
90
- a7 as useNamespacesFilter,
99
+ aa as useNamespacesFilter,
91
100
  u as useSchema
92
101
  };
@@ -8528,6 +8528,55 @@ var __publicField = (obj, key, value) => {
8528
8528
  return `${(_b = (_a = this.rawYaml.status) == null ? void 0 : _a.containerStatuses) == null ? void 0 : _b.filter((c) => c.ready).length}/${(_c = this.rawYaml.spec) == null ? void 0 : _c.containers.length}`;
8529
8529
  }
8530
8530
  }
8531
+ class PodMetricsModel extends ResourceModel {
8532
+ constructor(data2) {
8533
+ super(data2);
8534
+ __publicField(this, "usage");
8535
+ this.data = data2;
8536
+ let cpuUsageNum = 0;
8537
+ let memoryUsageNum = 0;
8538
+ for (const container2 of data2.containers) {
8539
+ cpuUsageNum += parseSi(container2.usage.cpu || "0");
8540
+ memoryUsageNum += parseSi(container2.usage.memory || "0");
8541
+ }
8542
+ this.usage = {
8543
+ cpu: {
8544
+ value: cpuUsageNum,
8545
+ si: formatSi(1e3 * cpuUsageNum, {
8546
+ suffix: "m",
8547
+ maxPrecision: 0
8548
+ })
8549
+ },
8550
+ memory: {
8551
+ value: memoryUsageNum,
8552
+ si: formatSi(memoryUsageNum, {
8553
+ suffix: "i",
8554
+ maxPrecision: 0
8555
+ })
8556
+ }
8557
+ };
8558
+ }
8559
+ }
8560
+ class CronJobModel extends WorkloadModel {
8561
+ constructor(data2) {
8562
+ super(data2);
8563
+ this.data = data2;
8564
+ }
8565
+ suspend() {
8566
+ const newOne = lodashEs.cloneDeep(this.data);
8567
+ if (this.data.kind === "CronJob") {
8568
+ lodashEs.set(newOne, "spec.suspend", true);
8569
+ }
8570
+ return newOne;
8571
+ }
8572
+ resume() {
8573
+ const newOne = lodashEs.cloneDeep(this.data);
8574
+ if (this.data.kind === "CronJob") {
8575
+ lodashEs.set(newOne, "spec.suspend", false);
8576
+ }
8577
+ return newOne;
8578
+ }
8579
+ }
8531
8580
  const ErrorContent_1t51xnx = "";
8532
8581
  const ErrorWrapper = "eckm4od";
8533
8582
  const ErrorContent = "e1hl982n";
@@ -9571,6 +9620,59 @@ var __publicField = (obj, key, value) => {
9571
9620
  }
9572
9621
  ) });
9573
9622
  }
9623
+ const index_3lw8k1 = "";
9624
+ const ListPageStyle = "laykzsq";
9625
+ const TableStyle = "t1ng0psc";
9626
+ function ListPage(props) {
9627
+ const {
9628
+ title,
9629
+ selectedKeys,
9630
+ tableProps
9631
+ } = props;
9632
+ return /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
9633
+ className: ListPageStyle,
9634
+ children: [/* @__PURE__ */ jsxRuntime.exports.jsx(TableToolBar, {
9635
+ title,
9636
+ selectedKeys
9637
+ }), /* @__PURE__ */ jsxRuntime.exports.jsx(Table, {
9638
+ ...tableProps,
9639
+ className: TableStyle,
9640
+ scroll: {
9641
+ y: "calc(100% - 48px)"
9642
+ }
9643
+ })]
9644
+ });
9645
+ }
9646
+ function ResourceList(props) {
9647
+ const { formatter, name: name2, columns, Dropdown } = props;
9648
+ const { i18n: i18n2 } = useTranslation();
9649
+ const { tableProps, selectedKeys } = useEagleTable({
9650
+ useTableParams: {},
9651
+ columns: [
9652
+ PhaseColumnRenderer(i18n2),
9653
+ NameColumnRenderer(i18n2),
9654
+ NameSpaceColumnRenderer(i18n2),
9655
+ ...columns
9656
+ ],
9657
+ tableProps: {
9658
+ currentSize: 10
9659
+ },
9660
+ formatter,
9661
+ Dropdown
9662
+ });
9663
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
9664
+ }
9665
+ function ResourceShow(props) {
9666
+ const { formatter, filedGroups, Dropdown } = props;
9667
+ return /* @__PURE__ */ jsxRuntime.exports.jsx(
9668
+ PageShow,
9669
+ {
9670
+ fieldGroups: filedGroups,
9671
+ formatter,
9672
+ Dropdown
9673
+ }
9674
+ );
9675
+ }
9574
9676
  const index_12sfrn = "";
9575
9677
  const Style = "s1bsn3us";
9576
9678
  const Separator = () => {
@@ -9945,59 +10047,6 @@ var __publicField = (obj, key, value) => {
9945
10047
  }
9946
10048
  );
9947
10049
  };
9948
- const index_3lw8k1 = "";
9949
- const ListPageStyle = "laykzsq";
9950
- const TableStyle = "t1ng0psc";
9951
- function ListPage(props) {
9952
- const {
9953
- title,
9954
- selectedKeys,
9955
- tableProps
9956
- } = props;
9957
- return /* @__PURE__ */ jsxRuntime.exports.jsxs("div", {
9958
- className: ListPageStyle,
9959
- children: [/* @__PURE__ */ jsxRuntime.exports.jsx(TableToolBar, {
9960
- title,
9961
- selectedKeys
9962
- }), /* @__PURE__ */ jsxRuntime.exports.jsx(Table, {
9963
- ...tableProps,
9964
- className: TableStyle,
9965
- scroll: {
9966
- y: "calc(100% - 48px)"
9967
- }
9968
- })]
9969
- });
9970
- }
9971
- function ResourceList(props) {
9972
- const { formatter, name: name2, columns, Dropdown } = props;
9973
- const { i18n: i18n2 } = useTranslation();
9974
- const { tableProps, selectedKeys } = useEagleTable({
9975
- useTableParams: {},
9976
- columns: [
9977
- PhaseColumnRenderer(i18n2),
9978
- NameColumnRenderer(i18n2),
9979
- NameSpaceColumnRenderer(i18n2),
9980
- ...columns
9981
- ],
9982
- tableProps: {
9983
- currentSize: 10
9984
- },
9985
- formatter,
9986
- Dropdown
9987
- });
9988
- return /* @__PURE__ */ jsxRuntime.exports.jsx(ListPage, { title: name2 || "", selectedKeys, tableProps });
9989
- }
9990
- function ResourceShow(props) {
9991
- const { formatter, filedGroups, Dropdown } = props;
9992
- return /* @__PURE__ */ jsxRuntime.exports.jsx(
9993
- PageShow,
9994
- {
9995
- fieldGroups: filedGroups,
9996
- formatter,
9997
- Dropdown
9998
- }
9999
- );
10000
- }
10001
10050
  const ResourceCRUD = (props) => {
10002
10051
  const { configs, urlPrefix } = props;
10003
10052
  const { i18n: i18n2 } = useTranslation();
@@ -11750,6 +11799,7 @@ var __publicField = (obj, key, value) => {
11750
11799
  exports2.ConditionsTable = ConditionsTable;
11751
11800
  exports2.CreateButton = CreateButton;
11752
11801
  exports2.CronJobDropdown = CronJobDropdown;
11802
+ exports2.CronJobModel = CronJobModel;
11753
11803
  exports2.CronjobJobsTable = CronjobJobsTable;
11754
11804
  exports2.DAEMONSET_INIT_VALUE = DAEMONSET_INIT_VALUE;
11755
11805
  exports2.DEPLOYMENT_INIT_VALUE = DEPLOYMENT_INIT_VALUE;
@@ -11763,6 +11813,7 @@ var __publicField = (obj, key, value) => {
11763
11813
  exports2.ImageField = ImageField;
11764
11814
  exports2.ImageNames = ImageNames;
11765
11815
  exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
11816
+ exports2.JobModel = JobModel;
11766
11817
  exports2.JobsField = JobsField;
11767
11818
  exports2.KeyValue = KeyValue;
11768
11819
  exports2.KeyValueListWidget = KeyValueListWidget;
@@ -11780,11 +11831,17 @@ var __publicField = (obj, key, value) => {
11780
11831
  exports2.PageShow = PageShow;
11781
11832
  exports2.PhaseColumnRenderer = PhaseColumnRenderer;
11782
11833
  exports2.PodContainersTable = PodContainersTable;
11834
+ exports2.PodMetricsModel = PodMetricsModel;
11835
+ exports2.PodModel = PodModel;
11783
11836
  exports2.PodsField = PodsField;
11784
11837
  exports2.RESOURCE_GROUP = RESOURCE_GROUP;
11785
11838
  exports2.ReplicaField = ReplicaField;
11786
11839
  exports2.ReplicasColumnRenderer = ReplicasColumnRenderer;
11787
11840
  exports2.ResourceCRUD = ResourceCRUD;
11841
+ exports2.ResourceForm = ResourceForm;
11842
+ exports2.ResourceList = ResourceList;
11843
+ exports2.ResourceModel = ResourceModel;
11844
+ exports2.ResourceShow = ResourceShow;
11788
11845
  exports2.ResourceUsageBar = ResourceUsageBar;
11789
11846
  exports2.RestartCountColumnRenderer = RestartCountColumnRenderer;
11790
11847
  exports2.STATEFULSET_INIT_VALUE = STATEFULSET_INIT_VALUE;
@@ -11797,6 +11854,7 @@ var __publicField = (obj, key, value) => {
11797
11854
  exports2.Tags = Tags;
11798
11855
  exports2.WorkloadDropdown = WorkloadDropdown;
11799
11856
  exports2.WorkloadImageColumnRenderer = WorkloadImageColumnRenderer;
11857
+ exports2.WorkloadModel = WorkloadModel;
11800
11858
  exports2.WorkloadPodsTable = WorkloadPodsTable;
11801
11859
  exports2.WorkloadReplicas = WorkloadReplicas;
11802
11860
  exports2.YamlEditorComponent = YamlEditorComponent;
package/dist/style.css CHANGED
@@ -27,10 +27,10 @@
27
27
  .e1ohe42f{margin-top:16px;}
28
28
  .w1akirqw{height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
29
29
  .t30srnq{line-height:32px !important;}
30
- .s1bsn3us{width:1px;height:16px;border-radius:1px;background:rgba(172,186,211,0.6);}
31
- .e5ks0bl{-webkit-flex:1;-ms-flex:1;flex:1;height:100%;}
32
30
  .laykzsq{width:100%;height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
33
31
  .t1ng0psc.table-wrapper{height:auto;-webkit-flex-shrink:1;-ms-flex-negative:1;flex-shrink:1;min-height:0;}
32
+ .s1bsn3us{width:1px;height:16px;border-radius:1px;background:rgba(172,186,211,0.6);}
33
+ .e5ks0bl{-webkit-flex:1;-ms-flex:1;flex:1;height:100%;}
34
34
  .wfg6u6g{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}.wfg6u6g .usage-text{width:50px;text-align:right;}.wfg6u6g .usage-bar{height:12px;width:100px;position:relative;border-radius:2px;}.wfg6u6g .request-anchor{position:absolute;left:10%;top:-3px;height:18px;width:2px;background:#777;z-index:9;}.wfg6u6g .usage-fill-bar{position:absolute;left:0;top:0;height:100%;background:rgba(0,128,255,0.6);z-index:7;}.wfg6u6g .request-bar{position:absolute;left:0;top:0;height:100%;background:#d8deeb;z-index:5;}.wfg6u6g .request-to-limit-bar{position:absolute;right:0;top:0;height:100%;background:#d8deeb;z-index:5;}.wfg6u6g .request-to-limit-bar.no-limit{background:linear-gradient(to right,#d8deeb 50%,#d8deeb 50%);background-size:4px 100%;}.wfg6u6g .request-to-limit-bar.no-limit.exceed-request{background:linear-gradient(to right,#d8deeb 50%,rgba(0,128,255,0.6) 50%);background-size:4px 100%;}
35
35
  .mdppgn0.ant-menu{background:#edf0f7;padding:8px;}.mdppgn0.ant-menu .ant-menu-item-selected{background:linear-gradient(90deg,#0080ff,#005ed1);border-radius:6px;box-shadow:0 1px 2px rgba(184,192,204,0.6);color:#fff;}.mdppgn0.ant-menu .ant-menu-item-selected a:hover{color:#fff;}.mdppgn0.ant-menu .ant-menu-item:not(.ant-menu-item-selected):hover{background:linear-gradient(90deg,#fff,hsla(0,0%,100%,0.6));border-radius:6px;box-shadow:0 0 4px rgba(235,239,245,0.6),0 8px 16px rgba(129,138,153,0.18);}
36
36
  .h16z07g.ant-layout-header{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:#fff;border-bottom:2px solid #edf0f7;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;height:50px;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:0 24px 0 14px;position:relative;z-index:10;}
@@ -1 +1,4 @@
1
+ export * from './list';
2
+ export * from './show';
3
+ export * from './create';
1
4
  export * from './ResourceCRUD';
@@ -3,5 +3,6 @@ export * from './hooks';
3
3
  export * from './components';
4
4
  export * from './constants';
5
5
  export * from './hooks';
6
+ export * from './model';
6
7
  export * from './Dovetail';
7
8
  export * from './types';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",