New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grafana/ui: Enable React based options editors for Datasource plugins #16748
Conversation
@@ -36,10 +37,12 @@ export interface Props { | |||
setDataSourceName: typeof setDataSourceName; | |||
updateDataSource: typeof updateDataSource; | |||
setIsDefault: typeof setIsDefault; | |||
plugin?: DataSourcePlugin<any, any>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you do not need the any, any the types are optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but Options are not optional. Gonna make options default to be {}
|
||
constructor(DataSourceClass: DataSourceConstructor<TQuery>) { | ||
this.DataSourceClass = DataSourceClass; | ||
this.components = {}; | ||
} | ||
|
||
setEditor(editor: React.ComponentType<DataSourcePluginOptionsEditorProps<TOptions>>) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Editor is a bit too non-descriptive for a data source, as it already as a QueryEditor.
Think setConfigEditor is more descriptive (as the current angular version is called ConfigCtrl). Also think this should be on the components sub object along with all the other components.
Check #16586 also... It includes something like this. Nevermind -- this does not replace the whole page with react :) |
@ryantxu yeah, this one is waaaaay simpler. But i see a future in your |
…a-alt * grafana/master: Feature: Enable React based options editors for Datasource plugins (grafana#16748)
* grafana/master: GraphLegendEditor: use stats picker rather than switches (grafana#16759) Feature: add cron setting for the ldap settings (grafana#16673) Build: Disables gosec until identified performance problems (grafana#16764) Chore: bump jQuery to 3.4.0 including prototype pollution vulnerability fix (grafana#16761) elasticsearch: add 7.x version support (grafana#16646) Provisioning: Add API endpoint to reload provisioning configs (grafana#16579) Config: Show user-friendly error message instead of stack trace (grafana#16564) Chore: Lowered implicit anys limit to 5954 Feature: Enable React based options editors for Datasource plugins (grafana#16748) sqlstore: use column name in order by (grafana#16583) user friendly guide (grafana#16743) Provisioning: Interpolate env vars in provisioning files (grafana#16499) admin: add more stats about roles (grafana#16667) Feature: Migrate Legend components to grafana/ui (grafana#16468) playlist: fix loading dashboards by tag (grafana#16727) CloudWatch: Use default alias if there is no alias for metrics (grafana#16732) Provisioning: Support FolderUid in Dashboard Provisioning Config (grafana#16559)
…MetricPanelCtrl * grafana/master: (34 commits) Streaming: support streaming and a javascript test datasource (grafana#16729) GraphLegendEditor: use stats picker rather than switches (grafana#16759) Feature: add cron setting for the ldap settings (grafana#16673) Build: Disables gosec until identified performance problems (grafana#16764) Chore: bump jQuery to 3.4.0 including prototype pollution vulnerability fix (grafana#16761) elasticsearch: add 7.x version support (grafana#16646) Provisioning: Add API endpoint to reload provisioning configs (grafana#16579) Config: Show user-friendly error message instead of stack trace (grafana#16564) Chore: Lowered implicit anys limit to 5954 Feature: Enable React based options editors for Datasource plugins (grafana#16748) sqlstore: use column name in order by (grafana#16583) user friendly guide (grafana#16743) Provisioning: Interpolate env vars in provisioning files (grafana#16499) admin: add more stats about roles (grafana#16667) Feature: Migrate Legend components to grafana/ui (grafana#16468) playlist: fix loading dashboards by tag (grafana#16727) CloudWatch: Use default alias if there is no alias for metrics (grafana#16732) Provisioning: Support FolderUid in Dashboard Provisioning Config (grafana#16559) Refactor: Make SelectOptionItem a generic type to enable select value typing (grafana#16718) docs: fix upgrade instructions ...
* grafana/master: Streaming: support streaming and a javascript test datasource (grafana#16729) GraphLegendEditor: use stats picker rather than switches (grafana#16759) Feature: add cron setting for the ldap settings (grafana#16673) Build: Disables gosec until identified performance problems (grafana#16764) Chore: bump jQuery to 3.4.0 including prototype pollution vulnerability fix (grafana#16761) elasticsearch: add 7.x version support (grafana#16646) Provisioning: Add API endpoint to reload provisioning configs (grafana#16579) Config: Show user-friendly error message instead of stack trace (grafana#16564) Chore: Lowered implicit anys limit to 5954 Feature: Enable React based options editors for Datasource plugins (grafana#16748) sqlstore: use column name in order by (grafana#16583) user friendly guide (grafana#16743) Provisioning: Interpolate env vars in provisioning files (grafana#16499) admin: add more stats about roles (grafana#16667) Feature: Migrate Legend components to grafana/ui (grafana#16468) playlist: fix loading dashboards by tag (grafana#16727) CloudWatch: Use default alias if there is no alias for metrics (grafana#16732) Provisioning: Support FolderUid in Dashboard Provisioning Config (grafana#16559)
* grafana/master: (31 commits) Streaming: support streaming and a javascript test datasource (grafana#16729) GraphLegendEditor: use stats picker rather than switches (grafana#16759) Feature: add cron setting for the ldap settings (grafana#16673) Build: Disables gosec until identified performance problems (grafana#16764) Chore: bump jQuery to 3.4.0 including prototype pollution vulnerability fix (grafana#16761) elasticsearch: add 7.x version support (grafana#16646) Provisioning: Add API endpoint to reload provisioning configs (grafana#16579) Config: Show user-friendly error message instead of stack trace (grafana#16564) Chore: Lowered implicit anys limit to 5954 Feature: Enable React based options editors for Datasource plugins (grafana#16748) sqlstore: use column name in order by (grafana#16583) user friendly guide (grafana#16743) Provisioning: Interpolate env vars in provisioning files (grafana#16499) admin: add more stats about roles (grafana#16667) Feature: Migrate Legend components to grafana/ui (grafana#16468) playlist: fix loading dashboards by tag (grafana#16727) CloudWatch: Use default alias if there is no alias for metrics (grafana#16732) Provisioning: Support FolderUid in Dashboard Provisioning Config (grafana#16559) Refactor: Make SelectOptionItem a generic type to enable select value typing (grafana#16718) docs: fix upgrade instructions ...
Side effect of #16731 discovery phase. Follows the same convention (
setEditor
) as React panels do.