{"id":15167136,"url":"https://github.com/lincolnloop/saltdash","last_synced_at":"2025-10-01T00:31:07.869Z","repository":{"id":37692955,"uuid":"117631998","full_name":"lincolnloop/saltdash","owner":"lincolnloop","description":"A read-only dashboard for Salt jobs","archived":true,"fork":false,"pushed_at":"2023-01-03T19:54:03.000Z","size":1805,"stargazers_count":20,"open_issues_count":26,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-01T11:22:24.744Z","etag":null,"topics":["dashboard","reporting","salt","saltstack"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lincolnloop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-16T04:40:04.000Z","updated_at":"2024-04-06T19:46:47.000Z","dependencies_parsed_at":"2023-02-01T09:30:44.126Z","dependency_job_id":null,"html_url":"https://github.com/lincolnloop/saltdash","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincolnloop%2Fsaltdash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincolnloop%2Fsaltdash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincolnloop%2Fsaltdash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lincolnloop%2Fsaltdash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lincolnloop","download_url":"https://codeload.github.com/lincolnloop/saltdash/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219875009,"owners_count":16554636,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dashboard","reporting","salt","saltstack"],"created_at":"2024-09-27T05:40:33.967Z","updated_at":"2025-10-01T00:31:02.558Z","avatar_url":"https://github.com/lincolnloop.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Salt Dash logo](https://cldup.com/pjjyyptW69.png)\n\n[![tests](https://img.shields.io/circleci/project/github/lincolnloop/saltdash/master.svg)](https://circleci.com/gh/lincolnloop/saltdash/tree/master)\n[![PyPI](https://img.shields.io/pypi/v/saltdash.svg)](https://pypi.org/project/saltdash/)\n![Python Versions](https://img.shields.io/pypi/pyversions/saltdash.svg)\n\n# Salt Dash\n\nRead-only web interface to read from Salt's [external job cache](https://docs.saltstack.com/en/latest/topics/jobs/external_cache.html) using the  [`pgjsonb`](https://docs.saltstack.com/en/latest/ref/returners/all/salt.returners.pgjsonb.html) returner.\n\n![screenshot](https://cldup.com/8TTHBPfhyu.png)\n\n\n## Development\n\n### Pre-requisites\n\n* Node.js for building the front-end.\n* [Pipenv](https://docs.pipenv.org/) for the back-end.\n* A Postgresql database\n\n### Installation\n\n```bash\ngit clone git@github.com:lincolnloop/saltdash.git\ncd saltdash\nmake all              # download dependencies and build the world\n$EDITOR saltdash.yml  # change settings as needed\npipenv shell          # activate the Python virtual environment\nsaltdash migrate      # setup the database\nsaltdash runserver    # run a development server\n```\n\n### Client-side\n\nUses [parcel](https://parceljs.org/). To start a development environment with live reloading, run:\n\n```bash\ncd client\nyarn run watch\n```\n\n## Running in Production\n\n```bash\npip install saltdash\n```\n\n`saltdash runserver` is not suitable for production. A production-level\nwebserver is included and can be started with `saltdash serve`. If Docker is\nmore your speed, there's a `Dockerfile` as well.\n\n⚠️ The built-in webserver does not handle HTTPS. The default settings assume the\napp is deployed behind a proxy which is terminating HTTPS connections and\nproperly handling headers. If this is not the case, [you should read this](https://docs.djangoproject.com/en/2.2/ref/settings/#secure-proxy-ssl-header) and take appropriate actions.\n\n### Configuration\n\nConfiguration can be done via environment variables, a file, or a combination\nof both thanks to [`Goodconf`](https://pypi.org/project/goodconf/). By default\nit will look for a YAML file named `saltdash.yml` in `/etc/saltdash/` or the current\ndirectory. You can also specify a configuration file with the `-C` or `--config`\nflags. `saltdash-generate-config` can be used to generate a sample config file\ncontaining the following variables:\n\n* **DEBUG**  \n  Enable debugging.  \n  type: `bool`  \n* **SECRET_KEY**  _REQUIRED_  \n  a long random string you keep secret https://docs.djangoproject.com/en/2.2/ref/settings/#secret-key  \n  type: `str`  \n* **DATABASE_URL**  \n  type: `str`  \n  default: `postgres://localhost:5432/salt`  \n* **ALLOWED_HOSTS**  \n  Hosts allowed to serve the site https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts  \n  type: `list`  \n  default: `['*']`  \n* **HIDE_OUTPUT**  \n  List of modules to hide the output from in the web interface.  \n  type: `list`  \n  default: `['pillar.*']`\n* **GITHUB_TEAM_ID**  \n  type: `str`  \n* **GITHUB_CLIENT_ID**  \n  type: `str`  \n* **GITHUB_CLIENT_SECRET**  \n  type: `str`  \n* **SENTRY_DSN**  \n  type: `str`  \n* **LISTEN**  \n  Socket for webserver to listen on.  \n  type: `str`  \n  default: `127.0.0.1:8077`  \n\nGitHub Team authentication is included by setting the relevant `GITHUB_*` variables.\n\nYou'll need to setup an OAuth App at `https://github.com/organizations/\u003corg\u003e/settings/applications` with a callback URL in the form: `https://your-site.example.com/auth/complete/github-team/`\n\nTo retrieve your team IDs:\n\n1. Create [a token at GitHub](https://github.com/settings/tokens)\n2. `curl -H \"Authorization: token \u003ctoken\u003e\" https://api.github.com/orgs/\u003corg\u003e/teams`\n\n\n\n## Setting up Salt\n\nOnce you've setup a Postgresql database using `saltdash migrate`, connect Salt's external job cache to the database by adding the following lines to `/etc/salt/master.d/job_cache.conf`:\n\n```ini\n# Replace items in brackets with actual values\nmaster_job_cache: pgjsonb\nreturner.pgjsonb.host: [db-host]\nreturner.pgjsonb.pass: [db-password]\nreturner.pgjsonb.db: [db-database-name]\nreturner.pgjsonb.port: [db-port]\nreturner.pgjsonb.user: [db-user]\n```\n\nRestart your `salt-master` and all future jobs should get stored in the database.\n\nIf you have *lots* of jobs, you'll probably want to purge the cache periodically. A helper command is provided to do just that, run:\n\n```bash\nsaltdash purge_job_cache [days_older_than_to_purge]\n```\n\nIf you want to automate this, use the `--no-input` flag to bypass the confirmation prompt.\n\n## Protecting Secrets\n\nIt is very easy to accidentally expose secrets in Salt via the logs and/or\nconsole output. The same applies for Saltdash. Since secrets are often stored\nin encrypted pillar data, by default the output from any `pillar.*` calls is\nhidden via the `HIDE_OUTPUT` setting. If you have additional modules you know\nexpose secret data, they should be added to the list.\n\nThere are many other ways secrets can leak, however. A few general tips (which\nare good practice whether you use Saltdash or not).\n\n* Set `show_changes: false` on any `file.*` actions which deal with sensitive data.\n* Set `hide_output: true` on any `cmd.*` state which may output sensitive data.\n* When working with files, use templates or `pillar_contents` when appropriate.\n* Avoid passing secrets as arguments to modules or states. Typically Salt can\n  read them from a pillar or config instead.\n\n## Attributions\n\nIcon by [BornSymbols](https://thenounproject.com/term/salt/705369) used under `CCBY` license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincolnloop%2Fsaltdash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flincolnloop%2Fsaltdash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flincolnloop%2Fsaltdash/lists"}