|
12 | 12 | License. |
13 | 13 | --> |
14 | 14 | <?jelly escape-by-default='true'?> |
15 | | -<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form"> |
| 15 | +<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form" |
| 16 | + xmlns:l="/lib/layout" xmlns:dd="/lib/layout/dropdowns"> |
16 | 17 | <j:if test="${it.hasPermission(it.PROVISION)}"> |
| 18 | + <j:set var="formId" value="${h.generateId()}"/> |
17 | 19 | <tr> |
18 | 20 | <td/> |
19 | | - <td colspan="${monitors.size()+1}"> |
20 | | - <f:form action="${rootURL}/${it.url}/provision" method="post" name="provision"> |
21 | | - <input type="submit" class="gce-provision-button" value="${%Provision via} ${it.displayName}"/> |
22 | | - <select name="configuration"> |
23 | | - <j:forEach var="c" items="${it.configurations}"> |
24 | | - <option value="${c.description}">${c.description}</option> |
25 | | - </j:forEach> |
26 | | - </select> |
27 | | - <st:once> |
28 | | - <script> |
29 | | - Behaviour.register({ |
30 | | - ".gce-provision-button" : function (e) { |
31 | | - new YAHOO.widget.Button(e, { type: "menu", menu: e.nextSibling }); |
32 | | - } |
33 | | - }); |
34 | | - </script> |
35 | | - </st:once> |
| 21 | + <td colspan="${monitors.size()+2}"> |
| 22 | + <l:overflowButton icon="symbol-add" |
| 23 | + text="${%Provision via} ${it.displayName}" |
| 24 | + tooltip="${null}" |
| 25 | + clazz="jenkins-!-margin-top-2"> |
| 26 | + <j:forEach var="t" items="${it.configurations}"> |
| 27 | + <dd:custom> |
| 28 | + <button class="jenkins-dropdown__item" |
| 29 | + data-type="gcloud-provision" |
| 30 | + data-form="${formId}" |
| 31 | + data-url="${t.description}"> |
| 32 | + ${t.description} |
| 33 | + </button> |
| 34 | + </dd:custom> |
| 35 | + </j:forEach> |
| 36 | + </l:overflowButton> |
| 37 | + <f:form action="${rootURL}/${it.url}/provision" method="post" name="provision" id="${formId}"> |
| 38 | + <input type="hidden" name="configuration"/> |
36 | 39 | </f:form> |
| 40 | + <st:adjunct includes="com.google.jenkins.plugins.computeengine.ComputeEngineCloud.provision"/> |
37 | 41 | </td> |
38 | 42 | </tr> |
39 | 43 | </j:if> |
|
0 commit comments