Skip to content

Commit 41db5b6

Browse files
Transformations: Separate useful doc content for UI use (grafana#75781)
* baldm0mma/doc_builder/ add to gitignore * baldm0mma/doc_builder/ add makefile commands * baldm0mma/doc_builder/ add content * baldm0mma/doc_builder/ format content * baldm0mma/doc_builder/ update makefile * baldm0mma/docs_builder/ update content * baldm0mma/doc_builder/ add back content * baldm0mma/doc_builder/ run builder * baldm0mma/doc_builder/ update naming * baldm0mma/doc_builder/ remove unused note * baldm0mma/doc_builder/ update template * baldm0mma/doc_builder/ add new line in makefile * baldm0mma/doc_builder/ rem new line * baldm0mma/doc_builder/ add final line * Much of this full PR was Co-Authored-By: Jack Baldry <jack.baldry@grafana.com> * baldm0mma/doc_builder/ update readme * baldm0mma/doc_builder/ update guidlines * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update docs/README.md Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update docs/README.md Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * Update scripts/docs/generate-transformations.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * baldm0mma/doc_builder/ update concat * baldmomma/doc_builder/ finish concat table * baldm0mma/docs_builder/ update with suggestions * baldm0mma/doc_builder/ update content to use getHelperDocs * baldm0mma/doc_builder/ update calculateField * baldm0mma/doc_builder/ update to byRefId * baldm0mma/doc_builder/ update filterByValue * baldm0mma/doc_builder/ update filterFieldsByName * baldm0mma/doc_builder/ update formatTime * baldm0mma/doc_builder/ update groupBy * baldm0mma/doc_builder/ update groupingToMatrix * baldm0mma/doc_update/ update heatmap * baldm0mma/doc_builder/ update histogram * baldm0mma/doc_builder/ update joinByField * baldm0mma/doc_builder/ update joinByLabels * baldm0mma/doc_builder/ update labelsToFields * baldm0mma/doc_builder/ update limit * baldm0mma/doc_builder/ update merge * baldm0mma/doc_builder/ update organize * baldm0mma/doc_builder/ update partitionByValues * baldm0mma/doc_builder/ update prepareTimeSeries * baldm0mma/doc_builder/ update reduce * baldm0mma/doc_builder/ update renameByRegex * baldm0mma/doc_builder/ update rowsToFields * baldm0mma/doc_builder/ update seriesToRows * baldm0mma/doc_builder/ update sortBy * baldm0mma/doc_builder/ update spatial * baldm0mma/doc_builder/ update timeSeriesTable * baldm0mma/doc_builder/ rerender all * baldm0mma/doc_builder/ update calculateField * baldm0mma/doc_builder/ gitignore conflicts * baldm0mma/doc_builder/ add formatString * baldm0mma/doc_builder/ update vars * baldm0mma/doc_builder/ update naming * baldm0mma/doc_builder/ rerender markdown * Update public/app/features/transformers/docs/content.ts Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com> * baldm0mma/doc_builder/ update content * baldm0mma/doc_builder/ add to codeownders * baldm0mma/doc_builder/ correct spelling * baldm0mma/doc_builder/ update comment --------- Co-authored-by: Isabel <76437239+imatwawana@users.noreply.github.com>
1 parent ec84caf commit 41db5b6

File tree

7 files changed

+1688
-186
lines changed

7 files changed

+1688
-186
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@ cypress.config.js @grafana/grafana-frontend-platform
513513
/scripts/verify-repo-update/ @grafana/grafana-delivery
514514
scripts/generate-icon-bundle.js @grafana/plugins-platform-frontend @grafana/grafana-frontend-platform
515515

516+
/scripts/docs/generate-transformations.ts @grafana/grafana-bi-squad
516517
/scripts/webpack/ @grafana/frontend-ops
517518
/scripts/generate-a11y-report.sh @grafana/grafana-frontend-platform
518519
.pa11yci.conf.js @grafana/grafana-frontend-platform

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,8 @@ deployment_tools_config.json
202202
.pr-body.txt
203203

204204
# Core plugin builds
205-
public/app/plugins/**/dist/
205+
public/app/plugins/**/dist/
206+
207+
# Ignore transpiled JavaScript resulting from the generate-transformations.ts script.
208+
/public/app/features/transformers/docs/*.js
209+
/scripts/docs/generate-transformations.js

docs/Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,11 @@ MAKEFLAGS += --warn-undefined-variables
66
MAKEFLAGS += --no-builtin-rule
77

88
include docs.mk
9+
10+
.PHONY: sources/panels-visualizations/query-transform-data/transform-data/index.md
11+
sources/panels-visualizations/query-transform-data/transform-data/index.md: ## Generate the Transform Data page source.
12+
sources/panels-visualizations/query-transform-data/transform-data/index.md:
13+
cd $(CURDIR)/..
14+
npx tsc ../scripts/docs/generate-transformations.ts
15+
node ../scripts/docs/generate-transformations.js > $(CURDIR)/$@
16+
npx prettier -w $(CURDIR)/$@

docs/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,17 @@ If you have the grafana/website repo checked out in the same directory as the gr
2323

2424
## Content guidelines
2525

26-
Edit content in the `sources` directory.
26+
Generally, one can edit content in the `sources` directory.
27+
28+
NOTE: the following paths are built instead from a typescript file and are auto-generated. Please do not edit these files directly.
29+
Instead, navigate to the appropriate typescript source file and edit the content there, then follow the build instructions to generate the markdown files.
30+
31+
- Transformations
32+
- Auto-generated markdown location:
33+
- docs/sources/panels-visualizations/query-transform-data/transform-data/index.md
34+
- Typescript location for editing and instructions:
35+
- scripts/docs/generate-transformations.ts - Includes all content not specific to a transformation.
36+
- public/app/features/transformers/docs/content.ts - Transformation-specific content.
2737

2838
### [Contributing](/contribute/documentation/README.md)
2939

0 commit comments

Comments
 (0)