mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Home: add setup guide tab under home tab (#92947)
* feat: add setup guide in home tab * chore: add feature toggle for setup guide * chore: add feature toggle for sub menu * chore: run pretier * chore: run i18n * chore: run generated files again * chore: update description * chore: update comment to trigger test flow * chore: trigger test * chore: fix styling
This commit is contained in:
parent
26a3e70cfa
commit
c822feff9e
@ -201,6 +201,7 @@ Experimental features might be changed or removed without prior notice.
|
|||||||
| `exploreLogsShardSplitting` | Used in Explore Logs to split queries into multiple queries based on the number of shards |
|
| `exploreLogsShardSplitting` | Used in Explore Logs to split queries into multiple queries based on the number of shards |
|
||||||
| `exploreLogsAggregatedMetrics` | Used in Explore Logs to query by aggregated metrics |
|
| `exploreLogsAggregatedMetrics` | Used in Explore Logs to query by aggregated metrics |
|
||||||
| `exploreLogsLimitedTimeRange` | Used in Explore Logs to limit the time range |
|
| `exploreLogsLimitedTimeRange` | Used in Explore Logs to limit the time range |
|
||||||
|
| `homeSetupGuide` | Used in Home for users who want to return to the onboarding flow or quickly find popular config pages |
|
||||||
| `appSidecar` | Enable the app sidecar feature that allows rendering 2 apps at the same time |
|
| `appSidecar` | Enable the app sidecar feature that allows rendering 2 apps at the same time |
|
||||||
|
|
||||||
## Development feature toggles
|
## Development feature toggles
|
||||||
|
@ -209,6 +209,7 @@ export interface FeatureToggles {
|
|||||||
exploreLogsShardSplitting?: boolean;
|
exploreLogsShardSplitting?: boolean;
|
||||||
exploreLogsAggregatedMetrics?: boolean;
|
exploreLogsAggregatedMetrics?: boolean;
|
||||||
exploreLogsLimitedTimeRange?: boolean;
|
exploreLogsLimitedTimeRange?: boolean;
|
||||||
|
homeSetupGuide?: boolean;
|
||||||
appPlatformAccessTokens?: boolean;
|
appPlatformAccessTokens?: boolean;
|
||||||
appSidecar?: boolean;
|
appSidecar?: boolean;
|
||||||
groupAttributeSync?: boolean;
|
groupAttributeSync?: boolean;
|
||||||
|
@ -28,4 +28,5 @@ const (
|
|||||||
enterpriseDatasourcesSquad codeowner = "@grafana/enterprise-datasources"
|
enterpriseDatasourcesSquad codeowner = "@grafana/enterprise-datasources"
|
||||||
grafanaSharingSquad codeowner = "@grafana/sharing-squad"
|
grafanaSharingSquad codeowner = "@grafana/sharing-squad"
|
||||||
grafanaDatabasesFrontend codeowner = "@grafana/databases-frontend"
|
grafanaDatabasesFrontend codeowner = "@grafana/databases-frontend"
|
||||||
|
growthAndOnboarding codeowner = "@grafana/growth-and-onboarding"
|
||||||
)
|
)
|
||||||
|
@ -1438,6 +1438,13 @@ var (
|
|||||||
FrontendOnly: true,
|
FrontendOnly: true,
|
||||||
Owner: grafanaObservabilityLogsSquad,
|
Owner: grafanaObservabilityLogsSquad,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "homeSetupGuide",
|
||||||
|
Description: "Used in Home for users who want to return to the onboarding flow or quickly find popular config pages",
|
||||||
|
Stage: FeatureStageExperimental,
|
||||||
|
FrontendOnly: true,
|
||||||
|
Owner: growthAndOnboarding,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "appPlatformAccessTokens",
|
Name: "appPlatformAccessTokens",
|
||||||
Description: "Enables the use of access tokens for the App Platform",
|
Description: "Enables the use of access tokens for the App Platform",
|
||||||
|
@ -190,6 +190,7 @@ singleTopNav,experimental,@grafana/grafana-frontend-platform,false,false,true
|
|||||||
exploreLogsShardSplitting,experimental,@grafana/observability-logs,false,false,true
|
exploreLogsShardSplitting,experimental,@grafana/observability-logs,false,false,true
|
||||||
exploreLogsAggregatedMetrics,experimental,@grafana/observability-logs,false,false,true
|
exploreLogsAggregatedMetrics,experimental,@grafana/observability-logs,false,false,true
|
||||||
exploreLogsLimitedTimeRange,experimental,@grafana/observability-logs,false,false,true
|
exploreLogsLimitedTimeRange,experimental,@grafana/observability-logs,false,false,true
|
||||||
|
homeSetupGuide,experimental,@grafana/growth-and-onboarding,false,false,true
|
||||||
appPlatformAccessTokens,experimental,@grafana/identity-access-team,false,false,false
|
appPlatformAccessTokens,experimental,@grafana/identity-access-team,false,false,false
|
||||||
appSidecar,experimental,@grafana/explore-squad,false,false,false
|
appSidecar,experimental,@grafana/explore-squad,false,false,false
|
||||||
groupAttributeSync,experimental,@grafana/identity-access-team,false,false,false
|
groupAttributeSync,experimental,@grafana/identity-access-team,false,false,false
|
||||||
|
|
@ -771,6 +771,10 @@ const (
|
|||||||
// Used in Explore Logs to limit the time range
|
// Used in Explore Logs to limit the time range
|
||||||
FlagExploreLogsLimitedTimeRange = "exploreLogsLimitedTimeRange"
|
FlagExploreLogsLimitedTimeRange = "exploreLogsLimitedTimeRange"
|
||||||
|
|
||||||
|
// FlagHomeSetupGuide
|
||||||
|
// Used in Home for users who want to return to the onboarding flow or quickly find popular config pages
|
||||||
|
FlagHomeSetupGuide = "homeSetupGuide"
|
||||||
|
|
||||||
// FlagAppPlatformAccessTokens
|
// FlagAppPlatformAccessTokens
|
||||||
// Enables the use of access tokens for the App Platform
|
// Enables the use of access tokens for the App Platform
|
||||||
FlagAppPlatformAccessTokens = "appPlatformAccessTokens"
|
FlagAppPlatformAccessTokens = "appPlatformAccessTokens"
|
||||||
|
@ -1433,6 +1433,22 @@
|
|||||||
"hideFromAdminPage": true
|
"hideFromAdminPage": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"metadata": {
|
||||||
|
"name": "homeSetupGuide",
|
||||||
|
"resourceVersion": "1726258153467",
|
||||||
|
"creationTimestamp": "2024-09-10T15:46:32Z",
|
||||||
|
"annotations": {
|
||||||
|
"grafana.app/updatedTimestamp": "2024-09-13 20:09:13.467989 +0000 UTC"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"spec": {
|
||||||
|
"description": "Used in Home for users who want to return to the onboarding flow or quickly find popular config pages",
|
||||||
|
"stage": "experimental",
|
||||||
|
"codeowner": "@grafana/growth-and-onboarding",
|
||||||
|
"frontend": true
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"metadata": {
|
"metadata": {
|
||||||
"name": "idForwarding",
|
"name": "idForwarding",
|
||||||
|
@ -202,6 +202,18 @@ func (s *ServiceImpl) getHomeNode(c *contextmodel.ReqContext, prefs *pref.Prefer
|
|||||||
Icon: "home-alt",
|
Icon: "home-alt",
|
||||||
SortWeight: navtree.WeightHome,
|
SortWeight: navtree.WeightHome,
|
||||||
}
|
}
|
||||||
|
ctx := c.Req.Context()
|
||||||
|
if s.features.IsEnabled(ctx, featuremgmt.FlagHomeSetupGuide) {
|
||||||
|
var children []*navtree.NavLink
|
||||||
|
// setup guide (a submenu item under Home)
|
||||||
|
children = append(children, &navtree.NavLink{
|
||||||
|
Id: "home-setup-guide",
|
||||||
|
Text: "Setup guide",
|
||||||
|
Url: homeUrl + "/setup-guide",
|
||||||
|
SortWeight: navtree.WeightHome,
|
||||||
|
})
|
||||||
|
homeNode.Children = children
|
||||||
|
}
|
||||||
return homeNode
|
return homeNode
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ export const MegaMenu = memo(
|
|||||||
<CustomScrollbar showScrollIndicators hideHorizontalTrack>
|
<CustomScrollbar showScrollIndicators hideHorizontalTrack>
|
||||||
<ul className={styles.itemList} aria-label={t('navigation.megamenu.list-label', 'Navigation')}>
|
<ul className={styles.itemList} aria-label={t('navigation.megamenu.list-label', 'Navigation')}>
|
||||||
{navItems.map((link, index) => (
|
{navItems.map((link, index) => (
|
||||||
<Stack key={link.text} direction={index === 0 ? 'row-reverse' : 'row'} alignItems="center">
|
<Stack key={link.text} direction={index === 0 ? 'row-reverse' : 'row'} alignItems="start">
|
||||||
{index === 0 && (
|
{index === 0 && (
|
||||||
<IconButton
|
<IconButton
|
||||||
id="dock-menu-button"
|
id="dock-menu-button"
|
||||||
@ -187,6 +187,8 @@ const getStyles = (theme: GrafanaTheme2) => ({
|
|||||||
}),
|
}),
|
||||||
dockMenuButton: css({
|
dockMenuButton: css({
|
||||||
display: 'none',
|
display: 'none',
|
||||||
|
position: 'relative',
|
||||||
|
top: theme.spacing(1),
|
||||||
|
|
||||||
[theme.breakpoints.up('xl')]: {
|
[theme.breakpoints.up('xl')]: {
|
||||||
display: 'inline-flex',
|
display: 'inline-flex',
|
||||||
|
@ -11,6 +11,8 @@ export function getNavTitle(navId: string | undefined) {
|
|||||||
switch (navId) {
|
switch (navId) {
|
||||||
case 'home':
|
case 'home':
|
||||||
return t('nav.home.title', 'Home');
|
return t('nav.home.title', 'Home');
|
||||||
|
case 'home-setup-guide':
|
||||||
|
return t('nav.setup-guide.title', 'Setup guide');
|
||||||
case 'new':
|
case 'new':
|
||||||
return t('nav.new.title', 'New');
|
return t('nav.new.title', 'New');
|
||||||
case 'create':
|
case 'create':
|
||||||
|
@ -1745,6 +1745,9 @@
|
|||||||
"subtitle": "Use service accounts to run automated workloads in Grafana",
|
"subtitle": "Use service accounts to run automated workloads in Grafana",
|
||||||
"title": "Service accounts"
|
"title": "Service accounts"
|
||||||
},
|
},
|
||||||
|
"setup-guide": {
|
||||||
|
"title": "Setup guide"
|
||||||
|
},
|
||||||
"shared-dashboard": {
|
"shared-dashboard": {
|
||||||
"subtitle": "Manage your organization's externally shared dashboards",
|
"subtitle": "Manage your organization's externally shared dashboards",
|
||||||
"title": "Shared dashboards"
|
"title": "Shared dashboards"
|
||||||
|
@ -1745,6 +1745,9 @@
|
|||||||
"subtitle": "Ůşę şęřvįčę äččőūʼnŧş ŧő řūʼn äūŧőmäŧęđ ŵőřĸľőäđş įʼn Ğřäƒäʼnä",
|
"subtitle": "Ůşę şęřvįčę äččőūʼnŧş ŧő řūʼn äūŧőmäŧęđ ŵőřĸľőäđş įʼn Ğřäƒäʼnä",
|
||||||
"title": "Ŝęřvįčę äččőūʼnŧş"
|
"title": "Ŝęřvįčę äččőūʼnŧş"
|
||||||
},
|
},
|
||||||
|
"setup-guide": {
|
||||||
|
"title": "Ŝęŧūp ģūįđę"
|
||||||
|
},
|
||||||
"shared-dashboard": {
|
"shared-dashboard": {
|
||||||
"subtitle": "Mäʼnäģę yőūř őřģäʼnįžäŧįőʼn'ş ęχŧęřʼnäľľy şĥäřęđ đäşĥþőäřđş",
|
"subtitle": "Mäʼnäģę yőūř őřģäʼnįžäŧįőʼn'ş ęχŧęřʼnäľľy şĥäřęđ đäşĥþőäřđş",
|
||||||
"title": "Ŝĥäřęđ đäşĥþőäřđş"
|
"title": "Ŝĥäřęđ đäşĥþőäřđş"
|
||||||
|
Loading…
Reference in New Issue
Block a user