|
@@ -118,13 +118,13 @@ |
|
@@ -118,13 +118,13 @@ |
118
|
html += data + '</span>';
|
118
|
html += data + '</span>';
|
119
|
return html;
|
119
|
return html;
|
120
|
},
|
120
|
},
|
121
|
- targets: 1
|
121
|
+ targets: 2
|
122
|
}, {
|
122
|
}, {
|
123
|
render: function(data, type, row){
|
123
|
render: function(data, type, row){
|
124
|
var disabled = row.state !== 'success';
|
124
|
var disabled = row.state !== 'success';
|
125
|
return '<button '+(disabled? 'disabled' : '')+' class="btn btn-success btn-xs deploy-btn" data-id="'+data+'" data-build='+row.buildTime+'>分发</button>';
|
125
|
return '<button '+(disabled? 'disabled' : '')+' class="btn btn-success btn-xs deploy-btn" data-id="'+data+'" data-build='+row.buildTime+'>分发</button>';
|
126
|
},
|
126
|
},
|
127
|
- targets: 3
|
127
|
+ targets: 4
|
128
|
}]
|
128
|
}]
|
129
|
});
|
129
|
});
|
130
|
|
130
|
|
|
@@ -153,11 +153,18 @@ |
|
@@ -153,11 +153,18 @@ |
153
|
|
153
|
|
154
|
$('.build-btn').click(function(){
|
154
|
$('.build-btn').click(function(){
|
155
|
var env = $(this).parents('.panel').data('env');
|
155
|
var env = $(this).parents('.panel').data('env');
|
156
|
- $.post('/projects/build/{{project._id}}', {env: env}, function(ret){
|
|
|
157
|
- if(ret.code == 200) {
|
|
|
158
|
- tables[env].ajax.reload();
|
|
|
159
|
- }
|
156
|
+ var i = layer.prompt({
|
|
|
157
|
+ title: '请输入需要构建的分支,默认为 {{deploy.branchName}}'
|
|
|
158
|
+ }, function(branch){
|
|
|
159
|
+ branch = branch || '{{deploy.branchName}}';
|
|
|
160
|
+ $.post('/projects/build/{{project._id}}', {env: env, branch: branch}, function(ret){
|
|
|
161
|
+ if(ret.code == 200) {
|
|
|
162
|
+ tables[env].ajax.reload();
|
|
|
163
|
+ layer.close(i);
|
|
|
164
|
+ }
|
|
|
165
|
+ });
|
160
|
});
|
166
|
});
|
|
|
167
|
+
|
161
|
});
|
168
|
});
|
162
|
|
169
|
|
163
|
|
170
|
|