Skip to content
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

Move settings to config page as default? #119

Closed
Brantone opened this issue Jan 7, 2015 · 9 comments · Fixed by #573
Closed

Move settings to config page as default? #119

Brantone opened this issue Jan 7, 2015 · 9 comments · Fixed by #573

Comments

@Brantone
Copy link

Brantone commented Jan 7, 2015

Wondering if it's worth moving the settings to the config page to be utilized as default, while still allowing settings to store cookies and override defaults?

Reason: I've had a few monitors set up, get them all configured to look pretty, then show it on a different computer and the columns/text-size is garbled again.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7546837-move-settings-to-config-page-as-default?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).
@Brantone
Copy link
Author

Brantone commented Jan 7, 2015

The implication of this is that JobView of function might need bit of retooling for all the parameters:
https://github.com/jan-molak/jenkins-build-monitor-plugin/blob/master/src/main/java/com/smartcodeltd/jenkinsci/plugins/buildmonitor/viewmodel/JobView.java#L30

@jan-molak
Copy link
Member

Yeah, I agree, that's a good idea. There's quite a few things people would like to have configurable, so this would be tremendously useful.
Is this something you'd like to pick up? I'm happy to help out but might not have enough time over the coming weeks to drive it myself.

@Brantone
Copy link
Author

Brantone commented Jan 8, 2015

Yup, can do. Just wanted to ensure it fit with your vision before getting too far in code changes.
The tricky part will be the JobView of functions and when they instantiate a new JobView and all permutations that it could take, so any ideas or insights would be useful.
Originally I was thinking rather than having a growing list of parameters, to reduce the configs down to simply JobView(job, new BuildAugmentor(), RelativeLocation.of(job), Date(), Array parameters) or something like that?

@jan-molak
Copy link
Member

A Config object should do the trick: JobView(job, new BuildAugmentor(), RelativeLocation.of(job), Date(), Conifg config). I think it would be cleaner than using just a plain Map or List

You could then have a bunch of getters for all the configuration options:

  • config.numberOfColumns()
  • config.fontSize()
  • config.showTestFailures(), etc.

In unit tests we could use a dummy implementation with some sensible defaults.

What do you think?

@Brantone
Copy link
Author

Would it be worth having BuildAugmentor as part of the Config class object?

Also, any preference on folder for where Config.java would reside?

@jan-molak
Copy link
Member

Hey @Brantone - no preference w/r to the Config's class habitat, maybe just the top-level package for now and we can move it when there's a need?

Not sure about the BuildAugmentor - it might be easier to have this conversation over code 😃

@drekbour
Copy link
Contributor

I'd take one thing at a time.
PR1 A shared Config object passed into the *Views would make a bunch of things easier.
PR2 Allowing common config to be overlayed by cookie config is a neat idea too.
PR3? BuildAugmentor is another thing entirely.

I need PR1 so will add that and then use as part of #60

@Brantone
Copy link
Author

@drekbour Thanks for taking a crack at this, other plugins have hijacked my focus :( I still have some uncommitted code that will be great to make use of this. 👍

tcollignon added a commit to tcollignon/jenkins-build-monitor-plugin that referenced this issue Dec 27, 2015
@tcollignon
Copy link

I have submit the "PR2" like you said. Tell me if it's good for you.

hughsaunders added a commit to hughsaunders/jenkins-build-monitor-plugin that referenced this issue Jul 18, 2019
This commit allows Jenkins users to specify defaults for build monitor
views when creating the views from the Jenkins UI. End users can still
modify these settings using the widget within build monitor.

This is useful because the defaults do not scale to large numbers of builds
so if a user is creating a build monitor view that they anticipate will
contain a large number of builds they can increase the number of columns
and prevent each end user from having to do that individually.

This is essentially a rebase of @tcolligon's changes in pr jenkinsci#189
and is related to issue jenkinsci#119.
hughsaunders added a commit to hughsaunders/jenkins-build-monitor-plugin that referenced this issue Jul 18, 2019
This commit allows Jenkins users to specify defaults for build monitor
views when creating the views from the Jenkins UI. End users can still
modify these settings using the widget within build monitor.

This is useful because the defaults do not scale to large numbers of builds
so if a user is creating a build monitor view that they anticipate will
contain a large number of builds they can increase the number of columns
and prevent each end user from having to do that individually.

This is essentially a rebase of @tcolligon's changes in pr jenkinsci#189
and is related to issue jenkinsci#119.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants