From 4821ccfd65aba3f265b695a0333d72e35ad95787 Mon Sep 17 00:00:00 2001 From: Jason Madigan Date: Tue, 30 Jul 2024 10:50:55 +0100 Subject: [PATCH] refs updates --- console-extensions.json | 10 +++++----- integration-tests/tests/example-page.cy.ts | 2 +- locales/en/plugin__console-plugin-template.json | 1 + package.json | 2 +- ...RHCLDashboardPage.tsx => KuadrantDashboardPage.tsx} | 8 ++++---- 5 files changed, 12 insertions(+), 11 deletions(-) rename src/components/{RHCLDashboardPage.tsx => KuadrantDashboardPage.tsx} (95%) diff --git a/console-extensions.json b/console-extensions.json index f0e84fa..9aa15d5 100644 --- a/console-extensions.json +++ b/console-extensions.json @@ -4,7 +4,7 @@ "properties": { "exact": true, "path": "/k8s/ns/:ns/rhcl", - "component": { "$codeRef": "RHCLDashboardPage" } + "component": { "$codeRef": "KuadrantDashboardPage" } } }, { @@ -12,14 +12,14 @@ "properties": { "exact": true, "path": "/k8s/all-namespaces/rhcl", - "component": { "$codeRef": "RHCLDashboardPage" } + "component": { "$codeRef": "KuadrantDashboardPage" } } }, { "type": "console.navigation/section", "properties": { - "id": "connectivity-link-section", - "name": "%plugin__console-plugin-template~Connectivity Link%", + "id": "kuadrant-section", + "name": "%plugin__console-plugin-template~Kuadrant%", "perspective": "dev" } }, @@ -30,7 +30,7 @@ "name": "%plugin__console-plugin-template~Dashboard%", "href": "/k8s/all-namespaces/rhcl", "perspective": "dev", - "section": "connectivity-link-section" + "section": "kuadrant-section" } } ] diff --git a/integration-tests/tests/example-page.cy.ts b/integration-tests/tests/example-page.cy.ts index d88942c..5868033 100644 --- a/integration-tests/tests/example-page.cy.ts +++ b/integration-tests/tests/example-page.cy.ts @@ -69,7 +69,7 @@ describe('Console plugin template test', () => { it('Verify the example page title', () => { cy.get('[data-quickstart-id="qs-nav-home"]').click(); - cy.get('[data-test="nav"]').contains('Connectivity Link').click(); + cy.get('[data-test="nav"]').contains('Kuadrant').click(); cy.url().should('include', '/example'); cy.get('[data-test="example-page-title"]').should('contain', 'Hello, Plugin!'); }); diff --git a/locales/en/plugin__console-plugin-template.json b/locales/en/plugin__console-plugin-template.json index f190036..e8e6153 100644 --- a/locales/en/plugin__console-plugin-template.json +++ b/locales/en/plugin__console-plugin-template.json @@ -6,6 +6,7 @@ "Hello, Plugin!": "Hello, Plugin!", "in package.json mapping the reference to the module.": "in package.json mapping the reference to the module.", "Connectivity Link": "Connectivity Link", + "Kuadrant": "Kuadrant", "Success!": "Success!", "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property": "This is a custom page contributed by the console plugin template. The extension that adds the page is declared in console-extensions.json in the project root along with the corresponding nav item. Update console-extensions.json to change or add extensions. Code references in console-extensions.json must have a corresponding property", "Your plugin is working.": "Your plugin is working.", diff --git a/package.json b/package.json index 64d8609..49b81a6 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "displayName": "OpenShift Console Plugin Template", "description": "Template project for OpenShift Console plugins. Edit package.json to change this message and the plugin name.", "exposedModules": { - "RHCLDashboardPage": "./components/RHCLDashboardPage" + "KuadrantDashboardPage": "./components/KuadrantDashboardPage" }, "dependencies": { "@console/pluginAPI": "*" diff --git a/src/components/RHCLDashboardPage.tsx b/src/components/KuadrantDashboardPage.tsx similarity index 95% rename from src/components/RHCLDashboardPage.tsx rename to src/components/KuadrantDashboardPage.tsx index 981997f..5fda69d 100644 --- a/src/components/RHCLDashboardPage.tsx +++ b/src/components/KuadrantDashboardPage.tsx @@ -44,7 +44,7 @@ const resources: Resource[] = [ { name: 'TLSPolicies', gvk: { group: 'kuadrant.io', version: 'v1alpha1', kind: 'TLSPolicy' } }, ]; -const RHCLDashboardPage: React.FC = () => { +const KuadrantDashboardPage: React.FC = () => { const { t } = useTranslation('plugin__console-plugin-template'); const { ns } = useParams<{ ns: string }>(); const [activeNamespace, setActiveNamespace] = useActiveNamespace(); @@ -105,11 +105,11 @@ const RHCLDashboardPage: React.FC = () => { return ( <> - {t('Connectivity Link')} + {t('Kuadrant')} - {t('Connectivity Link')} + {t('Kuadrant')} {resources.map((resource) => { const { group, version, kind } = resource.gvk; @@ -126,4 +126,4 @@ const RHCLDashboardPage: React.FC = () => { ); }; -export default RHCLDashboardPage; +export default KuadrantDashboardPage;