agendash 3.1.0 → 6.0.0
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 +11 -52
- package/public/site.webmanifest +8 -1
- package/Dockerfile +0 -23
- 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 -340
- 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 -221
- 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 -239
- package/public/app/js/main.js +0 -275
- 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/search.png +0 -0
package/public/app/js/newJob.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
const newJob = Vue.component("new-job", {
|
|
2
|
-
data: () => ({
|
|
3
|
-
jobDataParseError: "",
|
|
4
|
-
jobName: "",
|
|
5
|
-
jobSchedule: "",
|
|
6
|
-
jobRepeatEvery: "",
|
|
7
|
-
jobData: `{ "name": "Your medatada goes here..." }`,
|
|
8
|
-
}),
|
|
9
|
-
props: ["job"],
|
|
10
|
-
methods: {
|
|
11
|
-
clear() {
|
|
12
|
-
(this.jobDataParseError = ""),
|
|
13
|
-
(this.jobName = ""),
|
|
14
|
-
(this.jobSchedule = ""),
|
|
15
|
-
(this.jobRepeatEvery = ""),
|
|
16
|
-
(this.jobData = `{ "name": "Your medatada goes here..." }`);
|
|
17
|
-
},
|
|
18
|
-
create() {
|
|
19
|
-
const url = `api/jobs/create`;
|
|
20
|
-
|
|
21
|
-
let jobData = "";
|
|
22
|
-
try {
|
|
23
|
-
jobData = JSON.parse(this.jobData);
|
|
24
|
-
} catch (err) {
|
|
25
|
-
this.jobDataParseError = err.message;
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
let body = {
|
|
30
|
-
jobName: this.jobName,
|
|
31
|
-
jobSchedule: this.jobSchedule,
|
|
32
|
-
jobRepeatEvery: this.jobRepeatEvery,
|
|
33
|
-
jobData: jobData,
|
|
34
|
-
};
|
|
35
|
-
return axios
|
|
36
|
-
.post(url, body)
|
|
37
|
-
.then((result) => result.data)
|
|
38
|
-
.then((data) => {
|
|
39
|
-
this.$emit("popup-message");
|
|
40
|
-
this.$emit("refresh-data");
|
|
41
|
-
this.$refs.Close.click();
|
|
42
|
-
this.clear();
|
|
43
|
-
})
|
|
44
|
-
.catch(console.log);
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
template: `
|
|
48
|
-
<div class="modal fade" id="modalNewJob" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
|
|
49
|
-
<!-- Modal -->
|
|
50
|
-
<div class="modal-dialog" role="document">
|
|
51
|
-
<div class="modal-content">
|
|
52
|
-
<div class="modal-header">
|
|
53
|
-
<h5 class="modal-title" id="exampleModalLabel">Create Job</h5>
|
|
54
|
-
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
55
|
-
<span aria-hidden="true">×</span>
|
|
56
|
-
</button>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="modal-body">
|
|
59
|
-
<form>
|
|
60
|
-
<div class="form-group">
|
|
61
|
-
<label for="jobname">Job Name</label>
|
|
62
|
-
<input v-model="jobName" type="text" class="form-control" id="jobname" aria-describedby="jobname">
|
|
63
|
-
</div>
|
|
64
|
-
<div class="form-group">
|
|
65
|
-
<label for="jobSchedule">Job Schedule</label>
|
|
66
|
-
<input v-model="jobSchedule" type="text" class="form-control" id="jobSchedule" aria-describedby="jobSchedule">
|
|
67
|
-
<small id="jobSchedule" class="form-text text-muted">Number/Every Unit i.e: "1 seconds" or "3 days" (check npmjs.com/human-interval)</small>
|
|
68
|
-
</div>
|
|
69
|
-
<div class="form-group">
|
|
70
|
-
<label for="jobRepeatEvery">Job Repeat Every</label>
|
|
71
|
-
<input v-model="jobRepeatEvery" type="text" class="form-control" id="jobRepeatEvery" aria-describedby="jobRepeatEvery">
|
|
72
|
-
<small id="jobRepeatEvery" class="form-text text-muted">Number/Every Unit i.e: "1 month" or "3 hours"</small>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="form-group">
|
|
75
|
-
<label for="jobData">Job Metadata</label>
|
|
76
|
-
<prism-editor class="json-editor" :lineNumbers="true" v-model="jobData" language="json"></prism-editor>
|
|
77
|
-
<small class="form-text text-muted">{{jobDataParseError}}</small>
|
|
78
|
-
</div>
|
|
79
|
-
</form>
|
|
80
|
-
</div>
|
|
81
|
-
<div class="modal-footer">
|
|
82
|
-
<button type="button" class="btn btn-info" @click="create()">Create Job</button>
|
|
83
|
-
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
`,
|
|
89
|
-
});
|
package/public/app/js/sidebar.js
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
const sidebar = Vue.component("sidebar", {
|
|
2
|
-
props: ["overview", "pagesize", "loading"],
|
|
3
|
-
computed: {
|
|
4
|
-
sortedArray() {
|
|
5
|
-
function compare(a, b) {
|
|
6
|
-
let displayNameA = a.displayName.toLowerCase();
|
|
7
|
-
let displayNameB = b.displayName.toLowerCase();
|
|
8
|
-
if (displayNameA === "all jobs" || displayNameB === "all jobs") return;
|
|
9
|
-
if (displayNameA < displayNameB) return -1;
|
|
10
|
-
if (displayNameA > displayNameB) return 1;
|
|
11
|
-
return 0;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return this.overview.sort(compare);
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
methods: {
|
|
18
|
-
flexgrow(number) {
|
|
19
|
-
return Math.log2(1 + number);
|
|
20
|
-
},
|
|
21
|
-
searchSpecificJob(job, type) {
|
|
22
|
-
if (job === "All Jobs") {
|
|
23
|
-
if (type) {
|
|
24
|
-
this.$emit(
|
|
25
|
-
"search-sidebar",
|
|
26
|
-
"",
|
|
27
|
-
"",
|
|
28
|
-
"",
|
|
29
|
-
this.pagesize,
|
|
30
|
-
"",
|
|
31
|
-
"",
|
|
32
|
-
type,
|
|
33
|
-
""
|
|
34
|
-
);
|
|
35
|
-
} else {
|
|
36
|
-
this.$emit(
|
|
37
|
-
"search-sidebar",
|
|
38
|
-
"",
|
|
39
|
-
"",
|
|
40
|
-
"",
|
|
41
|
-
this.pagesize,
|
|
42
|
-
"",
|
|
43
|
-
"",
|
|
44
|
-
"",
|
|
45
|
-
""
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
} else if (type) {
|
|
49
|
-
this.$emit(
|
|
50
|
-
"search-sidebar",
|
|
51
|
-
job,
|
|
52
|
-
"",
|
|
53
|
-
"",
|
|
54
|
-
this.pagesize,
|
|
55
|
-
"",
|
|
56
|
-
"",
|
|
57
|
-
type,
|
|
58
|
-
""
|
|
59
|
-
);
|
|
60
|
-
} else {
|
|
61
|
-
this.$emit("search-sidebar", job, "", "", this.pagesize, "", "", "");
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
|
-
template: `
|
|
66
|
-
<div class="col sidebar">
|
|
67
|
-
<div class="row">
|
|
68
|
-
<div class="col ">
|
|
69
|
-
<button data-toggle="modal" data-target="#modalNewJob" @click="$emit('new-job')" data-placement="top" title="Add a new job" class="btn btn-block btn-outline-success"><i class="oi oi-plus IcoInButton"></i> New Job</button>
|
|
70
|
-
</div>
|
|
71
|
-
</div> <!-- row -->
|
|
72
|
-
<div class="row p-0">
|
|
73
|
-
<div v-if="loading" class="col-12 my-5 ml-auto text-center">
|
|
74
|
-
<div class="text-center my-5 py-5">
|
|
75
|
-
<div class="spinner-border" role="status">
|
|
76
|
-
</div>
|
|
77
|
-
<div>
|
|
78
|
-
<span class="">Loading Jobs...</span>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
<div v-else class="col">
|
|
83
|
-
<div class="row rows-ow" v-for="type in sortedArray">
|
|
84
|
-
<div class="col-12 d-flex mt-4 mybtn" @click="searchSpecificJob(type.displayName,'')">
|
|
85
|
-
<div class="mr-auto">{{type.displayName}}</div><div class="text-rigth pill-big-own bg-secondary right">{{type.total}}</div>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="col-12 p-1">
|
|
88
|
-
<div class="progress">
|
|
89
|
-
<div class="progress-bar progress-bar-striped progress-bar-info bg-info" role="progressbar" :style="{'flex-grow': flexgrow(type.scheduled)}"></div>
|
|
90
|
-
<div class="progress-bar progress-bar-striped progress-bar-primary bg-primary" role="progressbar" :style="{'flex-grow': flexgrow(type.queued)}"></div>
|
|
91
|
-
<div class="progress-bar progress-bar-striped progress-bar-warning bg-warning" role="progressbar" :style="{'flex-grow': flexgrow(type.running)}"></div>
|
|
92
|
-
<div class="progress-bar progress-bar-striped progress-bar-success bg-success" role="progressbar" :style="{'flex-grow': flexgrow(type.completed)}"></div>
|
|
93
|
-
<div class="progress-bar progress-bar-striped progress-bar-danger bg-danger" role="progressbar" :style="{'flex-grow': flexgrow(type.failed)}"></div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
<!-- internal list of states -->
|
|
97
|
-
<div class="col-12 d-flex px-3 mb-2 mybtn" @click="searchSpecificJob(type.displayName,'scheduled')">
|
|
98
|
-
<div class="mr-auto">Scheduled: </div><div class="text-rigth">{{type.scheduled}}</div>
|
|
99
|
-
</div>
|
|
100
|
-
<div class="col-12 d-flex px-3 mb-2 text-primary mybtn" @click="searchSpecificJob(type.displayName,'queued')">
|
|
101
|
-
<div class="mr-auto">Queued: </div><div class="text-rigth">{{type.queued}}</div>
|
|
102
|
-
</div>
|
|
103
|
-
<div class="col-12 d-flex px-3 mb-2 text-warning mybtn" @click="searchSpecificJob(type.displayName,'running')">
|
|
104
|
-
<div class="mr-auto">Running: </div><div class="text-rigth">{{type.running}}</div>
|
|
105
|
-
</div>
|
|
106
|
-
<div class="col-12 d-flex px-3 mb-2 text-success mybtn" @click="searchSpecificJob(type.displayName,'completed')">
|
|
107
|
-
<div class="mr-auto">Completed: </div><div class="text-rigth">{{type.completed}}</div>
|
|
108
|
-
</div>
|
|
109
|
-
<div class="col-12 d-flex px-3 mb-2 text-danger mybtn" @click="searchSpecificJob(type.displayName,'failed')">
|
|
110
|
-
<div class="mr-auto">Failed: </div><div class="text-rigth">{{type.failed}}</div>
|
|
111
|
-
</div>
|
|
112
|
-
<div class="col-12 d-flex px-3 mb-2 text-info mybtn" @click="searchSpecificJob(type.displayName,'repeating')">
|
|
113
|
-
<div class="mr-auto">Repeating: </div><div class="text-rigth">{{type.repeating}}</div>
|
|
114
|
-
</div>
|
|
115
|
-
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div> <!-- row -->
|
|
119
|
-
</div> <!-- div -->
|
|
120
|
-
`,
|
|
121
|
-
});
|
package/public/app/js/topbar.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
const topbar = Vue.component("topbar", {
|
|
2
|
-
props: ["name", "state", "search", "property"],
|
|
3
|
-
data: () => ({
|
|
4
|
-
// search: '',
|
|
5
|
-
// property: 'data.id',
|
|
6
|
-
// name: '',
|
|
7
|
-
limit: 15,
|
|
8
|
-
skip: 0,
|
|
9
|
-
refresh: 60,
|
|
10
|
-
// state: '',
|
|
11
|
-
object: false,
|
|
12
|
-
stateobject: [
|
|
13
|
-
{ text: "All", value: "", class: "" },
|
|
14
|
-
{ text: "Scheduled", value: "scheduled", class: "" },
|
|
15
|
-
{ text: "Queued", value: "queued", class: "text-primary" },
|
|
16
|
-
{ text: "Running", value: "running", class: "text-warning" },
|
|
17
|
-
{ text: "Completed", value: "completed", class: "text-success" },
|
|
18
|
-
{ text: "Failed", value: "failed", class: "text-danger" },
|
|
19
|
-
{ text: "Repeating", value: "repeating", class: "text-info" },
|
|
20
|
-
],
|
|
21
|
-
}),
|
|
22
|
-
methods: {
|
|
23
|
-
submit() {
|
|
24
|
-
this.$emit(
|
|
25
|
-
"search-form",
|
|
26
|
-
this.name,
|
|
27
|
-
this.search,
|
|
28
|
-
this.property,
|
|
29
|
-
this.limit,
|
|
30
|
-
this.skip,
|
|
31
|
-
this.refresh,
|
|
32
|
-
this.state,
|
|
33
|
-
this.object
|
|
34
|
-
);
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
template: `
|
|
38
|
-
<form @submit.prevent="submit">
|
|
39
|
-
<div class="row">
|
|
40
|
-
<div class="col-xs-12 col-md-6">
|
|
41
|
-
<div class="input-group mt-2 mb-2">
|
|
42
|
-
<div class="input-group-prepend">
|
|
43
|
-
<span class="input-group-text"> Name </span>
|
|
44
|
-
</div>
|
|
45
|
-
<input type="text" class="form-control" placeholder="job name" v-model='name'/>
|
|
46
|
-
</div>
|
|
47
|
-
<div class="input-group mt-2 mb-2">
|
|
48
|
-
<div class="input-group-prepend">
|
|
49
|
-
<span class="input-group-text"> Property </span>
|
|
50
|
-
</div>
|
|
51
|
-
<input type="text" class="form-control" placeholder="data.color" v-model="property" />
|
|
52
|
-
</div>
|
|
53
|
-
<div class="input-group mt-2 mb-2">
|
|
54
|
-
<div class="input-group-prepend">
|
|
55
|
-
<span class="input-group-text"> Value </span>
|
|
56
|
-
</div>
|
|
57
|
-
<input class="form-control" v-model="search" placeholder="green"/>
|
|
58
|
-
<div class="form-check mx-2 pt-2">
|
|
59
|
-
<input type="checkbox" v-model="object" class="form-check-input" id="isObjectId">
|
|
60
|
-
<label class="form-check-label" for="isObjectId"> Is ObjectId?</label>
|
|
61
|
-
</div>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
<div class="col-xs-12 col-md-6">
|
|
65
|
-
<div class="input-group mt-2 mb-2">
|
|
66
|
-
<div class="input-group-prepend">
|
|
67
|
-
<span class="input-group-text"> Refresh Interval </span>
|
|
68
|
-
</div>
|
|
69
|
-
<input type="text" class="form-control" v-model="refresh" />
|
|
70
|
-
</div>
|
|
71
|
-
<div class="input-group mt-2 mb-2">
|
|
72
|
-
<div class="input-group-prepend">
|
|
73
|
-
<span class="input-group-text"> Page Size </span>
|
|
74
|
-
</div>
|
|
75
|
-
<input type="number" class="form-control" v-model="limit" />
|
|
76
|
-
</div>
|
|
77
|
-
<div class="input-group mt-2 mb-2">
|
|
78
|
-
<div class="input-group-prepend">
|
|
79
|
-
<span class="input-group-text"> State </span>
|
|
80
|
-
</div>
|
|
81
|
-
<select v-model="state" class="form-control" id="selectStateInput">
|
|
82
|
-
<option v-bind:class="option.class" v-for="option in stateobject" v-bind:value="option.value">{{option.text}}</option>
|
|
83
|
-
</select>
|
|
84
|
-
</div>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
<div class="row mb-3">
|
|
88
|
-
<div class="col-xs-12 col-md-3 ml-auto text-right">
|
|
89
|
-
<button type=submit @click="$emit('search-form', name, search, property, limit, skip, refresh, state, object)" class="d-none d-md-inline-block btn btn-success"> Apply </button>
|
|
90
|
-
<button type=submit @click="$emit('search-form', name, search, property, limit, skip, refresh, state, object)" class="d-none d-inline-block d-md-none btn btn-block btn-success"> Apply </button>
|
|
91
|
-
</div>
|
|
92
|
-
</div>
|
|
93
|
-
</form>
|
|
94
|
-
`,
|
|
95
|
-
});
|
|
Binary file
|
package/public/favicon-16x16.png
DELETED
|
Binary file
|
package/public/favicon-32x32.png
DELETED
|
Binary file
|
package/public/favicon.ico
DELETED
|
Binary file
|
package/search.png
DELETED
|
Binary file
|