@whyour/qinglong 2.18.2-3 → 2.18.2-5
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/package.json +4 -4
- package/shell/preload/client.js +149 -40
- package/shell/preload/client.py +200 -30
- package/shell/preload/sitecustomize.js +1 -1
- package/shell/preload/sitecustomize.py +1 -1
- package/shell/share.sh +1 -1
- package/shell/update.sh +4 -1
- package/static/build/api/cron.js +10 -40
- package/static/build/api/system.js +15 -0
- package/static/build/app.js +1 -0
- package/static/build/config/index.js +2 -2
- package/static/build/config/util.js +17 -2
- package/static/build/data/notify.js +5 -6
- package/static/build/interface/schedule.js +9 -0
- package/static/build/loaders/bootAfter.js +12 -0
- package/static/build/loaders/initFile.js +2 -2
- package/static/build/protos/api.js +1285 -168
- package/static/build/protos/cron.js +46 -41
- package/static/build/protos/health.js +12 -13
- package/static/build/schedule/addCron.js +5 -5
- package/static/build/schedule/api.js +86 -1
- package/static/build/services/cron.js +70 -32
- package/static/build/services/notify.js +3 -4
- package/static/build/services/system.js +16 -1
- package/static/build/services/user.js +2 -1
- package/static/build/validation/schedule.js +42 -0
- package/static/dist/1134.b851963c.async.js +1 -0
- package/static/dist/1174.41a43fee.async.js +1 -0
- package/static/dist/1212.f87fd07a.async.js +1 -0
- package/static/dist/1706.ac98cb3f.async.js +1 -0
- package/static/dist/1887.9e0d3da8.async.js +1 -0
- package/static/dist/1969.d61ba5fb.async.js +1 -0
- package/static/dist/198.db47fc1a.async.js +1 -0
- package/static/dist/2003.8eafeca8.async.js +1 -0
- package/static/dist/2208.03c2cf4a.async.js +1 -0
- package/static/dist/2231.29b754cf.async.js +1 -0
- package/static/dist/2336.0756f45f.async.js +1 -0
- package/static/dist/2506.a6334794.async.js +1 -0
- package/static/dist/2577.aa8fe709.async.js +1 -0
- package/static/dist/2636.70ece391.async.js +1 -0
- package/static/dist/2750.7aa38add.async.js +1 -0
- package/static/dist/2783.0787fd60.async.js +1 -0
- package/static/dist/2843.e968a7af.async.js +1 -0
- package/static/dist/2905.a8f810e1.async.js +1 -0
- package/static/dist/293.80d14a4f.async.js +1 -0
- package/static/dist/2958.1a7daa3c.async.js +1 -0
- package/static/dist/3055.a99f8e4c.async.js +1 -0
- package/static/dist/3617.b7d4b2ed.async.js +1 -0
- package/static/dist/3711.9814cb8c.async.js +1 -0
- package/static/dist/3730.3654e8fa.async.js +1 -0
- package/static/dist/3840.801ded2b.async.js +1 -0
- package/static/dist/4324.5a5887d1.async.js +1 -0
- package/static/dist/4462.02fd0a33.async.js +1 -0
- package/static/dist/4481.4d51cf36.async.js +1 -0
- package/static/dist/4507.8541bc6d.async.js +1 -0
- package/static/dist/4559.faab3673.async.js +1 -0
- package/static/dist/4756.64d6d0a4.async.js +1 -0
- package/static/dist/4818.c83facd7.async.js +1 -0
- package/static/dist/4821.64537e48.async.js +1 -0
- package/static/dist/{8142.e3e82eda.async.js → 4934.1ca6b6b0.async.js} +1 -1
- package/static/dist/4944.3be3e188.async.js +1 -0
- package/static/dist/5.3ebdd181.async.js +1 -0
- package/static/dist/5232.f4b06476.async.js +1 -0
- package/static/dist/5325.54777fe5.async.js +1 -0
- package/static/dist/5363.2fedc735.async.js +1 -0
- package/static/dist/5436.f2e37c36.async.js +1 -0
- package/static/dist/5580.48b4722f.async.js +1 -0
- package/static/dist/5662.678b0cfb.async.js +1 -0
- package/static/dist/5759.45438497.async.js +1 -0
- package/static/dist/5876.93680102.async.js +1 -0
- package/static/dist/5878.32535c39.async.js +1 -0
- package/static/dist/591.1c6b5df7.async.js +1 -0
- package/static/dist/6367.8b0e838c.async.js +1 -0
- package/static/dist/6431.c50479be.async.js +1 -0
- package/static/dist/6437.91ff515b.async.js +1 -0
- package/static/dist/6598.01b8b308.async.js +1 -0
- package/static/dist/6711.84451b08.async.js +1 -0
- package/static/dist/6841.e92e9802.async.js +1 -0
- package/static/dist/685.2419bacf.async.js +1 -0
- package/static/dist/7036.fdeb74d0.async.js +1 -0
- package/static/dist/7272.1c73bcc5.async.js +1 -0
- package/static/dist/7278.96bf439f.async.js +1 -0
- package/static/dist/752.66fdc531.async.js +1 -0
- package/static/dist/7540.6bb57f5f.async.js +1 -0
- package/static/dist/7647.e9446154.async.js +1 -0
- package/static/dist/7661.6684ddda.async.js +1 -0
- package/static/dist/7714.1e826854.async.js +1 -0
- package/static/dist/7846.7d689939.async.js +1 -0
- package/static/dist/7993.ed86bf44.async.js +1 -0
- package/static/dist/8025.7dc65c6a.async.js +1 -0
- package/static/dist/8038.58b0571f.async.js +1 -0
- package/static/dist/8080.056470f6.async.js +1 -0
- package/static/dist/8142.a074ddf1.async.js +1 -0
- package/static/dist/831.9756b44d.async.js +1 -0
- package/static/dist/8315.3c15bde0.async.js +1 -0
- package/static/dist/8394.452e865e.async.js +1 -0
- package/static/dist/8416.69691e31.async.js +1 -0
- package/static/dist/8526.bb556c43.async.js +1 -0
- package/static/dist/8682.597beedb.async.js +1 -0
- package/static/dist/8776.e8798a5a.async.js +1 -0
- package/static/dist/8779.3e755010.async.js +1 -0
- package/static/dist/8826.b3f9fa78.async.js +1 -0
- package/static/dist/8851.a57942be.async.js +1 -0
- package/static/dist/8878.8367da80.async.js +1 -0
- package/static/dist/9033.f2e29d04.async.js +1 -0
- package/static/dist/9082.9f6c6520.async.js +1 -0
- package/static/dist/9095.816eeb1a.async.js +1 -0
- package/static/dist/9187.4bacb25e.async.js +1 -0
- package/static/dist/9308.3202ac13.async.js +1 -0
- package/static/dist/9674.1b962b29.chunk.css +1 -0
- package/static/dist/9674.962a6cda.async.js +1 -0
- package/static/dist/9853.695fdd64.async.js +1 -0
- package/static/dist/9974.c867bc89.async.js +1 -0
- package/static/dist/index.html +2 -2
- package/static/dist/{layouts__index.c986408d.async.js → layouts__index.623b87d2.async.js} +1 -1
- package/static/dist/preload_helper.68e6986a.js +1 -0
- package/static/dist/{src__pages__config__index.de6dca30.async.js → src__pages__config__index.622b6ee8.async.js} +1 -1
- package/static/dist/src__pages__crontab__const.323d5124.async.js +1 -0
- package/static/dist/{src__pages__crontab__detail.80d30a01.async.js → src__pages__crontab__detail.c7d28d13.async.js} +1 -1
- package/static/dist/src__pages__crontab__index.b6a281d6.async.js +1 -0
- package/static/dist/{src__pages__crontab__logModal.6a345e8a.async.js → src__pages__crontab__logModal.0767c532.async.js} +1 -1
- package/static/dist/src__pages__crontab__modal.b20074c2.async.js +1 -0
- package/static/dist/src__pages__crontab__type.db7c1858.async.js +1 -0
- package/static/dist/src__pages__dependence__modal.1bb8572d.async.js +1 -0
- package/static/dist/{src__pages__diff__index.a4176b58.async.js → src__pages__diff__index.013b7c75.async.js} +1 -1
- package/static/dist/src__pages__env__editNameModal.115bb8ea.async.js +1 -0
- package/static/dist/{src__pages__env__index.f3bfe0c7.async.js → src__pages__env__index.7205e719.async.js} +1 -1
- package/static/dist/{src__pages__env__modal.066399fd.async.js → src__pages__env__modal.d923acdb.async.js} +1 -1
- package/static/dist/{src__pages__error__index.656c9940.async.js → src__pages__error__index.a17578c5.async.js} +1 -1
- package/static/dist/{src__pages__initialization__index.75484c39.async.js → src__pages__initialization__index.684197ee.async.js} +1 -1
- package/static/dist/{src__pages__log__index.8a782756.async.js → src__pages__log__index.43024b22.async.js} +1 -1
- package/static/dist/{src__pages__login__index.8a653852.async.js → src__pages__login__index.cd6e3152.async.js} +1 -1
- package/static/dist/{src__pages__script__editModal.e7bf71bd.async.js → src__pages__script__editModal.10dd9857.async.js} +1 -1
- package/static/dist/src__pages__script__editNameModal.7d1cc6b4.async.js +1 -0
- package/static/dist/src__pages__script__index.1d172186.async.js +1 -0
- package/static/dist/src__pages__script__renameModal.09dfb133.async.js +1 -0
- package/static/dist/src__pages__script__saveModal.21b81bcc.async.js +1 -0
- package/static/dist/src__pages__script__setting.c6503aaf.async.js +1 -0
- package/static/dist/{src__pages__setting__about.f6325812.chunk.css → src__pages__setting__about.e6db5090.chunk.css} +1 -1
- package/static/dist/src__pages__setting__appModal.b115baf8.async.js +1 -0
- package/static/dist/{src__pages__setting__checkUpdate.04c00c9c.async.js → src__pages__setting__checkUpdate.c152dfaf.async.js} +1 -1
- package/static/dist/{src__pages__setting__dependence.55c598d0.chunk.css → src__pages__setting__dependence.28ecea01.chunk.css} +1 -1
- package/static/dist/{src__pages__setting__dependence.0dd0969b.async.js → src__pages__setting__dependence.f3afc194.async.js} +1 -1
- package/static/dist/{src__pages__setting__index.d666f8ec.chunk.css → src__pages__setting__index.7cf46d4a.chunk.css} +1 -1
- package/static/dist/src__pages__setting__index.f6051186.async.js +1 -0
- package/static/dist/{src__pages__setting__notification.b038afec.async.js → src__pages__setting__notification.b7722a0b.async.js} +1 -1
- package/static/dist/{src__pages__setting__other.55c598d0.chunk.css → src__pages__setting__other.28ecea01.chunk.css} +1 -1
- package/static/dist/src__pages__setting__other.45f67bd2.async.js +1 -0
- package/static/dist/{src__pages__setting__security.af57bd6a.async.js → src__pages__setting__security.534a5e67.async.js} +1 -1
- package/static/dist/{src__pages__setting__systemLog.501844bd.async.js → src__pages__setting__systemLog.cb8a2174.async.js} +1 -1
- package/static/dist/{src__pages__subscription__index.b43143e7.async.js → src__pages__subscription__index.30fefd8e.async.js} +1 -1
- package/static/dist/{src__pages__subscription__logModal.02c80eb3.async.js → src__pages__subscription__logModal.9bf0b4f6.async.js} +1 -1
- package/static/dist/src__pages__subscription__modal.10cd630d.async.js +1 -0
- package/static/dist/static/codicon.63b8ee5b.ttf +0 -0
- package/static/dist/{umi.e783bacd.js → umi.e6d28cd5.js} +1 -1
- package/version.yaml +9 -6
- package/static/dist/2208.c1a40612.async.js +0 -1
- package/static/dist/3127.2579e73a.async.js +0 -1
- package/static/dist/4402.49bbe98d.async.js +0 -1
- package/static/dist/8826.37966028.async.js +0 -1
- package/static/dist/preload_helper.6482f199.js +0 -1
- package/static/dist/src__pages__crontab__index.9e38b6dc.async.js +0 -1
- package/static/dist/src__pages__crontab__modal.78b1e588.async.js +0 -1
- package/static/dist/src__pages__crontab__type.bde5cda4.async.js +0 -1
- package/static/dist/src__pages__dependence__modal.e6696a7c.async.js +0 -1
- package/static/dist/src__pages__env__editNameModal.02322e80.async.js +0 -1
- package/static/dist/src__pages__script__editNameModal.c048343e.async.js +0 -1
- package/static/dist/src__pages__script__index.9d9099c1.async.js +0 -1
- package/static/dist/src__pages__script__renameModal.357c6c72.async.js +0 -1
- package/static/dist/src__pages__script__saveModal.61fcb1fe.async.js +0 -1
- package/static/dist/src__pages__script__setting.f2d78204.async.js +0 -1
- package/static/dist/src__pages__setting__appModal.9eeaeee7.async.js +0 -1
- package/static/dist/src__pages__setting__index.46a8e768.async.js +0 -1
- package/static/dist/src__pages__setting__other.0d869d58.async.js +0 -1
- package/static/dist/src__pages__subscription__modal.a61ece75.async.js +0 -1
|
@@ -1,46 +1,44 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
5
|
// protoc v3.17.3
|
|
6
6
|
// source: back/protos/cron.proto
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
8
|
exports.CronClient = exports.CronService = exports.DeleteCronResponse = exports.DeleteCronRequest = exports.AddCronResponse = exports.AddCronRequest = exports.ICron = exports.ISchedule = exports.protobufPackage = void 0;
|
|
12
9
|
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
13
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
14
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
15
12
|
exports.protobufPackage = "com.ql.cron";
|
|
16
13
|
function createBaseISchedule() {
|
|
17
14
|
return { schedule: "" };
|
|
18
15
|
}
|
|
19
16
|
exports.ISchedule = {
|
|
20
|
-
encode(message, writer =
|
|
17
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
21
18
|
if (message.schedule !== "") {
|
|
22
19
|
writer.uint32(10).string(message.schedule);
|
|
23
20
|
}
|
|
24
21
|
return writer;
|
|
25
22
|
},
|
|
26
23
|
decode(input, length) {
|
|
27
|
-
const reader = input instanceof
|
|
24
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
28
25
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
29
26
|
const message = createBaseISchedule();
|
|
30
27
|
while (reader.pos < end) {
|
|
31
28
|
const tag = reader.uint32();
|
|
32
29
|
switch (tag >>> 3) {
|
|
33
|
-
case 1:
|
|
30
|
+
case 1: {
|
|
34
31
|
if (tag !== 10) {
|
|
35
32
|
break;
|
|
36
33
|
}
|
|
37
34
|
message.schedule = reader.string();
|
|
38
35
|
continue;
|
|
36
|
+
}
|
|
39
37
|
}
|
|
40
38
|
if ((tag & 7) === 4 || tag === 0) {
|
|
41
39
|
break;
|
|
42
40
|
}
|
|
43
|
-
reader.
|
|
41
|
+
reader.skip(tag & 7);
|
|
44
42
|
}
|
|
45
43
|
return message;
|
|
46
44
|
},
|
|
@@ -65,10 +63,10 @@ exports.ISchedule = {
|
|
|
65
63
|
},
|
|
66
64
|
};
|
|
67
65
|
function createBaseICron() {
|
|
68
|
-
return { id: "", schedule: "", command: "",
|
|
66
|
+
return { id: "", schedule: "", command: "", extra_schedules: [], name: "" };
|
|
69
67
|
}
|
|
70
68
|
exports.ICron = {
|
|
71
|
-
encode(message, writer =
|
|
69
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
72
70
|
if (message.id !== "") {
|
|
73
71
|
writer.uint32(10).string(message.id);
|
|
74
72
|
}
|
|
@@ -78,8 +76,8 @@ exports.ICron = {
|
|
|
78
76
|
if (message.command !== "") {
|
|
79
77
|
writer.uint32(26).string(message.command);
|
|
80
78
|
}
|
|
81
|
-
for (const v of message.
|
|
82
|
-
exports.ISchedule.encode(v, writer.uint32(34).fork()).
|
|
79
|
+
for (const v of message.extra_schedules) {
|
|
80
|
+
exports.ISchedule.encode(v, writer.uint32(34).fork()).join();
|
|
83
81
|
}
|
|
84
82
|
if (message.name !== "") {
|
|
85
83
|
writer.uint32(42).string(message.name);
|
|
@@ -87,47 +85,52 @@ exports.ICron = {
|
|
|
87
85
|
return writer;
|
|
88
86
|
},
|
|
89
87
|
decode(input, length) {
|
|
90
|
-
const reader = input instanceof
|
|
88
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
91
89
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
92
90
|
const message = createBaseICron();
|
|
93
91
|
while (reader.pos < end) {
|
|
94
92
|
const tag = reader.uint32();
|
|
95
93
|
switch (tag >>> 3) {
|
|
96
|
-
case 1:
|
|
94
|
+
case 1: {
|
|
97
95
|
if (tag !== 10) {
|
|
98
96
|
break;
|
|
99
97
|
}
|
|
100
98
|
message.id = reader.string();
|
|
101
99
|
continue;
|
|
102
|
-
|
|
100
|
+
}
|
|
101
|
+
case 2: {
|
|
103
102
|
if (tag !== 18) {
|
|
104
103
|
break;
|
|
105
104
|
}
|
|
106
105
|
message.schedule = reader.string();
|
|
107
106
|
continue;
|
|
108
|
-
|
|
107
|
+
}
|
|
108
|
+
case 3: {
|
|
109
109
|
if (tag !== 26) {
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
112
112
|
message.command = reader.string();
|
|
113
113
|
continue;
|
|
114
|
-
|
|
114
|
+
}
|
|
115
|
+
case 4: {
|
|
115
116
|
if (tag !== 34) {
|
|
116
117
|
break;
|
|
117
118
|
}
|
|
118
|
-
message.
|
|
119
|
+
message.extra_schedules.push(exports.ISchedule.decode(reader, reader.uint32()));
|
|
119
120
|
continue;
|
|
120
|
-
|
|
121
|
+
}
|
|
122
|
+
case 5: {
|
|
121
123
|
if (tag !== 42) {
|
|
122
124
|
break;
|
|
123
125
|
}
|
|
124
126
|
message.name = reader.string();
|
|
125
127
|
continue;
|
|
128
|
+
}
|
|
126
129
|
}
|
|
127
130
|
if ((tag & 7) === 4 || tag === 0) {
|
|
128
131
|
break;
|
|
129
132
|
}
|
|
130
|
-
reader.
|
|
133
|
+
reader.skip(tag & 7);
|
|
131
134
|
}
|
|
132
135
|
return message;
|
|
133
136
|
},
|
|
@@ -136,8 +139,8 @@ exports.ICron = {
|
|
|
136
139
|
id: isSet(object.id) ? globalThis.String(object.id) : "",
|
|
137
140
|
schedule: isSet(object.schedule) ? globalThis.String(object.schedule) : "",
|
|
138
141
|
command: isSet(object.command) ? globalThis.String(object.command) : "",
|
|
139
|
-
|
|
140
|
-
? object.
|
|
142
|
+
extra_schedules: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.extra_schedules)
|
|
143
|
+
? object.extra_schedules.map((e) => exports.ISchedule.fromJSON(e))
|
|
141
144
|
: [],
|
|
142
145
|
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
143
146
|
};
|
|
@@ -154,8 +157,8 @@ exports.ICron = {
|
|
|
154
157
|
if (message.command !== "") {
|
|
155
158
|
obj.command = message.command;
|
|
156
159
|
}
|
|
157
|
-
if ((_a = message.
|
|
158
|
-
obj.
|
|
160
|
+
if ((_a = message.extra_schedules) === null || _a === void 0 ? void 0 : _a.length) {
|
|
161
|
+
obj.extra_schedules = message.extra_schedules.map((e) => exports.ISchedule.toJSON(e));
|
|
159
162
|
}
|
|
160
163
|
if (message.name !== "") {
|
|
161
164
|
obj.name = message.name;
|
|
@@ -171,7 +174,7 @@ exports.ICron = {
|
|
|
171
174
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
172
175
|
message.schedule = (_b = object.schedule) !== null && _b !== void 0 ? _b : "";
|
|
173
176
|
message.command = (_c = object.command) !== null && _c !== void 0 ? _c : "";
|
|
174
|
-
message.
|
|
177
|
+
message.extra_schedules = ((_d = object.extra_schedules) === null || _d === void 0 ? void 0 : _d.map((e) => exports.ISchedule.fromPartial(e))) || [];
|
|
175
178
|
message.name = (_e = object.name) !== null && _e !== void 0 ? _e : "";
|
|
176
179
|
return message;
|
|
177
180
|
},
|
|
@@ -180,30 +183,31 @@ function createBaseAddCronRequest() {
|
|
|
180
183
|
return { crons: [] };
|
|
181
184
|
}
|
|
182
185
|
exports.AddCronRequest = {
|
|
183
|
-
encode(message, writer =
|
|
186
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
184
187
|
for (const v of message.crons) {
|
|
185
|
-
exports.ICron.encode(v, writer.uint32(10).fork()).
|
|
188
|
+
exports.ICron.encode(v, writer.uint32(10).fork()).join();
|
|
186
189
|
}
|
|
187
190
|
return writer;
|
|
188
191
|
},
|
|
189
192
|
decode(input, length) {
|
|
190
|
-
const reader = input instanceof
|
|
193
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
191
194
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
192
195
|
const message = createBaseAddCronRequest();
|
|
193
196
|
while (reader.pos < end) {
|
|
194
197
|
const tag = reader.uint32();
|
|
195
198
|
switch (tag >>> 3) {
|
|
196
|
-
case 1:
|
|
199
|
+
case 1: {
|
|
197
200
|
if (tag !== 10) {
|
|
198
201
|
break;
|
|
199
202
|
}
|
|
200
203
|
message.crons.push(exports.ICron.decode(reader, reader.uint32()));
|
|
201
204
|
continue;
|
|
205
|
+
}
|
|
202
206
|
}
|
|
203
207
|
if ((tag & 7) === 4 || tag === 0) {
|
|
204
208
|
break;
|
|
205
209
|
}
|
|
206
|
-
reader.
|
|
210
|
+
reader.skip(tag & 7);
|
|
207
211
|
}
|
|
208
212
|
return message;
|
|
209
213
|
},
|
|
@@ -232,11 +236,11 @@ function createBaseAddCronResponse() {
|
|
|
232
236
|
return {};
|
|
233
237
|
}
|
|
234
238
|
exports.AddCronResponse = {
|
|
235
|
-
encode(_, writer =
|
|
239
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
236
240
|
return writer;
|
|
237
241
|
},
|
|
238
242
|
decode(input, length) {
|
|
239
|
-
const reader = input instanceof
|
|
243
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
240
244
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
241
245
|
const message = createBaseAddCronResponse();
|
|
242
246
|
while (reader.pos < end) {
|
|
@@ -246,7 +250,7 @@ exports.AddCronResponse = {
|
|
|
246
250
|
if ((tag & 7) === 4 || tag === 0) {
|
|
247
251
|
break;
|
|
248
252
|
}
|
|
249
|
-
reader.
|
|
253
|
+
reader.skip(tag & 7);
|
|
250
254
|
}
|
|
251
255
|
return message;
|
|
252
256
|
},
|
|
@@ -269,30 +273,31 @@ function createBaseDeleteCronRequest() {
|
|
|
269
273
|
return { ids: [] };
|
|
270
274
|
}
|
|
271
275
|
exports.DeleteCronRequest = {
|
|
272
|
-
encode(message, writer =
|
|
276
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
273
277
|
for (const v of message.ids) {
|
|
274
278
|
writer.uint32(10).string(v);
|
|
275
279
|
}
|
|
276
280
|
return writer;
|
|
277
281
|
},
|
|
278
282
|
decode(input, length) {
|
|
279
|
-
const reader = input instanceof
|
|
283
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
280
284
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
281
285
|
const message = createBaseDeleteCronRequest();
|
|
282
286
|
while (reader.pos < end) {
|
|
283
287
|
const tag = reader.uint32();
|
|
284
288
|
switch (tag >>> 3) {
|
|
285
|
-
case 1:
|
|
289
|
+
case 1: {
|
|
286
290
|
if (tag !== 10) {
|
|
287
291
|
break;
|
|
288
292
|
}
|
|
289
293
|
message.ids.push(reader.string());
|
|
290
294
|
continue;
|
|
295
|
+
}
|
|
291
296
|
}
|
|
292
297
|
if ((tag & 7) === 4 || tag === 0) {
|
|
293
298
|
break;
|
|
294
299
|
}
|
|
295
|
-
reader.
|
|
300
|
+
reader.skip(tag & 7);
|
|
296
301
|
}
|
|
297
302
|
return message;
|
|
298
303
|
},
|
|
@@ -321,11 +326,11 @@ function createBaseDeleteCronResponse() {
|
|
|
321
326
|
return {};
|
|
322
327
|
}
|
|
323
328
|
exports.DeleteCronResponse = {
|
|
324
|
-
encode(_, writer =
|
|
329
|
+
encode(_, writer = new wire_1.BinaryWriter()) {
|
|
325
330
|
return writer;
|
|
326
331
|
},
|
|
327
332
|
decode(input, length) {
|
|
328
|
-
const reader = input instanceof
|
|
333
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
329
334
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
330
335
|
const message = createBaseDeleteCronResponse();
|
|
331
336
|
while (reader.pos < end) {
|
|
@@ -335,7 +340,7 @@ exports.DeleteCronResponse = {
|
|
|
335
340
|
if ((tag & 7) === 4 || tag === 0) {
|
|
336
341
|
break;
|
|
337
342
|
}
|
|
338
|
-
reader.
|
|
343
|
+
reader.skip(tag & 7);
|
|
339
344
|
}
|
|
340
345
|
return message;
|
|
341
346
|
},
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
3
3
|
// versions:
|
|
4
|
-
// protoc-gen-ts_proto
|
|
4
|
+
// protoc-gen-ts_proto v2.6.1
|
|
5
5
|
// protoc v3.17.3
|
|
6
6
|
// source: back/protos/health.proto
|
|
7
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
8
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
9
|
-
};
|
|
10
7
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
8
|
exports.HealthClient = exports.HealthService = exports.HealthCheckResponse = exports.HealthCheckRequest = exports.healthCheckResponse_ServingStatusToJSON = exports.healthCheckResponse_ServingStatusFromJSON = exports.HealthCheckResponse_ServingStatus = exports.protobufPackage = void 0;
|
|
12
9
|
/* eslint-disable */
|
|
10
|
+
const wire_1 = require("@bufbuild/protobuf/wire");
|
|
13
11
|
const grpc_js_1 = require("@grpc/grpc-js");
|
|
14
|
-
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
15
12
|
exports.protobufPackage = "com.ql.health";
|
|
16
13
|
var HealthCheckResponse_ServingStatus;
|
|
17
14
|
(function (HealthCheckResponse_ServingStatus) {
|
|
@@ -62,30 +59,31 @@ function createBaseHealthCheckRequest() {
|
|
|
62
59
|
return { service: "" };
|
|
63
60
|
}
|
|
64
61
|
exports.HealthCheckRequest = {
|
|
65
|
-
encode(message, writer =
|
|
62
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
66
63
|
if (message.service !== "") {
|
|
67
64
|
writer.uint32(10).string(message.service);
|
|
68
65
|
}
|
|
69
66
|
return writer;
|
|
70
67
|
},
|
|
71
68
|
decode(input, length) {
|
|
72
|
-
const reader = input instanceof
|
|
69
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
73
70
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
74
71
|
const message = createBaseHealthCheckRequest();
|
|
75
72
|
while (reader.pos < end) {
|
|
76
73
|
const tag = reader.uint32();
|
|
77
74
|
switch (tag >>> 3) {
|
|
78
|
-
case 1:
|
|
75
|
+
case 1: {
|
|
79
76
|
if (tag !== 10) {
|
|
80
77
|
break;
|
|
81
78
|
}
|
|
82
79
|
message.service = reader.string();
|
|
83
80
|
continue;
|
|
81
|
+
}
|
|
84
82
|
}
|
|
85
83
|
if ((tag & 7) === 4 || tag === 0) {
|
|
86
84
|
break;
|
|
87
85
|
}
|
|
88
|
-
reader.
|
|
86
|
+
reader.skip(tag & 7);
|
|
89
87
|
}
|
|
90
88
|
return message;
|
|
91
89
|
},
|
|
@@ -113,30 +111,31 @@ function createBaseHealthCheckResponse() {
|
|
|
113
111
|
return { status: 0 };
|
|
114
112
|
}
|
|
115
113
|
exports.HealthCheckResponse = {
|
|
116
|
-
encode(message, writer =
|
|
114
|
+
encode(message, writer = new wire_1.BinaryWriter()) {
|
|
117
115
|
if (message.status !== 0) {
|
|
118
116
|
writer.uint32(8).int32(message.status);
|
|
119
117
|
}
|
|
120
118
|
return writer;
|
|
121
119
|
},
|
|
122
120
|
decode(input, length) {
|
|
123
|
-
const reader = input instanceof
|
|
121
|
+
const reader = input instanceof wire_1.BinaryReader ? input : new wire_1.BinaryReader(input);
|
|
124
122
|
let end = length === undefined ? reader.len : reader.pos + length;
|
|
125
123
|
const message = createBaseHealthCheckResponse();
|
|
126
124
|
while (reader.pos < end) {
|
|
127
125
|
const tag = reader.uint32();
|
|
128
126
|
switch (tag >>> 3) {
|
|
129
|
-
case 1:
|
|
127
|
+
case 1: {
|
|
130
128
|
if (tag !== 8) {
|
|
131
129
|
break;
|
|
132
130
|
}
|
|
133
131
|
message.status = reader.int32();
|
|
134
132
|
continue;
|
|
133
|
+
}
|
|
135
134
|
}
|
|
136
135
|
if ((tag & 7) === 4 || tag === 0) {
|
|
137
136
|
break;
|
|
138
137
|
}
|
|
139
|
-
reader.
|
|
138
|
+
reader.skip(tag & 7);
|
|
140
139
|
}
|
|
141
140
|
return message;
|
|
142
141
|
},
|
|
@@ -11,13 +11,13 @@ const logger_1 = __importDefault(require("../loaders/logger"));
|
|
|
11
11
|
const addCron = (call, callback) => {
|
|
12
12
|
var _a;
|
|
13
13
|
for (const item of call.request.crons) {
|
|
14
|
-
const { id, schedule, command,
|
|
14
|
+
const { id, schedule, command, extra_schedules, name } = item;
|
|
15
15
|
if (data_1.scheduleStacks.has(id)) {
|
|
16
16
|
(_a = data_1.scheduleStacks.get(id)) === null || _a === void 0 ? void 0 : _a.forEach((x) => x.cancel());
|
|
17
17
|
}
|
|
18
18
|
logger_1.default.info('[schedule][创建定时任务], 任务ID: %s, 名称: %s, cron: %s, 执行命令: %s', id, name, schedule, command);
|
|
19
|
-
if (
|
|
20
|
-
|
|
19
|
+
if (extra_schedules === null || extra_schedules === void 0 ? void 0 : extra_schedules.length) {
|
|
20
|
+
extra_schedules.forEach((x) => {
|
|
21
21
|
logger_1.default.info('[schedule][创建定时任务], 任务ID: %s, 名称: %s, cron: %s, 执行命令: %s', id, name, x.schedule, command);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
@@ -26,8 +26,8 @@ const addCron = (call, callback) => {
|
|
|
26
26
|
logger_1.default.info(`[schedule][准备运行任务] 命令: ${command}`);
|
|
27
27
|
(0, runCron_1.runCron)(command, item);
|
|
28
28
|
}),
|
|
29
|
-
...((
|
|
30
|
-
?
|
|
29
|
+
...((extra_schedules === null || extra_schedules === void 0 ? void 0 : extra_schedules.length)
|
|
30
|
+
? extra_schedules.map((x) => node_schedule_1.default.scheduleJob(id, x.schedule, async () => {
|
|
31
31
|
logger_1.default.info(`[schedule][准备运行任务] 命令: ${command}`);
|
|
32
32
|
(0, runCron_1.runCron)(command, item);
|
|
33
33
|
}))
|
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.systemNotify = exports.getEnvById = exports.updateEnvNames = exports.enableEnvs = exports.disableEnvs = exports.moveEnv = exports.deleteEnvs = exports.updateEnv = exports.createEnv = exports.getEnvs = void 0;
|
|
17
|
+
exports.deleteCrons = exports.updateCron = exports.createCron = exports.getCronDetail = exports.systemNotify = exports.getEnvById = exports.updateEnvNames = exports.enableEnvs = exports.disableEnvs = exports.moveEnv = exports.deleteEnvs = exports.updateEnv = exports.createEnv = exports.getEnvs = void 0;
|
|
7
18
|
require("reflect-metadata");
|
|
8
19
|
const typedi_1 = require("typedi");
|
|
9
20
|
const env_1 = __importDefault(require("../services/env"));
|
|
10
21
|
const logger_1 = __importDefault(require("../loaders/logger"));
|
|
11
22
|
const pick_1 = __importDefault(require("lodash/pick"));
|
|
12
23
|
const system_1 = __importDefault(require("../services/system"));
|
|
24
|
+
const cron_1 = __importDefault(require("../services/cron"));
|
|
13
25
|
typedi_1.Container.set('logger', logger_1.default);
|
|
14
26
|
const getEnvs = async (call, callback) => {
|
|
15
27
|
try {
|
|
28
|
+
if (!call.request.searchValue) {
|
|
29
|
+
return callback(null, {
|
|
30
|
+
code: 400,
|
|
31
|
+
data: [],
|
|
32
|
+
message: 'searchValue is required',
|
|
33
|
+
});
|
|
34
|
+
}
|
|
16
35
|
const envService = typedi_1.Container.get(env_1.default);
|
|
17
36
|
const data = await envService.envs(call.request.searchValue);
|
|
18
37
|
callback(null, {
|
|
@@ -137,4 +156,70 @@ const systemNotify = async (call, callback) => {
|
|
|
137
156
|
}
|
|
138
157
|
};
|
|
139
158
|
exports.systemNotify = systemNotify;
|
|
159
|
+
const normalizeCronData = (data) => {
|
|
160
|
+
var _a, _b, _c, _d, _e;
|
|
161
|
+
if (!data)
|
|
162
|
+
return undefined;
|
|
163
|
+
return Object.assign(Object.assign({}, data), { sub_id: (_a = data.sub_id) !== null && _a !== void 0 ? _a : undefined, extra_schedules: (_b = data.extra_schedules) !== null && _b !== void 0 ? _b : undefined, pid: (_c = data.pid) !== null && _c !== void 0 ? _c : undefined, task_before: (_d = data.task_before) !== null && _d !== void 0 ? _d : undefined, task_after: (_e = data.task_after) !== null && _e !== void 0 ? _e : undefined });
|
|
164
|
+
};
|
|
165
|
+
const getCronDetail = async (call, callback) => {
|
|
166
|
+
try {
|
|
167
|
+
if (!call.request.log_path) {
|
|
168
|
+
return callback(null, {
|
|
169
|
+
code: 400,
|
|
170
|
+
data: undefined,
|
|
171
|
+
message: 'log_path is required',
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
const cronService = typedi_1.Container.get(cron_1.default);
|
|
175
|
+
const data = (await cronService.find({
|
|
176
|
+
log_path: call.request.log_path,
|
|
177
|
+
}));
|
|
178
|
+
callback(null, { code: 200, data: normalizeCronData(data) });
|
|
179
|
+
}
|
|
180
|
+
catch (e) {
|
|
181
|
+
callback(e);
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
exports.getCronDetail = getCronDetail;
|
|
185
|
+
const createCron = async (call, callback) => {
|
|
186
|
+
try {
|
|
187
|
+
const cronService = typedi_1.Container.get(cron_1.default);
|
|
188
|
+
const data = (await cronService.create(call.request));
|
|
189
|
+
callback(null, { code: 200, data: normalizeCronData(data) });
|
|
190
|
+
}
|
|
191
|
+
catch (e) {
|
|
192
|
+
callback(e);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
exports.createCron = createCron;
|
|
196
|
+
const updateCron = async (call, callback) => {
|
|
197
|
+
try {
|
|
198
|
+
const cronService = typedi_1.Container.get(cron_1.default);
|
|
199
|
+
const _a = call.request, { id } = _a, fields = __rest(_a, ["id"]);
|
|
200
|
+
const updateRequest = Object.assign({ id }, Object.entries(fields).reduce((acc, [key, value]) => {
|
|
201
|
+
if (value !== undefined) {
|
|
202
|
+
acc[key] = value;
|
|
203
|
+
}
|
|
204
|
+
return acc;
|
|
205
|
+
}, {}));
|
|
206
|
+
const data = (await cronService.update(updateRequest));
|
|
207
|
+
callback(null, { code: 200, data: normalizeCronData(data) });
|
|
208
|
+
}
|
|
209
|
+
catch (e) {
|
|
210
|
+
callback(e);
|
|
211
|
+
}
|
|
212
|
+
};
|
|
213
|
+
exports.updateCron = updateCron;
|
|
214
|
+
const deleteCrons = async (call, callback) => {
|
|
215
|
+
try {
|
|
216
|
+
const cronService = typedi_1.Container.get(cron_1.default);
|
|
217
|
+
await cronService.remove(call.request.ids);
|
|
218
|
+
callback(null, { code: 200 });
|
|
219
|
+
}
|
|
220
|
+
catch (e) {
|
|
221
|
+
callback(e);
|
|
222
|
+
}
|
|
223
|
+
};
|
|
224
|
+
exports.deleteCrons = deleteCrons;
|
|
140
225
|
//# sourceMappingURL=api.js.map
|