grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
63.97k stars 11.97k forks source link

Disable panel menu in panel solo route (embed mode) #12019

Open starlilyth opened 6 years ago

starlilyth commented 6 years ago

Because Grafana is the #1 TSD graph templating solution available I would like to request an actual, useable ANONYMOUS user mode, one that does not indicate or allow any editing of the exported realtime graphs.

I am providing graphs via the "Embed" feature in an iframe to a web application with many users. These graphs are exported by enabling 'anonymous' access, but they are in not in any way something I want to put in the hands of 'anonymous' users in production:

I can use "&inactive" to disable the drop menu on a graph that has been exported, but the "+" grab handle or finger pointer is still displayed when mousing over the header. Even with "&inactive", Anon users can still edit legend details (axis, color) by clicking on the items color. Editing by Anon users is possible if the dashboard does not have "Editable" unchecked.

Bottom line: ANONYMOUS users should NEVER have edit access to any part of the exported graph, or indicators to edit options, regardless of settings on the dashboard or flags used in the url! This seems an obvious and common sense safeguard; I am surprised it does not work this way already, hence my request.

I understand that this may not have been something considered in your original roadmap or current set of milestones, but you are doing the project an enormous disservice by not recognizing the potential application of this tool in the absence of any better solutions. I would be grateful for your serious consideration of this request.

Grafana v5.1.3 InfluxDB 1.5.2 Centos 7

Thank you, Lily

torkelo commented 6 years ago

We could disable the panel menu in solo/embed mode. Would not add any true security but would be less confusing for the user interacting with the iframed panel.

starlilyth commented 6 years ago

Please also disable the legend edit menu in the same mode, as this poses the same confusion problem - anon user can currently click a legend name to see that series individually (good), but can also click legend color to edit (bad/confusing when it doesnt fit into the iframe, which is practically always).

I appreciate your attention to this issue.

dastrix80 commented 6 years ago

Is there any update to this request? I too would like all the menus etc removed from an iframe embedded graph

k1vt1r commented 6 years ago

+1

z11aalex commented 6 years ago

+1 this feature shall have a greater attention from grafana community

balabalazhoucj commented 6 years ago

+1

daFritz84 commented 6 years ago

+1

SomeFixItDude commented 6 years ago

+1 Makes embedding much more usable.

MRakeshHarsha commented 6 years ago

+1 any update on this?

hanynowsky commented 5 years ago

This issue makes the snapshoting useless. adding: &inactive=1 to the URL does not help much.

starlilyth commented 5 years ago

Looks like the team has pushed this very popular long standing and common sense request off to yet another version. Believe me, I would offer to fix this myself if I had the knowledge; instead I can only ask what is needed to ensure this is positively included in the 5.5 release.

facetoe commented 5 years ago

+1

tuhao1020 commented 5 years ago

any update on this request?

ntompson commented 5 years ago

Seriously - this isn't an option?

+1 for me too

syedsfayaz commented 4 years ago

+1

Bots4You-Heimel commented 4 years ago

+1

YuxiJin-tobeyjin commented 4 years ago

+1

flyboy013 commented 4 years ago

+1

yogi4yu commented 4 years ago

+1 this is a must have feature

yogi4u commented 4 years ago

+1 really a useful feature

varunshah1106 commented 4 years ago

+1

1300371 commented 4 years ago

+1

razie commented 4 years ago

how do we vote for this? Is someone counting comments or is there something smarter?

fabionaspolini commented 4 years ago

+1

Saoni commented 4 years ago

Is there any update on this issue? Can anyone provide the solution to this?

tmm1 commented 4 years ago

If you can inject CSS into the iframe, something like this works:

.panel-header:hover{ background-color: transparent; }
.panel-title-container{ cursor: auto; }
.panel-title-text{ cursor: auto; }
.panel-menu-toggle{ display: none; }
.panel-menu-container{ display: none; }
yogi4u commented 4 years ago

It also makes sense to disable the menu for non-admin/viewer/guest user or based on user role.

oliverwreath commented 3 years ago

+1 this feature request deserve more attention from the Grafana community.

hanumesh commented 3 years ago

+100 this feature request deserve more attention from the Grafana community.

hanumesh commented 3 years ago

https://community.grafana.com/t/disable-view-share-and-more-menu-from-graph/26572/12

We require more attention from Graphana community

faizansalamat commented 3 years ago

A quick and easy hack to hide the graph controls :

We are going to play with the themes.

Grafana has two Themes " Light " & " Dark ".

I edited my light theme css by hiding all the menus, sidebar , and page titles. This light theme was shared with the end users while at the back I was monitoring all the alerts on the dark theme. You can pass Theme in the URL https://[dashboardurl]&theme=light

in short " hide all the extra elements from one theme and share it with the users while you use the other theme to play around with the data "

head over to the build folder. ( located under extracted grafana folder )

- D:\grafana-8.0.4.windows-amd64\grafana-8.0.4\public\build\
- Look for grafana.light.d6a5ae6ae74fba833b3d ( if you want to edit the light theme and hide the controls ) or - grafana.dark.d6a5ae6ae74fba833b3d ( if you want to edit the dark theme and hide controls )

here is the css which you will paste at the bottom of your css file :

.page-toolbar .css-1hik5m6 { display:none !important} //to hide toolbar .panel-title {display:none !important} //to hide graph titles .submenu-controls { display: none !important} //to hide sub menu controls .css-1rf5v84 {display: none !important} //to hide toolbar inner .css-6v8co2 {display: none !important} //to hide toolbar inner .sidemenu {diplay: none !important} // to hide sidebar .react-resizable-handle{display:none !Important;} // to remove the drag event on the panels

go head save and refresh grafana.

cheers.

iamelec commented 2 years ago

A quick and easy hack to hide the graph controls :

We are going to play with the themes.

Grafana has two Themes " Light " & " Dark ".

I edited my light theme css by hiding all the menus, sidebar , and page titles. This light theme was shared with the end users while at the back I was monitoring all the alerts on the dark theme. You can pass Theme in the URL https://[dashboardurl]&theme=light

in short " hide all the extra elements from one theme and share it with the users while you use the other theme to play around with the data "

head over to the build folder. ( located under extracted grafana folder )

_- D:\grafana-8.0.4.windows-amd64\grafana-8.0.4\public\build_ - Look for grafana.light.d6a5ae6ae74fba833b3d ( if you want to edit the light theme and hide the controls ) or - grafana.dark.d6a5ae6ae74fba833b3d ( if you want to edit the dark theme and hide controls )

here is the css which you will paste at the bottom of your css file :

.page-toolbar .css-1hik5m6 { display:none !important} //to hide toolbar .panel-title {display:none !important} //to hide graph titles .submenu-controls { display: none !important} //to hide sub menu controls .css-1rf5v84 {display: none !important} //to hide toolbar inner .css-6v8co2 {display: none !important} //to hide toolbar inner .sidemenu {diplay: none !important} // to hide sidebar .react-resizable-handle{display:none !Important;} // to remove the drag event on the panels

go head save and refresh grafana.

cheers.

Does this hack still work in Grafana v8.1.2? I can't seem to get it to work. The light theme is also called 'grafana.light.8ea303538f79ee32b68a' for me.

figotee3 commented 1 year ago

+1

liuyuanzhi-cn commented 1 year ago

+1

MarBlack23 commented 7 months ago

Is there any method for version 10? @faizansalamat

ikaranmali commented 7 months ago

Version 10 seems to not accepting these changes, on version 9 the trick works fine! Please suggest how to do it for version 10.