@dovetail-v2/refine 0.0.14-beta.1 → 0.0.14-beta.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.e0df5a1b.js → MonacoYamlDiffEditor.e41c15eb.js} +1 -1
- package/dist/{index.e31fb37e.js → index.453e0071.js} +21 -10
- package/dist/refine.js +2 -1
- package/dist/refine.umd.cjs +20 -9
- package/lib/src/hooks/useEagleTable/columns.d.ts +3 -3
- package/lib/src/models/event-model.d.ts +8 -0
- package/lib/src/models/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -7398,7 +7398,7 @@ const WorkloadReplicas = ({
|
|
|
7398
7398
|
const currentReplicas = get(record, "spec.replicas", 0);
|
|
7399
7399
|
const scale = (delta) => {
|
|
7400
7400
|
const v = record.scale(currentReplicas + delta);
|
|
7401
|
-
const id =
|
|
7401
|
+
const id = record.id;
|
|
7402
7402
|
pruneBeforeEdit(v);
|
|
7403
7403
|
mutate({
|
|
7404
7404
|
id,
|
|
@@ -9200,13 +9200,12 @@ const EventsTable = ({}) => {
|
|
|
9200
9200
|
],
|
|
9201
9201
|
[i18n2]
|
|
9202
9202
|
);
|
|
9203
|
-
const dataSource = useMemo(
|
|
9204
|
-
|
|
9203
|
+
const dataSource = useMemo(() => {
|
|
9204
|
+
return data2 == null ? void 0 : data2.data.filter((d) => {
|
|
9205
9205
|
const objectId = `${d.regarding.namespace}/${d.regarding.name}`;
|
|
9206
9206
|
return objectId === parsed.id;
|
|
9207
|
-
})
|
|
9208
|
-
|
|
9209
|
-
);
|
|
9207
|
+
});
|
|
9208
|
+
}, [data2 == null ? void 0 : data2.data, parsed]);
|
|
9210
9209
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
9211
9210
|
Table,
|
|
9212
9211
|
{
|
|
@@ -9672,7 +9671,7 @@ const Separator = () => {
|
|
|
9672
9671
|
});
|
|
9673
9672
|
};
|
|
9674
9673
|
const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
9675
|
-
const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.
|
|
9674
|
+
const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.e41c15eb.js"));
|
|
9676
9675
|
const YamlEditorComponent = forwardRef(
|
|
9677
9676
|
function YamlEditorComponent2(props, ref) {
|
|
9678
9677
|
const {
|
|
@@ -16349,7 +16348,8 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
16349
16348
|
this.restarts = result;
|
|
16350
16349
|
}
|
|
16351
16350
|
redeploy() {
|
|
16352
|
-
const
|
|
16351
|
+
const rawYaml = this._globalStore.restoreItem(this);
|
|
16352
|
+
const newOne = lodash.exports.cloneDeep(rawYaml);
|
|
16353
16353
|
const path = "spec.template.metadata.annotations";
|
|
16354
16354
|
const annotations = lodash.exports.get(newOne, path, {});
|
|
16355
16355
|
lodash.exports.set(newOne, path, {
|
|
@@ -16359,7 +16359,8 @@ class WorkloadModel extends WorkloadBaseModel {
|
|
|
16359
16359
|
return newOne;
|
|
16360
16360
|
}
|
|
16361
16361
|
scale(value) {
|
|
16362
|
-
const
|
|
16362
|
+
const rawYaml = this._globalStore.restoreItem(this);
|
|
16363
|
+
const newOne = lodash.exports.cloneDeep(rawYaml);
|
|
16363
16364
|
if (newOne.kind === "Deployment" || newOne.kind === "StatefulSet") {
|
|
16364
16365
|
lodash.exports.set(newOne, "spec.replicas", value);
|
|
16365
16366
|
}
|
|
@@ -16490,13 +16491,22 @@ class CronJobModel extends WorkloadBaseModel {
|
|
|
16490
16491
|
return newOne;
|
|
16491
16492
|
}
|
|
16492
16493
|
}
|
|
16494
|
+
class EventModel extends ResourceModel {
|
|
16495
|
+
constructor(_rawYaml, _globalStore) {
|
|
16496
|
+
super(_rawYaml, _globalStore);
|
|
16497
|
+
this._rawYaml = _rawYaml;
|
|
16498
|
+
this._globalStore = _globalStore;
|
|
16499
|
+
this.id = _rawYaml.metadata.uid || _rawYaml.id;
|
|
16500
|
+
}
|
|
16501
|
+
}
|
|
16493
16502
|
const ModelMap = {
|
|
16494
16503
|
Deployment: WorkloadModel,
|
|
16495
16504
|
DaemonSet: WorkloadModel,
|
|
16496
16505
|
StatefulSet: WorkloadModel,
|
|
16497
16506
|
CronJob: CronJobModel,
|
|
16498
16507
|
Job: JobModel,
|
|
16499
|
-
Pod: PodModel
|
|
16508
|
+
Pod: PodModel,
|
|
16509
|
+
Event: EventModel
|
|
16500
16510
|
};
|
|
16501
16511
|
class ModelPlugin {
|
|
16502
16512
|
constructor() {
|
|
@@ -16724,6 +16734,7 @@ export {
|
|
|
16724
16734
|
PodMetricsModel as aD,
|
|
16725
16735
|
ResourceModel as aE,
|
|
16726
16736
|
CronJobModel as aF,
|
|
16737
|
+
EventModel as aG,
|
|
16727
16738
|
SchemaStrategy as aa,
|
|
16728
16739
|
DeleteManyButton as ab,
|
|
16729
16740
|
ListPage as ac,
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ai, A, an, B, ap, a6, g, C, f, ay, $, v, y, J, aF, Q, aq, ao, a2, V, ab, aw, ae, D, ag, Z, I, ar, az, a1, T, K, X, ac, af, M, ah, N, m, b, q, ak, d, at, t, P, w, am, aD, aC, a0, ax, _, R, G, F, z, aE, E, L, e, au, as, aa, a3, U, a8, S, a5, a7, a9, a4, ad, av, al, aB, x, W, aA, H, O, c, Y, n, s, p, o, r, a, i, h, k, l, aj, u } from "./index.
|
|
1
|
+
import { ai, A, an, B, ap, a6, g, C, f, ay, $, v, y, J, aF, Q, aq, ao, a2, V, ab, aw, ae, D, ag, aG, Z, I, ar, az, a1, T, K, X, ac, af, M, ah, N, m, b, q, ak, d, at, t, P, w, am, aD, aC, a0, ax, _, R, G, F, z, aE, E, L, e, au, as, aa, a3, U, a8, S, a5, a7, a9, a4, ad, av, al, aB, x, W, aA, H, O, c, Y, n, s, p, o, r, a, i, h, k, l, aj, u } from "./index.453e0071.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "js-yaml";
|
|
@@ -40,6 +40,7 @@ export {
|
|
|
40
40
|
ae as DrawerShow,
|
|
41
41
|
D as DurationColumnRenderer,
|
|
42
42
|
ag as EditButton,
|
|
43
|
+
aG as EventModel,
|
|
43
44
|
Z as ImageField,
|
|
44
45
|
I as ImageNames,
|
|
45
46
|
ar as JOB_INIT_VALUE,
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -7411,7 +7411,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7411
7411
|
const currentReplicas = lodashEs.get(record, "spec.replicas", 0);
|
|
7412
7412
|
const scale = (delta) => {
|
|
7413
7413
|
const v = record.scale(currentReplicas + delta);
|
|
7414
|
-
const id =
|
|
7414
|
+
const id = record.id;
|
|
7415
7415
|
pruneBeforeEdit(v);
|
|
7416
7416
|
mutate({
|
|
7417
7417
|
id,
|
|
@@ -9213,13 +9213,12 @@ var __publicField = (obj, key, value) => {
|
|
|
9213
9213
|
],
|
|
9214
9214
|
[i18n2]
|
|
9215
9215
|
);
|
|
9216
|
-
const dataSource = React.useMemo(
|
|
9217
|
-
|
|
9216
|
+
const dataSource = React.useMemo(() => {
|
|
9217
|
+
return data2 == null ? void 0 : data2.data.filter((d) => {
|
|
9218
9218
|
const objectId = `${d.regarding.namespace}/${d.regarding.name}`;
|
|
9219
9219
|
return objectId === parsed.id;
|
|
9220
|
-
})
|
|
9221
|
-
|
|
9222
|
-
);
|
|
9220
|
+
});
|
|
9221
|
+
}, [data2 == null ? void 0 : data2.data, parsed]);
|
|
9223
9222
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
9224
9223
|
Table,
|
|
9225
9224
|
{
|
|
@@ -16362,7 +16361,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16362
16361
|
this.restarts = result;
|
|
16363
16362
|
}
|
|
16364
16363
|
redeploy() {
|
|
16365
|
-
const
|
|
16364
|
+
const rawYaml = this._globalStore.restoreItem(this);
|
|
16365
|
+
const newOne = lodash.exports.cloneDeep(rawYaml);
|
|
16366
16366
|
const path = "spec.template.metadata.annotations";
|
|
16367
16367
|
const annotations = lodash.exports.get(newOne, path, {});
|
|
16368
16368
|
lodash.exports.set(newOne, path, {
|
|
@@ -16372,7 +16372,8 @@ var __publicField = (obj, key, value) => {
|
|
|
16372
16372
|
return newOne;
|
|
16373
16373
|
}
|
|
16374
16374
|
scale(value) {
|
|
16375
|
-
const
|
|
16375
|
+
const rawYaml = this._globalStore.restoreItem(this);
|
|
16376
|
+
const newOne = lodash.exports.cloneDeep(rawYaml);
|
|
16376
16377
|
if (newOne.kind === "Deployment" || newOne.kind === "StatefulSet") {
|
|
16377
16378
|
lodash.exports.set(newOne, "spec.replicas", value);
|
|
16378
16379
|
}
|
|
@@ -16503,13 +16504,22 @@ var __publicField = (obj, key, value) => {
|
|
|
16503
16504
|
return newOne;
|
|
16504
16505
|
}
|
|
16505
16506
|
}
|
|
16507
|
+
class EventModel extends ResourceModel {
|
|
16508
|
+
constructor(_rawYaml, _globalStore) {
|
|
16509
|
+
super(_rawYaml, _globalStore);
|
|
16510
|
+
this._rawYaml = _rawYaml;
|
|
16511
|
+
this._globalStore = _globalStore;
|
|
16512
|
+
this.id = _rawYaml.metadata.uid || _rawYaml.id;
|
|
16513
|
+
}
|
|
16514
|
+
}
|
|
16506
16515
|
const ModelMap = {
|
|
16507
16516
|
Deployment: WorkloadModel,
|
|
16508
16517
|
DaemonSet: WorkloadModel,
|
|
16509
16518
|
StatefulSet: WorkloadModel,
|
|
16510
16519
|
CronJob: CronJobModel,
|
|
16511
16520
|
Job: JobModel,
|
|
16512
|
-
Pod: PodModel
|
|
16521
|
+
Pod: PodModel,
|
|
16522
|
+
Event: EventModel
|
|
16513
16523
|
};
|
|
16514
16524
|
class ModelPlugin {
|
|
16515
16525
|
constructor() {
|
|
@@ -16756,6 +16766,7 @@ var __publicField = (obj, key, value) => {
|
|
|
16756
16766
|
exports2.DrawerShow = DrawerShow;
|
|
16757
16767
|
exports2.DurationColumnRenderer = DurationColumnRenderer;
|
|
16758
16768
|
exports2.EditButton = EditButton;
|
|
16769
|
+
exports2.EventModel = EventModel;
|
|
16759
16770
|
exports2.ImageField = ImageField;
|
|
16760
16771
|
exports2.ImageNames = ImageNames;
|
|
16761
16772
|
exports2.JOB_INIT_VALUE = JOB_INIT_VALUE;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Column } from '../../components/Table';
|
|
2
|
-
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel } from '../../models';
|
|
2
|
+
import { JobModel, PodModel, ResourceModel, WorkloadModel, WorkloadBaseModel, CronJobModel } from '../../models';
|
|
3
3
|
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
4
4
|
export declare const NameColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(resource?: string) => Column<Model>;
|
|
5
5
|
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
@@ -10,6 +10,6 @@ export declare const ReplicasColumnRenderer: <Model extends WorkloadModel>() =>
|
|
|
10
10
|
export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
11
11
|
export declare const NodeNameColumnRenderer: <Model extends PodModel>(options?: Partial<Column<Model>> | undefined) => Column<Model>;
|
|
12
12
|
export declare const RestartCountColumnRenderer: <Model extends PodModel>() => Column<Model>;
|
|
13
|
-
export declare const CompletionsCountColumnRenderer: <Model extends JobModel>() => Column<Model>;
|
|
14
|
-
export declare const DurationColumnRenderer: <Model extends JobModel>() => Column<Model>;
|
|
13
|
+
export declare const CompletionsCountColumnRenderer: <Model extends JobModel | CronJobModel>() => Column<Model>;
|
|
14
|
+
export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>() => Column<Model>;
|
|
15
15
|
export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>() => Column<Model>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { GlobalStore, Unstructured } from 'k8s-api-provider';
|
|
2
|
+
import { Event } from 'kubernetes-types/core/v1';
|
|
3
|
+
import { ResourceModel } from './resource-model';
|
|
4
|
+
export declare class EventModel extends ResourceModel {
|
|
5
|
+
_rawYaml: Unstructured & Event;
|
|
6
|
+
_globalStore: GlobalStore;
|
|
7
|
+
constructor(_rawYaml: Unstructured & Event, _globalStore: GlobalStore);
|
|
8
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.0.14-beta.
|
|
3
|
+
"version": "0.0.14-beta.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dayjs": "^1.11.10",
|
|
21
21
|
"i18next": "^23.2.3",
|
|
22
22
|
"js-yaml": "^4.1.0",
|
|
23
|
-
"k8s-api-provider": "0.0.15-beta.
|
|
23
|
+
"k8s-api-provider": "0.0.15-beta.2",
|
|
24
24
|
"ky": "^0.33.3",
|
|
25
25
|
"lodash-es": "^4.17.21",
|
|
26
26
|
"mitt": "^3.0.1",
|