Coder Social home page Coder Social logo

huanghao1975 / grafana-datatable-panel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from briangann/grafana-datatable-panel

0.0 1.0 0.0 22.22 MB

Datatables.net based panel for Grafana

License: MIT License

JavaScript 0.59% CSS 20.68% HTML 11.43% Makefile 0.10% TypeScript 39.35% SCSS 27.84%

grafana-datatable-panel's Introduction

Grafana Datatable Panel

Twitter Follow Release David Dependancy Status David Dev Dependency Status Known Vulnerabilities Maintainability Test Coverage

This panel plugin provides a Datatables.net table panel for Grafana 6.x/7.x

Screenshots

Paging enabled

Default Paging

Scrolling enabled

Scrolling

Light Theme with Paging

Light Theme with Paging

Numbered Rows and Compact Style

Numbered and Compact Rows

Options

Options Tab

Options

Same options as built-in table panel

Datatable Options Tab

Datatable Options

Table Display Options

  • Font Size - set font size of table content
  • Scroll - toggle for scrolling vs Paging
  • Paging Options
    • Rows Per Page - number of rows to display when paging is enabled
    • Paging type - multiple navigation options

Column Aliasing

  • Override the name displayed for a column

Column Width Hints

  • Provide a width "hint" in percentage or pixels ( 100px or 10% ). Note: The table will autosize as needed, but will use the hints provided.

Column Sorting

  • Sort table by any number of columns in ascending/descending order.

Table Options

  • Row Numbers - toggle to show row numbers
  • Length Change Enabled - top left dropdown for showing alternate page sizes
  • Search Enabled - toggle to allow searching table content (regex is enabled)
  • Info - Displays the "Show N of X entries" on bottom left of table
  • Cell Borders - show borders around each Cell (cannot be enabled with Row Borders)
  • Row Borders - show border between rows
  • Compact Rows - uses less padding for denser data display
  • Striped Rows - non-colored rows will be "striped" odd/even
  • Order Column - Highlights the column used for sorting
  • Hover - Highlights row on mouse hover

Theme Settings

  • Basic theme is currently the only option, more to be added

Thresholding

Row-based threshold coloring

Thresholding with Row Coloring

Cell based threshold coloring

Thresholding with Cell Coloring

Cell based threshold value coloring

Thresholding with Value Coloring

RowColumn threshold coloring

This option sets the row color to the "highest" threshold found for all cells in row.

It also sets the color for each cell according to the threshold (you can tell which columns actually exceeded the threshold).

This means - a row can have an overall color, with each cell indicating it's real threshold color.

Thresholding with RowColumn1

Thresholding with RowColumn2

RowColumn threshold coloring including row counter

Same as above, but with row counter included

Thresholding with RowColumn including row count

Features

  • Feature parity with built-in Grafana Table Panel
  • Row coloring uses the "highest" threshold color of all columns
  • New "RowColumn" threshold color option: Sets color to "highest" threshold found for all cells in row. Also sets color for each cell according to the threshold. This means - a row can have an overall color, with each cell indicating it's real threshold color.
  • Set font size for rows
  • Scrolling
  • Paging
    • Preset page sizes
    • Multiple paging types
    • Dropdown for page size
  • Row Numbers reactive to filtering
  • Searchable table content (filtering), regex enabled
  • Columns names can be aliased
  • URLs inside row text can be "clicked"
  • Rows can have a click-through URL
  • Multi-Column Sorting
  • Horizontal scrolling enabled when columns are wider than panel

TODO

  • [+] Column is not working

Building

This plugin relies on Yarn, typical build sequence:

yarn install
yarn build

For development, you can run:

yarn install
yarn watch

The code will be parsed then copied into "dist" if the build passes without errors.

Docker Support

A docker-compose.yml file is include for easy development and testing, just run

docker-compose up

Then browse to (http://localhost:3000)

RPM

A spec file is included to facilitate RPM based deployments, to generate run

make rpm

External Dependencies

  • Grafana 6.x/7.x

Build Dependencies

  • yarn

Acknowledgements

This panel is based on the "Table" panel by GrafanaLabs

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.