Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude/skills/build-plugin/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ Pass in the prompt:
- The versioned plugin dir, plus the `--plugin-id <id> --datasource-id <id>` captured at Checkpoint A.
- The planned dashboards from Phase 2 (top-level summary + one perspective per object type) and the object types.
- The data stream names to build tiles from β€” the sub-agent reads the stream files itself for columns and parameters.
- Instructions: read `references/oob-content.md` β€” including its SmartViz section, which has the sub-agent fetch current chart guidance with `squaredup skill visualize` β€” write `defaultContent/` (manifest, scopes, dashboards) and `scopes.json` (only scopes the dashboards actually use), run `squaredup validate --json` from the plugin dir, and return a compact report β€” dashboards written, scopes added, validation result, any assumptions or follow-ups.
- Instructions: read `references/oob-content.md` β€” including its SmartViz section, which has the sub-agent fetch current chart guidance with `squaredup skill visualize` β€” write `defaultContent/` (manifest, scopes, dashboards) and `scopes.json` (only scopes the dashboards actually use), then give each linking column (`sourceId`) in `dataStreams/` whose type now has a perspective a `drilldown` to it (see `references/data-streams.md`, Drilldown metadata entry; without one, the column doesn't link in organizations without the Observability Graph), run `squaredup validate --json` from the plugin dir, and return a compact report β€” dashboards written, scopes added, drilldowns added, validation result, any assumptions or follow-ups.

Resolve anything the report flags before Phase 8.

Expand Down
15 changes: 12 additions & 3 deletions .claude/skills/build-plugin/references/data-streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -761,18 +761,25 @@ Use it when the API returns a value in one unit but you want to display another,

### Drilldown metadata entry

Links a column value to an object in the graph:
Links a column's cells to an indexed object, opening one of the plugin's dashboards with its variable set to that object:

```json
{
"sourceId": "deviceId", // column whose value is the sourceId
"name": "deviceName", // column whose cells link
"sourceId": "deviceId", // column whose value is the object's sourceId (can be this column)
"sourceType": "My Device", // MUST be a fixed string β€” cannot be dynamic
"name": "deviceName" // column to use as the display name
"drilldown": { "pluginDashboardPath": "devices/device-health" } // the plugin dashboard to open
}
```

> ⚠️ `sourceType` must be a hardcoded string. Dynamic per-row sourceType is not supported.

- **Without `drilldown`, the column only links in organizations with the Observability Graph**, where it opens the object's graph drilldown. Elsewhere it doesn't link at all. With `drilldown`, the Graph still opens the object's drilldown, on that dashboard.
- **`pluginDashboardPath`** is the dashboard's path within the plugin: each folder under `defaultContent/`, then the dashboard's `name` (not its file name), each lowercased with spaces and punctuation turned into `-`. `defaultContent/Devices/device.dash.json` named `Device Health` is `devices/device-health`. A typo, a rename or a moved folder breaks the link silently: the platform ignores a `drilldown` it can't use rather than failing validation.
- **Point it at a perspective for the type**: a dashboard whose variable's [scope](oob-content.md#scopesjson) holds the column's `sourceType`. Where the type has several, pick the one that fits what the stream shows. If the plugin has no dashboard for the type, leave `drilldown` out.
- **Give every linking column its own `sourceType`**, even when its `sourceId` column has one: differently named columns are separate. Entries with the same `name` merge, so a second `{ "name", "sourceId", "sourceType", "drilldown" }` entry for an existing column works too.
- **`"drilldown": false`** turns off a link the column would otherwise have, including the Graph's. Don't use it to mean "no dashboard".

> ⚠️ **Blocks tiles** also require `linkColumn` in the viz config set to the same column as `name` in the drilldown entry. Without it, blocks render but don't navigate.

### Object property lookup
Expand All @@ -793,6 +800,8 @@ Replace a raw ID column with a human-readable property from a related indexed ob

Appending a related object's list property this way lets tiles filter and group a stream's rows by it (e.g. issues filtered by their repository's topics). See [List columns](#list-columns-array-shape).

These columns link to the object too, so give them a `drilldown` as in [Drilldown metadata entry](#drilldown-metadata-entry).

---

## Post-request scripts
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/build-plugin/references/oob-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ Common tiles, with the **exact** column names the chart's `field`s must use:
- **When unsure what makes a good dashboard, copy a shipped one.** The `plugins/` directory is full of mature OOB content β€” find a plugin whose data shape resembles yours and read its `.dash.json` files to see how real dashboards order tiles, mix visualisations, and lay out the grid. i.e. Lead with a summary row of scalar/KPI tiles, then breakdowns (donut/bar) and detail (tables/line graphs) below.
- **Do not repeat the plugin name in dashboard names.** The name appears beneath the plugin name in the UI β€” "MyPlugin / Overview" is correct; "MyPlugin / MyPlugin Overview" is redundant.
- **Give each dashboard a distinct name.** Perspective tabs sit next to each other β€” identical names are indistinguishable.
- **A dashboard's folders and `name` are its drilldown path.** Linking columns open it by `pluginDashboardPath` (see [data-streams.md](data-streams.md#drilldown-metadata-entry)), so renaming a dashboard or moving its folder breaks them silently. Update every `pluginDashboardPath` in `dataStreams/` that names the old path.
- `"variables"` array supports **only one variable** per dashboard. Design each dashboard around a single object type.
- **Every variable a tile references must be declared** in the dashboard's `"variables"` array, otherwise the binding resolves to nothing.
- **Keep request counts low on overview tiles.** A tile over an `httpRequestScopedSingle` stream sends one request per object in scope, so a summary of 50 environments is 50 API calls every time the dashboard loads. (Other scoped streams can send all the objects in one request.) Prefer a single list call, or a property captured at import, for account-wide summaries; keep per-object streams for drilldown dashboards.
Expand Down
1 change: 1 addition & 0 deletions .claude/skills/convert-dashboard/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Verify the output β€” check that:
- `dashboard.version` is reset to `1` (the script forces this regardless of the pasted-in version)
- `config.scopes[]` entries with `ids_defaultScopeIds` bindings are removed
- Perspective tiles: `config.variables`, `config.scope.variable`, `config.scope.scope` are templatized
- No column in `config.dataStream.metadata` keeps a `drilldown.dashboardId` or a `sourceLookup.configId`. The script turns a dashboard drilldown into `{}` and names each one on stderr. Where the column should open one of the plugin's own dashboards, set `"drilldown": { "pluginDashboardPath": "<path>" }` (see [data-streams.md, Drilldown metadata entry](../build-plugin/references/data-streams.md#drilldown-metadata-entry))
- The tiles x/y/z positions have not been changed from the pasted dashboard JSON

**Done when:** no hardcoded platform IDs remain in any tile.
Expand Down
32 changes: 32 additions & 0 deletions .claude/skills/convert-dashboard/scripts/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,34 @@ if (allScopes) {
const scopeName = scopeEntry?.name;
const variableName = scopeEntry?.variable?.name;

// A column drilldown can name a workspace dashboard or another data source, and neither exists in a
// plugin. As the platform's own plugin export does: a dashboard id becomes {} (no dashboard, rather
// than inheriting the data stream's), and a lookup in another data source turns the link off.
function toPluginColumn(column, tile) {
if (!column || typeof column !== 'object') return column;

const converted = { ...column };

if (converted.sourceLookup?.configId) {
delete converted.sourceLookup;
delete converted.sourceId;
converted.drilldown = false;
} else if (converted.drilldown?.dashboardId) {
process.stderr.write(
`Tile "${tile.config?.title ?? tile.i}", column "${converted.name ?? converted.pattern ?? converted.cloneAs ?? converted.comparisonName}": ` +
`drilldown to ${converted.drilldown.dashboardId} removed. ` +
'Set "drilldown": { "pluginDashboardPath": "<path>" } if it should open one of the plugin\'s dashboards.\n'
);
converted.drilldown = {};
}

if (Array.isArray(converted.expand)) {
converted.expand = converted.expand.map(entry => toPluginColumn(entry, tile));
}

return converted;
}

function normalizeTile(tile) {
const config = structuredClone(tile.config);
if (!config) return tile;
Expand All @@ -65,6 +93,10 @@ function normalizeTile(tile) {
if (config.scopes.length === 0) delete config.scopes;
}

if (Array.isArray(config.dataStream?.metadata)) {
config.dataStream.metadata = config.dataStream.metadata.map(column => toPluginColumn(column, tile));
}

// Templatize dataStream
if (config.dataStream) {
// Leave global built-in data streams (e.g. datastream-properties) untouched β€”
Expand Down
3 changes: 3 additions & 0 deletions REVIEW.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ SquaredUp behaviour that reviews have repeatedly got wrong. Treat these as estab
- SmartViz applies shapes whichever renderer a tile uses.
- In a `state` shape, `map` lists the raw values for each state (e.g. `{ "success": ["Good"] }`), so the column still emits the raw labels.
- **SmartViz matching and defaults.** SmartViz is documented by the platform's `squaredup skill visualize`, not in this repository; these points are kept here for reviewers only. Colour and value maps (`colors`, `mappedColors`, row highlights) match keys case-insensitively. `gaugeBands[].to` is a 0–1 fraction of the gauge range, not an absolute value. `ringGridMax` defaults to 100. The scalar `comparison` displays the value it is given; it does not calculate a delta.
- **Links without the Observability Graph.** In an organization without the Graph, a `sourceId` column only links if it declares `drilldown`, and a URL column that links to `/drilldown/node` is dropped. See [data-streams.md, Drilldown metadata entry](.claude/skills/build-plugin/references/data-streams.md#drilldown-metadata-entry).
- **Mustache expressions.** Unset variables resolve to an empty string; they do not throw. Do not suggest `typeof` guards.
- **Configuration validation warns, it does not block.** A failing `configValidation` step shows a warning; the user can still save the data source.
- **Dashboard variables and pickers.** A perspective tile that declares a variable does not run with an empty selection; it shows "No objects selected". Object pickers only offer objects that have been imported.
Expand Down Expand Up @@ -131,6 +132,7 @@ SquaredUp behaviour that reviews have repeatedly got wrong. Treat these as estab
- Template text - Any `{{…}}` other than the templating tokens (`configId`, `workspaceId`, `scopes.[…]`, `dataStreams.[…]`, `variables.[…]`) is substituted, normally to nothing, when the default content is installed. Flag it unless it is wrapped as `{{{{raw}}}}…{{{{/raw}}}}`. Common places are `labelFormat`, `cartesianTooltipTemplate` and `statusGridSecondaryTemplate`. See [oob-content.md, Templating tokens](.claude/skills/build-plugin/references/oob-content.md#templating-tokens).
- Request volume - Flag overview tiles that send one request per object (per environment, per device) where an imported property or a single list call would do.
- Timeframes - Check the stream's `timeframes` before calling a tile's timeframe redundant or wrong; a stream may only offer one range.
- Renames - A dashboard's folders and `name` are its drilldown path. Flag a rename or move that leaves a `pluginDashboardPath` in `dataStreams/` naming the old path.

### Out-of-the-box dashboard manifest (defaultContent/\*\*/manifest.json)

Expand All @@ -153,6 +155,7 @@ SquaredUp behaviour that reviews have repeatedly got wrong. Treat these as estab
- Deduplication - If multiple data streams share the same API endpoint and differ only by a filter, consider merging them into a single stream with a UI parameter to control the filter.
- Capped results - Flag counts or totals calculated from a list whose total result the API caps (e.g. a search that never returns more than 2,000 rows), and filtering that happens in a script after such a request. Both silently undercount; the filter or count belongs in the API request. A per-page cap that the stream pages past is not a finding.
- Optional request parameters - Omit an optional parameter when it is empty rather than sending an empty string, which many APIs reject.
- Drilldowns - A `sourceId` column whose `sourceType` has a perspective in the plugin needs `"drilldown": { "pluginDashboardPath": "<path>" }`, with the path matching that dashboard's folders and `name`. Flag `"drilldown": false` used to mean "no dashboard", and URL columns built to link to `/drilldown/node`. See [data-streams.md, Drilldown metadata entry](.claude/skills/build-plugin/references/data-streams.md#drilldown-metadata-entry).
- ui
- displayName - First word uppercase, then lowercase (e.g. β€œTable name"). Single value: singular. Multiple values: β€œ(s)" (e.g. Tables name(s)). Do not use β€œyou" β€œYour" in display names. Keep text neutral, concise, and descriptive.
- help - Use extremely sparingly. Never state the obvious. Only use when something important must be understood. Start with a verb where possible (e.g. β€œSupports the ServiceNow filtering definition format").
Expand Down
2 changes: 1 addition & 1 deletion plugins/AutoTask/v1/dataStreams/companies.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"metadata": [
{ "name": "id", "displayName": "ID", "sourceType": "autotask-company", "shape": "string", "visible": false },
{ "name": "companyName", "displayName": "Company Name" },
{ "sourceId": "id", "sourceType": "autotask-company", "name": "companyName" },
{ "sourceId": "id", "sourceType": "autotask-company", "drilldown": { "pluginDashboardPath": "tickets-overview" }, "name": "companyName" },
{ "name": "isActive", "displayName": "Is Active" },
{ "name": "phone", "displayName": "Phone" },
{ "name": "address1", "displayName": "Address" },
Expand Down
2 changes: 1 addition & 1 deletion plugins/AutoTask/v1/dataStreams/contractStatus.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
{ "name": "contractName", "displayName": "Contract Name" },
{ "name": "companyID", "displayName": "Company ID", "sourceType": "autotask-company", "shape": "string", "visible": false },
{ "name": "companyName", "displayName": "Company", "sourceId": "companyID", "objectPropertyPath": "name", "shape": "string" },
{ "sourceId": "companyID", "sourceType": "autotask-company", "name": "companyName" },
{ "sourceId": "companyID", "sourceType": "autotask-company", "drilldown": { "pluginDashboardPath": "tickets-overview" }, "name": "companyName" },
{
"name": "contractTypeName",
"displayName": "Contract Type",
Expand Down
2 changes: 1 addition & 1 deletion plugins/AutoTask/v1/dataStreams/tickets.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
{ "name": "priority", "displayName": "Priority (Raw)", "sourceType": "autotask-ticket-priority", "shape": "string", "visible": false },
{ "name": "companyID", "sourceType": "autotask-company", "shape": "string", "visible": false },
{ "name": "companyName", "displayName": "Company", "sourceId": "companyID", "objectPropertyPath": "name", "shape": "string" },
{ "sourceId": "companyID", "sourceType": "autotask-company", "name": "companyName" },
{ "sourceId": "companyID", "sourceType": "autotask-company", "drilldown": { "pluginDashboardPath": "tickets-overview" }, "name": "companyName" },
{ "name": "contactID", "sourceType": "autotask-contact", "shape": "string", "visible": false },
{ "name": "contactName", "displayName": "Contact", "sourceId": "contactID", "objectPropertyPath": "name", "shape": "string" },
{ "name": "contractID", "sourceType": "autotask-contract", "shape": "string", "visible": false },
Expand Down
2 changes: 1 addition & 1 deletion plugins/AutoTask/v1/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "autotask",
"displayName": "Autotask",
"version": "1.0.8",
"version": "1.0.9",
"author": {
"name": "SquaredUp Labs",
"type": "labs"
Expand Down
12 changes: 10 additions & 2 deletions plugins/Auvik/v1/dataStreams/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,10 @@
"displayName": "Device",
"shape": "string",
"sourceId": "deviceId",
"sourceType": "Device"
"sourceType": "Device",
"drilldown": {
"pluginDashboardPath": "device"
}
},
{
"name": "currentStatus",
Expand Down Expand Up @@ -147,7 +150,12 @@
{
"name": "tenantName",
"displayName": "Tenant",
"shape": "string"
"shape": "string",
"sourceId": "tenantId",
"sourceType": "Tenant",
"drilldown": {
"pluginDashboardPath": "tenant"
}
},
{
"name": "tenantId",
Expand Down
12 changes: 10 additions & 2 deletions plugins/Auvik/v1/dataStreams/configurationBackups.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,10 @@
"shape": "string",
"role": "label",
"sourceId": "deviceId",
"sourceType": "Device"
"sourceType": "Device",
"drilldown": {
"pluginDashboardPath": "device"
}
},
{
"name": "backupTime",
Expand Down Expand Up @@ -135,7 +138,12 @@
{
"name": "tenantName",
"displayName": "Tenant",
"shape": "string"
"shape": "string",
"sourceId": "tenantId",
"sourceType": "Tenant",
"drilldown": {
"pluginDashboardPath": "tenant"
}
},
{
"name": "tenantId",
Expand Down
12 changes: 10 additions & 2 deletions plugins/Auvik/v1/dataStreams/deviceSupport.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@
"shape": "string",
"role": "label",
"sourceId": "deviceId",
"sourceType": "Device"
"sourceType": "Device",
"drilldown": {
"pluginDashboardPath": "device"
}
},
{
"name": "warrantyCoverageStatus",
Expand Down Expand Up @@ -326,7 +329,12 @@
{
"name": "tenantName",
"displayName": "Tenant",
"shape": "string"
"shape": "string",
"sourceId": "tenantId",
"sourceType": "Tenant",
"drilldown": {
"pluginDashboardPath": "tenant"
}
},
{
"name": "tenantId",
Expand Down
19 changes: 16 additions & 3 deletions plugins/Auvik/v1/dataStreams/devices.json
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@
"shape": "string",
"role": "label",
"sourceId": "id",
"sourceType": "Device"
"sourceType": "Device",
"drilldown": {
"pluginDashboardPath": "device"
}
},
{
"name": "onlineStatus",
Expand Down Expand Up @@ -418,7 +421,12 @@
{
"itemShape": "string"
}
]
],
"sourceId": "networkIds",
"sourceType": "Network",
"drilldown": {
"pluginDashboardPath": "network"
}
},
{
"name": "managed",
Expand Down Expand Up @@ -559,7 +567,12 @@
{
"name": "tenantName",
"displayName": "Tenant",
"shape": "string"
"shape": "string",
"sourceId": "tenantId",
"sourceType": "Tenant",
"drilldown": {
"pluginDashboardPath": "tenant"
}
},
{
"name": "tenantId",
Expand Down
Loading
Loading