Laura/refactor/rename trash section (#88617)

* refactor: move and rename page component

* refactor: change codeowners

* refactor: change naming in backend

* refactor: change wording of subtitle
This commit is contained in:
Laura Benz 2024-06-04 09:03:33 +02:00 committed by GitHub
parent eeabb6f066
commit b6bd9e5352
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 38 additions and 38 deletions

View File

@ -4796,6 +4796,9 @@ exports[`better eslint`] = {
[0, 0, 0, "Styles should be written using objects.", "2"],
[0, 0, 0, "Styles should be written using objects.", "3"]
],
"public/app/features/manage-dashboards/RecentlyDeletedPage.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/manage-dashboards/components/ImportDashboardForm.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],
@ -5794,9 +5797,6 @@ exports[`better eslint`] = {
"public/app/features/transformers/standardTransformers.ts:5381": [
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
],
"public/app/features/trash-section/TrashPage.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"]
],
"public/app/features/users/TokenRevokedModal.tsx:5381": [
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "0"],
[0, 0, 0, "No untranslated strings. Wrap text with <Trans />", "1"],

2
.github/CODEOWNERS vendored
View File

@ -414,6 +414,7 @@ playwright.config.ts @grafana/plugins-platform-frontend
/public/app/features/live/ @grafana/grafana-app-platform-squad
/public/app/features/apiserver/ @grafana/grafana-app-platform-squad
/public/app/features/manage-dashboards/ @grafana/dashboards-squad
/public/app/features/manage-dashboards/RecentlyDeletedPage.tsx @grafana/grafana-frontend-platform
/public/app/features/notifications/ @grafana/grafana-frontend-platform
/public/app/features/org/ @grafana/grafana-frontend-platform
/public/app/features/panel/ @grafana/dashboards-squad
@ -435,7 +436,6 @@ playwright.config.ts @grafana/plugins-platform-frontend
/public/app/features/transformers/timeSeriesTable/ @grafana/dataviz-squad @grafana/app-o11y-visualizations
/public/app/features/users/ @grafana/identity-access-team
/public/app/features/variables/ @grafana/dashboards-squad
/public/app/features/trash-section/ @grafana/grafana-frontend-platform
/public/app/plugins/panel/alertlist/ @grafana/alerting-frontend
/public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform
/public/app/plugins/panel/barchart/ @grafana/dataviz-squad

View File

@ -356,10 +356,10 @@ func (s *ServiceImpl) buildDashboardNavLinks(c *contextmodel.ReqContext) []*navt
if s.features.IsEnabled(c.Req.Context(), featuremgmt.FlagDashboardRestore) && hasAccess(ac.EvalPermission(dashboards.ActionDashboardsDelete)) {
dashboardChildNavs = append(dashboardChildNavs, &navtree.NavLink{
Text: "Trash",
SubTitle: "Any items remaining in the Trash for more than 30 days will be automatically deleted",
Id: "dashboards/trash",
Url: s.cfg.AppSubURL + "/dashboard/trash",
Text: "Recently Deleted",
SubTitle: "Any items listed here for more than 30 days will be automatically deleted.",
Id: "dashboards/recentlyDeleted",
Url: s.cfg.AppSubURL + "/dashboard/recentlyDeleted",
})
}
}

View File

@ -40,8 +40,8 @@ export function getNavTitle(navId: string | undefined) {
return t('nav.reporting.title', 'Reporting');
case 'dashboards/public':
return t('nav.public.title', 'Public dashboards');
case 'dashboards/trash':
return t('nav.trash.title', 'Trash');
case 'dashboards/recentlyDeleted':
return t('nav.recentlyDeleted.title', 'Recently Deleted');
case 'dashboards/new':
return t('nav.new-dashboard.title', 'New dashboard');
case 'dashboards/folder/new':
@ -208,10 +208,10 @@ export function getNavSubTitle(navId: string | undefined) {
);
case 'dashboards/library-panels':
return t('nav.library-panels.subtitle', 'Reusable panels that can be added to multiple dashboards');
case 'dashboards/trash':
case 'dashboards/recentlyDeleted':
return t(
'nav.trash.subtitle',
'Any items remaining in the Trash for more than 30 days will be automatically deleted'
'nav.recentlyDeleted.subtitle',
'Any items listed here for more than 30 days will be automatically deleted.'
);
case 'alerting':
return t('nav.alerting.subtitle', 'Learn about problems in your systems moments after they occur');

View File

@ -0,0 +1,15 @@
import React from 'react';
import { Page } from '../../core/components/Page/Page';
const RecentlyDeletedPage = () => {
return (
<Page navId="dashboards/recentlyDeleted">
<Page.Contents>
<p>page content</p>
</Page.Contents>
</Page>
);
};
export default RecentlyDeletedPage;

View File

@ -1,15 +0,0 @@
import React from 'react';
import { Page } from 'app/core/components/Page/Page';
const TrashPage = () => {
return (
<Page navId="dashboards/trash">
<Page.Contents>
<p>page content</p>
</Page.Contents>
</Page>
);
};
export default TrashPage;

View File

@ -436,10 +436,10 @@ export function getAppRoutes(): RouteDescriptor[] {
),
},
config.featureToggles.dashboardRestore && {
path: '/dashboard/trash',
path: '/dashboard/recentlyDeleted',
roles: () => contextSrv.evaluatePermission([AccessControlAction.DashboardsDelete]),
component: SafeDynamicImport(
() => import(/* webpackChunkName: "TrashPage" */ 'app/features/trash-section/TrashPage')
() => import(/* webpackChunkName: "TrashPage" */ '../features/manage-dashboards/RecentlyDeletedPage')
),
},
{

View File

@ -1128,6 +1128,10 @@
"public": {
"title": "Public dashboards"
},
"recentlyDeleted": {
"subtitle": "Any items listed here for more than 30 days will be automatically deleted.",
"title": "Recently Deleted"
},
"recorded-queries": {
"title": "Recorded queries"
},
@ -1189,10 +1193,6 @@
"subtitle": "Optimize performance with k6 and Synthetic Monitoring insights",
"title": "Testing & synthetics"
},
"trash": {
"subtitle": "Any items remaining in the Trash for more than 30 days will be automatically deleted",
"title": "Trash"
},
"upgrading": {
"title": "Stats and license"
},

View File

@ -1128,6 +1128,10 @@
"public": {
"title": "Pūþľįč đäşĥþőäřđş"
},
"recentlyDeleted": {
"subtitle": "Åʼny įŧęmş ľįşŧęđ ĥęřę ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ.",
"title": "Ŗęčęʼnŧľy Đęľęŧęđ"
},
"recorded-queries": {
"title": "Ŗęčőřđęđ qūęřįęş"
},
@ -1189,10 +1193,6 @@
"subtitle": "Øpŧįmįžę pęřƒőřmäʼnčę ŵįŧĥ ĸ6 äʼnđ Ŝyʼnŧĥęŧįč Mőʼnįŧőřįʼnģ įʼnşįģĥŧş",
"title": "Ŧęşŧįʼnģ & şyʼnŧĥęŧįčş"
},
"trash": {
"subtitle": "Åʼny įŧęmş řęmäįʼnįʼnģ įʼn ŧĥę Ŧřäşĥ ƒőř mőřę ŧĥäʼn 30 đäyş ŵįľľ þę äūŧőmäŧįčäľľy đęľęŧęđ",
"title": "Ŧřäşĥ"
},
"upgrading": {
"title": "Ŝŧäŧş äʼnđ ľįčęʼnşę"
},