@things-factory/scheduler 7.1.34
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/CHANGELOG.md +8 -0
- package/client/bootstrap.ts +1 -0
- package/client/index.ts +0 -0
- package/client/pages/scheduler/popup-crontab-input.ts +75 -0
- package/client/pages/scheduler/schedule-list-page.ts +326 -0
- package/client/pages/scheduler/schedule-popup.ts +484 -0
- package/client/route.ts +7 -0
- package/client/tsconfig.json +11 -0
- package/client/types.ts +34 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +2 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/index.d.ts +0 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/scheduler/popup-crontab-input.d.ts +12 -0
- package/dist-client/pages/scheduler/popup-crontab-input.js +77 -0
- package/dist-client/pages/scheduler/popup-crontab-input.js.map +1 -0
- package/dist-client/pages/scheduler/schedule-list-page.d.ts +42 -0
- package/dist-client/pages/scheduler/schedule-list-page.js +326 -0
- package/dist-client/pages/scheduler/schedule-list-page.js.map +1 -0
- package/dist-client/pages/scheduler/schedule-popup.d.ts +25 -0
- package/dist-client/pages/scheduler/schedule-popup.js +457 -0
- package/dist-client/pages/scheduler/schedule-popup.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +8 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/types.d.ts +33 -0
- package/dist-client/types.js +2 -0
- package/dist-client/types.js.map +1 -0
- package/dist-server/controllers/index.d.ts +0 -0
- package/dist-server/controllers/index.js +1 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/index.d.ts +2 -0
- package/dist-server/index.js +6 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/routes.js +25 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/index.d.ts +5 -0
- package/dist-server/service/index.js +21 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/schedule/index.d.ts +6 -0
- package/dist-server/service/schedule/index.js +10 -0
- package/dist-server/service/schedule/index.js.map +1 -0
- package/dist-server/service/schedule/schedule-mutation.d.ts +6 -0
- package/dist-server/service/schedule/schedule-mutation.js +55 -0
- package/dist-server/service/schedule/schedule-mutation.js.map +1 -0
- package/dist-server/service/schedule/schedule-query.d.ts +6 -0
- package/dist-server/service/schedule/schedule-query.js +70 -0
- package/dist-server/service/schedule/schedule-query.js.map +1 -0
- package/dist-server/service/schedule/schedule-type.d.ts +75 -0
- package/dist-server/service/schedule/schedule-type.js +281 -0
- package/dist-server/service/schedule/schedule-type.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/helps/scheduler/assets/scheduler-explains.png +0 -0
- package/helps/scheduler/assets/scheduler-service-msa.png +0 -0
- package/helps/scheduler/assets/scheduler-service-openapi.png +0 -0
- package/helps/scheduler/assets/scheduler-service-scalable.png +0 -0
- package/helps/scheduler/assets/updated-scheduler-diagram-periodic.png +0 -0
- package/helps/scheduler/assets/updated-scheduler-diagram-pubsub.png +0 -0
- package/helps/scheduler/scheduler.ko.md +185 -0
- package/helps/scheduler/scheduler.md +186 -0
- package/helps/scheduler/scheduler.zh.md +185 -0
- package/package.json +38 -0
- package/server/controllers/index.ts +0 -0
- package/server/index.ts +3 -0
- package/server/routes.ts +28 -0
- package/server/service/index.ts +25 -0
- package/server/service/schedule/index.ts +7 -0
- package/server/service/schedule/schedule-mutation.ts +34 -0
- package/server/service/schedule/schedule-query.ts +64 -0
- package/server/service/schedule/schedule-type.ts +194 -0
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +8 -0
- package/translations/en.json +9 -0
- package/translations/ja.json +9 -0
- package/translations/ko.json +9 -0
- package/translations/ms.json +9 -0
- package/translations/zh.json +9 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/button/elevated-button.js';
|
|
3
|
+
import '@operato/data-grist/ox-grist.js';
|
|
4
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
5
|
+
import '@operato/data-grist/ox-record-creator.js';
|
|
6
|
+
import './schedule-popup.js';
|
|
7
|
+
import { PageView } from '@operato/shell';
|
|
8
|
+
import { FetchOption } from '@operato/data-grist';
|
|
9
|
+
declare const SchedulerListPage_base: (new (...args: any[]) => {
|
|
10
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
11
|
+
connectedCallback(): void;
|
|
12
|
+
disconnectedCallback(): void;
|
|
13
|
+
stateChanged(_state: unknown): void;
|
|
14
|
+
readonly isConnected: boolean;
|
|
15
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
16
|
+
export declare class SchedulerListPage extends SchedulerListPage_base {
|
|
17
|
+
static styles: import("lit").CSSResult[];
|
|
18
|
+
gristConfig: any;
|
|
19
|
+
mode: 'CARD' | 'GRID' | 'LIST';
|
|
20
|
+
private grist;
|
|
21
|
+
get context(): {
|
|
22
|
+
title: string;
|
|
23
|
+
search: {
|
|
24
|
+
handler: (search: string) => void;
|
|
25
|
+
value: string;
|
|
26
|
+
};
|
|
27
|
+
filter: {
|
|
28
|
+
handler: () => void;
|
|
29
|
+
};
|
|
30
|
+
help: string;
|
|
31
|
+
};
|
|
32
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
33
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
34
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
35
|
+
popupCallback(popup: any): Promise<void>;
|
|
36
|
+
fetchHandler({ page, limit, sortings, filters }: FetchOption): Promise<{
|
|
37
|
+
total: any;
|
|
38
|
+
records: any;
|
|
39
|
+
}>;
|
|
40
|
+
unregisterSchedule(handle: string): Promise<void>;
|
|
41
|
+
}
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
2
|
+
import '@material/web/icon/icon.js';
|
|
3
|
+
import '@material/web/button/elevated-button.js';
|
|
4
|
+
import '@operato/data-grist/ox-grist.js';
|
|
5
|
+
import '@operato/data-grist/ox-filters-form.js';
|
|
6
|
+
import '@operato/data-grist/ox-record-creator.js';
|
|
7
|
+
import './schedule-popup.js';
|
|
8
|
+
import { CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles';
|
|
9
|
+
import { PageView, store } from '@operato/shell';
|
|
10
|
+
import { css, html } from 'lit';
|
|
11
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
12
|
+
import { DataGrist } from '@operato/data-grist';
|
|
13
|
+
import { client } from '@operato/graphql';
|
|
14
|
+
import { i18next, localize } from '@operato/i18n';
|
|
15
|
+
import { notify, openPopup } from '@operato/layout';
|
|
16
|
+
import { OxPrompt } from '@operato/popup';
|
|
17
|
+
import { isMobileDevice } from '@operato/utils';
|
|
18
|
+
import { connect } from 'pwa-helpers/connect-mixin';
|
|
19
|
+
import gql from 'graphql-tag';
|
|
20
|
+
let SchedulerListPage = class SchedulerListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
21
|
+
constructor() {
|
|
22
|
+
super(...arguments);
|
|
23
|
+
this.mode = isMobileDevice() ? 'CARD' : 'GRID';
|
|
24
|
+
}
|
|
25
|
+
get context() {
|
|
26
|
+
return {
|
|
27
|
+
title: i18next.t('title.schedule list'),
|
|
28
|
+
search: {
|
|
29
|
+
handler: (search) => {
|
|
30
|
+
this.grist.searchText = search;
|
|
31
|
+
},
|
|
32
|
+
value: this.grist.searchText
|
|
33
|
+
},
|
|
34
|
+
filter: {
|
|
35
|
+
handler: () => {
|
|
36
|
+
this.grist.toggleHeadroom();
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
help: 'scheduler/scheduler'
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID');
|
|
44
|
+
return html `
|
|
45
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
|
46
|
+
<div slot="headroom" class="header">
|
|
47
|
+
<div class="filters">
|
|
48
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
49
|
+
|
|
50
|
+
<div id="modes">
|
|
51
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
52
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
53
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
<ox-record-creator id="add" .customPopupCallback=${this.popupCallback.bind(this)}>
|
|
57
|
+
<button>
|
|
58
|
+
<md-icon>add</md-icon>
|
|
59
|
+
</button>
|
|
60
|
+
<schedule-popup slot="popup"></schedule-popup>
|
|
61
|
+
</ox-record-creator>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
</ox-grist>
|
|
65
|
+
`;
|
|
66
|
+
}
|
|
67
|
+
async pageInitialized(lifecycle) {
|
|
68
|
+
this.gristConfig = {
|
|
69
|
+
list: {
|
|
70
|
+
fields: ['name', 'description'],
|
|
71
|
+
details: ['active', 'updatedAt']
|
|
72
|
+
},
|
|
73
|
+
columns: [
|
|
74
|
+
{ type: 'gutter', gutterName: 'sequence' },
|
|
75
|
+
{ type: 'gutter', gutterName: 'row-selector', multiple: true },
|
|
76
|
+
{
|
|
77
|
+
type: 'gutter',
|
|
78
|
+
gutterName: 'button',
|
|
79
|
+
fixed: true,
|
|
80
|
+
icon: record => (!record ? 'reorder' : record.id ? 'reorder' : ''),
|
|
81
|
+
iconOnly: false,
|
|
82
|
+
title: record => (!record ? i18next.t('button.detail') : record.id ? i18next.t('button.detail') : ''),
|
|
83
|
+
width: 72,
|
|
84
|
+
handlers: {
|
|
85
|
+
click: (columns, data, column, record, rowIndex) => {
|
|
86
|
+
if (!record.id)
|
|
87
|
+
return;
|
|
88
|
+
openPopup(html `
|
|
89
|
+
<schedule-popup schedule-id=${record.id} @requestRefresh=${() => this.grist.fetch()}></schedule-popup>
|
|
90
|
+
`, {
|
|
91
|
+
backdrop: true,
|
|
92
|
+
help: 'scheduler/scheduler',
|
|
93
|
+
size: 'large',
|
|
94
|
+
title: i18next.t('title.schedule detail')
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'gutter',
|
|
101
|
+
gutterName: 'button',
|
|
102
|
+
fixed: true,
|
|
103
|
+
icon: record => (!record ? 'delete' : record.id ? 'delete' : ''),
|
|
104
|
+
iconOnly: false,
|
|
105
|
+
title: record => (!record ? i18next.t('button.delete') : record.id ? i18next.t('button.delete') : ''),
|
|
106
|
+
width: 72,
|
|
107
|
+
handlers: {
|
|
108
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
109
|
+
if (record)
|
|
110
|
+
this.unregisterSchedule(record.id);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
type: 'string',
|
|
116
|
+
name: 'name',
|
|
117
|
+
header: i18next.t('field.name'),
|
|
118
|
+
record: {
|
|
119
|
+
editable: false
|
|
120
|
+
},
|
|
121
|
+
filter: 'i_like' /* only i_like supported */,
|
|
122
|
+
sortable: true,
|
|
123
|
+
width: 150
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
type: 'string',
|
|
127
|
+
name: 'application',
|
|
128
|
+
header: i18next.t('field.schedule-application'),
|
|
129
|
+
record: {
|
|
130
|
+
renderer: (value, column, record, rowIndex, field) => { var _a; return (_a = record.client) === null || _a === void 0 ? void 0 : _a.application; }
|
|
131
|
+
},
|
|
132
|
+
filter: 'i_like' /* only i_like supported */,
|
|
133
|
+
sortable: true,
|
|
134
|
+
width: 150
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
type: 'string',
|
|
138
|
+
name: 'group',
|
|
139
|
+
header: i18next.t('field.group'),
|
|
140
|
+
record: {
|
|
141
|
+
renderer: (value, column, record, rowIndex, field) => { var _a; return (_a = record.client) === null || _a === void 0 ? void 0 : _a.group; }
|
|
142
|
+
},
|
|
143
|
+
filter: 'i_like' /* only i_like supported */,
|
|
144
|
+
sortable: true,
|
|
145
|
+
width: 150
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
type: 'string',
|
|
149
|
+
name: 'type',
|
|
150
|
+
header: i18next.t('field.type'),
|
|
151
|
+
record: {
|
|
152
|
+
renderer: (value, column, record, rowIndex, field) => { var _a; return (_a = record.client) === null || _a === void 0 ? void 0 : _a.type; }
|
|
153
|
+
},
|
|
154
|
+
filter: 'i_like' /* only i_like supported */,
|
|
155
|
+
sortable: true,
|
|
156
|
+
width: 150
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'string',
|
|
160
|
+
name: 'key',
|
|
161
|
+
header: i18next.t('field.key'),
|
|
162
|
+
record: {
|
|
163
|
+
renderer: (value, column, record, rowIndex, field) => { var _a; return (_a = record.client) === null || _a === void 0 ? void 0 : _a.key; }
|
|
164
|
+
},
|
|
165
|
+
filter: 'i_like' /* only i_like supported */,
|
|
166
|
+
sortable: true,
|
|
167
|
+
width: 150
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
type: 'string',
|
|
171
|
+
name: 'operation',
|
|
172
|
+
header: i18next.t('field.schedule-operation'),
|
|
173
|
+
record: {
|
|
174
|
+
renderer: (value, column, record, rowIndex, field) => { var _a; return (_a = record.client) === null || _a === void 0 ? void 0 : _a.operation; }
|
|
175
|
+
},
|
|
176
|
+
filter: 'i_like' /* only i_like supported */,
|
|
177
|
+
sortable: true,
|
|
178
|
+
width: 150
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
type: 'datetime',
|
|
182
|
+
name: 'updatedAt',
|
|
183
|
+
header: i18next.t('field.updated_at'),
|
|
184
|
+
record: {
|
|
185
|
+
editable: false
|
|
186
|
+
},
|
|
187
|
+
sortable: true,
|
|
188
|
+
width: 180
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
rows: {
|
|
192
|
+
appendable: false,
|
|
193
|
+
selectable: {
|
|
194
|
+
multiple: true
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
sorters: [
|
|
198
|
+
{
|
|
199
|
+
name: 'name'
|
|
200
|
+
}
|
|
201
|
+
]
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
async pageUpdated(changes, lifecycle) {
|
|
205
|
+
if (this.active) {
|
|
206
|
+
this.grist.fetch();
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
async popupCallback(popup) {
|
|
210
|
+
popup.onclosed = () => { };
|
|
211
|
+
}
|
|
212
|
+
async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }) {
|
|
213
|
+
const response = await client.query({
|
|
214
|
+
query: gql `
|
|
215
|
+
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
216
|
+
responses: schedules(filters: $filters, pagination: $pagination, sortings: $sortings) {
|
|
217
|
+
items {
|
|
218
|
+
id
|
|
219
|
+
name
|
|
220
|
+
client {
|
|
221
|
+
application
|
|
222
|
+
group
|
|
223
|
+
type
|
|
224
|
+
key
|
|
225
|
+
operation
|
|
226
|
+
}
|
|
227
|
+
type
|
|
228
|
+
schedule
|
|
229
|
+
timezone
|
|
230
|
+
task {
|
|
231
|
+
type
|
|
232
|
+
connection {
|
|
233
|
+
host
|
|
234
|
+
headers
|
|
235
|
+
topic
|
|
236
|
+
}
|
|
237
|
+
data
|
|
238
|
+
history_check
|
|
239
|
+
failed_policy
|
|
240
|
+
retry_wait
|
|
241
|
+
retry_count
|
|
242
|
+
max_retry_count
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
total
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
`,
|
|
249
|
+
variables: {
|
|
250
|
+
filters,
|
|
251
|
+
pagination: { page, limit },
|
|
252
|
+
sortings
|
|
253
|
+
}
|
|
254
|
+
});
|
|
255
|
+
return {
|
|
256
|
+
total: response.data.responses.total || 0,
|
|
257
|
+
records: response.data.responses.items || []
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
async unregisterSchedule(handle) {
|
|
261
|
+
if (await OxPrompt.open({
|
|
262
|
+
title: i18next.t('text.are_you_sure'),
|
|
263
|
+
text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),
|
|
264
|
+
confirmButton: { text: i18next.t('button.confirm') },
|
|
265
|
+
cancelButton: { text: i18next.t('button.cancel') }
|
|
266
|
+
})) {
|
|
267
|
+
const response = await client.mutate({
|
|
268
|
+
mutation: gql `
|
|
269
|
+
mutation ($handle: ID!) {
|
|
270
|
+
unregisterSchedule(handle: $handle)
|
|
271
|
+
}
|
|
272
|
+
`,
|
|
273
|
+
variables: {
|
|
274
|
+
handle
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
if (!response.errors) {
|
|
278
|
+
this.grist.fetch();
|
|
279
|
+
notify({
|
|
280
|
+
message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })
|
|
281
|
+
});
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
};
|
|
286
|
+
SchedulerListPage.styles = [
|
|
287
|
+
ScrollbarStyles,
|
|
288
|
+
CommonGristStyles,
|
|
289
|
+
CommonHeaderStyles,
|
|
290
|
+
css `
|
|
291
|
+
:host {
|
|
292
|
+
display: flex;
|
|
293
|
+
|
|
294
|
+
width: 100%;
|
|
295
|
+
|
|
296
|
+
--grid-record-emphasized-background-color: #8b0000;
|
|
297
|
+
--grid-record-emphasized-color: #ff6b6b;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
ox-grist {
|
|
301
|
+
overflow-y: auto;
|
|
302
|
+
flex: 1;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
ox-filters-form {
|
|
306
|
+
flex: 1;
|
|
307
|
+
}
|
|
308
|
+
`
|
|
309
|
+
];
|
|
310
|
+
__decorate([
|
|
311
|
+
property({ type: Object }),
|
|
312
|
+
__metadata("design:type", Object)
|
|
313
|
+
], SchedulerListPage.prototype, "gristConfig", void 0);
|
|
314
|
+
__decorate([
|
|
315
|
+
property({ type: String }),
|
|
316
|
+
__metadata("design:type", String)
|
|
317
|
+
], SchedulerListPage.prototype, "mode", void 0);
|
|
318
|
+
__decorate([
|
|
319
|
+
query('ox-grist'),
|
|
320
|
+
__metadata("design:type", DataGrist)
|
|
321
|
+
], SchedulerListPage.prototype, "grist", void 0);
|
|
322
|
+
SchedulerListPage = __decorate([
|
|
323
|
+
customElement('schedule-list-page')
|
|
324
|
+
], SchedulerListPage);
|
|
325
|
+
export { SchedulerListPage };
|
|
326
|
+
//# sourceMappingURL=schedule-list-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schedule-list-page.js","sourceRoot":"","sources":["../../../client/pages/scheduler/schedule-list-page.ts"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AACnC,OAAO,yCAAyC,CAAA;AAChD,OAAO,iCAAiC,CAAA;AACxC,OAAO,wCAAwC,CAAA;AAC/C,OAAO,0CAA0C,CAAA;AACjD,OAAO,qBAAqB,CAAA;AAE5B,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAe,MAAM,qBAAqB,CAAA;AAC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port '@operato/data-grist/ox-filters-form.js'\nimport '@operato/data-grist/ox-record-creator.js'\nimport './schedule-popup.js'\n\nimport { CommonHeaderStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'\nimport { PageView, store } from '@operato/shell'\nimport { css, html } from 'lit'\nimport { customElement, property, query } from 'lit/decorators.js'\nimport { DataGrist, FetchOption } from '@operato/data-grist'\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify, openPopup } from '@operato/layout'\nimport { OxPrompt } from '@operato/popup'\nimport { isMobileDevice } from '@operato/utils'\n\nimport { connect } from 'pwa-helpers/connect-mixin'\nimport gql from 'graphql-tag'\n\n@customElement('schedule-list-page')\nexport class SchedulerListPage extends connect(store)(localize(i18next)(PageView)) {\n static styles = [\n ScrollbarStyles,\n CommonGristStyles,\n CommonHeaderStyles,\n css`\n :host {\n display: flex;\n\n width: 100%;\n\n --grid-record-emphasized-background-color: #8b0000;\n --grid-record-emphasized-color: #ff6b6b;\n }\n\n ox-grist {\n overflow-y: auto;\n flex: 1;\n }\n\n ox-filters-form {\n flex: 1;\n }\n `\n ]\n\n @property({ type: Object }) gristConfig: any\n @property({ type: String }) mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'\n\n @query('ox-grist') private grist!: DataGrist\n\n get context() {\n return {\n title: i18next.t('title.schedule list'),\n search: {\n handler: (search: string) => {\n this.grist.searchText = search\n },\n value: this.grist.searchText\n },\n filter: {\n handler: () => {\n this.grist.toggleHeadroom()\n }\n },\n help: 'scheduler/scheduler'\n }\n }\n\n render() {\n const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')\n\n return html`\n <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>\n <div slot=\"headroom\" class=\"header\">\n <div class=\"filters\">\n <ox-filters-form autofocus without-search></ox-filters-form>\n\n <div id=\"modes\">\n <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>\n <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>\n <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>\n </div>\n\n <ox-record-creator id=\"add\" .customPopupCallback=${this.popupCallback.bind(this)}>\n <button>\n <md-icon>add</md-icon>\n </button>\n <schedule-popup slot=\"popup\"></schedule-popup>\n </ox-record-creator>\n </div>\n </div>\n </ox-grist>\n `\n }\n\n async pageInitialized(lifecycle: any) {\n this.gristConfig = {\n list: {\n fields: ['name', 'description'],\n details: ['active', 'updatedAt']\n },\n columns: [\n { type: 'gutter', gutterName: 'sequence' },\n { type: 'gutter', gutterName: 'row-selector', multiple: true },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: record => (!record ? 'reorder' : record.id ? 'reorder' : ''),\n iconOnly: false,\n title: record => (!record ? i18next.t('button.detail') : record.id ? i18next.t('button.detail') : ''),\n width: 72,\n handlers: {\n click: (columns, data, column, record, rowIndex) => {\n if (!record.id) return\n openPopup(\n html`\n <schedule-popup schedule-id=${record.id} @requestRefresh=${() => this.grist.fetch()}></schedule-popup>\n `,\n {\n backdrop: true,\n help: 'scheduler/scheduler',\n size: 'large',\n title: i18next.t('title.schedule detail')\n }\n )\n }\n }\n },\n {\n type: 'gutter',\n gutterName: 'button',\n fixed: true,\n icon: record => (!record ? 'delete' : record.id ? 'delete' : ''),\n iconOnly: false,\n title: record => (!record ? i18next.t('button.delete') : record.id ? i18next.t('button.delete') : ''),\n width: 72,\n handlers: {\n click: (_columns, _data, _column, record, _rowIndex) => {\n if (record) this.unregisterSchedule(record.id)\n }\n }\n },\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n record: {\n editable: false\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'application',\n header: i18next.t('field.schedule-application'),\n record: {\n renderer: (value, column, record, rowIndex, field) => record.client?.application\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'group',\n header: i18next.t('field.group'),\n record: {\n renderer: (value, column, record, rowIndex, field) => record.client?.group\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'type',\n header: i18next.t('field.type'),\n record: {\n renderer: (value, column, record, rowIndex, field) => record.client?.type\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'key',\n header: i18next.t('field.key'),\n record: {\n renderer: (value, column, record, rowIndex, field) => record.client?.key\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'string',\n name: 'operation',\n header: i18next.t('field.schedule-operation'),\n record: {\n renderer: (value, column, record, rowIndex, field) => record.client?.operation\n },\n filter: 'i_like' /* only i_like supported */,\n sortable: true,\n width: 150\n },\n {\n type: 'datetime',\n name: 'updatedAt',\n header: i18next.t('field.updated_at'),\n record: {\n editable: false\n },\n sortable: true,\n width: 180\n }\n ],\n rows: {\n appendable: false,\n selectable: {\n multiple: true\n }\n },\n sorters: [\n {\n name: 'name'\n }\n ]\n }\n }\n\n async pageUpdated(changes: any, lifecycle: any) {\n if (this.active) {\n this.grist.fetch()\n }\n }\n\n async popupCallback(popup) {\n popup.onclosed = () => {}\n }\n\n async fetchHandler({ page = 1, limit = 100, sortings = [], filters = [] }: FetchOption) {\n const response = await client.query({\n query: gql`\n query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {\n responses: schedules(filters: $filters, pagination: $pagination, sortings: $sortings) {\n items {\n id\n name\n client {\n application\n group\n type\n key\n operation\n }\n type\n schedule\n timezone\n task {\n type\n connection {\n host\n headers\n topic\n }\n data\n history_check\n failed_policy\n retry_wait\n retry_count\n max_retry_count\n }\n }\n total\n }\n }\n `,\n variables: {\n filters,\n pagination: { page, limit },\n sortings\n }\n })\n\n return {\n total: response.data.responses.total || 0,\n records: response.data.responses.items || []\n }\n }\n\n async unregisterSchedule(handle: string) {\n if (\n await OxPrompt.open({\n title: i18next.t('text.are_you_sure'),\n text: i18next.t('text.sure_to_x', { x: i18next.t('text.delete') }),\n confirmButton: { text: i18next.t('button.confirm') },\n cancelButton: { text: i18next.t('button.cancel') }\n })\n ) {\n const response = await client.mutate({\n mutation: gql`\n mutation ($handle: ID!) {\n unregisterSchedule(handle: $handle)\n }\n `,\n variables: {\n handle\n }\n })\n\n if (!response.errors) {\n this.grist.fetch()\n notify({\n message: i18next.t('text.info_x_successfully', { x: i18next.t('text.delete') })\n })\n }\n }\n }\n}\n"]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js';
|
|
2
|
+
import '@material/web/textfield/filled-text-field.js';
|
|
3
|
+
import '@material/web/select/outlined-select.js';
|
|
4
|
+
import '@material/web/checkbox/checkbox.js';
|
|
5
|
+
import '@material/web/button/filled-button.js';
|
|
6
|
+
import '@operato/input/ox-input-data.js';
|
|
7
|
+
import '@operato/input/ox-input-key-values.js';
|
|
8
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
9
|
+
import { Schedule } from 'types';
|
|
10
|
+
export declare class NewSchedulePopup extends LitElement {
|
|
11
|
+
static styles: import("lit").CSSResult[];
|
|
12
|
+
closeCallback?: (schedule?: Schedule | null) => void;
|
|
13
|
+
scheduleId?: string;
|
|
14
|
+
schedule: Schedule;
|
|
15
|
+
form: HTMLFormElement;
|
|
16
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
17
|
+
updated(changes: PropertyValues<this>): Promise<void>;
|
|
18
|
+
private onInputChanged;
|
|
19
|
+
private reset;
|
|
20
|
+
private cancel;
|
|
21
|
+
private prepareSchedule;
|
|
22
|
+
private registerSchedule;
|
|
23
|
+
private updateSchedule;
|
|
24
|
+
private fetchSchedule;
|
|
25
|
+
}
|