From 8d5a7f3bee6a29dbdefa79a0ea10e83f293fbd16 Mon Sep 17 00:00:00 2001 From: Scott Anderson Date: Wed, 6 Feb 2019 09:03:32 -0700 Subject: [PATCH] extended the children function and updated uses of the children function --- content/v2.0/process-data/_index.md | 5 +---- content/v2.0/process-data/manage-tasks/_index.md | 5 +---- content/v2.0/query-data/guides/_index.md | 2 +- .../v2.0/reference/flux/functions/misc/_index.md | 2 +- .../v2.0/reference/flux/functions/outputs/_index.md | 2 +- .../v2.0/reference/flux/functions/tests/_index.md | 2 +- .../flux/functions/transformations/_index.md | 13 ++----------- .../functions/transformations/aggregates/_index.md | 2 +- .../functions/transformations/selectors/_index.md | 2 +- .../transformations/type-conversions/_index.md | 2 +- .../reference/flux/language/built-ins/_index.md | 6 +----- layouts/shortcodes/children.html | 12 +++++++++++- 12 files changed, 23 insertions(+), 32 deletions(-) diff --git a/content/v2.0/process-data/_index.md b/content/v2.0/process-data/_index.md index 4a0647a88..4c6c8a586 100644 --- a/content/v2.0/process-data/_index.md +++ b/content/v2.0/process-data/_index.md @@ -23,7 +23,4 @@ The following articles explain how to configure and build tasks using the Influx and via raw Flux scripts with the `influx` command line interface (CLI). They also provide examples of commonly used tasks. -[Write a task](/v2.0/process-data/write-a-task) -[Manage Tasks](/v2.0/process-data/manage-tasks) -[Common Tasks](/v2.0/process-data/common-tasks) -[Task Options](/v2.0/process-data/task-options) +{{< children >}} diff --git a/content/v2.0/process-data/manage-tasks/_index.md b/content/v2.0/process-data/manage-tasks/_index.md index b26aa7bb1..0173e43e0 100644 --- a/content/v2.0/process-data/manage-tasks/_index.md +++ b/content/v2.0/process-data/manage-tasks/_index.md @@ -15,7 +15,4 @@ InfluxDB provides two options for managing the creation, reading, updating, and through the InfluxDB user interface (UI) or using the `influx` command line interface (CLI). Both tools can perform all task CRUD operations. -[Create a task](/v2.0/process-data/manage-tasks/create-task) -[View tasks](/v2.0/process-data/manage-tasks/view-tasks) -[Update a task](/v2.0/process-data/manage-tasks/update-task) -[Delete a task](/v2.0/process-data/manage-tasks/delete-task) +{{< children >}} diff --git a/content/v2.0/query-data/guides/_index.md b/content/v2.0/query-data/guides/_index.md index d6f32d714..c19dda0da 100644 --- a/content/v2.0/query-data/guides/_index.md +++ b/content/v2.0/query-data/guides/_index.md @@ -10,4 +10,4 @@ menu: The following guides walk through common query uses cases. -{{% children %}} +{{< children >}} diff --git a/content/v2.0/reference/flux/functions/misc/_index.md b/content/v2.0/reference/flux/functions/misc/_index.md index cf285784f..696924f50 100644 --- a/content/v2.0/reference/flux/functions/misc/_index.md +++ b/content/v2.0/reference/flux/functions/misc/_index.md @@ -12,4 +12,4 @@ Flux functions primarily retrieve, shape and transform, then output data, howeve there are functions available that serve other purposes. The following functions are are available but don't fit within other function categories: -{{< function-list category="Miscellaneous" menu="v2_0_ref" >}} +{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/functions/outputs/_index.md b/content/v2.0/reference/flux/functions/outputs/_index.md index 96520cf14..bc5f3fb00 100644 --- a/content/v2.0/reference/flux/functions/outputs/_index.md +++ b/content/v2.0/reference/flux/functions/outputs/_index.md @@ -11,4 +11,4 @@ menu: Flux output functions yield results or send data to a specified output destination. The following output functions are are available: -{{< function-list category="Outputs" menu="v2_0_ref" >}} +{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/functions/tests/_index.md b/content/v2.0/reference/flux/functions/tests/_index.md index 1850a247b..fc0043634 100644 --- a/content/v2.0/reference/flux/functions/tests/_index.md +++ b/content/v2.0/reference/flux/functions/tests/_index.md @@ -11,4 +11,4 @@ menu: Flux testing functions test piped-forward data in specific ways and return errors if the tests fail. The following testing functions are available: -{{< function-list category="Tests" menu="v2_0_ref" >}} +{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/functions/transformations/_index.md b/content/v2.0/reference/flux/functions/transformations/_index.md index dd3996c5b..592634313 100644 --- a/content/v2.0/reference/flux/functions/transformations/_index.md +++ b/content/v2.0/reference/flux/functions/transformations/_index.md @@ -11,17 +11,8 @@ menu: Flux transformation functions transform or shape your data in specific ways. There are different types of transformations categorized below: -## [Aggregates](/v2.0/reference/flux/functions/transformations/aggregates) -Aggregate functions take values from an input table and aggregate them in some way. -The output table contains is a single row with the aggregated value. - -## [Selectors](/v2.0/reference/flux/functions/transformations/selectors) -Selector functions return one or more records based on function logic. -The output table is different than the input table, but individual row values are not. - -## [Type conversions](/v2.0/reference/flux/functions/transformations/type-conversions) -Type conversion functions convert the `_value` column of the input table into a specific data type. +{{< children show="sections" >}} ## Generic transformations -{{< function-list category="Transformations" menu="v2_0_ref" >}} +{{< children type="functions" show="pages" >}} diff --git a/content/v2.0/reference/flux/functions/transformations/aggregates/_index.md b/content/v2.0/reference/flux/functions/transformations/aggregates/_index.md index 1bde2bc48..dc236a9d9 100644 --- a/content/v2.0/reference/flux/functions/transformations/aggregates/_index.md +++ b/content/v2.0/reference/flux/functions/transformations/aggregates/_index.md @@ -32,7 +32,7 @@ It windows and aggregates the data, then combines windowed tables into a single ### Aggregate functions The following aggregate functions are available: -{{< function-list category="Aggregates" menu="v2_0_ref" >}} +{{< children type="functions" >}} ### Aggregate selectors The following functions are both aggregates and selectors. diff --git a/content/v2.0/reference/flux/functions/transformations/selectors/_index.md b/content/v2.0/reference/flux/functions/transformations/selectors/_index.md index c3f75b850..13cc15723 100644 --- a/content/v2.0/reference/flux/functions/transformations/selectors/_index.md +++ b/content/v2.0/reference/flux/functions/transformations/selectors/_index.md @@ -13,7 +13,7 @@ The output table is different than the input table, but individual row values ar The following selector functions are available: -{{< function-list category="Selectors" menu="v2_0_ref" >}} +{{< children type="functions" >}} ### Selectors and aggregates diff --git a/content/v2.0/reference/flux/functions/transformations/type-conversions/_index.md b/content/v2.0/reference/flux/functions/transformations/type-conversions/_index.md index 5b6e04c44..fcdff7292 100644 --- a/content/v2.0/reference/flux/functions/transformations/type-conversions/_index.md +++ b/content/v2.0/reference/flux/functions/transformations/type-conversions/_index.md @@ -11,4 +11,4 @@ menu: Flux type conversion functions convert columns of the input table into a specific data type. The following type conversion functions are available: -{{< function-list category="Type conversions" menu="v2_0_ref" >}} +{{< children type="functions" >}} diff --git a/content/v2.0/reference/flux/language/built-ins/_index.md b/content/v2.0/reference/flux/language/built-ins/_index.md index 9438f2842..f65dedfb0 100644 --- a/content/v2.0/reference/flux/language/built-ins/_index.md +++ b/content/v2.0/reference/flux/language/built-ins/_index.md @@ -13,8 +13,4 @@ menu: Flux contains many preassigned values. These preassigned values are defined in the source files for the various built-in packages. -## [System built-ins](/v2.0/reference/flux/language/built-ins/system-built-ins) -When a built-in value is not expressible in Flux, its value may be defined by the hosting environment. - -## [Time constants](/v2.0/reference/flux/language/built-ins/time-constants) -When a built-in value is not expressible in Flux, its value may be defined by the hosting environment. +{{< children >}} diff --git a/layouts/shortcodes/children.html b/layouts/shortcodes/children.html index 66d001556..45e8e6f2e 100644 --- a/layouts/shortcodes/children.html +++ b/layouts/shortcodes/children.html @@ -1,5 +1,15 @@ -{{ $pages := union .Page.Pages .Page.Sections }} {{ $type := .Get "type" | default "articles" }} +{{ $show := .Get "show" | default "all" }} + +{{ if eq $show "all" }} + {{ .Scratch.Set "pages" (union .Page.Pages .Page.Sections) }} +{{ else if (eq $show "sections") }} + {{ .Scratch.Set "pages" .Page.Sections }} +{{ else if (eq $show "pages") }} + {{ .Scratch.Set "pages" .Page.Pages }} +{{ end }} + +{{ $pages := .Scratch.Get "pages" }}