@comet/cms-admin 8.7.0-canary-20251117073736 → 8.7.0-canary-20251117091749
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/lib/cronJobs/CronJobsGrid.d.ts.map +1 -1
- package/lib/cronJobs/CronJobsGrid.js +26 -33
- package/lib/cronJobs/CronJobsPage.d.ts.map +1 -1
- package/lib/cronJobs/CronJobsPage.js +21 -4
- package/lib/cronJobs/JobLogs.d.ts.map +1 -1
- package/lib/cronJobs/JobLogs.js +10 -22
- package/lib/cronJobs/JobsGrid.d.ts.map +1 -1
- package/lib/cronJobs/JobsGrid.js +81 -75
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJobsGrid.d.ts","sourceRoot":"","sources":["../../src/cronJobs/CronJobsGrid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CronJobsGrid.d.ts","sourceRoot":"","sources":["../../src/cronJobs/CronJobsGrid.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,YAAY,4CA+H3B"}
|
|
@@ -13,7 +13,6 @@ var _xDataGrid = require("@mui/x-data-grid");
|
|
|
13
13
|
var _dateFns = require("date-fns");
|
|
14
14
|
var _react = require("react");
|
|
15
15
|
var _reactIntl = require("react-intl");
|
|
16
|
-
var _ContentScopeIndicator = require("../contentScope/ContentScopeIndicator");
|
|
17
16
|
var _JobRuntime = require("./JobRuntime");
|
|
18
17
|
var _JobStatus = require("./JobStatus");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -41,19 +40,6 @@ var disableFieldOptions = {
|
|
|
41
40
|
};
|
|
42
41
|
var cronJobsQuery = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query KubernetesCronJobs {\n kubernetesCronJobs {\n id\n name\n label\n schedule\n lastScheduledAt\n lastJobRun {\n id\n name\n startTime\n completionTime\n status\n }\n }\n }\n"])));
|
|
43
42
|
var triggerCronJobMutation = (0, _client.gql)(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n mutation TriggerKubernetesCronJob($name: String!) {\n triggerKubernetesCronJob(name: $name) {\n id\n name\n }\n }\n"])));
|
|
44
|
-
function CronJobsToolbar() {
|
|
45
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
|
|
46
|
-
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentScopeIndicator.ContentScopeIndicator, {
|
|
47
|
-
global: true
|
|
48
|
-
}),
|
|
49
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
|
|
50
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
51
|
-
id: "comet.cronJobs.title",
|
|
52
|
-
defaultMessage: "Cron Jobs"
|
|
53
|
-
})
|
|
54
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FillSpace, {})]
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
43
|
function CronJobsGrid() {
|
|
58
44
|
var _data$kubernetesCronJ;
|
|
59
45
|
var intl = (0, _reactIntl.useIntl)();
|
|
@@ -75,9 +61,7 @@ function CronJobsGrid() {
|
|
|
75
61
|
var closeDialog = function closeDialog() {
|
|
76
62
|
setCronJobToStart(undefined);
|
|
77
63
|
};
|
|
78
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
79
|
-
disablePadding: true,
|
|
80
|
-
fullHeight: true,
|
|
64
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
81
65
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.DataGrid, {
|
|
82
66
|
rows: rows,
|
|
83
67
|
loading: loading,
|
|
@@ -136,28 +120,37 @@ function CronJobsGrid() {
|
|
|
136
120
|
renderCell: function renderCell(_ref3) {
|
|
137
121
|
var row = _ref3.row;
|
|
138
122
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
139
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
123
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
|
|
124
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
125
|
+
id: "comet.pages.cronJobs.showRuns",
|
|
126
|
+
defaultMessage: "Show runs"
|
|
127
|
+
}),
|
|
128
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
129
|
+
component: _admin.StackLink,
|
|
130
|
+
pageName: "jobs",
|
|
131
|
+
payload: row.name,
|
|
132
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Time, {
|
|
133
|
+
color: "primary"
|
|
134
|
+
})
|
|
145
135
|
})
|
|
146
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
136
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
|
|
137
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
138
|
+
id: "comet.pages.cronJobs.runJobNow",
|
|
139
|
+
defaultMessage: "Run job now"
|
|
140
|
+
}),
|
|
141
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
142
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.Play, {
|
|
143
|
+
color: "primary",
|
|
144
|
+
onClick: function onClick() {
|
|
145
|
+
setCronJobToStart(row.name);
|
|
146
|
+
}
|
|
147
|
+
})
|
|
152
148
|
})
|
|
153
149
|
})]
|
|
154
150
|
});
|
|
155
151
|
}
|
|
156
152
|
}, disableFieldOptions)],
|
|
157
|
-
disableColumnSelector: true
|
|
158
|
-
slots: {
|
|
159
|
-
toolbar: CronJobsToolbar
|
|
160
|
-
}
|
|
153
|
+
disableColumnSelector: true
|
|
161
154
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Dialog, {
|
|
162
155
|
open: dialogOpen,
|
|
163
156
|
onClose: closeDialog,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CronJobsPage.d.ts","sourceRoot":"","sources":["../../src/cronJobs/CronJobsPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CronJobsPage.d.ts","sourceRoot":"","sources":["../../src/cronJobs/CronJobsPage.tsx"],"names":[],"mappings":"AAQA,wBAAgB,YAAY,4CAqC3B"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.CronJobsPage = CronJobsPage;
|
|
7
7
|
var _admin = require("@comet/admin");
|
|
8
8
|
var _reactIntl = require("react-intl");
|
|
9
|
+
var _ContentScopeIndicator = require("../contentScope/ContentScopeIndicator");
|
|
9
10
|
var _CronJobsGrid = require("./CronJobsGrid");
|
|
10
11
|
var _JobLogs = require("./JobLogs");
|
|
11
12
|
var _JobsGrid = require("./JobsGrid");
|
|
@@ -18,9 +19,16 @@ function CronJobsPage() {
|
|
|
18
19
|
defaultMessage: "Cron Jobs"
|
|
19
20
|
}),
|
|
20
21
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackSwitch, {
|
|
21
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackPage, {
|
|
22
23
|
name: "grid",
|
|
23
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
24
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackToolbar, {
|
|
25
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentScopeIndicator.ContentScopeIndicator, {
|
|
26
|
+
global: true
|
|
27
|
+
})
|
|
28
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.MainContent, {
|
|
29
|
+
fullHeight: true,
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CronJobsGrid.CronJobsGrid, {})
|
|
31
|
+
})]
|
|
24
32
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
25
33
|
name: "jobs",
|
|
26
34
|
children: function children(selectedCronJobName) {
|
|
@@ -33,8 +41,17 @@ function CronJobsPage() {
|
|
|
33
41
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPage, {
|
|
34
42
|
name: "logs",
|
|
35
43
|
children: function children(selectedJobName) {
|
|
36
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
37
|
-
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.StackToolbar, {
|
|
46
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentScopeIndicator.ContentScopeIndicator, {
|
|
47
|
+
global: true
|
|
48
|
+
}),
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarBackButton, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarAutomaticTitleItem, {})]
|
|
50
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.MainContent, {
|
|
51
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_JobLogs.JobLogs, {
|
|
52
|
+
jobName: selectedJobName
|
|
53
|
+
})
|
|
54
|
+
})]
|
|
38
55
|
});
|
|
39
56
|
}
|
|
40
57
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobLogs.d.ts","sourceRoot":"","sources":["../../src/cronJobs/JobLogs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JobLogs.d.ts","sourceRoot":"","sources":["../../src/cronJobs/JobLogs.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,OAAO,CAAC,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,2CA+CjD"}
|
package/lib/cronJobs/JobLogs.js
CHANGED
|
@@ -13,23 +13,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
13
13
|
var _templateObject;
|
|
14
14
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
15
15
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
16
|
-
function JobLogsToolbar(props) {
|
|
17
|
-
var kubernetesJob = props.kubernetesJob;
|
|
18
|
-
if (!kubernetesJob) {
|
|
19
|
-
return null;
|
|
20
|
-
}
|
|
21
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
|
|
22
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarBackButton, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
|
|
23
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
24
|
-
id: "comet.jobLogs.title",
|
|
25
|
-
defaultMessage: "Job logs for {job}",
|
|
26
|
-
values: {
|
|
27
|
-
job: kubernetesJob.label ? "".concat(kubernetesJob.label, " (").concat(kubernetesJob.name, ")") : kubernetesJob.name
|
|
28
|
-
}
|
|
29
|
-
})
|
|
30
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.FillSpace, {})]
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
16
|
var LogsContainer = /*#__PURE__*/(0, _styles.styled)("pre", process.env.NODE_ENV === "production" ? {
|
|
34
17
|
target: "e1ft7azl0"
|
|
35
18
|
} : {
|
|
@@ -40,7 +23,7 @@ var LogsContainer = /*#__PURE__*/(0, _styles.styled)("pre", process.env.NODE_ENV
|
|
|
40
23
|
styles: "margin:0;overflow-x:auto"
|
|
41
24
|
} : {
|
|
42
25
|
name: "1jclnsc",
|
|
43
|
-
styles: "margin:0;overflow-x:auto/*# sourceMappingURL=data:application/json;charset=utf-8;base64,
|
|
26
|
+
styles: "margin:0;overflow-x:auto/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jcm9uSm9icy9Kb2JMb2dzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRbUMiLCJmaWxlIjoiLi4vLi4vc3JjL2Nyb25Kb2JzL0pvYkxvZ3MudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgZ3FsLCB1c2VRdWVyeSB9IGZyb20gXCJAYXBvbGxvL2NsaWVudFwiO1xuaW1wb3J0IHsgTG9hZGluZywgU3RhY2tQYWdlVGl0bGUgfSBmcm9tIFwiQGNvbWV0L2FkbWluXCI7XG5pbXBvcnQgeyBCb3gsIFR5cG9ncmFwaHkgfSBmcm9tIFwiQG11aS9tYXRlcmlhbFwiO1xuaW1wb3J0IHsgc3R5bGVkIH0gZnJvbSBcIkBtdWkvbWF0ZXJpYWwvc3R5bGVzXCI7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlIH0gZnJvbSBcInJlYWN0LWludGxcIjtcblxuaW1wb3J0IHsgdHlwZSBHUUxLdWJlcm5ldGVzSm9iV2l0aExvZ3NRdWVyeSwgdHlwZSBHUUxLdWJlcm5ldGVzSm9iV2l0aExvZ3NRdWVyeVZhcmlhYmxlcyB9IGZyb20gXCIuL0pvYkxvZ3MuZ2VuZXJhdGVkXCI7XG5cbmNvbnN0IExvZ3NDb250YWluZXIgPSBzdHlsZWQoXCJwcmVcIilgXG4gICAgbWFyZ2luOiAwO1xuICAgIG92ZXJmbG93LXg6IGF1dG87XG5gO1xuXG5jb25zdCBqb2JXaXRoTG9nc1F1ZXJ5ID0gZ3FsYFxuICAgIHF1ZXJ5IEt1YmVybmV0ZXNKb2JXaXRoTG9ncygkbmFtZTogU3RyaW5nISkge1xuICAgICAgICBrdWJlcm5ldGVzSm9iKG5hbWU6ICRuYW1lKSB7XG4gICAgICAgICAgICBpZFxuICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgbGFiZWxcbiAgICAgICAgfVxuICAgICAgICBrdWJlcm5ldGVzSm9iTG9ncyhuYW1lOiAkbmFtZSlcbiAgICB9XG5gO1xuXG5leHBvcnQgZnVuY3Rpb24gSm9iTG9ncyhwcm9wczogeyBqb2JOYW1lOiBzdHJpbmcgfSkge1xuICAgIGNvbnN0IHsgam9iTmFtZSB9ID0gcHJvcHM7XG5cbiAgICBjb25zdCB7IGxvYWRpbmcsIGRhdGEsIGVycm9yIH0gPSB1c2VRdWVyeTxHUUxLdWJlcm5ldGVzSm9iV2l0aExvZ3NRdWVyeSwgR1FMS3ViZXJuZXRlc0pvYldpdGhMb2dzUXVlcnlWYXJpYWJsZXM+KGpvYldpdGhMb2dzUXVlcnksIHtcbiAgICAgICAgdmFyaWFibGVzOiB7IG5hbWU6IGpvYk5hbWUgfSxcbiAgICB9KTtcblxuICAgIGlmIChlcnJvcikge1xuICAgICAgICB0aHJvdyBlcnJvcjtcbiAgICB9XG5cbiAgICBpZiAobG9hZGluZykge1xuICAgICAgICByZXR1cm4gPExvYWRpbmcgYmVoYXZpb3I9XCJmaWxsUGFnZUhlaWdodFwiIC8+O1xuICAgIH1cblxuICAgIGNvbnN0IGxvZ3MgPSBkYXRhPy5rdWJlcm5ldGVzSm9iTG9ncztcbiAgICBjb25zdCBqb2IgPSBkYXRhPy5rdWJlcm5ldGVzSm9iO1xuXG4gICAgcmV0dXJuIChcbiAgICAgICAgPD5cbiAgICAgICAgICAgIDxTdGFja1BhZ2VUaXRsZVxuICAgICAgICAgICAgICAgIHRpdGxlPXtcbiAgICAgICAgICAgICAgICAgICAgPEZvcm1hdHRlZE1lc3NhZ2VcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkPVwiY29tZXQuam9iTG9ncy50aXRsZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0TWVzc2FnZT1cIkpvYiBsb2dzIGZvciB7am9ifVwiXG4gICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZXM9e3tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqb2I6IGpvYj8ubGFiZWwgPyBgJHtqb2I/LmxhYmVsfSAoJHtqb2I/Lm5hbWV9KWAgOiBqb2I/Lm5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB9fVxuICAgICAgICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8+XG4gICAgICAgICAgICB7bG9ncyA/IChcbiAgICAgICAgICAgICAgICA8Qm94IHBhZGRpbmdMZWZ0PXs0fT5cbiAgICAgICAgICAgICAgICAgICAgPExvZ3NDb250YWluZXI+e2xvZ3N9PC9Mb2dzQ29udGFpbmVyPlxuICAgICAgICAgICAgICAgIDwvQm94PlxuICAgICAgICAgICAgKSA6IChcbiAgICAgICAgICAgICAgICA8Qm94IHBhZGRpbmc9ezR9PlxuICAgICAgICAgICAgICAgICAgICA8VHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICAgICAgICAgIDxGb3JtYXR0ZWRNZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ9XCJjb21ldC5jcm9uSm9icy5ub0xvZ3NcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRNZXNzYWdlPVwiTm8gbG9ncyBhdmFpbGFibGUuIFlvdSBtYXkgY29uc2lkZXIgY2hlY2tpbmcgZXh0ZXJuYWwgbG9nZ2luZyB0b29scyBpZiBhdmFpbGFibGUuXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8+XG4gICAgICAgICAgICAgICAgICAgIDwvVHlwb2dyYXBoeT5cbiAgICAgICAgICAgICAgICA8L0JveD5cbiAgICAgICAgICAgICl9XG4gICAgICAgIDwvPlxuICAgICk7XG59XG4iXX0= */",
|
|
44
27
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
45
28
|
});
|
|
46
29
|
var jobWithLogsQuery = (0, _client.gql)(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n query KubernetesJobWithLogs($name: String!) {\n kubernetesJob(name: $name) {\n id\n name\n label\n }\n kubernetesJobLogs(name: $name)\n }\n"])));
|
|
@@ -64,10 +47,15 @@ function JobLogs(props) {
|
|
|
64
47
|
}
|
|
65
48
|
var logs = data === null || data === void 0 ? void 0 : data.kubernetesJobLogs;
|
|
66
49
|
var job = data === null || data === void 0 ? void 0 : data.kubernetesJob;
|
|
67
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
51
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.StackPageTitle, {
|
|
52
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
53
|
+
id: "comet.jobLogs.title",
|
|
54
|
+
defaultMessage: "Job logs for {job}",
|
|
55
|
+
values: {
|
|
56
|
+
job: job !== null && job !== void 0 && job.label ? "".concat(job === null || job === void 0 ? void 0 : job.label, " (").concat(job === null || job === void 0 ? void 0 : job.name, ")") : job === null || job === void 0 ? void 0 : job.name
|
|
57
|
+
}
|
|
58
|
+
})
|
|
71
59
|
}), logs ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Box, {
|
|
72
60
|
paddingLeft: 4,
|
|
73
61
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(LogsContainer, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JobsGrid.d.ts","sourceRoot":"","sources":["../../src/cronJobs/JobsGrid.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"JobsGrid.d.ts","sourceRoot":"","sources":["../../src/cronJobs/JobsGrid.tsx"],"names":[],"mappings":"AAsEA,KAAK,aAAa,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,2CA4E5C"}
|
package/lib/cronJobs/JobsGrid.js
CHANGED
|
@@ -12,6 +12,7 @@ var _material = require("@mui/material");
|
|
|
12
12
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
13
13
|
var _dateFns = require("date-fns");
|
|
14
14
|
var _reactIntl = require("react-intl");
|
|
15
|
+
var _ContentScopeIndicator = require("../contentScope/ContentScopeIndicator");
|
|
15
16
|
var _JobRuntime = require("./JobRuntime");
|
|
16
17
|
var _JobStatus = require("./JobStatus");
|
|
17
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -38,6 +39,9 @@ function JobsToolbar(props) {
|
|
|
38
39
|
}),
|
|
39
40
|
data = _useQuery.data;
|
|
40
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_admin.Toolbar, {
|
|
42
|
+
scopeIndicator: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ContentScopeIndicator.ContentScopeIndicator, {
|
|
43
|
+
global: true
|
|
44
|
+
}),
|
|
41
45
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarBackButton, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.ToolbarTitleItem, {
|
|
42
46
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
43
47
|
id: "comet.jobs.title",
|
|
@@ -66,80 +70,82 @@ function JobsGrid(props) {
|
|
|
66
70
|
throw error;
|
|
67
71
|
}
|
|
68
72
|
var rows = (_data$kubernetesJobs = data === null || data === void 0 ? void 0 : data.kubernetesJobs) !== null && _data$kubernetesJobs !== void 0 ? _data$kubernetesJobs : [];
|
|
69
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
73
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(JobsToolbar, {
|
|
75
|
+
cronJobName: cronJob
|
|
76
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.MainContent, {
|
|
77
|
+
fullHeight: true,
|
|
78
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.DataGrid, {
|
|
79
|
+
rows: rows,
|
|
80
|
+
loading: loading,
|
|
81
|
+
hideFooterPagination: true,
|
|
82
|
+
columns: [_objectSpread({
|
|
83
|
+
field: "name",
|
|
84
|
+
headerName: intl.formatMessage({
|
|
85
|
+
id: "comet.pages.jobs.name",
|
|
86
|
+
defaultMessage: "Name"
|
|
87
|
+
}),
|
|
88
|
+
flex: 2
|
|
89
|
+
}, disableFieldOptions), _objectSpread(_objectSpread({
|
|
90
|
+
field: "status",
|
|
91
|
+
headerName: intl.formatMessage({
|
|
92
|
+
id: "comet.pages.publisher.status",
|
|
93
|
+
defaultMessage: "Status"
|
|
94
|
+
}),
|
|
95
|
+
flex: 1
|
|
96
|
+
}, disableFieldOptions), {}, {
|
|
97
|
+
renderCell: function renderCell(_ref) {
|
|
98
|
+
var row = _ref.row;
|
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_JobStatus.JobStatus, {
|
|
100
|
+
status: row.status,
|
|
101
|
+
children: row.status
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}), _objectSpread(_objectSpread({
|
|
105
|
+
field: "runtime",
|
|
106
|
+
headerName: intl.formatMessage({
|
|
107
|
+
id: "comet.pages.jobs.runtime",
|
|
108
|
+
defaultMessage: "Runtime"
|
|
109
|
+
}),
|
|
110
|
+
flex: 1
|
|
111
|
+
}, disableFieldOptions), {}, {
|
|
112
|
+
valueGetter: function valueGetter(params, row) {
|
|
113
|
+
return {
|
|
114
|
+
startTime: row.startTime,
|
|
115
|
+
completionTime: row.completionTime
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
renderCell: function renderCell(_ref2) {
|
|
119
|
+
var value = _ref2.value;
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_JobRuntime.JobRuntime, {
|
|
121
|
+
startTime: value.startTime ? (0, _dateFns.parseISO)(value.startTime) : undefined,
|
|
122
|
+
completionTime: value.completionTime ? (0, _dateFns.parseISO)(value.completionTime) : undefined
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
}), _objectSpread({
|
|
126
|
+
field: "actions",
|
|
127
|
+
type: "actions",
|
|
128
|
+
headerName: "",
|
|
129
|
+
renderCell: function renderCell(_ref3) {
|
|
130
|
+
var row = _ref3.row;
|
|
131
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_admin.Tooltip, {
|
|
132
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
133
|
+
id: "comet.pages.jobs.showLogs",
|
|
134
|
+
defaultMessage: "Show logs"
|
|
135
|
+
}),
|
|
136
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.IconButton, {
|
|
137
|
+
component: _admin.StackLink,
|
|
138
|
+
pageName: "logs",
|
|
139
|
+
payload: row.name,
|
|
140
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_adminIcons.List, {
|
|
141
|
+
color: "primary"
|
|
142
|
+
})
|
|
143
|
+
})
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
}, disableFieldOptions)],
|
|
147
|
+
disableColumnSelector: true
|
|
148
|
+
})
|
|
149
|
+
})]
|
|
144
150
|
});
|
|
145
151
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@comet/cms-admin",
|
|
3
|
-
"version": "8.7.0-canary-
|
|
3
|
+
"version": "8.7.0-canary-20251117091749",
|
|
4
4
|
"description": "Comet CMS Admin package",
|
|
5
5
|
"repository": {
|
|
6
6
|
"directory": "packages/admin/cms-admin",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"slugify": "^1.6.6",
|
|
42
42
|
"use-debounce": "^10.0.5",
|
|
43
43
|
"uuid": "^11.1.0",
|
|
44
|
-
"@comet/admin": "8.7.0-canary-
|
|
45
|
-
"@comet/admin-
|
|
46
|
-
"@comet/admin-
|
|
47
|
-
"@comet/admin-rte": "8.7.0-canary-
|
|
44
|
+
"@comet/admin": "8.7.0-canary-20251117091749",
|
|
45
|
+
"@comet/admin-icons": "8.7.0-canary-20251117091749",
|
|
46
|
+
"@comet/admin-date-time": "8.7.0-canary-20251117091749",
|
|
47
|
+
"@comet/admin-rte": "8.7.0-canary-20251117091749"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@apollo/client": "^3.13.8",
|
|
@@ -98,9 +98,9 @@
|
|
|
98
98
|
"react-router-dom": "^5.3.4",
|
|
99
99
|
"ts-jest": "^29.4.0",
|
|
100
100
|
"typescript": "5.8.3",
|
|
101
|
-
"@comet/admin-babel-preset": "8.7.0-canary-
|
|
102
|
-
"@comet/cli": "8.7.0-canary-
|
|
103
|
-
"@comet/eslint-config": "8.7.0-canary-
|
|
101
|
+
"@comet/admin-babel-preset": "8.7.0-canary-20251117091749",
|
|
102
|
+
"@comet/cli": "8.7.0-canary-20251117091749",
|
|
103
|
+
"@comet/eslint-config": "8.7.0-canary-20251117091749"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@apollo/client": "^3.7.0",
|