npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@financial-times/grafana-tools

v2.0.1

Published

Automate your project Grafana dashboards

Downloads

66

Readme

Grafana Tools MIT licensed

Automate your project Grafana dashboards.

grafana pull <slug> <file>
grafana push <slug> <file>

Table Of Contents

Requirements

Running Grafana tools requires Node.js 10.x and npm.

Install

npm install -g @financial-times/grafana-tools

Usage

Pull a JSON representation of a dashboard and save it locally:

Usage: grafana pull <name> <file> [options]

Options:

  -h, --help             output usage information
  -V, --version          output the version number
  -a, --api-key <key>    the API key to use when accessing the Grafana API
  -H, --hostname <host>  the hostname Grafana runs on

Push a local JSON representation of a dashboard to the server:

Usage: grafana-push <name> <file> [options]

Options:

  -h, --help             output usage information
  -V, --version          output the version number
  -a, --api-key <key>    the API key to use when accessing the Grafana API
  -H, --hostname <host>  the hostname Grafana runs on
  -o, --overwrite        whether to overwrite any changes on the server

Note: the --api-key option can also be set with a GRAFANA_API_KEY environment variable.

Testing

To run tests on your machine you'll need to install Node.js and run make install. Then you can run the following commands:

make test              # run all the tests
make test-unit         # run the unit tests

You can run the unit tests with coverage reporting, which expects 90% coverage or more:

make test-unit-coverage verify-coverage

The code will also need to pass linting on CI, you can run the linter locally with:

make verify

We run the tests and linter on CI, you can view ci. make test and make lint must pass before we merge a pull request.

Deployment

New versions of the module are published automatically by CI when a new tag is created matching the pattern /v.*/.

Migration guide

State | Major Version | Last Minor Release | Migration guide | :---: | :---: | :---: | :---: ✨ active | 2 | N/A | migrate to v2 | ⚠ maintained | 1 | 1.0 | N/A |

License

The Financial Times has published this software under the MIT license.