Changes not being reflected in deployment

  • What Grafana version and what operating system are you using?

    • v8.5.2
  • What are you trying to achieve?

    • Hide “Inspect” panel from users with View permissions
  • How are you trying to achieve it?

    • Changes to:
      public/app/features/dashboard/utils/getPanelMenu.ts
      public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
      public/app/features/inspector
  • What happened?

    • The changes were not reflected in the browser.
  • What did you expect to happen?

    • I gradually increased the scope of the changes to the point that I expect the panel to be hidden for all users (Admin, Editor, and Viewer)
  • Can you copy/paste the configuration(s) that you are having problems with?

    • To the dockerfile linked below, I added the following lines:
COPY ./build-templates/layouts/getPanelMenu.ts /usr/share/grafana/public/app/features/dashboard/utils/getPanelMenu.ts

COPY ./build-templates/layouts/PanelHeader.tsx /usr/share/grafana/public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx

COPY ./build-templates/layouts/inspector /usr/share/grafana/public/app/features/inspector
  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

    • No there were no errors. It’s running in K8S and I am able to bash into the pod and cat the files that were changed and see that the change is reflected there. I’m certain that the pod in K8S is looking at the correct (updated) image in our container repository.
    • I went so far as to remove all of the html in the inspector folder. After I roll that out to K8S, the refresh is delayed, which indicates that the new yaml is being accepted. But the Inspect panel is still there and when I use developer tools to inspect the html, I see the html that I deleted and does not exist in the container.
    • There are other files that are copied into the container that do work properly so I am wondering if there is some other required step in the deployment that the person before me did to get it working.
  • Did you follow any online instructions? If so, what is the URL?

We figured it out. You have to locate the actual .js files built by npm by grepping around in the container, copy them locally, change them, and then copy them back into the container.