-
Notifications
You must be signed in to change notification settings - Fork 11.7k
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
App Plugins: support react pages and tabs #16586
Conversation
* grafana/master: Update jwt regexp to include = (grafana#16521) Chore: docs fixes underscore formatting (grafana#16516) Fix: Pass missing maxDataPoints to query in Explore (grafana#16513) Fix: Recalculate intervals in Explore on run queries (grafana#16510) devenv: add elasticsearch v6 filebeat integration (grafana#16493) devenv: add worldmap panel panels for elasticsearch (grafana#16313)
Consider: #16528 (comment) when looking at the constructor |
* grafana/master: Panel Plugins: pass query request/response to react panel plugins (grafana#16577) Explore: Adds logs highlighting in Explore on keypress (grafana#16596) Build: adding dependency used by extensions (grafana#16622) TimePicker: Re-add apply button in time picker (grafana#16619) Chore: refactor auth proxy (grafana#16504) Docs: updated help for changelog cli task (grafana#16615) replace dep with go modules (grafana#16017) Docs: Updated changelog for 6.1.4 Heatmap: Fixed auto decimals when bucket name is not number but contains dots, fixes grafana#13019 (grafana#16609) build: partially replace gometalinter with golangci-lint (grafana#16610) Explore & Dashboard: New Refresh picker (grafana#16505)
* grafana/master: PanelQueryRunner: move error handling to QueryRunnerOptions (grafana#16654) refactor: Merge PanelChrome and DataPanel, do query execution in PanelQueryRunner (grafana#16632) Search: Fixed search issue introduced in recent PR (grafana#16652) Cloudwatch: fix for flaky tests (grafana#16649) UI: Remove old icons (grafana#16335) Search: Fixes search limits and adds a page parameter (grafana#16458) Chore: Upgrade lodash to v4.17.11 (grafana#16645) Chore: Lock dependencies (grafana#16644) tech: replace bmizerany/assert with stretchr/testify (grafana#16625) Chore: update yarn.lock (grafana#16637)
* grafana/master: build: restore postgres integration tests (grafana#16801) docs: explain correct access control model of GCS buckets (grafana#16792) Chore: Fixed no implicit any Typescript errors (grafana#16799) Feature: introduce LdapActiveSyncEnabled setting (grafana#16787) Plugins: ReactPanelPlugin to VizPanelPlugin (grafana#16779) UX: Improve Grafana usage for smaller screens (grafana#16783) ThresholdEditor: Minor style fix for smaller screens (grafana#16791) Build: Use isolated modules for ts-jest (grafana#16786) LDAP Refactoring to support syncronizing more than one user at a time. (grafana#16705) build: removes unused vendored files (fix/explore): remove vertical-align looks better for long logs (grafana#16736) Chore: bump jQuery to 3.4.0 in grafana/ui (grafana#16781) Devenv: Updated home dashboard and added new influxdb test dashboard Chore: Lowered implicit anys limit to 5946 RefreshPicker: minor design update (grafana#16774)
* grafana/master: Plugins: rename vizPlugin to panelPlugin (grafana#16802) Plugins: move app/feature/plugin properties into PluginMeta (grafana#16809) Plugins: move PanelPluginMeta to grafana/ui (grafana#16804) Plugins: move datasource specific meta out of the main meta type (grafana#16803) updates changelog for 6.1.6 Fix: Fetch histogram series from other api route (grafana#16768) phantomjs: set web-security to true Chore: Lowered implicit anys limit to 5668
src: 'public/app/features/plugins/partials/update_instructions.html', | ||
scope: modalScope, | ||
}); | ||
}; |
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.
@torkelo -- this is my one real blocker, everything else just needs testing from someone else running apps :)
Any ideas? is there a way to make a new $scope? or to show-modal
with a react component? update_instructions
would be pretty easy to convert
It would be great to get help testing this from someone running a bunch of plugins and apps. This keeps still has both versions running so it is easy to compare: New: React: Old: Angular: |
* grafana/master: Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841)
* grafana/master: Add Windows MSI generation to build process (grafana#16502)
…ct-app-pages * 'react-app-pages' of github.com:ryantxu/grafana: Apps: Fix showing update instructions modal
I think this is ready to go -- maybe someone with more react skilz should thunkify PluginDashboards.tsx and/or merge it with DataSourceDashboards.tsx, but I think that could happen later. The part I think needs testing is the config page of existing apps. It works fine for everything I have tried, but if apps got sneaky with the ConfigCtrl it may not work now. We should keep the concept of AppRootPage and ConfgTabs alpha for now, so I don't think this has anything we need to report externally yet. |
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.
Looks good, great work! tested with Wordping & percona app & example app
@daniellee @briangann -- this PR changed the container for app ConfigCtrl elements to react. Before 6.2, it would be good to check any apps you have on your systems to make sure they still work as expected :) |
* grafana/master: App Plugins: support react pages and tabs (grafana#16586)
* grafana/master: Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790)
…MetricPanelCtrl * grafana/master: (24 commits) CSV: escape quotes in toCSV (grafana#16874) Dashboard: Lazy load out of view panels (grafana#15554) LDAP: Added reload endpoint for LDAP config (grafana#15470) PluginsList: Removed icons and updated snapshots (grafana#16872) Panels: Fixed issue with panel type change and data updates (grafana#16871) Chore: fix modes for non-executable files (grafana#16864) DataSourceSettings: Minor fix for uncontrolled input (grafana#16863) Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841) prometheus: fix regression after adding support for tracing headers (grafana#16829) area/circleci: Speed up circleci build process for branches and pr (grafana#16778) ...
* grafana/master: (44 commits) CSV: escape quotes in toCSV (grafana#16874) Dashboard: Lazy load out of view panels (grafana#15554) LDAP: Added reload endpoint for LDAP config (grafana#15470) PluginsList: Removed icons and updated snapshots (grafana#16872) Panels: Fixed issue with panel type change and data updates (grafana#16871) Chore: fix modes for non-executable files (grafana#16864) DataSourceSettings: Minor fix for uncontrolled input (grafana#16863) Chore: Lowered implicit anys limit to 5623 TestData: Add dashboards to testdata (grafana#16855) Input Datasource: convert from angular config to react ConfigEditor (grafana#16856) DataSources: minor typescript cleanups and comments (grafana#16860) TestDataDatasource: Add config editor (grafana#16861) App Plugins: support react pages and tabs (grafana#16586) Add Windows MSI generation to build process (grafana#16502) Datasources: add support for POST HTTP verb for InfluxDB (grafana#16690) Add pattern validation in configs (grafana#16837) Search: Enable filtering dashboards in search by current folder (grafana#16790) FormLabel: allow any rather than just a string for tooltip (grafana#16841) prometheus: fix regression after adding support for tracing headers (grafana#16829) area/circleci: Speed up circleci build process for branches and pr (grafana#16778) ...
Hi @ryantxu , How can I use this fix of plugins with tabs as navigation in my AngularJs plugins? I recently joined a new company and they have a requirement like this but they have all their plugins built using AngularJs. |
we only support react plugins for this |
fixes #16433
This issue has grown as I keep poking on it. I'm not sure if I should split it up or just keep it together. Let me know what makes sense.
This PR includes:
AppRootPage
: a single component that gets all request to /a/{plugin-id/*PluginConfigTab
: a way for apps (and eventually datasources, maybe panels) to add a tab on the existing plugin pagePluginEditCtrl
to reactPluginPage
. edit has always felt funny for everything except apps, since it just shows the readme. I took "edit" out of the URLConfigCtrl
within the react tabs -- seems to work!I think it is close to ready to go, but would love someone else with apps to test it :)
Screenshots:
![image](https://user-images.githubusercontent.com/705951/57045442-763e6800-6c22-11e9-8633-4c028c2dfb05.png)
The app is configured with:
TODO:
PluginDashboards.tsx
and/or merge it withDataSourceDashboards.tsx