Skip to content

The Unified and Autonomous Development Platform

Add job run help

Robin Shen6a6f0b12b765
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
index 87a5d50551..ff142225f1 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.html
@@ -29,6 +29,8 @@
<div wicket:id="body">
<div wicket:id="feedback"></div>
<table wicket:id="builds" class="table"></table>
+ <div wicket:id="tips" class="form-text text-muted"><wicket:svg href="bulb" class="icon icon-sm mb-1"/> <span>Jobs can be run either
+ from job menu of a commit, or from <a wicket:id="promotion" target="_blank">promotion</a> menu of an existing build</span></div>
</div>
</div>
</div>
diff --git a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
index 8b52605481..29f68b7c07 100644
--- a/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
+++ b/server-core/src/main/java/io/onedev/server/web/component/build/list/BuildListPanel.java
@@ -31,6 +31,7 @@ import org.apache.wicket.markup.html.basic.Label;
import org.apache.wicket.markup.html.form.Form;
import org.apache.wicket.markup.html.form.TextField;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
+import org.apache.wicket.markup.html.link.ExternalLink;
import org.apache.wicket.markup.html.link.Link;
import org.apache.wicket.markup.html.panel.Fragment;
import org.apache.wicket.markup.html.panel.Panel;
@@ -1046,6 +1047,24 @@ public abstract class BuildListPanel extends Panel {
body.add(buildsTable = new OneDataTable<Build, Void>("builds", columns, dataProvider,
WebConstants.PAGE_SIZE, getPagingHistorySupport()));
+ body.add(new WebMarkupContainer("tips") {
+
+ @Override
+ protected void onInitialize() {
+ super.onInitialize();
+
+ String href = OneDev.getInstance().getDocRoot() + "/pages/concepts.md#build-promotion";
+ add(new ExternalLink("promotion", href));
+ }
+
+ @Override
+ protected void onConfigure() {
+ super.onConfigure();
+ setVisible(SecurityUtils.getUser() != null && SecurityUtils.canReadCode(getProject()));
+ }
+
+ });
+
setOutputMarkupId(true);
}