@dovetail-v2/refine 0.0.63-alpha.0 → 0.0.63-alpha.2
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/{MonacoYamlDiffEditor-b319f3df.js → MonacoYamlDiffEditor-614d92de.js} +1 -1
- package/dist/{index-11d0685a.js → index-4a634772.js} +21 -5
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +20 -4
- package/dist/style.css +3 -3
- package/lib/src/components/ShowContent/fields.d.ts +3 -0
- package/lib/src/models/node-model.d.ts +3 -0
- package/package.json +1 -1
|
@@ -10072,6 +10072,20 @@ class NodeModel extends WorkloadBaseModel {
|
|
|
10072
10072
|
get role() {
|
|
10073
10073
|
return "node-role.kubernetes.io/control-plane" in (this.metadata.labels || {}) ? "Control Plane" : "Worker";
|
|
10074
10074
|
}
|
|
10075
|
+
get ip() {
|
|
10076
|
+
var _a, _b;
|
|
10077
|
+
return (_b = (_a = this._rawYaml.status.addresses) == null ? void 0 : _a.find((add) => add.type === "InternalIP")) == null ? void 0 : _b.address;
|
|
10078
|
+
}
|
|
10079
|
+
get nodeGroupName() {
|
|
10080
|
+
var _a;
|
|
10081
|
+
return (_a = this.metadata.labels) == null ? void 0 : _a["cape.infrastructure.cluster.x-k8s.io/node-group"];
|
|
10082
|
+
}
|
|
10083
|
+
get isControlPlane() {
|
|
10084
|
+
var _a;
|
|
10085
|
+
if (!((_a = this == null ? void 0 : this.metadata) == null ? void 0 : _a.labels))
|
|
10086
|
+
return false;
|
|
10087
|
+
return "node-role.kubernetes.io/control-plane" in this.metadata.labels;
|
|
10088
|
+
}
|
|
10075
10089
|
}
|
|
10076
10090
|
class StorageClassModel extends ResourceModel {
|
|
10077
10091
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -11238,7 +11252,7 @@ function Tabs(props) {
|
|
|
11238
11252
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11239
11253
|
}) });
|
|
11240
11254
|
}
|
|
11241
|
-
const
|
|
11255
|
+
const ShowContent_1u0cbxv = "";
|
|
11242
11256
|
const ShowContentWrapperStyle = "s9agep2";
|
|
11243
11257
|
const BackButton = "bo89gfi";
|
|
11244
11258
|
const ToolBarWrapper = "t1ohe42f";
|
|
@@ -11270,7 +11284,7 @@ function ShowGroupComponent(props) {
|
|
|
11270
11284
|
});
|
|
11271
11285
|
}
|
|
11272
11286
|
const ShowContent = (props) => {
|
|
11273
|
-
var _a, _b, _c;
|
|
11287
|
+
var _a, _b, _c, _d;
|
|
11274
11288
|
const {
|
|
11275
11289
|
showConfig,
|
|
11276
11290
|
formatter,
|
|
@@ -11310,6 +11324,8 @@ const ShowContent = (props) => {
|
|
|
11310
11324
|
if (!record)
|
|
11311
11325
|
return null;
|
|
11312
11326
|
return fields.map((field) => {
|
|
11327
|
+
if (field.hidden)
|
|
11328
|
+
return null;
|
|
11313
11329
|
let content;
|
|
11314
11330
|
const value2 = get$3(record, field.path);
|
|
11315
11331
|
if (field.renderContent) {
|
|
@@ -11385,7 +11401,7 @@ const ShowContent = (props) => {
|
|
|
11385
11401
|
state: stateDisplay
|
|
11386
11402
|
}) : void 0]
|
|
11387
11403
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11388
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
11404
|
+
children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(CanAccess, {
|
|
11389
11405
|
resource: resource == null ? void 0 : resource.name,
|
|
11390
11406
|
action: AccessControlAuth.Edit,
|
|
11391
11407
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
@@ -11396,7 +11412,7 @@ const ShowContent = (props) => {
|
|
|
11396
11412
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(EditPen16GradientBlueIcon, {}),
|
|
11397
11413
|
children: t2("dovetail.edit_yaml")
|
|
11398
11414
|
})
|
|
11399
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
|
|
11415
|
+
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
|
|
11400
11416
|
record,
|
|
11401
11417
|
size: "large"
|
|
11402
11418
|
})]
|
|
@@ -23080,7 +23096,7 @@ const Separator = () => {
|
|
|
23080
23096
|
});
|
|
23081
23097
|
};
|
|
23082
23098
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
23083
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
23099
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-614d92de.js"));
|
|
23084
23100
|
const YamlEditorComponent = forwardRef(
|
|
23085
23101
|
function YamlEditorComponent2(props, ref) {
|
|
23086
23102
|
const {
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bk, b$, A, aJ, aL, at, bB, aW, V, bP, bD, aD, H, C, h, c3, aw, a_, a5, c5, a9, ag, ce, al, bE, bC, ch, az, b4, v, ar, ba, cg, c0, be, D, aQ, bg, cf, aU, aH, bn, c2, F, c4, bN, au, aa, q, p, c6, I, b1, aG, s, bF, c8, ay, b0, ah, am, an, a1, ao, aK, as, bb, bf, a2, M, bO, bY, bj, N, X, c, aI, $, bm, b6, b5, c7, by, cm, f, cl, bH, G, y, E, B, z, a3, cp, co, P, aY, t, a6, bx, aV, cc, cb, aO, b2, o, ax, aX, w, b3, aP, cq, x, c1, bh, bo, bp, av, R, a8, ae, ad, bi, ab, cd, bA, ac, ai, g, bU, bX, bT, bS, bV, bW, bQ, bI, bL, bM, bK, bJ, bG, bZ, bq, aA, a$, ap, l, bt, k, aM, ck, n, bu, aN, m, aF, aZ, i, cj, aC, aE, b9, b8, aB, S, bd, bc, ci, aS, cn, aR, aT, b7, bR, bz, bv, bw, a4, U, ca, a7, W, c9, af, ak, aj, e, b_, aq, br, J, Y, d, a0, _, Z, r, b, L, K, O, Q, u, bl, T, bs, a } from "./index-
|
|
1
|
+
import { bk, b$, A, aJ, aL, at, bB, aW, V, bP, bD, aD, H, C, h, c3, aw, a_, a5, c5, a9, ag, ce, al, bE, bC, ch, az, b4, v, ar, ba, cg, c0, be, D, aQ, bg, cf, aU, aH, bn, c2, F, c4, bN, au, aa, q, p, c6, I, b1, aG, s, bF, c8, ay, b0, ah, am, an, a1, ao, aK, as, bb, bf, a2, M, bO, bY, bj, N, X, c, aI, $, bm, b6, b5, c7, by, cm, f, cl, bH, G, y, E, B, z, a3, cp, co, P, aY, t, a6, bx, aV, cc, cb, aO, b2, o, ax, aX, w, b3, aP, cq, x, c1, bh, bo, bp, av, R, a8, ae, ad, bi, ab, cd, bA, ac, ai, g, bU, bX, bT, bS, bV, bW, bQ, bI, bL, bM, bK, bJ, bG, bZ, bq, aA, a$, ap, l, bt, k, aM, ck, n, bu, aN, m, aF, aZ, i, cj, aC, aE, b9, b8, aB, S, bd, bc, ci, aS, cn, aR, aT, b7, bR, bz, bv, bw, a4, U, ca, a7, W, c9, af, ak, aj, e, b_, aq, br, J, Y, d, a0, _, Z, r, b, L, K, O, Q, u, bl, T, bs, a } from "./index-4a634772.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -10078,6 +10078,20 @@ var __publicField = (obj, key, value) => {
|
|
|
10078
10078
|
get role() {
|
|
10079
10079
|
return "node-role.kubernetes.io/control-plane" in (this.metadata.labels || {}) ? "Control Plane" : "Worker";
|
|
10080
10080
|
}
|
|
10081
|
+
get ip() {
|
|
10082
|
+
var _a, _b;
|
|
10083
|
+
return (_b = (_a = this._rawYaml.status.addresses) == null ? void 0 : _a.find((add) => add.type === "InternalIP")) == null ? void 0 : _b.address;
|
|
10084
|
+
}
|
|
10085
|
+
get nodeGroupName() {
|
|
10086
|
+
var _a;
|
|
10087
|
+
return (_a = this.metadata.labels) == null ? void 0 : _a["cape.infrastructure.cluster.x-k8s.io/node-group"];
|
|
10088
|
+
}
|
|
10089
|
+
get isControlPlane() {
|
|
10090
|
+
var _a;
|
|
10091
|
+
if (!((_a = this == null ? void 0 : this.metadata) == null ? void 0 : _a.labels))
|
|
10092
|
+
return false;
|
|
10093
|
+
return "node-role.kubernetes.io/control-plane" in this.metadata.labels;
|
|
10094
|
+
}
|
|
10081
10095
|
}
|
|
10082
10096
|
class StorageClassModel extends ResourceModel {
|
|
10083
10097
|
constructor(_rawYaml, _globalStore) {
|
|
@@ -11244,7 +11258,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11244
11258
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(kit.tabsTabPane, { tab: tab.title, children: tab.children }, tab.title);
|
|
11245
11259
|
}) });
|
|
11246
11260
|
}
|
|
11247
|
-
const
|
|
11261
|
+
const ShowContent_1u0cbxv = "";
|
|
11248
11262
|
const ShowContentWrapperStyle = "s9agep2";
|
|
11249
11263
|
const BackButton = "bo89gfi";
|
|
11250
11264
|
const ToolBarWrapper = "t1ohe42f";
|
|
@@ -11276,7 +11290,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11276
11290
|
});
|
|
11277
11291
|
}
|
|
11278
11292
|
const ShowContent = (props) => {
|
|
11279
|
-
var _a, _b, _c;
|
|
11293
|
+
var _a, _b, _c, _d;
|
|
11280
11294
|
const {
|
|
11281
11295
|
showConfig,
|
|
11282
11296
|
formatter,
|
|
@@ -11316,6 +11330,8 @@ var __publicField = (obj, key, value) => {
|
|
|
11316
11330
|
if (!record)
|
|
11317
11331
|
return null;
|
|
11318
11332
|
return fields.map((field) => {
|
|
11333
|
+
if (field.hidden)
|
|
11334
|
+
return null;
|
|
11319
11335
|
let content;
|
|
11320
11336
|
const value2 = lodashEs.get(record, field.path);
|
|
11321
11337
|
if (field.renderContent) {
|
|
@@ -11391,7 +11407,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11391
11407
|
state: stateDisplay
|
|
11392
11408
|
}) : void 0]
|
|
11393
11409
|
}), /* @__PURE__ */ jsxRuntimeExports.jsxs(kit.space, {
|
|
11394
|
-
children: [/* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11410
|
+
children: [(_d = showConfig.renderExtraButton) == null ? void 0 : _d.call(showConfig, record), !showConfig.hideEditYamlButton ? /* @__PURE__ */ jsxRuntimeExports.jsx(core.CanAccess, {
|
|
11395
11411
|
resource: resource == null ? void 0 : resource.name,
|
|
11396
11412
|
action: AccessControlAuth.Edit,
|
|
11397
11413
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(kit.button, {
|
|
@@ -11402,7 +11418,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11402
11418
|
prefixIcon: /* @__PURE__ */ jsxRuntimeExports.jsx(iconsReact.EditPen16GradientBlueIcon, {}),
|
|
11403
11419
|
children: t2("dovetail.edit_yaml")
|
|
11404
11420
|
})
|
|
11405
|
-
}), /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
|
|
11421
|
+
}) : null, /* @__PURE__ */ jsxRuntimeExports.jsx(Dropdown, {
|
|
11406
11422
|
record,
|
|
11407
11423
|
size: "large"
|
|
11408
11424
|
})]
|
package/dist/style.css
CHANGED
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
.h11urhaw{margin-right:8px;line-height:18px;}
|
|
31
31
|
.e1i58tpl.ant-btn.ant-btn-link{height:18px;line-height:18px;font-size:12px;}
|
|
32
32
|
.s9agep2{height:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;background:linear-gradient(180deg,#fff 0%,#edf0f7 100%);}.s9agep2 .ant-row{margin-right:0 !important;}
|
|
33
|
-
.bo89gfi{color:rgba(0,21,64,0.3);line-height:18px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}.bo89gfi:hover{color:#
|
|
33
|
+
.bo89gfi{color:rgba(0,21,64,0.3);line-height:18px;cursor:pointer;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;}.bo89gfi:hover{color:#0080ff;}
|
|
34
34
|
.t1ohe42f{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:16px 24px 8px 24px;background-color:#fff;}
|
|
35
|
-
.nqm4qz0{color:#
|
|
35
|
+
.nqm4qz0{color:#00122e;margin-right:8px;}
|
|
36
36
|
.ticl0qc{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;}
|
|
37
37
|
.so9uwk1{width:100%;}
|
|
38
38
|
.ge26ou0{padding:12px 16px;padding-bottom:4px;border-radius:8px;border:1px solid rgba(211,218,235,0.6);box-shadow: 0px 0px 2.003px 0px rgba(107,125,153,0.15), 0px 0px 16px 0px rgba(107,125,153,0.08);background-color:#fff;margin:0 24px;overflow:auto;width:calc(100% - 48px);max-width:1592px;}.ge26ou0:first-of-type{margin-top:16px;}.ge26ou0:not(:last-of-type){margin-bottom:24px;}.ge26ou0 .pagination-wrapper{padding-top:12px;padding-bottom:0;}
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
.fykgn2i{background-color:#fff;height:100%;}
|
|
41
41
|
.fngr745{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}
|
|
42
42
|
.t11wg61l{padding-bottom:16px;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;min-width:904px;}
|
|
43
|
-
.v1x3rivf{color:#
|
|
43
|
+
.v1x3rivf{color:#00122e;}
|
|
44
44
|
.tf5s6s.ant-tabs{-webkit-flex:1;-ms-flex:1;flex:1;min-height:0;}.tf5s6s.ant-tabs .ant-tabs-nav{margin-bottom:0;margin-right:24px;}.tf5s6s.ant-tabs .ant-tabs-nav-list{margin-left:24px;}.tf5s6s.ant-tabs .ant-tabs-content-holder{overflow:auto;}.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-content,.tf5s6s.ant-tabs .ant-tabs-content-holder .ant-tabs-tabpane-active{height:100%;}
|
|
45
45
|
.b11tbgf7.ant-btn-quiet.ant-btn{color:rgba(44,56,82,0.75);}
|
|
46
46
|
.gtbyh5g{padding-bottom:12px;}
|
|
@@ -9,6 +9,7 @@ export type ShowField<Model extends ResourceModel> = {
|
|
|
9
9
|
path: string[];
|
|
10
10
|
labelWidth?: string;
|
|
11
11
|
col?: number;
|
|
12
|
+
hidden?: boolean;
|
|
12
13
|
render?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
|
|
13
14
|
renderContent?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
|
|
14
15
|
};
|
|
@@ -31,6 +32,8 @@ export type ShowTab<Model extends ResourceModel> = {
|
|
|
31
32
|
};
|
|
32
33
|
export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
|
|
33
34
|
tabs?: ShowTab<Model>[];
|
|
35
|
+
renderExtraButton?: (record: Model) => React.ReactNode;
|
|
36
|
+
hideEditYamlButton?: boolean;
|
|
34
37
|
}
|
|
35
38
|
export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
|
|
36
39
|
export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
|
|
@@ -11,5 +11,8 @@ export declare class NodeModel extends WorkloadBaseModel {
|
|
|
11
11
|
_globalStore: GlobalStore;
|
|
12
12
|
constructor(_rawYaml: RequiredNode, _globalStore: GlobalStore);
|
|
13
13
|
get role(): NodeRole;
|
|
14
|
+
get ip(): string | undefined;
|
|
15
|
+
get nodeGroupName(): string | undefined;
|
|
16
|
+
get isControlPlane(): boolean;
|
|
14
17
|
}
|
|
15
18
|
export {};
|