Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-7090

Add to navigation button in search result does nothing

    XMLWordPrintable

Details

    • Low
    • ODC Sprint 231
    • 1
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • NA

    Description

      Description of problem:
      When searched for a resource, I tried to add some to the pinned resource with the "Add to navigation" button. But nothing happened. The browser log shows this error:

      main-881e214a8ddf8f8a8eb8.js:53201 unhandled error: Uncaught TypeError: Cannot read properties of undefined (reading 'length') TypeError: Cannot read properties of undefined (reading 'length')
          at http://localhost:9000/static/main-881e214a8ddf8f8a8eb8.js:37694:147
          at http://localhost:9000/static/main-881e214a8ddf8f8a8eb8.js:38349:57
          at http://localhost:9000/static/main-881e214a8ddf8f8a8eb8.js:37693:9
          at pinToggle (http://localhost:9000/static/main-881e214a8ddf8f8a8eb8.js:67199:9)
          at onClick (http://localhost:9000/static/main-881e214a8ddf8f8a8eb8.js:67281:341)
          at HTMLUnknownElement.callCallback (http://localhost:9000/static/vendors~main-99688ccb22de160eb977.js:446274:14)
          at Object.invokeGuardedCallbackDev (http://localhost:9000/static/vendors~main-99688ccb22de160eb977.js:446323:16)
      
      main-881e214a8ddf8f8a8eb8.js:37694 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
          at main-881e214a8ddf8f8a8eb8.js:37694:147
          at main-881e214a8ddf8f8a8eb8.js:38349:57
          at main-881e214a8ddf8f8a8eb8.js:37693:9
          at pinToggle (main-881e214a8ddf8f8a8eb8.js:67199:9)
          at onClick (main-881e214a8ddf8f8a8eb8.js:67281:341)
          at HTMLUnknownElement.callCallback (vendors~main-99688ccb22de160eb977.js:446274:14)
          at Object.invokeGuardedCallbackDev (vendors~main-99688ccb22de160eb977.js:446323:16)
          at invokeGuardedCallback (vendors~main-99688ccb22de160eb977.js:446385:31)
          at invokeGuardedCallbackAndCatchFirstError (vendors~main-99688ccb22de160eb977.js:446399:25)
          at executeDispatch (vendors~main-99688ccb22de160eb977.js:450572:3)
      ...
      window.onerror @ main-881e214a8ddf8f8a8eb8.js:53201
      vendors~main-99688ccb22de160eb977.js:446420 Uncaught TypeError: Cannot read properties of undefined (reading 'length')
          at main-881e214a8ddf8f8a8eb8.js:37694:147
          at main-881e214a8ddf8f8a8eb8.js:38349:57
          at main-881e214a8ddf8f8a8eb8.js:37693:9
          at pinToggle (main-881e214a8ddf8f8a8eb8.js:67199:9)
          at onClick (main-881e214a8ddf8f8a8eb8.js:67281:341)
          at HTMLUnknownElement.callCallback (vendors~main-99688ccb22de160eb977.js:446274:14)
          at Object.invokeGuardedCallbackDev (vendors~main-99688ccb22de160eb977.js:446323:16)
          at invokeGuardedCallback (vendors~main-99688ccb22de160eb977.js:446385:31)
          at invokeGuardedCallbackAndCatchFirstError (vendors~main-99688ccb22de160eb977.js:446399:25)
          at executeDispatch (vendors~main-99688ccb22de160eb977.js:450572:3)
      

      After some research I noticed this happen when the pinnedResources was {} in the user settings ConfigMap. I don't know how I can reproduce with just UI interactions.

      Version-Release number of selected component (if applicable):
      4.13

      How reproducible:
      Always when manually modifying the ConfigMap, unsure how to reproduce this just with UI interactions.

      Steps to Reproduce:
      Open the user-settings ConfigMap and set "console.pinedResources" to "{}" (with quotes as all ConfigMap values need to be strings)

        console.pinnedResources: '{}'
      

      Or run this patch command:

      oc patch -n openshift-console-user-settings configmaps user-settings-kubeadmin --type=merge --patch '{"data":{"console.pinnedResources":"null"}}'
      

      After that:

      1. Open dev perspective
      2. Navigate to Search
      3. Select a resource type
      4. Click on "Add to navigation"

      Actual results:
      Nothing happen when clicking on "Add to navigation"

      (Browser log shows error above).

      Expected results:
      Resource type should be added to the navigation.

      Additional info:

      Attachments

        Activity

          People

            cjerolim Christoph Jerolimov
            cjerolim Christoph Jerolimov
            Sanket Pathak Sanket Pathak
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: