* Add prettifyLogMessage to select components in test file * Change entry depending on the value of prettifyLogMessage * Add prettifyLogMessage to state * Fix merge conflict * Fixe bug where the log message wasn't parsed as JSON * Implement function to restructure all logs * Change elstic image version back to 7.7.1 * Add showCommonLabels that was missing * Remove comment * Put import of getParser together with the other imports * Logs: fix bug where message isn't restructured if it contains ANSI code * Logs: change label for switch to Restructure * Remove unnecessary file * Logs: added divider before switch component * Add dividers between the different log options * Remove unintentional changes * Explore: remove dividers in log settings * Explore: refactor for LogRowMessage for better readability * remove unnecessary change * Logs: fix bug where logs aren't restructured if they have highlights * Logs: minor refactoring * Logs: use memoizeOne to prevent parsing on every re-render * Logs: calculate needsHilight inside renderLogMessage instead of outside * Logs: fix bug where logs aren't prettified when wrap logs is disabled * Explore: change name to prettify * Remove console.log Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> * Dashboards: add switch to prettify log messages to the Logs fields * Logs: make prettify only work for JSON logs * Logs: fix bug with tests for logs * Update public/app/plugins/panel/logs/module.tsx Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com> |
||
---|---|---|
.. | ||
.storybook | ||
src | ||
.eslintrc | ||
api-extractor.json | ||
CHANGELOG.md | ||
index.js | ||
LICENSE_APACHE2 | ||
package.json | ||
README.md | ||
rollup.config.ts | ||
tsconfig.build.json | ||
tsconfig.json |
Grafana UI components library
@grafana/ui is currently in BETA.
@grafana/ui is a collection of components used by Grafana
Our goal is to deliver Grafana's common UI elements for plugins developers and contributors.
Browse the Storybook catalog of the components.
See package source for more details.
Installation
yarn add @grafana/ui
npm install @grafana/ui
Development
For development purposes we suggest using yarn link
that will create symlink to @grafana/ui lib. To do so navigate to packages/grafana-ui
and run yarn link
. Then, navigate to your project and run yarn link @grafana/ui
to use the linked version of the lib. To unlink follow the same procedure, but use yarn unlink
instead.
Storybook 6.x migration
We've upgraded Storybook to version 6 and with that we will convert to using controls instead of knobs for manipulating components. Controls will not require as much coding as knobs do. Please refer to the storybook style-guide for further information.