mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Public Dashboards: Add Public Tag to Dashboard Title (#52351)
Adds Public tag to dashboard title when it has an enabled public dashboard
This commit is contained in:
@@ -4,7 +4,7 @@ import { useLocation } from 'react-router-dom';
|
||||
|
||||
import { locationUtil, textUtil } from '@grafana/data';
|
||||
import { locationService } from '@grafana/runtime';
|
||||
import { ButtonGroup, ModalsController, ToolbarButton, PageToolbar, useForceUpdate } from '@grafana/ui';
|
||||
import { ButtonGroup, ModalsController, ToolbarButton, PageToolbar, useForceUpdate, Tag } from '@grafana/ui';
|
||||
import { AppChromeUpdate } from 'app/core/components/AppChrome/AppChromeUpdate';
|
||||
import { NavToolbarSeparator } from 'app/core/components/AppChrome/NavToolbarSeparator';
|
||||
import config from 'app/core/config';
|
||||
@@ -154,6 +154,10 @@ export const DashNav = React.memo<Props>((props) => {
|
||||
);
|
||||
}
|
||||
|
||||
if (dashboard.meta.publicDashboardEnabled) {
|
||||
buttons.push(<Tag name="Public" colorIndex={5}></Tag>);
|
||||
}
|
||||
|
||||
if (dashboard.uid && config.featureToggles.dashboardComments) {
|
||||
buttons.push(
|
||||
<ModalsController key="button-dashboard-comments">
|
||||
|
||||
Reference in New Issue
Block a user