fix: correct settings JSX structure, update display name, improve params handling
- Fix extra closing Box tag in SettingsPage causing blank display - Change display name from 'Sealed Secrets Plugin for Headlamp' to 'Sealed Secrets' - Use default values for params to avoid undefined in hooks (fixes retry button issue) Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
# https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml
|
# https://github.com/artifacthub/hub/blob/master/docs/metadata/artifacthub-pkg.yml
|
||||||
version: 0.2.14
|
version: 0.2.14
|
||||||
name: headlamp-sealed-secrets
|
name: headlamp-sealed-secrets
|
||||||
displayName: Sealed Secrets Plugin for Headlamp
|
displayName: Sealed Secrets
|
||||||
createdAt: "2026-02-12T00:00:00Z"
|
createdAt: "2026-02-12T00:00:00Z"
|
||||||
description: A comprehensive Headlamp plugin for managing Bitnami Sealed Secrets with client-side encryption and RBAC-aware UI
|
description: A comprehensive Headlamp plugin for managing Bitnami Sealed Secrets with client-side encryption and RBAC-aware UI
|
||||||
license: Apache-2.0
|
license: Apache-2.0
|
||||||
|
|||||||
@@ -57,15 +57,15 @@ function formatScope(scope: SealedSecretScope): string {
|
|||||||
* SealedSecret detail view component
|
* SealedSecret detail view component
|
||||||
*/
|
*/
|
||||||
export function SealedSecretDetail() {
|
export function SealedSecretDetail() {
|
||||||
const { namespace, name } = useParams<{ namespace: string; name: string }>();
|
const { namespace = '', name = '' } = useParams<{ namespace: string; name: string }>();
|
||||||
const [sealedSecret, error] = SealedSecret.useGet(name, namespace);
|
const [sealedSecret, error] = SealedSecret.useGet(name || undefined, namespace || undefined);
|
||||||
const [secret] = K8s.ResourceClasses.Secret.useGet(name, namespace);
|
const [secret] = K8s.ResourceClasses.Secret.useGet(name || undefined, namespace || undefined);
|
||||||
const [decryptKey, setDecryptKey] = React.useState<string | null>(null);
|
const [decryptKey, setDecryptKey] = React.useState<string | null>(null);
|
||||||
const [deleteDialogOpen, setDeleteDialogOpen] = React.useState(false);
|
const [deleteDialogOpen, setDeleteDialogOpen] = React.useState(false);
|
||||||
const [rotating, setRotating] = React.useState(false);
|
const [rotating, setRotating] = React.useState(false);
|
||||||
const [canDecrypt, setCanDecrypt] = React.useState(false);
|
const [canDecrypt, setCanDecrypt] = React.useState(false);
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
const { permissions } = usePermissions(namespace);
|
const { permissions } = usePermissions(namespace || undefined);
|
||||||
|
|
||||||
// Check if user can decrypt secrets (requires get permission on Secrets)
|
// Check if user can decrypt secrets (requires get permission on Secrets)
|
||||||
React.useEffect(() => {
|
React.useEffect(() => {
|
||||||
|
|||||||
@@ -151,6 +151,6 @@ export function SettingsPage() {
|
|||||||
<dd style={{ display: 'inline', margin: 0 }}>8080</dd>
|
<dd style={{ display: 'inline', margin: 0 }}>8080</dd>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user