From 2b4516e3cf9cd9a4320c2e8650c440727dd11058 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 06:50:05 +0000 Subject: [PATCH 1/2] Initial plan From 3b45ad86c5f7be6b4cdb4c007b1df33533bee903 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Feb 2026 06:58:28 +0000 Subject: [PATCH 2/2] fix: resolve lint errors and build issues Co-authored-by: moshloop <1489660+moshloop@users.noreply.github.com> --- .../docs/guide/views/concepts/templating.md | 43 ++++++++++--------- .../docs/guide/views/queries/http.md | 28 +++++++++--- 2 files changed, 43 insertions(+), 28 deletions(-) diff --git a/mission-control/docs/guide/views/concepts/templating.md b/mission-control/docs/guide/views/concepts/templating.md index 4a8e7f74..cf79e8b5 100644 --- a/mission-control/docs/guide/views/concepts/templating.md +++ b/mission-control/docs/guide/views/concepts/templating.md @@ -92,12 +92,12 @@ templating: ### Required Properties -| Property | Type | Description | -| -------- | ------ | ----------------------------------------------------------------- | -| `key` | string | Unique identifier for the variable (used in template expressions) | -| `label` | string | Display name shown to users | -| `values` | array | Static list of options for the dropdown | -| `valueFrom` | object | Dynamic options from config items (alternative to `values`) | +| Property | Type | Description | +| ----------- | ------ | ----------------------------------------------------------------- | +| `key` | string | Unique identifier for the variable (used in template expressions) | +| `label` | string | Display name shown to users | +| `values` | array | Static list of options for the dropdown | +| `valueFrom` | object | Dynamic options from config items (alternative to `values`) | :::note One of values or valueFrom is required Every variable must have exactly one of `values` (static list) or `valueFrom` (dynamic from configs) to populate the dropdown options. These fields are mutually exclusive. @@ -105,24 +105,24 @@ Every variable must have exactly one of `values` (static list) or `valueFrom` (d ### Optional Properties -| Property | Type | Description | -| ----------- | ------ | -------------------------------------------------------------------- | -| `default` | string | Default value when view loads | -| `dependsOn` | array | List of variable keys this depends on | +| Property | Type | Description | +| ----------- | ------ | ------------------------------------- | +| `default` | string | Default value when view loads | +| `dependsOn` | array | List of variable keys this depends on | ## valueFrom Structure When using dynamic values from config items, `valueFrom` has the following structure: -| Property | Type | Description | -|----------|------|-------------| -| `config` | object | Config selector to find matching config items | -| `config.types` | array | List of config types to match (e.g., `['Kubernetes::Cluster']`) | -| `config.tagSelector` | string | Tag selector for filtering configs (optional) | -| `config.search` | string | Free text search for configs (optional) | -| `config.limit` | int | Maximum number of configs to return (optional, default: no limit) | -| `label` | string | CEL expression for dropdown display labels (optional, defaults to config name) | -| `value` | string | CEL expression for dropdown values (optional, defaults to config name) | +| Property | Type | Description | +| -------------------- | ------ | ------------------------------------------------------------------------------ | +| `config` | object | Config selector to find matching config items | +| `config.types` | array | List of config types to match (e.g., `['Kubernetes::Cluster']`) | +| `config.tagSelector` | string | Tag selector for filtering configs (optional) | +| `config.search` | string | Free text search for configs (optional) | +| `config.limit` | int | Maximum number of configs to return (optional, default: no limit) | +| `label` | string | CEL expression for dropdown display labels (optional, defaults to config name) | +| `value` | string | CEL expression for dropdown values (optional, defaults to config name) | **Example:** @@ -132,8 +132,8 @@ valueFrom: types: ['Kubernetes::Pod'] tagSelector: 'cluster=production' limit: 50 - label: 'row.name + " (" + row.tags.namespace + ")"' # Display: "nginx (default)" - value: 'row.name' # Value used in queries: "nginx" + label: 'row.name + " (" + row.tags.namespace + ")"' # Display: "nginx (default)" + value: 'row.name' # Value used in queries: "nginx" ``` ## Variable Types @@ -468,6 +468,7 @@ spec: ``` 5. **Limit dynamic variable options** - Add reasonable limits to prevent huge lists + ```yaml valueFrom: config: diff --git a/mission-control/docs/guide/views/queries/http.md b/mission-control/docs/guide/views/queries/http.md index 490a0153..6dd7f1a1 100644 --- a/mission-control/docs/guide/views/queries/http.md +++ b/mission-control/docs/guide/views/queries/http.md @@ -80,6 +80,7 @@ The `connection` field references a stored [Connection](/mission-control/guide/c 5. Resolving any environment variable references in connection properties Connection properties that can be inherited: + - `url` - Base URL for the API - `username` / `password` - HTTP Basic Authentication - `bearer` - Bearer token for token-based auth @@ -89,19 +90,33 @@ Connection properties that can be inherited: **Example with connection:** -```yaml title="http-connection.yaml" file=/modules/mission-control/fixtures/views/http-connection.yaml - +```yaml +queries: + users: + http: + url: /api/users + connection: connection://my-api ``` ## Templating Support The `body` field supports Go templating, allowing dynamic request payloads: -```yaml title="http-post-body.yaml" file=/modules/mission-control/fixtures/views/http-post-body.yaml - +```yaml +queries: + search: + http: + url: https://api.example.com/search + method: POST + body: | + { + "query": "$(var.searchTerm)", + "limit": 100 + } ``` Template variables available in the body: + - `$(var.)` - View template variables - Environment variables via `$(ENV_VAR_NAME)` @@ -116,7 +131,7 @@ Set the property via environment variable or configuration: ```yaml # Increase limit to 50 MB properties: - view.http.body.max_size_bytes: "52428800" + view.http.body.max_size_bytes: '52428800' ``` ### Size Limit Error Handling @@ -128,6 +143,7 @@ http response body size (32 MB) exceeds maximum allowed (25 MB); increase limit ``` To resolve: + 1. Increase the limit via the property (if you have sufficient memory) 2. Use pagination in the API request to fetch smaller chunks 3. Apply filters in the API request to reduce response size @@ -142,5 +158,3 @@ queries: url: https://api.example.com/items?page=1&per_page=100 connection: connection://my-api ``` - -