jenkinsci / build-monitor-plugin

Jenkins Build Monitor Plugin
https://plugins.jenkins.io/build-monitor-plugin/
MIT License
724 stars 279 forks source link

Customise Build Monitor with URL parameters #54

Open Rylon opened 10 years ago

Rylon commented 10 years ago

We run this dashboard on a video wall which occasionally resets, to keep the browser stable (refreshing it all day causes the history to fill up and it becomes less stable over time).

Is it possible to pass in, say, the font size you want to use, as a URL parameter?

Thanks!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25288140-customise-build-monitor-with-url-parameters?utm_campaign=plugin&utm_content=tracker%2F580790&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F580790&utm_medium=issues&utm_source=github).
jan-molak commented 10 years ago

Hi @Rylon,

If I understand what you described correctly, the reason why you need to reset your video wall (I assumed that by 'reseting' you mean a full system reset/restart, am I correct?) is because periodic full-page refreshing (another assumption I make is that it's achieved with some browser plugin reloading/F5-ing the Build Monitor View, is that right?) causes the cache to build up and makes the browser 'less stable over time' (not sure if I understand what this means in your context? does it crash?).

Build Monitor uses AJAX to communicate with the Jenkins CI server so no full-page refreshing is required... It also stores any display-specific configuration in long-lived cookies, so unless you clear your browser cache when you quit your browser, all the config data should be preserved.

Is the behaviour you're observing different?

Looking forward to hearing from you! J

Rylon commented 10 years ago

Essentially yeah :)

Currently we're using a Mac app called 'Fluid' which creates standalone .apps which actually just wrap around the built in System Webkit and display URLs in an iframe, rotating between them every 15-20 seconds. This is mainly because we don't have enough screens for all the dashboards we want to display.

Although the long lived cookie is working fine, if we move Build Monitor from one display to another, we have to set the display properties again, as it's effectively a different browser being a different Fluid app.

So to work around I was wondering if the properties could be passed in via the URL.

Thanks! Ryan

jan-molak commented 10 years ago

Ah, I see. 'Fluid' looks pretty cool :) I noticed that it claims to support:

Is this feature not working with the Build Monitor?

Best, Jan

Rylon commented 10 years ago

I think we've already got separate cookie storage on, actually Build Monitor doesn't work with Fluid, as it claims to not support latest CSS3, so I put that on a separate display in Google Chrome. The feature is working, it just means I need to set the options once per screen, then it does remember.

Cheers, Ryan

paurullan commented 8 years ago

We are using some raspberry pi to display the view and same thing: configuring via URL params would be incredibly useful.

apfelfabrik commented 8 years ago

Hey, I would love this feature as well, we have the build monitor set up on a Chromecast with greenscreen (https://github.com/groupon/greenscreen), so there is no way we can set those values in cookies. Any chance this would make it in if I sit down to implement it?

jan-molak commented 8 years ago

Hey @apfelfabrik - sure, I like the idea so if you'd like to chip in with a pull request it's highly likely to make it in!

ipsi commented 8 years ago

I'd also appreciate this - we use a Screensaver on OSX to display the page, and that doesn't allow us to click on anything... In particular, we use WebViewScreensaver. This provides us with a display of the information that we need without compromising security (the screensaver is configured to ask for a password).

tleahygoogle-zz commented 8 years ago

I'd also like this feature (well this one, https://github.com/jan-molak/jenkins-build-monitor-plugin/issues/71, or https://github.com/jan-molak/jenkins-build-monitor-plugin/pull/189 would also work).

Our internal network is very secure so all kiosks machines are locked down. The content for a kiosk is provided by system that captures periodic snapshots of whatever urls you give it. Cookies will never persist so having some control over the display either by configs or url params would be great.

chri7325 commented 7 years ago

This would help us a lot as well as we have these monitors on many different screens. Each one can have their screen savor tailored for the display which would be very nice.

azd-nightingale commented 6 years ago

+1

AndSand commented 6 years ago

+1

rodeo-sam commented 5 years ago

+1

bumblebeewoods commented 5 years ago

+1

Classe commented 5 years ago

+1

vnikolovski commented 5 years ago

Hi guys I have no idea if this can be done like this, first time trying something with js and probably is wrong but can it be something similar on this for getting params from URL

`angular.

let url = new URL(window.location.href);
let searchParams = new URLSearchParams(url.search);

module('buildMonitor.settings', [ 'buildMonitor.services', 'rzModule']).

controller('controlPanel', ['$scope', 'searchParams', 'townCrier',
    function ($scope, searchParams, townCrier) {
        'use strict';

        $scope.settings.fontSize        = searchParams.get('fontSize',        1);
        $scope.settings.numberOfColumns = searchParams.get('numberOfColumns', 2);
        $scope.settings.colourBlind     = searchParams.get('colourBlind',     0);
        $scope.settings.reduceMotion    = searchParams.get('reduceMotion',    0);
        $scope.settings.showBadges      = searchParams.get('showBadges',      0);

        angular.forEach($scope.settings, function(value, name) {
            $scope.$watch('settings.' + name, function(currentValue) {
                searchParams.put(name, currentValue);
            });
        });

        // that's the minimum viable product .. at its tiniest
        townCrier.uponNewVersion(function() {
            $scope.newVersionAvailable = true;
        });
    }]);`
pxpgraphics commented 5 years ago

Hi @Rylon,

I've submitted a PR which should address this feature request. I realize this issues was created 4 years ago, but I thought I'd let you know.

cc/ @jan-molak

Rylon commented 5 years ago

Oh cool, thanks @pxpgraphics !

f-steff commented 5 years ago

@jan-molak Any chance to see @pxpgraphics PR merged any time soon? Or for an alternative method to set the defaults?

josephtole commented 4 years ago

Has there been any update on this? I would also want to use this feature.

MisterChild commented 3 years ago

I'm also really interested in this feature. Any plans to merge it in near future? Thanks a lot!

tinu1976ch commented 1 year ago

will this feature / PR https://github.com/jenkinsci/build-monitor-plugin/pull/403 been added in future?