Skip to content

Commit 45cf952

Browse files
authored
Merge pull request #763 from controlplaneio-fluxcd/improve-link
web: make namespace filtering docs link work on the whole text
2 parents 366c637 + cfce647 commit 45cf952

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

web/src/components/dashboards/cluster/ClusterPage.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ function NoNamespaceAccessWarning({ userInfo }) {
2727
Limited Access
2828
</h3>
2929
<p class="mt-1 text-sm text-yellow-700 dark:text-yellow-300">
30-
You don't have access to any namespaces. Contact your administrator to grant your group the necessary permissions.
3130
<a
3231
href={namespaceFilteringDocUrl}
3332
target="_blank"
3433
rel="noopener noreferrer"
3534
onClick={(e) => e.stopPropagation()}
36-
class="inline-flex items-center align-middle text-yellow-700 underline decoration-yellow-500/70 underline-offset-2 transition-colors hover:text-yellow-800 dark:text-yellow-300 dark:hover:text-yellow-200"
35+
class="inline-flex items-center gap-1 align-middle transition-colors hover:text-yellow-800 dark:hover:text-yellow-200"
3736
title="Namespace filtering documentation"
38-
aria-label="Namespace filtering documentation"
3937
>
40-
<svg class="ml-px h-4 w-4 flex-shrink-0 relative -top-px" fill="none" stroke="currentColor" viewBox="0 0 24 24">
38+
<span>
39+
You don't have access to any namespaces. Contact your administrator to grant your group the necessary permissions.
40+
</span>
41+
<svg class="h-4 w-4 flex-shrink-0 relative -top-px" fill="none" stroke="currentColor" viewBox="0 0 24 24" aria-hidden="true">
4142
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z" />
4243
</svg>
4344
</a>

web/src/components/dashboards/cluster/ClusterPage.test.jsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,7 @@ describe('ClusterPage', () => {
285285
render(<ClusterPage spec={spec} />)
286286

287287
expect(screen.getByText('Limited Access')).toBeInTheDocument()
288-
expect(screen.getByText(/Contact your administrator/)).toBeInTheDocument()
289-
const docLink = screen.getByRole('link', { name: 'Namespace filtering documentation' })
288+
const docLink = screen.getByRole('link', { name: /You don't have access to any namespaces\. Contact your administrator to grant your group the necessary permissions\./ })
290289
expect(docLink).toHaveAttribute('href', namespaceFilteringDocUrl)
291290
expect(docLink).toHaveAttribute('target', '_blank')
292291
expect(docLink).toHaveAttribute('rel', 'noopener noreferrer')

0 commit comments

Comments
 (0)