agendash 4.0.0 → 6.0.1
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/LICENSE.md +25 -0
- package/README.md +109 -200
- package/dist/AgendashController.d.ts +50 -0
- package/dist/AgendashController.js +176 -0
- package/dist/AgendashController.js.map +1 -0
- package/dist/csp.d.ts +1 -0
- package/dist/csp.js +15 -0
- package/dist/csp.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -0
- package/dist/middlewares/express.d.ts +22 -0
- package/dist/middlewares/express.js +119 -0
- package/dist/middlewares/express.js.map +1 -0
- package/dist/middlewares/fastify.d.ts +18 -0
- package/dist/middlewares/fastify.js +129 -0
- package/dist/middlewares/fastify.js.map +1 -0
- package/dist/middlewares/hapi.d.ts +28 -0
- package/dist/middlewares/hapi.js +198 -0
- package/dist/middlewares/hapi.js.map +1 -0
- package/dist/middlewares/koa.d.ts +25 -0
- package/dist/middlewares/koa.js +139 -0
- package/dist/middlewares/koa.js.map +1 -0
- package/dist/types.d.ts +154 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +77 -62
- package/public/assets/index-CIdOb8D1.css +5 -0
- package/public/assets/index-Ct6Ovrls.js +17 -0
- package/public/index.html +10 -52
- package/Dockerfile +0 -23
- package/History.md +0 -118
- package/LICENSE +0 -21
- package/all-jobs.png +0 -0
- package/app.js +0 -23
- package/bin/agendash-standalone-fastify.js +0 -61
- package/bin/agendash-standalone-hapi.js +0 -60
- package/bin/agendash-standalone-koa.js +0 -56
- package/bin/agendash-standalone.js +0 -64
- package/create-job.png +0 -0
- package/entrypoint.sh +0 -5
- package/lib/controllers/agendash.js +0 -341
- package/lib/csp.js +0 -28
- package/lib/middlewares/README.md +0 -59
- package/lib/middlewares/express.js +0 -80
- package/lib/middlewares/fastify.js +0 -77
- package/lib/middlewares/hapi.js +0 -101
- package/lib/middlewares/koa.js +0 -77
- package/mobile-ui-sm.png +0 -0
- package/mobile-ui-xs.png +0 -0
- package/public/android-chrome-192x192.png +0 -0
- package/public/android-chrome-512x512.png +0 -0
- package/public/app/assets/ArgensdashV2Logo.svg +0 -18
- package/public/app/css/styles.css +0 -233
- package/public/app/js/confirmDelete.js +0 -40
- package/public/app/js/confirmDeleteMulti.js +0 -45
- package/public/app/js/confirmRequeue.js +0 -40
- package/public/app/js/confirmRequeueMulti.js +0 -45
- package/public/app/js/confirms.js +0 -8
- package/public/app/js/jobdetail.js +0 -48
- package/public/app/js/joblist.js +0 -248
- package/public/app/js/main.js +0 -283
- package/public/app/js/newJob.js +0 -89
- package/public/app/js/sidebar.js +0 -121
- package/public/app/js/topbar.js +0 -95
- package/public/apple-touch-icon.png +0 -0
- package/public/favicon-16x16.png +0 -0
- package/public/favicon-32x32.png +0 -0
- package/public/favicon.ico +0 -0
- package/public/site.webmanifest +0 -1
- package/search.png +0 -0
package/History.md
DELETED
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
# 4.0.0
|
|
2
|
-
|
|
3
|
-
- Drop support for node 12. Add support for node 18 and MongoDB 5.0.
|
|
4
|
-
- Fastify upgraded to v4. #215
|
|
5
|
-
- Various UI fixes. #212 #203
|
|
6
|
-
- Vulnerability fixes. #220
|
|
7
|
-
- Requeue and Delete job fixes. #226 #227
|
|
8
|
-
|
|
9
|
-
# 3.1.0
|
|
10
|
-
|
|
11
|
-
- Add Content-Security-Policy header to all server implementations
|
|
12
|
-
|
|
13
|
-
# 3.0.0
|
|
14
|
-
|
|
15
|
-
- BREAKING: Drop support for MongoDB v3.4, only >=v3.6 is supported now.
|
|
16
|
-
- BREAKING: Drop support for node 10, but added node 16 support.
|
|
17
|
-
- feat: add `fastify` support #194
|
|
18
|
-
- fix: a lot of rendering issues
|
|
19
|
-
- fix: newer version of `mongodb` compatibility #193
|
|
20
|
-
|
|
21
|
-
This file won't mention contributors anymore. Because all contributors are listed on the [main page](https://github.com/agenda/agendash) now. Thanks, GitHub!
|
|
22
|
-
|
|
23
|
-
# 2.1.0 - JSON validation when creating jobs
|
|
24
|
-
|
|
25
|
-
- feat: Add json validator message when createJob #169 (thanks @love8587)
|
|
26
|
-
|
|
27
|
-
# 2.0.0 - First public release of v2 as Agendash proper
|
|
28
|
-
|
|
29
|
-
Complete rewrite of Agendash in Vue.js!
|
|
30
|
-
|
|
31
|
-
Supports Node.js 10 and up.
|
|
32
|
-
|
|
33
|
-
# 2.0.0-beta0.8.2 / 2020-12-04 - As agendash2, in parallel repository https://github.com/agenda/agendash-v2
|
|
34
|
-
|
|
35
|
-
- fix: search by job name, small side bar design fix and toggle improvements (thanks @simllll)
|
|
36
|
-
- fix: joblist reset fix (thanks @simllll)
|
|
37
|
-
- fix: improve design on desktop + close sidebar on mobile when clicked on something (thanks @simllll)
|
|
38
|
-
- feat: enable options.query as number (thanks @Enubia @simllll)
|
|
39
|
-
- feat: multiselect checkboxes (thanks @Enubia @simllll)
|
|
40
|
-
|
|
41
|
-
# 2.0.0-beta0.1.0 / 2020-04-30 - First public release of Agendash2 in parallel repository https://github.com/agenda/agendash-v2
|
|
42
|
-
|
|
43
|
-
- New frontend written from scratch in Vue.js
|
|
44
|
-
- Add search
|
|
45
|
-
- Add pagination
|
|
46
|
-
- Change default refresh interval to 60 seconds
|
|
47
|
-
|
|
48
|
-
# 1.0.0 / 2019-02-25
|
|
49
|
-
|
|
50
|
-
- Add Hapi v17 middleware, drop support for Node.js v6 & v7 (#81) by umens (**BREAKING**)
|
|
51
|
-
- Support Agenda version 2 by alexkwolfe (**BREAKING**)
|
|
52
|
-
|
|
53
|
-
# 0.5.0 / 2019-02-25
|
|
54
|
-
|
|
55
|
-
- Update dependencies (#69, #70) (**BREAKING**)
|
|
56
|
-
- Agenda `>=0.7.0 <1.0.0` → `^1.0.3` and thus require MongoDB v3+
|
|
57
|
-
- async `^1.0.0` → `^2.6.0`
|
|
58
|
-
- Drop support for Node.js v4 and v5 (might still work but we're stopping testing these) (**BREAKING**)
|
|
59
|
-
- Switch testing with Mocha to [Ava](https://www.npmjs.com/package/ava) (#70)
|
|
60
|
-
- Docker support (#54) by WoLfulus
|
|
61
|
-
- Fix 404 errors when deleting and re-queuing jobs (#61) by koresar
|
|
62
|
-
|
|
63
|
-
# 0.4.0 / 2016-10-27
|
|
64
|
-
|
|
65
|
-
- (simison) Agenda dependency version `<1.0.0` to avoid breaking dependency.
|
|
66
|
-
- (loris) Fix #24 - Added indexes for faster queries.
|
|
67
|
-
- Fix #28 - Removed dependency on Mongo Driver.
|
|
68
|
-
- Added API tests with mocha and supertest. No frontend tests.
|
|
69
|
-
|
|
70
|
-
# 0.3.2 / 2016-06-30
|
|
71
|
-
|
|
72
|
-
- (HugoCornu) Fix #19 "Schedule Job" - Don't repeat job if user didn't want it repeated
|
|
73
|
-
|
|
74
|
-
# 0.3.1 / 2016-04-12
|
|
75
|
-
|
|
76
|
-
- (simison) Add engines key to package.json
|
|
77
|
-
|
|
78
|
-
# 0.3.0 / 2016-04-04
|
|
79
|
-
|
|
80
|
-
- (bh-chaker) Schedule Job Feature - create new jobs from the UI
|
|
81
|
-
- Limit to 200 jobs on page, no UI for configuration
|
|
82
|
-
|
|
83
|
-
# 0.2.1 / 2016-03-25
|
|
84
|
-
|
|
85
|
-
- (vziukas) Recurring job count and labels
|
|
86
|
-
- Fixed "queued" label colors
|
|
87
|
-
|
|
88
|
-
# 0.2.0 / 2016-03-18
|
|
89
|
-
|
|
90
|
-
- (vziukas) Configurable title
|
|
91
|
-
- Middleware option moved to "options" object
|
|
92
|
-
|
|
93
|
-
# 0.1.1 / 2016-03-17
|
|
94
|
-
|
|
95
|
-
- (vziukas) multiple instances of agendash can each have a separate agenda
|
|
96
|
-
|
|
97
|
-
# 0.1.0 / 2016-03-15
|
|
98
|
-
|
|
99
|
-
- (rapidia) remove "arrow function" syntax for non-chrome browsers
|
|
100
|
-
- (ebourmalo) Fix the middleware usage and use a proper structure
|
|
101
|
-
|
|
102
|
-
# 0.0.5 / 2016-02-24
|
|
103
|
-
|
|
104
|
-
- Batch requeue and delete
|
|
105
|
-
- Select All and Select None
|
|
106
|
-
|
|
107
|
-
# 0.0.4 / 2016-02-24
|
|
108
|
-
|
|
109
|
-
- Select multiple jobs
|
|
110
|
-
|
|
111
|
-
# 0.0.2 / 2016-02-23
|
|
112
|
-
|
|
113
|
-
- version bump so npm will update docs
|
|
114
|
-
- Added screenshots
|
|
115
|
-
|
|
116
|
-
# 0.0.1 / 2016-02-23
|
|
117
|
-
|
|
118
|
-
- Initial Release
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) Agenda maintainers
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/all-jobs.png
DELETED
|
Binary file
|
package/app.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
const path = require("path");
|
|
3
|
-
|
|
4
|
-
module.exports = (agenda, options) => {
|
|
5
|
-
options = options || {};
|
|
6
|
-
if (!options.middleware) {
|
|
7
|
-
options.middleware = "express";
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
const agendash = require("./lib/controllers/agendash")(agenda, options);
|
|
11
|
-
const middlewarePath = path.join(
|
|
12
|
-
__dirname,
|
|
13
|
-
"./lib/middlewares",
|
|
14
|
-
options.middleware
|
|
15
|
-
);
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
return require(middlewarePath)(agendash);
|
|
19
|
-
} catch (error) {
|
|
20
|
-
console.error(error);
|
|
21
|
-
throw new Error(`Middleware load failed with ${JSON.stringify(options)}`);
|
|
22
|
-
}
|
|
23
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const Agenda = require("agenda");
|
|
4
|
-
const agendash = require("../app");
|
|
5
|
-
const Fastify = require("fastify");
|
|
6
|
-
const program = require("commander");
|
|
7
|
-
|
|
8
|
-
program
|
|
9
|
-
.option(
|
|
10
|
-
"-d, --db <db>",
|
|
11
|
-
"[required] Mongo connection string, same as Agenda connection string"
|
|
12
|
-
)
|
|
13
|
-
.option(
|
|
14
|
-
"-c, --collection <collection>",
|
|
15
|
-
"[optional] Mongo collection, same as Agenda collection name, default agendaJobs",
|
|
16
|
-
"agendaJobs"
|
|
17
|
-
)
|
|
18
|
-
.option(
|
|
19
|
-
"-p, --port <port>",
|
|
20
|
-
"[optional] Server port, default 3000",
|
|
21
|
-
(n, d) => Number(n) || d,
|
|
22
|
-
3000
|
|
23
|
-
)
|
|
24
|
-
.option(
|
|
25
|
-
"-t, --title <title>",
|
|
26
|
-
"[optional] Page title, default Agendash",
|
|
27
|
-
"Agendash"
|
|
28
|
-
)
|
|
29
|
-
.option(
|
|
30
|
-
"-p, --path <path>",
|
|
31
|
-
"[optional] Path to bind Agendash to, default /",
|
|
32
|
-
"/"
|
|
33
|
-
)
|
|
34
|
-
.parse(process.argv);
|
|
35
|
-
|
|
36
|
-
if (!program.db) {
|
|
37
|
-
console.error("--db required");
|
|
38
|
-
process.exit(1);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
if (!program.path.startsWith("/")) {
|
|
42
|
-
console.error("--path must begin with /");
|
|
43
|
-
process.exit(1);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
const fastify = Fastify();
|
|
47
|
-
|
|
48
|
-
const agenda = new Agenda().database(program.db, program.collection);
|
|
49
|
-
|
|
50
|
-
fastify.register(
|
|
51
|
-
agendash(agenda, {
|
|
52
|
-
middleware: "fastify",
|
|
53
|
-
title: program.title,
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
fastify.listen({ port: program.port }, function () {
|
|
58
|
-
console.log(
|
|
59
|
-
`Agendash started http://localhost:${program.port}${program.path}`
|
|
60
|
-
);
|
|
61
|
-
});
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const { Agenda } = require("agenda");
|
|
4
|
-
const agendash = require("../app");
|
|
5
|
-
const Hapi = require("@hapi/hapi");
|
|
6
|
-
const program = require("commander");
|
|
7
|
-
|
|
8
|
-
program
|
|
9
|
-
.option(
|
|
10
|
-
"-d, --db <db>",
|
|
11
|
-
"[required] Mongo connection string, same as Agenda connection string"
|
|
12
|
-
)
|
|
13
|
-
.option(
|
|
14
|
-
"-c, --collection <collection>",
|
|
15
|
-
"[optional] Mongo collection, same as Agenda collection name, default agendaJobs",
|
|
16
|
-
"agendaJobs"
|
|
17
|
-
)
|
|
18
|
-
.option(
|
|
19
|
-
"-p, --port <port>",
|
|
20
|
-
"[optional] Server port, default 3000",
|
|
21
|
-
(n, d) => Number(n) || d,
|
|
22
|
-
3000
|
|
23
|
-
)
|
|
24
|
-
.option(
|
|
25
|
-
"-t, --title <title>",
|
|
26
|
-
"[optional] Page title, default Agendash",
|
|
27
|
-
"Agendash"
|
|
28
|
-
)
|
|
29
|
-
.parse(process.argv);
|
|
30
|
-
|
|
31
|
-
if (!program.db) {
|
|
32
|
-
console.error("--db required");
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const init = async () => {
|
|
37
|
-
const server = Hapi.server({
|
|
38
|
-
port: 3002,
|
|
39
|
-
host: "localhost",
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
const agenda = new Agenda().database(program.db, program.collection);
|
|
43
|
-
|
|
44
|
-
await server.register(require("@hapi/inert"));
|
|
45
|
-
await server.register(
|
|
46
|
-
agendash(agenda, {
|
|
47
|
-
middleware: "hapi",
|
|
48
|
-
})
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
await server.start();
|
|
52
|
-
console.log("Server running on %s", server.info.uri);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
process.on("unhandledRejection", (error) => {
|
|
56
|
-
console.log(error);
|
|
57
|
-
process.exit(1);
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
init();
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const { Agenda } = require("agenda");
|
|
4
|
-
const agendash = require("../app");
|
|
5
|
-
const Koa = require("koa");
|
|
6
|
-
const program = require("commander");
|
|
7
|
-
|
|
8
|
-
program
|
|
9
|
-
.option(
|
|
10
|
-
"-d, --db <db>",
|
|
11
|
-
"[required] Mongo connection string, same as Agenda connection string"
|
|
12
|
-
)
|
|
13
|
-
.option(
|
|
14
|
-
"-c, --collection <collection>",
|
|
15
|
-
"[optional] Mongo collection, same as Agenda collection name, default agendaJobs",
|
|
16
|
-
"agendaJobs"
|
|
17
|
-
)
|
|
18
|
-
.option(
|
|
19
|
-
"-p, --port <port>",
|
|
20
|
-
"[optional] Server port, default 3000",
|
|
21
|
-
(n, d) => Number(n) || d,
|
|
22
|
-
3000
|
|
23
|
-
)
|
|
24
|
-
.option(
|
|
25
|
-
"-t, --title <title>",
|
|
26
|
-
"[optional] Page title, default Agendash",
|
|
27
|
-
"Agendash"
|
|
28
|
-
)
|
|
29
|
-
.parse(process.argv);
|
|
30
|
-
|
|
31
|
-
if (!program.db) {
|
|
32
|
-
console.error("--db required");
|
|
33
|
-
process.exit(1);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const init = async () => {
|
|
37
|
-
const agenda = new Agenda().database(program.db, program.collection);
|
|
38
|
-
|
|
39
|
-
const app = new Koa();
|
|
40
|
-
const middlewares = agendash(agenda, {
|
|
41
|
-
middleware: "koa",
|
|
42
|
-
});
|
|
43
|
-
for (const middleware of middlewares) {
|
|
44
|
-
app.use(middleware);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
await app.listen(program.port);
|
|
48
|
-
console.log("Server running on port %s", program.port);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
process.on("unhandledRejection", (error) => {
|
|
52
|
-
console.log(error);
|
|
53
|
-
process.exit(1);
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
init();
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
const http = require("http");
|
|
4
|
-
const { Agenda } = require("agenda");
|
|
5
|
-
const agendash = require("../app");
|
|
6
|
-
const express = require("express");
|
|
7
|
-
const program = require("commander");
|
|
8
|
-
|
|
9
|
-
program
|
|
10
|
-
.option(
|
|
11
|
-
"-d, --db <db>",
|
|
12
|
-
"[required] Mongo connection string, same as Agenda connection string"
|
|
13
|
-
)
|
|
14
|
-
.option(
|
|
15
|
-
"-c, --collection <collection>",
|
|
16
|
-
"[optional] Mongo collection, same as Agenda collection name, default agendaJobs",
|
|
17
|
-
"agendaJobs"
|
|
18
|
-
)
|
|
19
|
-
.option(
|
|
20
|
-
"-p, --port <port>",
|
|
21
|
-
"[optional] Server port, default 3000",
|
|
22
|
-
(n, d) => Number(n) || d,
|
|
23
|
-
3000
|
|
24
|
-
)
|
|
25
|
-
.option(
|
|
26
|
-
"-t, --title <title>",
|
|
27
|
-
"[optional] Page title, default Agendash",
|
|
28
|
-
"Agendash"
|
|
29
|
-
)
|
|
30
|
-
.option(
|
|
31
|
-
"-p, --path <path>",
|
|
32
|
-
"[optional] Path to bind Agendash to, default /",
|
|
33
|
-
"/"
|
|
34
|
-
)
|
|
35
|
-
.parse(process.argv);
|
|
36
|
-
|
|
37
|
-
if (!program.db) {
|
|
38
|
-
console.error("--db required");
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
if (!program.path.startsWith("/")) {
|
|
43
|
-
console.error("--path must begin with /");
|
|
44
|
-
process.exit(1);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const app = express();
|
|
48
|
-
|
|
49
|
-
const agenda = new Agenda().database(program.db, program.collection);
|
|
50
|
-
app.use(
|
|
51
|
-
program.path,
|
|
52
|
-
agendash(agenda, {
|
|
53
|
-
title: program.title,
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
app.set("port", program.port);
|
|
58
|
-
|
|
59
|
-
const server = http.createServer(app);
|
|
60
|
-
server.listen(program.port, () => {
|
|
61
|
-
console.log(
|
|
62
|
-
`Agendash started http://localhost:${program.port}${program.path}`
|
|
63
|
-
);
|
|
64
|
-
});
|
package/create-job.png
DELETED
|
Binary file
|