Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix storage class page broken if get unknown provisioner #1227

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

a110605
Copy link
Collaborator

@a110605 a110605 commented Nov 8, 2024

Summary

freenas-iscsi-csi provisoner is unknown which is not Longhorn v1, Longhornv2 or LVM.

We can show empty string for unknown provisoner

Screenshot 2024-11-08 at 11 19 34 AM

PR Checklist

  • Is this a multi-tenancy feature/bug?
    • Yes, the relevant RBAC changes are at:
  • Do we need to backport changes to the old Rancher UI, such as RKE1?
    • Yes, the relevant PR is at:
  • Are backend engineers aware of UI changes?
    • Yes, the backend owner is:

Related Issue #
harvester/harvester#6970

Screenshot/Video

Screenshot 2024-11-08 at 11 25 19 AM

@a110605 a110605 requested review from tserong and torchiaf November 8, 2024 03:32
@a110605 a110605 self-assigned this Nov 8, 2024
Copy link
Collaborator

@torchiaf torchiaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@a110605 a110605 merged commit e6796a6 into harvester:master Nov 8, 2024
9 checks passed
@torchiaf
Copy link
Collaborator

torchiaf commented Nov 8, 2024

@mergify backport release-harvester-v1.4

Copy link

mergify bot commented Nov 8, 2024

backport release-harvester-v1.4

✅ Backports have been created

torchiaf added a commit that referenced this pull request Nov 8, 2024
…v1.4/pr-1227

fix storage class page broken if get unknown provisioner (backport #1227)
@tserong
Copy link

tserong commented Nov 11, 2024

I know I'm late with the review on this (sorry!) but it might be worth falling back to showing this.provisioner rather than an empty string, because that would still tell you something about the provisioner, even if it's not a "pretty" name.

@tserong
Copy link

tserong commented Nov 11, 2024

...yeah this seems to work:

--- a/pkg/harvester/models/harvester/storage.k8s.io.storageclass.js
+++ b/pkg/harvester/models/harvester/storage.k8s.io.storageclass.js
@@ -55,7 +55,7 @@ export default class HciStorageClass extends StorageClass {
       key = `harvester.storage.storageClass.lvm.label`;
     }
 
-    return key ? this.$rootGetters['i18n/t'](key) : null;
+    return key ? this.$rootGetters['i18n/t'](key) : this.provisioner;
   }
 
   get isLonghornV2() {

image

This matches what you see if you click the storage class to view the details:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants