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

URL param for "inactive mode" #11228

Closed
towolf opened this Issue Mar 13, 2018 · 7 comments

Comments

Projects
None yet
3 participants
@towolf
Contributor

towolf commented Mar 13, 2018

We are using Grafana on Raspberry Pi driven monitors.

This works great, but animation and reflow is not so great due to lack of hardware power.

Now some of our TV dashboards are used in ?kiosk mode, and all is fine with those.

But some dashboards are not using "kiosk" because the creator wants to keep the dashboard title and hence the Rpi has to animate the dashboard to go inactive.

We would prefer an URL param (e.g. ?inactive) to start in inactive mode right away.

Would something like this work?

--- a/public/app/core/components/grafana_app.ts
+++ b/public/app/core/components/grafana_app.ts
@@ -117,6 +117,11 @@ export function grafanaAppDirective(playlistSrv, contextSrv, $timeout, $rootScop
           appEvents.emit('toggle-kiosk-mode');
         }
 
+        // check for inactive url param
+        if (data.params.inactive) {
+          appEvents.emit('toggle-sidemenu-hidden');
+        }
+
         // close all drops
         for (let drop of Drop.drops) {
           drop.destroy();
@bergquist

This comment has been minimized.

Show comment
Hide comment
@bergquist

bergquist Apr 11, 2018

Contributor

Makes sense. Any chance you could submit a PR? Would also need to update the docs.

Contributor

bergquist commented Apr 11, 2018

Makes sense. Any chance you could submit a PR? Would also need to update the docs.

@towolf

This comment has been minimized.

Show comment
Hide comment
@towolf

towolf Apr 12, 2018

Contributor

@bergquist I made one. Setting up the build chain to test was surprisingly low effort.

Contributor

towolf commented Apr 12, 2018

@bergquist I made one. Setting up the build chain to test was surprisingly low effort.

@towolf

This comment has been minimized.

Show comment
Hide comment
@towolf

towolf Apr 12, 2018

Contributor

image

Contributor

towolf commented Apr 12, 2018

image

@bergquist bergquist added this to the 5.1 milestone Apr 16, 2018

@bergquist bergquist closed this in #11579 Apr 16, 2018

bergquist added a commit that referenced this issue Apr 16, 2018

ryantxu added a commit to NatelEnergy/grafana that referenced this issue Apr 16, 2018

Merge remote-tracking branch 'grafana/master'
* grafana/master: (23 commits)
  changlelog: notes about closing issues/pr's
  sqlds: fix text in comments for tests
  removes codecov from front-end tests
  changelog: adds note about closing #11228
  Grafana-CLI: mention the plugins directory is not writable on failure
  docs: fix codespell issues
  public: fix codespell issues
  conf: fix codespell issues
  blocks: fix codespell issues
  CHANGELOG.md: fix codespell issues
  scripts: fix codespell issues
  pkg: fix codespell issues
  Mention the ?inactive parameter in the docs
  Add another URL param «inactive» which works like «kiosk» but with title
  docker: change mysql container so that it uses utc
  mysql: use a datetime column with microsecond precision in test
  tsdb: improved floating point support when converting sql time column to epoch (ms)
  mssql: fix precision for time columns in time series query mode
  postgres: support running multiple postgres integration tests
  postgres: fix precision for time columns in time series query mode
  ...
@dario-collavini

This comment has been minimized.

Show comment
Hide comment
@dario-collavini

dario-collavini May 8, 2018

Hi. This works well but I have an issue using param '?inactive'.
It seems that the inactive status is maintained for like 1 minute (even moving the mouse), then after that period sidebars are restored when mouse is moved. Two things:

  1. is it possible to always stay in tv mode? No just for 1 minute
  2. The first minute tv mode is 'on', no zoom out/mark favorite/etc... button are displayed, but you can hover over a button and its label is displayed... Button function should be removed in this case

dario-collavini commented May 8, 2018

Hi. This works well but I have an issue using param '?inactive'.
It seems that the inactive status is maintained for like 1 minute (even moving the mouse), then after that period sidebars are restored when mouse is moved. Two things:

  1. is it possible to always stay in tv mode? No just for 1 minute
  2. The first minute tv mode is 'on', no zoom out/mark favorite/etc... button are displayed, but you can hover over a button and its label is displayed... Button function should be removed in this case
@towolf

This comment has been minimized.

Show comment
Hide comment
@towolf

towolf May 8, 2018

Contributor

@dario-collavini my patch basically starts the dashboard already in inactive mode, with the sidebar hidden.

The only thing I wanted to achieve was to avoid the animation of hiding the sidebar later.

I did not even consider mouse activity, because our TVs do not have input devices attached.

To ignore mouse activity, I think more code is needed to make a kiosk mode + dashboard title.

Contributor

towolf commented May 8, 2018

@dario-collavini my patch basically starts the dashboard already in inactive mode, with the sidebar hidden.

The only thing I wanted to achieve was to avoid the animation of hiding the sidebar later.

I did not even consider mouse activity, because our TVs do not have input devices attached.

To ignore mouse activity, I think more code is needed to make a kiosk mode + dashboard title.

@dario-collavini

This comment has been minimized.

Show comment
Hide comment
@dario-collavini

dario-collavini May 8, 2018

Thanks for the reply.
For our purposes, a mix of kiosk and tv mode would be helpful: the user must not navigate in different sections through the left sidebar or upper dashboard name, but needs to be able to change time intervals or refreshing times at his will, hence displaying just zoom out/ time interval buttons.
It would be nice to have it.

dario-collavini commented May 8, 2018

Thanks for the reply.
For our purposes, a mix of kiosk and tv mode would be helpful: the user must not navigate in different sections through the left sidebar or upper dashboard name, but needs to be able to change time intervals or refreshing times at his will, hence displaying just zoom out/ time interval buttons.
It would be nice to have it.

@towolf

This comment has been minimized.

Show comment
Hide comment
@towolf

towolf May 8, 2018

Contributor

@dario-collavini I think to create a new Issue is your best bet. Maybe I can look at this later. Or someone else.

Contributor

towolf commented May 8, 2018

@dario-collavini I think to create a new Issue is your best bet. Maybe I can look at this later. Or someone else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment