mirror of
https://github.com/grafana/grafana.git
synced 2024-11-28 03:34:15 -06:00
cfdea1ee30
* add isPublic to dashboard * refactor routes to use route group and add placeholder method for sharing apii * add sharing pane and utils for public dashboard config to sharing modal * Sharing modal now persists data through the api * moves ShareDashboard endpoint to new file and starts adding tests * generates mocks. Adds tests for public dashboard feature flag * Adds ability to pass in array of features to enable for the test * test to update public flag on dashboard WIP * Adds mock for SaveDashboardSharingConfig * Fixes tests. Had to use FakeDashboardService * Adds React tests for public dashboards toggle * removes semicolons * refactors SharePublic component to use hooks * rename from `share publicly` to `public dashboard config` * checkpoint. debugging tests. need to verify name changes * checkpoint. test bugs fixed. need to finish returning proper response codes * finish renaming. fix test * Update pkg/api/api.go Co-authored-by: Torkel Ödegaard <torkel@grafana.com> * update backend url * rename internal objects and commands. fix configuration modal labels * add endpoint for retrieving public dashboard configuration and populate the frontend state from it * add test for dashboardCanBePublic * adds backend routes * copy DashboardPage component into component for public dashboards. WIP * adds react routes, and doesnt render main nav bar when viewing a public route * removes extra react route from testing * updates component name * Wrap the original dashboard component so we can pass props relevant to public dashboards, turn kiosk mode on/off, etc * Wraps DashboardPage in PublicDashboardPage component. DashboardPage gets rendered in kiosk mode when public prop is passed. * removes commented out code from exploratory work * Makes public dashboard routes require no auth * extracts helper to own util file to check if were viewing a public page * Hides panel dropdown when its being viewed publicly * formatting * use function from utils file for determining if publicly viewed. If public, hides app notifications, searchwrapper, and commandpalette. * adds unit tests for util function used to see if page is being viewed publicly * cant added annotations to panel when being publicly viewed * removes useless comment * hides backend and frontend pubdash routes behind feature flag * consider feature flag when checking url path to see if on public dashboard * renames function * still render app notifications when in public view * Extract pubdash route logic into own file * fixes failing tests * Determines path using location locationUtils. This covers the case when grafana is being hosted on a subpath. Updates tests. * renames pubdash web route to be more understandable * rename route * fixes failing test * fixes failing test. Needed to update pubdash urls * sets flag on grafana boot config for if viewing public dashboard. Removes hacky check that looks at the url * fixes failing tests. Uses config to determine if viewing public dashboard * renders the blue panel timeInfo on public dashboard panel * Extracts conditional logic for rendering components out into their own functions * removes publicDashboardView check, and uses dashboard meta instead * the timeInfo is always displayed on the panel * After fetch of public dashboard dto, the meta isPublic flag gets set and used to determine if viewing public dashboard for child components. Fixes tests for PanelHeader. * Fixes failing test. Needed to add isPublic flag to dashboard meta. Co-authored-by: Jeff Levin <jeff@levinology.com> Co-authored-by: Torkel Ödegaard <torkel@grafana.com> |
||
---|---|---|
.. | ||
apierrors | ||
avatar | ||
datasource | ||
docs | ||
dtos | ||
frontendlogging | ||
navlinks | ||
pluginproxy | ||
response | ||
routing | ||
static | ||
accesscontrol.go | ||
admin_encryption.go | ||
admin_provisioning_test.go | ||
admin_provisioning.go | ||
admin_test.go | ||
admin_users_test.go | ||
admin_users.go | ||
admin.go | ||
alerting_test.go | ||
alerting.go | ||
annotations_test.go | ||
annotations.go | ||
api.go | ||
apikey.go | ||
app_routes.go | ||
basic_auth_test.go | ||
basic_auth.go | ||
comments.go | ||
common_test.go | ||
dashboard_permission_test.go | ||
dashboard_permission.go | ||
dashboard_public_config_test.go | ||
dashboard_public_config.go | ||
dashboard_snapshot_test.go | ||
dashboard_snapshot.go | ||
dashboard_test.go | ||
dashboard.go | ||
dataproxy.go | ||
datasources_test.go | ||
datasources.go | ||
fakes.go | ||
folder_permission_test.go | ||
folder_permission.go | ||
folder_test.go | ||
folder.go | ||
frontend_logging_test.go | ||
frontend_logging.go | ||
frontend_metrics.go | ||
frontendsettings_test.go | ||
frontendsettings.go | ||
grafana_com_proxy.go | ||
health_test.go | ||
health.go | ||
http_server_test.go | ||
http_server.go | ||
index.go | ||
ldap_debug_test.go | ||
ldap_debug.go | ||
login_oauth_test.go | ||
login_oauth.go | ||
login_test.go | ||
login.go | ||
metrics_test.go | ||
metrics.go | ||
org_invite.go | ||
org_test.go | ||
org_users_test.go | ||
org_users.go | ||
org.go | ||
password.go | ||
playlist_play.go | ||
playlist.go | ||
plugin_dashboards_test.go | ||
plugin_dashboards.go | ||
plugin_metrics_test.go | ||
plugin_metrics.go | ||
plugin_resource.go | ||
plugins_test.go | ||
plugins.go | ||
preferences_test.go | ||
preferences.go | ||
quota_test.go | ||
quota.go | ||
render.go | ||
search_test.go | ||
search.go | ||
short_url_test.go | ||
short_url.go | ||
signup.go | ||
stars.go | ||
swagger.go | ||
team_members_test.go | ||
team_members.go | ||
team_test.go | ||
team.go | ||
user_test.go | ||
user_token_test.go | ||
user_token.go | ||
user.go | ||
utils.go |