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

[JENKINS-66342] Dashboard View views can't be created via groovy scripts #201

Open
TobiX opened this issue Aug 9, 2021 · 0 comments
Open

Comments

@TobiX
Copy link
Contributor

TobiX commented Aug 9, 2021

I am unable to use groovy scripts to create a view with Dashboard View.  Any reference to a property of a dashboard that isn't already a property of a view (like useCssStyle or leftPortlets) results in an error. For example, I would expect this groovy code to create a view in the folder (other plain listView blocks work in this folder):

folder(projectFolderName) {
	description(projectFolderName + ' Regression Jobs')
	views{
		dashboardView('Tests Dashboard') {
			description('Test result dashboard for ' + projectFolderName)
			recurse(true)
			jobs {
				regex('[\\w\\s]+\\/.*')
			}
			columns testDashboardColumns
			useCssStyle(true)
			leftPortletWidth('66%')
			rightPortletWidth('33%')
			leftPortlets() {
				hudsonStdJobsPortlet('Latest Test Results')
			}
			rightPortlets {
				unstableJobsPortlet
				{
					name('Tests with Failures')
					showOnlyFailedJobs(true)
					recurse(true)
				}
			}
		}
	}
}

Instead, it results in this error:

Processing DSL script myJobs.groovy
ERROR: (myJobs.groovy, line 789) No signature of method: javaposse.jobdsl.dsl.views.DashboardView.useCssStyle() is applicable for argument types: (java.lang.Boolean) values: [true]
Finished: FAILURE

In the above example, if I omit useCssStyle, I just get similar errors on the next dashboard property. I have tried different arguments and styles of setting any of the properties to no avail.

Is this user error? Am I improperly trying to set up this view? Or is there something in Dashboard View that isn't configured in a way that will allow me to set them up this way?


Originally reported by amellis, imported from: Dashboard View views can't be created via groovy scripts
  • assignee: tgr
  • status: Open
  • priority: Minor
  • resolution: Unresolved
  • imported: 2022-10-30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant