
* WIP: initial panel links editor * WIP: Added dashboard migration to new panel drilldown link schema * Make link_srv interpolate new variables * Fix failing tests * Drilldown: Add context menu to graph viz (#17284) * Add simple context menu for adding graph annotations and showing drilldown links * Close graph context menu when user start scrolling * Move context menu component to grafana/ui * Make graph context menu appear on click, use cmd/ctrl click for quick annotations * Move graph context menu controller to separate file * Drilldown: datapoint variables interpolation (#17328) * Add simple context menu for adding graph annotations and showing drilldown links * Close graph context menu when user start scrolling * Move context menu component to grafana/ui * Make graph context menu appear on click, use cmd/ctrl click for quick annotations * Add util for absolute time range transformation * Add series name and datapoint timestamp interpolation * Rename drilldown link variables tot snake case, use const values instead of strings in tests * Bring LinkSrv.getPanelLinkAnchorInfo for compatibility reasons and add deprecation warning * Rename seriesLabel to seriesName * Drilldown: use separate editors for panel and series links (#17355) * Use correct target ini context menu links * Rename PanelLinksEditor to DrilldownLinksEditor and mote it to grafana/ui * Expose DrilldownLinksEditor as an angular directive * Enable visualization specifix drilldown links * Props interfaces rename * Drilldown: Add variables suggestion and syntax highlighting for drilldown link editor (#17391) * Add variables suggestion in drilldown link editor * Enable prism * Fix backspace not working * Move slate value helpers to grafana/ui * Add syntax higlighting for links input * Rename drilldown link components to data links * Add template variabe suggestions * Bugfix * Fix regexp not working in Firefox * Display correct links in panel header corner * bugfix * bugfix * Bugfix * Context menu UI tweaks * Use data link terminology instead of drilldown * DataLinks: changed autocomplete syntax * Use singular form for data link * Use the same syntax higlighting for built-in and template variables in data links editor * UI improvements to context menu * UI review tweaks * Tweak layout of data link editor * Fix vertical spacing * Remove data link header in context menu * Remove pointer cursor from series label in context menu * Fix variable selection on click * DataLinks: migrations for old links * Update docs about data links * Use value time instead of time range when interpolating datapoint timestamp * Remove not used util * Update docs * Moved icon a bit more down * Interpolate value ts only when using __value_time variable * Bring href property back to LinkModel * Add any type annotations * Fix TS error on slate's Value type * minor changes
Building The Docs
To build the docs locally, you need to have docker installed. The docs are built using Hugo - a static site generator.
Prepare the Docker Image:
Git clone grafana/website
repo. Run these commands in the root of that repo. Note that you may require sudo
when running make docs-build
depending on how your system's docker
service is configured):
git clone https://github.com/grafana/website
cd website
make docs-build
Build the Documentation:
Now that the docker image has been prepared we can build the grafana docs and start a docs server.
If you have not cloned the Grafana repository already then:
cd ..
git clone https://github.com/grafana/grafana
Switch your working directory to the directory this file (README.md) is in.
cd grafana/docs
An AWS config file is required to build the docs Docker image and to publish the site to AWS. If you are building locally only and do not have any AWS credentials for docs.grafana.org then create an empty file named awsconfig
in the current directory.
touch awsconfig
Then run (possibly with sudo
):
make watch
This command will not return control of the shell to the user. Instead the command is now running a new docker container built from the image we created in the previous step.
Open localhost:3004 to view the docs.
Images & Content
All markdown files are located in this repo (main grafana repo). But all images are added to the https://github.com/grafana/website repo. So the process of adding images is a bit complicated.
First you need create a feature (PR) branch of https://github.com/grafana/website so you can make change. Then add the image to the /static/img/docs
directory. Then make a commit that adds the image.
Then run:
make docs-build
This will rebuild the docs docker container.
To be able to use the image you have to quit (CTRL-C) the make watch
command (that you run in the same directory as this README). Then simply rerun make watch
, it will restart the docs server but now with access to your image.
Editing content
Changes to the markdown files should automatically cause a docs rebuild and live reload should reload the page in your browser.