Skip to content

Commit

Permalink
Merge pull request #23 from grafana/next
Browse files Browse the repository at this point in the history
  • Loading branch information
sd2k authored Jun 11, 2024
2 parents 9868607 + 0d80b89 commit d1bd71c
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 13 deletions.
5 changes: 1 addition & 4 deletions .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,5 @@
"labels": "no-changelog"
}
]
],
"shipit": {
"prerelease": true
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ jobs:
- name: Run auto shipit
run: yarn auto shipit
env:
GITHUB_TOKEN: ${{ secrets.GH_ADMIN_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion docusaurus/website/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "website",
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"npmClient": "yarn",
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"packages": [
"packages/*"
],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"license": "Apache-2.0",
"private": true,
"name": "grafana-scenes-ml",
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"description": "Grafana framework for building dynamic dashboards",
"keywords": [
"typescript"
Expand Down
2 changes: 1 addition & 1 deletion packages/scenes-ml-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "scenes-ml-app",
"private": true,
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"author": "Grafana Labs",
"license": "AGPL-3.0-only",
"description": "A basic Grafana app plugin with demos of the Scenes ML components",
Expand Down
2 changes: 1 addition & 1 deletion packages/scenes-ml/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grafana/scenes-ml",
"version": "0.1.0-next.0",
"version": "0.1.0-next.1",
"description": "Machine Learning extensions to Grafana Scenes",
"author": "Grafana Labs",
"license": "AGPL-3.0-only",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ChangepointDetector } from "@bsull/augurs";
import { DataFrame, DataQueryRequest, dateTime, FieldType } from "@grafana/data";
import { DataFrame, DataQueryRequest, dateTime, Field, FieldType } from "@grafana/data";
import { DataTopic } from "@grafana/schema";
import { ButtonGroup, Checkbox, ToolbarButton } from "@grafana/ui";
import React from 'react';
Expand All @@ -8,7 +8,9 @@ import { of } from "rxjs";
import { SceneComponentProps, SceneObjectState, SceneObjectUrlValues, SceneObjectBase, SceneObjectUrlSyncConfig, ExtraQueryDataProcessor, ExtraQueryProvider, ExtraQueryDescriptor } from "@grafana/scenes";

export interface Changepoint {
idx: number
time: number;
field: Field<number>;
}

interface SceneChangepointDetectorState extends SceneObjectState {
Expand All @@ -20,7 +22,6 @@ interface SceneChangepointDetectorState extends SceneObjectState {
lookbackFactorOptions: Array<{ label: string; value: number }>;

// Callback for when a changepoint is detected.
// TODO: add series info to this.
onChangepointDetected?: (changepoint: Changepoint) => void;
}

Expand Down Expand Up @@ -161,7 +162,7 @@ function createChangepointAnnotations(
const time = timeField.values[cp + 1];
annotationTimes.push(time);
annotationTexts.push('Changepoint detected');
onChangepointDetected?.({ time });
onChangepointDetected?.({ idx: cp + 1, time, field });
}
}
return {
Expand Down

0 comments on commit d1bd71c

Please sign in to comment.