5580d06101
* initial commit for PromQAIL * add feature toggle and start button * add drawer * set up drawer and state * fix styles and start the conditional text display * add data info list going to ai * add logos and style * metric display table style, neeed to make responsive * make feature toggle frontend only * add logic for want prompt for list or not, add helpers, addquerysuggestion type * make query suggestion component * add buttons to add or refine prompt * refactor logic to add interactions to have multiple AI or historical interactions * refactor and enable multiple questions, all flow * add colorful AI icon to drawer open button * fix linting * refactor for hooking up promQail app and only giving one suggestion * design fixes * fix next prompt button styling * historical suggestions give us 5, fixed that and some design things * hook up the api, provide defense filler if it's down, refactor lots * use query, fix linting * add metadata to explain for ai suggestions * styling fixes * give metadata for historical suggestions by parsing query on the fly * no prompt field to query-suggestion endpoint if prompt is empty * fix linting * use suggest rte for historical list, fix long code style * use suggest rte for historical list, fix long code style * fix historical bug * added prompt file * updated llm logic in explainer helper * bump @grafana/experimental from 1.7.0 to 1.7.2 * use llmservice and vectorservice * cleanup prompts + streaming explainer * promqail feature toggle: fix re-order * PromQL non-llm failback recommendation logic (#75469) * added template recommendation logic directly in helpers * also added selected labels to recommendation * PromQail: query gen: fix prompt formatting and fetch metric labels to be used (#75450) * PromQail: query gen: fix prompt formatting and fetch metric labels to be used * Code fixes as suggested * Use newly decided collection name for promql templates * Prometheus: Promqail tests and bug fixes (#75852) * add tests for drawer * refine one prompt at a time, fix css * scroll into view on interaction change * fix styles for light * disable prompt input after getting sugestions for that interaction * make buttons disappear after selecting refine prompt or show historical queries to prevent user from clicking many times * fix border radius * fix new eslint rule about css requiring objects and not template literals * add scrollIntoView for test * grafana_prometheus_promqail_explanation_feedback - add feedback rudderstack interaction for explanation * add form link to feedback for query suggestions * fix bugs * for prettier * PromQL Builder Explainer: Added promql documentation and updated prompt (#75593) * added promql documentation and updated prompt * refactor prompt generation into isolated function * updated prompt to answer with a question * removed commented code * updated metadata logic * updated documentation body logic * Prometheus: PromQAIL UI fixes (#76654) * align buttons at 16px * only autoscroll when an interaction has been added or the suggestions have been updated * add 12px below explain for suggested queries * add . after suggestion number * fix linting error * Prometheus: PromQAIL feedback improvements (#76711) * align buttons at 16px * only autoscroll when an interaction has been added or the suggestions have been updated * add 12px below explain for suggested queries * add . after suggestion number * add text indication for explanation feedback * add form for suggestion feedback, add form for not helpful explanation feedback * fix linting error * make radio button feedback required * required text, padding additions, thank you for your feedback * PromQL Builder Suggestion: Added type level templates and removed explainer steps for fallback suggestion logic (#75764) * adding more detailed templates to promql fallback suggest * remove debug logs * added missing explain logic * Fix brendan's type issue --------- Co-authored-by: Brendan O'Handley <brendan.ohandley@grafana.com> Co-authored-by: bohandley <brendan.ohandley@gmail.com> * make yarn.lock equal to current in main * fix feature toggles * fix prettier issues --------- Co-authored-by: Edward Qian <edward.qian@grafana.com> Co-authored-by: Yasir Ekinci <yas.ekinci@grafana.com> Co-authored-by: Edward Qian <edward.c.qian@gmail.com> Co-authored-by: Gerry Boland <gerboland@users.noreply.github.com> |
||
---|---|---|
.. | ||
sources | ||
.gitignore | ||
docs.mk | ||
logo-horizontal.png | ||
make-docs | ||
Makefile | ||
README.md | ||
variables.mk |
Building the docs locally
When you contribute to documentation, it's a good practice to build the docs on your local machine to make sure your changes appear as you expect. This README explains the process for doing that.
To build a local version, you need to run a process in a Docker container.
Grafana periodically updates the Docker image, docs-base
, to update the styling of the Docs.
Requirements
- Docker >= 2.1.0.3
- Yarn >= 1.22.4
Build the doc site
First, make sure the Docker daemon is running on your machine. Then, follow these steps:
- On the command line, first change to the docs folder:
cd docs
. - Run
make docs
. This launches a preview of the website with the current grafana docs athttp://localhost:3002/docs/grafana/latest/
which will refresh automatically when changes are made to content in thesources
directory.
If you have the grafana/website repo checked out in the same directory as the grafana repo, then you can run make docs-local-static
to use local assets (such as images).
Content guidelines
Edit content in the sources
directory.
Contributing
Using relref
for internal links
Use the Hugo shortcode relref any time you are linking to other internal docs pages.
Syntax is:
{{< relref "example.md" >}}
You might need to add more context for the link (containing folders and so on, folder/example.md
) if Hugo says the relref is ambiguous.
Managing redirects
When moving content around or removing pages it's important that users following old links are properly redirected to the new location. We do this using the aliases feature in Hugo.
If you are moving a page, add an aliases
entry in the front matter referencing the old location of the page which will redirect the old url to the new location.
If you are removing a page, add an aliases
entry in the front matter of the most-applicable page referencing the location of the page being removed.
If you are copying an existing page as the basis for a new one, be sure to remove any aliases
entries in the front matter in your copy to avoid conflicting redirects.
Edit the side menu
The side menu is automatically build from the file structure. Use the weight front matter parameter to order pages.
To specify different menu text from the page title, use the front matter parameter menuTitle
.
Add images
Please see our help documentation on Image, diagram, and screenshot guidelines for comprehensive information.
Deploy changes to grafana.com
When a PR is merged with changes in the docs/sources
directory, those changes are automatically synced by a GitHub action (.github/workflows/publish.yml
) to the grafana/website repo.
- A PR that targets the
main
branch syncs to thecontent/docs/grafana/next
directory in thewebsite
repository, and publishes tohttps://grafana.com/docs/grafana/next/
. - A PR targeting the
latest/current
release branch syncs to thecontent/docs/grafana/latest
directory in thewebsite
repository, and publishes tohttps://grafana.com/docs/grafana/latest/
.
Once the sync is complete, the website will automatically publish to production - no further action is needed.