{"_id":"@anp-tech/agendash","_rev":"2-49c1ebdc463721dc25b60478dbfa876e","name":"@anp-tech/agendash","dist-tags":{"latest":"2.1.2"},"versions":{"2.1.1":{"name":"@anp-tech/agendash","version":"2.1.1","description":"A fork of agendash with slight modifications","main":"app.js","bin":{"agendash":"bin/agendash-standalone.js"},"engines":{"node":">=10.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://george-ashnelson@bitbucket.org/featurespace/awe-agendash.git"},"license":"MIT","dependencies":{"agenda":"^3.1.0 || ^4.0.0","body-parser":"^1.15.0","commander":"^2.9.0","express":"^4.0.0","mongodb":"*","semver":"^7.3.4"},"devDependencies":{"@hapi/hapi":"19.2.0","@hapi/inert":"6.0.3","ava":"3.15.0","eslint":"7.19.0","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.1.3"},"eslintConfig":{"parserOptions":{"ecmaVersion":2019},"env":{"es6":true,"node":true},"extends":"eslint:recommended"},"eslintIgnore":["public"],"gitHead":"574c7da64c53f913c11f57ddac4da151fb6cc169","homepage":"https://bitbucket.org/featurespace/awe-agendash#readme","_id":"@anp-tech/agendash@2.1.1","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-fdPetQIKmf/leR9V5jTHdX4ggVvlefXdOSPm9te/P64OMCXOhnOGWubGxou3q68rPLyUXSYmAt/ztIE0Rw7kNw==","shasum":"b9c39d16d57e2e51ea6a784acc6a75c24f1c2fbc","tarball":"https://registry.npmjs.org/@anp-tech/agendash/-/agendash-2.1.1.tgz","fileCount":41,"unpackedSize":574856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI4VBCRA9TVsSAnZWagAAacIP/AtqGFwpaiGwN+L4Lwcu\nDiRGmE9bmz67JjPb73cSIEpWasPcav46OHCV9+kBYI6Pb5XvQKqBNs2RDMdA\njCJWZeqzU863X+yTOWcQm39lG+9s3oP6+R8kcFZbf+HzJGTADyTvwhOPWpEu\nSgVIbpCN7bikjxO3Niw6Wfz0Rt1l8PnCkhXXSjA2hk6rX8BUrD5iEYDKBxY2\na4jE0hpWHU4m9DS2Tdl95FsSntmw80vt8MZRFLL7+K9ptz9TgNXtygxQYP9X\na47yehoK3CH4E3jZSrnsHsiu+bNhDNqycKZNbgdeZ3+jWvu/kHVIjB2zp8IX\ntWEzhpC4Yqn9yNzIpUaUa3xz+Ni7g2NMgKrMrDuPj8fqG86SiCeaG/UHKs97\n4x+1AjmHyfITi8yVvTFCuLq9sfuh6IgFsksaV73IaNRObIm47BmyR1du6gNo\nRd3hsiC2X7PTVP65jNQx8BasENuPyu6EqoKhqyJFprsF63/mlLbuY2tZKgGi\nozwznGsoCT33C6jqX6XIGoaBszjBSarOoPt/cLqTk/DnH3YPFSIiIubXbbRj\nP3n0Yr2WhisLbj1NwdcZqOVPjweOWSnnzYSyXllcKWEqk91VIDVdA33V2MNV\nGFi0GA3ASyT9nxfwJeqGXzE8rdDXiZ9d5Qds4jBVvYSmgBWNjn0s2G2ZvoCF\ngGrH\r\n=U8po\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUHOZ0VLDoX1w3vqO5Zg05FDpTNyVsxxrtMwhQOr97HQIgOB6gJzdcqae27AOvMYLBhgJvjWTPaAj0cm5ig0Nv7vg="}]},"_npmUser":{"name":"anptechnology","email":"technology@ashnelson.com"},"directories":{},"maintainers":[{"name":"anptechnology","email":"technology@ashnelson.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agendash_2.1.1_1629717825598_0.42772564453428785"},"_hasShrinkwrap":false},"2.1.2":{"name":"@anp-tech/agendash","version":"2.1.2","description":"A fork of agendash with slight modifications","main":"app.js","bin":{"agendash":"bin/agendash-standalone.js"},"engines":{"node":">=10.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://george-ashnelson@bitbucket.org/featurespace/awe-agendash.git"},"license":"MIT","dependencies":{"agenda":"^3.1.0 || ^4.0.0","body-parser":"^1.15.0","commander":"^2.9.0","express":"^4.0.0","mongodb":"*","semver":"^7.3.4"},"devDependencies":{"@hapi/hapi":"19.2.0","@hapi/inert":"6.0.3","ava":"3.15.0","eslint":"7.19.0","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.1.3"},"eslintConfig":{"parserOptions":{"ecmaVersion":2019},"env":{"es6":true,"node":true},"extends":"eslint:recommended"},"eslintIgnore":["public"],"gitHead":"231cdb168c4839d2ea63369e3fe6d6b9de24522d","homepage":"https://bitbucket.org/featurespace/awe-agendash#readme","_id":"@anp-tech/agendash@2.1.2","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-dETVxkFTlEvdAlHcJU8BaxzaGYdwXpbE90xL+bZHQRSiGP6ytnVKeqoAJTQt3xzxTh6zydcloKWg6gj8g/E4IQ==","shasum":"21d737f2efd04526e39e9ff0f270f9b67503d03f","tarball":"https://registry.npmjs.org/@anp-tech/agendash/-/agendash-2.1.2.tgz","fileCount":41,"unpackedSize":574984,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhI4aKCRA9TVsSAnZWagAA+sQP/2TLFgTAvziCCoq7HKwR\nUJRLSXPBcWweqm81wQR0hWk67WOkZ8fDLOcUhdWlsXzBAX64shfSasv4EYor\nnCh5CPN1z/sIYNcXv13x2WD3yz/EVnXXnxyCDzgZvEi4V1O5gTQgypRw7uKR\nkrPZ1BX9G+pgg2gjcMveUliDqTOpJwmJmCSwaCCuvDAuZMbzGAypewGAEazj\nHHDMH4xnusJhsPYlI2uYpXqRh4p0HduORyiOyCdbz3bJbEqfqT7AGJsU4nQO\nEOELnSnObpI7e51FAmIjuv/yP2D/GrXVlfXr22yMkmADTs0Av7NK9F3NW1Gp\n9QE6IFGMDNpAFql7jjNyfFNCa4VcTB2uL1HP42GlAHL9ELF3OmrJ2EnVJIZV\nhI2p9HJpsSI8IOY2N7Ms2UusDwLkkGKuBUBQlMaMWfgVFCthDP7Ug8ot51k+\nQUVzx6CA4KXlNcLbVBkzHfIuOvd7YP0Ba9GApKqm2Wl+94Fsky9LwZOpUjpc\nTxasVt+/ch6rL9SejR8EOJwwUJ+g9ianG78Da8r1gsUmTICFX38pokULgyUX\nU5EoW18jHHQxe0TlNupjbXUesf3uwQK/6heXRkpP8qo37qelokECH6fDJ9aV\nka0HMbvnbs7Kp1h/m/ojnVfgGaKIWN4/LfrsciqSPtn8QaKdLWwwn00T3cyS\nZoWh\r\n=1Frh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE2fhCveMiSN0Thu39+g/d69HQ2egm4Ts226Y2gBZS/AIgZ+47P8wVNHlcXF9xJkgLPOCHylKlPkX6r1rQ0BadbL8="}]},"_npmUser":{"name":"anptechnology","email":"technology@ashnelson.com"},"directories":{},"maintainers":[{"name":"anptechnology","email":"technology@ashnelson.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/agendash_2.1.2_1629718154696_0.054759102489515765"},"_hasShrinkwrap":false}},"time":{"created":"2021-08-23T11:23:45.558Z","2.1.1":"2021-08-23T11:23:45.795Z","modified":"2022-04-04T14:19:20.380Z","2.1.2":"2021-08-23T11:29:14.901Z"},"maintainers":[{"name":"anptechnology","email":"technology@ashnelson.com"}],"description":"A fork of agendash with slight modifications","homepage":"https://bitbucket.org/featurespace/awe-agendash#readme","keywords":["agenda","agendash","dashboard","job-queues"],"repository":{"type":"git","url":"git+https://george-ashnelson@bitbucket.org/featurespace/awe-agendash.git"},"license":"MIT","readme":"# @anp-tech/agendash\n\nA fork of agendash Dashboard for [Agenda](https://github.com/agenda/agenda) with slight modifications to use pkFactory account for pkFactory as an object with createPk function.\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### 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"}