{"_id":"@bonliva/agendash","_rev":"1-a20d1bcc9fa078f92c379b1510c74cb0","name":"@bonliva/agendash","dist-tags":{"latest":"6.0.1"},"versions":{"6.0.0":{"name":"@bonliva/agendash","version":"6.0.0","keywords":["agenda","agendash","dashboard","job-queues"],"license":"MIT","_id":"@bonliva/agendash@6.0.0","maintainers":[{"name":"arenuzzz","email":"syn.max.13@gmail.com"},{"name":"iamdanthedev","email":"iamdanthedev@gmail.com"}],"homepage":"https://github.com/agenda/agendash#readme","bugs":{"url":"https://github.com/agenda/agendash/issues"},"bin":{"agendash":"bin/agendash-standalone.js"},"dist":{"shasum":"d77a792ffce4cea401ea5ad17e3cac2743a12376","tarball":"https://registry.npmjs.org/@bonliva/agendash/-/agendash-6.0.0.tgz","fileCount":43,"integrity":"sha512-NpyTbntI4FgfyXL5RoRcVMDU9y2NnAYUQL4UaoLunj0m5EyCTAX7E3HmG40WqVBLGiHrbm6u153D5FA2JPqpmw==","signatures":[{"sig":"MEYCIQDOYUpJPr/NPxvbhrb1THCNAxEOxGt/y/C8aq4cF4LDMwIhAK3YF+YDR+SY2VV+m+Dqmacj3hixyGoObXHSZXaD5CuC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":576888},"main":"app.js","engines":{"node":">=14.0.0"},"gitHead":"e86e7f7d3e411c1d61f2975dd2876a17b7205b38","scripts":{"ava":"ava -v -c 1","lint":"eslint ./","test":"run-p lint ava"},"_npmUser":{"name":"iamdanthedev","email":"iamdanthedev@gmail.com"},"repository":{"url":"git+https://github.com/agenda/agendash.git","type":"git"},"_npmVersion":"10.8.2","description":"A modern dashboard for Agenda.js with Pagination and Search capabilities","directories":{},"_nodeVersion":"20.18.0","dependencies":{"semver":"^7.3.4","express":"^4.17.3","mongodb":"*","commander":"^2.9.0","body-parser":"^1.19.2"},"eslintConfig":{"env":{"es6":true,"node":true},"extends":"eslint:recommended","parserOptions":{"ecmaVersion":2019}},"eslintIgnore":["public"],"_hasShrinkwrap":false,"devDependencies":{"ava":"3.15.0","koa":"2.13.1","eslint":"7.19.0","fastify":"^4.9.2","prettier":"2.2.1","supertest":"^6.2.2","@hapi/hapi":"^20.2.1","koa-router":"10.0.0","koa-static":"5.0.0","@hapi/inert":"^6.0.5","npm-run-all":"4.1.5","koa-bodyparser":"4.3.0","@bonliva/agenda":"^6.0.0","@fastify/static":"^6.5.0"},"_npmOperationalInternal":{"tmp":"tmp/agendash_6.0.0_1731488664523_0.18123709794742693","host":"s3://npm-registry-packages"}},"6.0.1":{"name":"@bonliva/agendash","version":"6.0.1","description":"A modern dashboard for Agenda.js with Pagination and Search capabilities","main":"app.js","bin":{"agendash":"bin/agendash-standalone.js"},"engines":{"node":">=14.0.0"},"scripts":{"test":"run-p lint ava","lint":"eslint ./","ava":"ava -v -c 1"},"keywords":["agenda","agendash","dashboard","job-queues"],"repository":{"type":"git","url":"git+https://github.com/agenda/agendash.git"},"bugs":{"url":"https://github.com/agenda/agendash/issues"},"homepage":"https://github.com/agenda/agendash#readme","license":"MIT","dependencies":{"body-parser":"^1.19.2","commander":"^2.9.0","express":"^4.17.3","mongodb":"*","semver":"^7.3.4"},"devDependencies":{"@bonliva/agenda":"^6.0.0","@fastify/static":"^6.5.0","@hapi/hapi":"^20.2.1","@hapi/inert":"^6.0.5","ava":"3.15.0","eslint":"7.19.0","fastify":"^4.9.2","koa":"2.13.1","koa-bodyparser":"4.3.0","koa-router":"10.0.0","koa-static":"5.0.0","npm-run-all":"4.1.5","prettier":"2.2.1","supertest":"^6.2.2"},"eslintConfig":{"parserOptions":{"ecmaVersion":2019},"env":{"es6":true,"node":true},"extends":"eslint:recommended"},"eslintIgnore":["public"],"_id":"@bonliva/agendash@6.0.1","gitHead":"8690995b9a77bd82da7eacee9591318830c55671","_nodeVersion":"20.18.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Dc5SSbLsVmnPzsYDkL0efZ2sH/6tOk9TSgSzeLP/MJdzK55Yz4WKc2SwWGhUH9sKEqHabhFOwdUsVcZLpJjrlg==","shasum":"f3b9fa7695d9ae67b18777095811f7beeb71b3d1","tarball":"https://registry.npmjs.org/@bonliva/agendash/-/agendash-6.0.1.tgz","fileCount":43,"unpackedSize":576764,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHUvGEdwZmAO5sY18k0sy5xPZxsCP1BEzR44CvBfbSF+AiEAvL/l1NwR0eCPM5M4r4kOMtq+2+pB7K2y+Rw4WdCpyjk="}]},"_npmUser":{"name":"iamdanthedev","email":"iamdanthedev@gmail.com"},"directories":{},"maintainers":[{"name":"arenuzzz","email":"syn.max.13@gmail.com"},{"name":"iamdanthedev","email":"iamdanthedev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agendash_6.0.1_1731493108371_0.7995382958469515"},"_hasShrinkwrap":false}},"time":{"created":"2024-11-13T09:04:24.399Z","modified":"2024-11-13T10:18:28.833Z","6.0.0":"2024-11-13T09:04:24.788Z","6.0.1":"2024-11-13T10:18:28.595Z"},"bugs":{"url":"https://github.com/agenda/agendash/issues"},"license":"MIT","homepage":"https://github.com/agenda/agendash#readme","keywords":["agenda","agendash","dashboard","job-queues"],"repository":{"type":"git","url":"git+https://github.com/agenda/agendash.git"},"description":"A modern dashboard for Agenda.js with Pagination and Search capabilities","maintainers":[{"name":"arenuzzz","email":"syn.max.13@gmail.com"},{"name":"iamdanthedev","email":"iamdanthedev@gmail.com"}],"readme":"# Agendash\n\nA Dashboard for [Agenda](https://github.com/agenda/agenda).\n\n---\n\n### Features\n\n- Job status auto-refreshes: 60-second polling by default.\n- Schedule a new job from the UI.\n- Dive in to see more details about the job, like the json data.\n- Requeue a job. Clone the data and run immediately.\n- Delete jobs. Useful for cleaning up old completed jobs.\n- Search jobs by name and metadata. Supports querying by Mongo Object Id.\n- Pagination\n- Responsive UI\n\n---\n\n### Screenshots\n\n#### Dashboard\n\n![Auto-refresh list of jobs](all-jobs.png)\n\n---\n\n#### Create jobs\n\n![See job details, requeue or delete jobs](create-job.png)\n\n---\n\n#### Search by name, metadata, job status\n\n![Search for a job by name or metadata ](search.png)\n\n---\n\n#### Responsive UI\n\n![Mobile UI small devices](mobile-ui-sm.png)\n\n![Mobile UI extra small devices](mobile-ui-xs.png)\n\n---\n\n# Troubleshooting\n\n### Index for sorting\n\nIt may be required to create the following index for faster sorting (see [#24](https://github.com/agenda/agendash/issues/24))\n\n```\ndb.agendaJobs.ensureIndex({\n    \"nextRunAt\" : -1,\n    \"lastRunAt\" : -1,\n    \"lastFinishedAt\" : -1\n}, \"agendash\")\n```\n\n---\n\n# Roadmap\n\n- [ ] Get more test coverage\n- [ ] Add middlewares for fastify, and other express-like libraries\n- [ ] You decide! Submit a feature request\n\n### Install\n\n```\nnpm install --save agendash\n```\n\n_Note_: `Agendash` requires mongodb version >2.6.0 to perform the needed aggregate queries. This is your mongo database version, not your node package version! To check your database version, connect to mongo and run `db.version()`.\n\n### Middleware usage\n\n#### Express\n\nAgendash provides Express middleware you can use at a specified path, for example this will\nmake Agendash available on your site at the `/dash` path. Note: Do not try to mount Agendash\nat the root level like `app.use('/', Agendash(agenda))`.\n\n```js\nvar express = require(\"express\");\nvar app = express();\n\n// ... your other express middleware like body-parser\n\nvar Agenda = require(\"agenda\");\nvar Agendash = require(\"agendash\");\n\nvar agenda = new Agenda({ db: { address: \"mongodb://127.0.0.1/agendaDb\" } });\n// or provide your own mongo client:\n// var agenda = new Agenda({mongo: myMongoClient})\n\napp.use(\"/dash\", Agendash(agenda));\n\n// ... your other routes\n\n// ... start your server\n```\n\nBy mounting Agendash as middleware on a specific path, you may provide your\nown authentication for that path. For example if you have an authenticated\nsession using passport, you can protect the dashboard path like this:\n\n```js\napp.use(\n  \"/dash\",\n  function (req, res, next) {\n    if (!req.user || !req.user.is_admin) {\n      res.send(401);\n    } else {\n      next();\n    }\n  },\n  Agendash(agenda)\n);\n```\n\nOther middlewares will come soon in the folder `/lib/middlewares/`.\nYou'll just have to update the last line to require the middleware you need:\n\n```js\napp.use(\n  \"/agendash\",\n  Agendash(agenda, {\n    middleware: \"connect\",\n  })\n);\n```\n\nNote that if you use a CSRF protection middleware like [`csurf`](https://www.npmjs.com/package/csurf), you might need to [configure it off](https://github.com/agenda/agendash/issues/23#issuecomment-270917949) for Agendash-routes.\n\n#### Hapi\n\nA minimum Node.js version 12 is required for `@hapi/hapi` dependency.\n\n```shell\nnpm i @hapi/inert @hapi/hapi\n```\n\n```js\nconst agenda = new Agenda().database(\n  \"mongodb://127.0.0.1/agendaDb\",\n  \"agendaJobs\"\n);\n\nconst server = require(\"@hapi/hapi\").server({\n  port: 3002,\n  host: \"localhost\",\n});\nawait server.register(require(\"@hapi/inert\"));\nawait server.register(\n  Agendash(agenda, {\n    middleware: \"hapi\",\n  })\n);\n\nawait server.start();\n```\n\nThen browse to `http://localhost:3002/`.\n\n#### Koa\n\n```shell\nnpm i koa koa-bodyparser koa-router koa-static\n```\n\n```js\nconst agenda = new Agenda().database(\n  \"mongodb://127.0.0.1/agendaDb\",\n  \"agendaJobs\"\n);\n\nconst Koa = require(\"koa\");\nconst app = new Koa();\nconst middlewares = Agendash(agenda, {\n  middleware: \"koa\",\n});\nfor (const middleware of middlewares) {\n  app.use(middleware);\n}\n\nawait app.listen(3002);\n```\n\nThen browse to `http://localhost:3002/`.\n\n#### Fastify\n\n```shell\nnpm i fastify\n```\n\n```js\nconst agenda = new Agenda().database(\n  \"mongodb://127.0.0.1/agendaDb\",\n  \"agendaJobs\"\n);\n\nconst Fastify = require(\"fastify\");\nconst fastify = new Fastify();\n\nfastify.register(\n  Agendash(\n    agenda, \n    { middleware: \"fastify\" }\n  );\n);\n\nawait fastify.listen(3002);\n```\n\nThen browse to `http://localhost:3002/`.\n\n### Standalone usage\n\nAgendash comes with a standalone Express app which you can use like this:\n\n```bash\n./node_modules/.bin/agendash --db=mongodb://localhost/agendaDb --collection=agendaCollection --port=3002\n```\n\nor like this, for default collection `agendaJobs` and default port `3000`:\n\n```bash\n./node_modules/.bin/agendash --db=mongodb://localhost/agendaDb\n```\n\nIf you are using npm >= 5.2, then you can use [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b):\n\n```bash\nnpx agendash --db=mongodb://localhost/agendaDb --collection=agendaCollection --port=3002\n```\n\nThen browse to `http://localhost:3002/`.\n\n### Docker usage\n\nAgendash can also be run within a Docker container like this:\n\n```bash\ndocker run -p 3000:3000 \\\n  --env MONGODB_URI=mongo://myUser:myPass@myHost/myDb \\\n  --env COLLECTION=myAgendaCollection agenda/agendash\n```\n\nThen browse to `http://localhost:3000/`.\n","readmeFilename":"README.md"}