Skip to content

Commit

Permalink
fix(system): improve query help docs (#39)
Browse files Browse the repository at this point in the history
Co-authored-by: Melissa Hilliard <63749096+MelissaHilliard@users.noreply.github.com>
  • Loading branch information
mure and MelissaHilliard authored Sep 26, 2023
1 parent ccf66dc commit 49487f0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/datasources/system/components/SystemQueryEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ export function SystemQueryEditor({ query, onChange, onRunQuery, datasource }: P

return (
<>
<InlineField label="Query type">
<InlineField label="Query type" labelWidth={14} tooltip={tooltips.queryType}>
<RadioButtonGroup
options={enumToOptions(SystemQueryType)}
onChange={onQueryTypeChange}
value={query.queryKind}
/>
</InlineField>
{query.queryKind === SystemQueryType.Metadata && (
<InlineField label="System" tooltip="Enter system ID or alias">
<InlineField label="System" labelWidth={14} tooltip={tooltips.system}>
<AutoSizeInput
defaultValue={query.systemName}
maxWidth={80}
Expand All @@ -43,3 +43,10 @@ export function SystemQueryEditor({ query, onChange, onRunQuery, datasource }: P
</>
);
}

const tooltips = {
queryType: `Metadata allows you to visualize the properties of one or more systems.
Summary allows you to visualize the number of disconnected and connected systems.`,
system: `Query for a specific system by its name or ID. If left blank, the plugin returns all
available systems. You can enter a variable into this field.`,
};
5 changes: 5 additions & 0 deletions src/datasources/system/query_help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
The _SystemLink Systems_ data source allows you to display system
metadata in dashboards.

For more information, refer to [Managing Your Systems - SystemLink
Enterprise](https://www.ni.com/docs/en-US/bundle/systemlink-enterprise/page/managing-systems.html).

0 comments on commit 49487f0

Please sign in to comment.