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
[FIXED JENKINS-44204] Provide essential views for clouds #2887
Conversation
Cloud pages can now be customized by actions and sidepanel, that can be further customized by widgets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍 All comments are rather improvement proposal excepting the missing documentation to Cloud
Javadoc. I would follow the approach in other such API classes when new pages are documented
* @since TODO | ||
* @return Jenkins relative URL. | ||
*/ | ||
public @Nonnull String getUrl() { return "cloud/" + name; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not inline the code here. IIRC Oracle codestyle does not advertise it
*/ | ||
public @Nonnull String getUrl() { return "cloud/" + name; } | ||
|
||
public @Nonnull String getSearchUrl() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add Javadoc as well? Just to explain difference. Maybe it is also a subject for default implementation like @jglick did for job APIs
<l:layout title="${it.name}"> | ||
<st:include page="sidepanel.jelly" it="${it}"/> | ||
<l:main-panel> | ||
<h1>Cloud ${it.name}</h1> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cloud" should be localizable IMHO
<st:include page="summary.jelly" from="${action}" optional="true" it="${action}" /> | ||
</j:forEach> | ||
|
||
<st:include page="main.jelly" optional="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe makes sense to print something if there is no such main page. NIT
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is Jenkins knows very little about the clouds itself.
@@ -81,7 +83,7 @@ | |||
* @see NodeProvisioner | |||
* @see AbstractCloudImpl | |||
*/ | |||
public abstract class Cloud extends AbstractModelObject implements ExtensionPoint, Describable<Cloud>, AccessControlled { | |||
public abstract class Cloud extends Actionable implements ExtensionPoint, Describable<Cloud>, AccessControlled { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloud Javadoc needs to describe the new UI components
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean the ones I introduced, no those that Actionable
brought in, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yep. The ones introduced by Actionable are not mandatory though it would not hurt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
As @olivergondza said in IRC, he prefers to wait for a while for feedback from @jenkinsci/code-reviewers . So I will put this PR on-hold & let Oliver to decide when to merge |
@olivergondza Ping? |
No more feedback so I will go on and merge. |
[FIXED JENKINS-44204] Provide essential views for clouds
Description
Provide essential views for clouds
Cloud pages can now be customized by actions and sidepanel, that can be further customized by widgets.
index
view so they can be linked.Cloud
is actionable now.main
ortop
view instead of overriding theindex
page as a whole.index
view, sidepanel's task list or list of boxes underneath.cloud-stats plugin integration in downstream PR: jenkinsci/cloud-stats-plugin#3
See JENKINS-44204.
Changelog entries
Views for Jenkins clouds.
Submitter checklist
Desired reviewers
@jenkinsci/code-reviewers, this is a new view API for cloud plugins.