Skip to content

Commit

Permalink
Support both workspace and workspace_id properties
Browse files Browse the repository at this point in the history
  • Loading branch information
mure committed Oct 18, 2023
1 parent ec8e4ee commit 28e895b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/datasources/tag/TagDataSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export class TagDataSource extends DataSourceBase<TagQuery> {
{ name: 'updated', values: [current?.timestamp], type: FieldType.time, config: { unit: 'dateTimeFromNow' } },
];
} else {
const history = await this.getTagHistoryValues(tag.path, tag.workspace, range, maxDataPoints);
const history = await this.getTagHistoryValues(tag.path, tag.workspace ?? tag.workspace_id, range, maxDataPoints);
result.fields = [
{ name: 'time', values: history.datetimes },
{ name, values: history.values },
Expand Down
1 change: 1 addition & 0 deletions src/datasources/tag/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface TagWithValue {
path: string;
properties: Record<string, string> | null;
workspace: string;
workspace_id: string;
};
}

Expand Down

0 comments on commit 28e895b

Please sign in to comment.