...
|
...
|
@@ -19,7 +19,7 @@ |
|
|
<div class="panel-heading">
|
|
|
<p>请配置项目信息.</p>
|
|
|
</div>
|
|
|
<form action="/projects/save" method="POST" data-pjax>
|
|
|
<form action="/projects/save" method="POST" data-pjax>
|
|
|
<input type="hidden" name="_id" value="{{project._id}}">
|
|
|
<div class="panel-body">
|
|
|
<div class="row">
|
...
|
...
|
@@ -29,7 +29,8 @@ |
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">Name</label>
|
|
|
<input type="text" name="name" value="{{project.name}}" class="form-control" placeholder="项目名称, 须和gitlab中的名称一致">
|
|
|
<input type="text" name="name" value="{{project.name}}" class="form-control"
|
|
|
placeholder="项目名称, 须和gitlab中的名称一致">
|
|
|
</div>
|
|
|
<!-- form-group -->
|
|
|
</div>
|
...
|
...
|
@@ -37,14 +38,16 @@ |
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">Name</label>
|
|
|
<input type="text" name="subname" value="{{project.subname}}" class="form-control" placeholder="项目名称,ex: 前端wap版">
|
|
|
<input type="text" name="subname" value="{{project.subname}}" class="form-control"
|
|
|
placeholder="项目名称,ex: 前端wap版">
|
|
|
</div>
|
|
|
<!-- form-group -->
|
|
|
</div>
|
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">Repository Url</label>
|
|
|
<input type="text" name="gitlab" value="{{project.gitlab}}" class="form-control" placeholder="Gitlab 地址">
|
|
|
<input type="text" name="gitlab" value="{{project.gitlab}}" class="form-control"
|
|
|
placeholder="Gitlab 地址">
|
|
|
</div>
|
|
|
<!-- form-group -->
|
|
|
</div>
|
...
|
...
|
@@ -61,7 +64,8 @@ |
|
|
<div class="form-group">
|
|
|
<label class="col-lg-2 control-label" style="text-align: right;padding-top: 7px;">构建脚本:</label>
|
|
|
<div class="col-lg-10">
|
|
|
<input type="text" name="scripts[build]" value="{{project.scripts.build}}" class="form-control" placeholder="ex: gulp build && npm install">
|
|
|
<input type="text" name="scripts[build]" value="{{project.scripts.build}}"
|
|
|
class="form-control" placeholder="ex: gulp build && npm install">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -69,7 +73,8 @@ |
|
|
<div class="form-group">
|
|
|
<label class="col-lg-2 control-label" style="text-align: right;padding-top: 7px;">启动脚本:</label>
|
|
|
<div class="col-lg-10">
|
|
|
<input type="text" name="scripts[start]" value="{{project.scripts.start}}" class="form-control" placeholder="ex: pm2 startOrReload process.json">
|
|
|
<input type="text" name="scripts[start]" value="{{project.scripts.start}}"
|
|
|
class="form-control" placeholder="ex: pm2 startOrReload process.json">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -90,7 +95,11 @@ |
|
|
<label class="control-label">目标服务器</label>
|
|
|
<div class="col-sm-12">
|
|
|
{{#each servers.production}}
|
|
|
<div class="checkbox inline-block mr10"><label><input type="checkbox" name="deploy[production][target][{{@index}}]" value="{{host}}" {{#if checked}}checked=""{{/if}}> {{host}}</label></div>
|
|
|
<div class="checkbox inline-block mr10"><label><input type="checkbox"
|
|
|
name="deploy[production][target][{{@index}}]"
|
|
|
value="{{host}}"
|
|
|
{{#if checked}}checked=""{{/if}}> {{host}}
|
|
|
</label></div>
|
|
|
{{/each}}
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -100,7 +109,9 @@ |
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">对应Git分支</label>
|
|
|
<input type="text" value="{{project.deploy.production.branchName}}" name="deploy[production][branchName]" placeholder="master" class="form-control">
|
|
|
<input type="text" value="{{project.deploy.production.branchName}}"
|
|
|
name="deploy[production][branchName]" placeholder="master"
|
|
|
class="form-control">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -108,12 +119,14 @@ |
|
|
<div class="col-sm-12">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">测试URL</label>
|
|
|
<input type="text" value="{{project.deploy.production.testUrl}}" name="deploy[production][testUrl]" placeholder="ex: http://{host}:8080/test" class="form-control">
|
|
|
<input type="text" value="{{project.deploy.production.testUrl}}"
|
|
|
name="deploy[production][testUrl]"
|
|
|
placeholder="ex: http://{host}:8080/test" class="form-control">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div><!-- tab-pane -->
|
|
|
|
|
|
|
|
|
<div class="tab-pane" id="profile4">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-12">
|
...
|
...
|
@@ -121,7 +134,14 @@ |
|
|
<label class="control-label">目标服务器</label>
|
|
|
<div class="col-sm-12">
|
|
|
{{#each servers.test}}
|
|
|
<div class="checkbox inline-block mr10"><label><input type="checkbox" name="deploy[test][target][{{@index}}]" value="{{host}}" {{#if checked}}checked=""{{/if}}> {{host}}</label></div>
|
|
|
<div class="checkbox inline-block mr10">
|
|
|
<label>
|
|
|
<input type="checkbox"
|
|
|
name="deploy[test][target][{{@index}}]"
|
|
|
value="{{host}}"
|
|
|
{{#if checked}}checked=""{{/if}}> {{host}}
|
|
|
</label>
|
|
|
</div>
|
|
|
{{/each}}
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -131,7 +151,9 @@ |
|
|
<div class="col-sm-6">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">对应Git分支</label>
|
|
|
<input type="text" value="{{project.deploy.test.branchName}}" name="deploy[test][branchName]" value="" placeholder="master" class="form-control">
|
|
|
<input type="text" value="{{project.deploy.test.branchName}}"
|
|
|
name="deploy[test][branchName]" value="" placeholder="master"
|
|
|
class="form-control">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -139,7 +161,9 @@ |
|
|
<div class="col-sm-12">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">测试URL</label>
|
|
|
<input type="text" value="{{project.deploy.test.testUrl}}" name="deploy[test][testUrl]" placeholder="ex: http://{host}:8080/test" class="form-control">
|
|
|
<input type="text" value="{{project.deploy.test.testUrl}}"
|
|
|
name="deploy[test][testUrl]" placeholder="ex: http://{host}:8080/test"
|
|
|
class="form-control">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
...
|
...
|
@@ -147,24 +171,50 @@ |
|
|
</div><!-- tab-content -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="row">
|
|
|
<div class="col-sm-12">
|
|
|
<h5 class="lg-title mb10">监控配置</h5>
|
|
|
<ul class="nav nav-tabs nav-primary">
|
|
|
<li class="active"><a href="#influx-info" data-toggle="tab"><strong>InfluxDB</strong></a></li>
|
|
|
</ul>
|
|
|
<div class="tab-content tab-content-primary mb30">
|
|
|
<div class="tab-pane active" id="influx-info">
|
|
|
<div class="row">
|
|
|
<div class="col-sm-12">
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">Influxdb Measurement</label>
|
|
|
<input type="text" name="monitor[influx][name]" value="{{project.monitor.influx.name}}"
|
|
|
class="form-control" placeholder="请输入项目日志配置的measurement">
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div><!-- tab-pane -->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- row -->
|
|
|
</div>
|
|
|
<!-- panel-body -->
|
|
|
<div class="panel-footer">
|
|
|
<button type="submit" class="btn btn-primary">保存</button>
|
|
|
<button type="button" class="btn btn-default ml20 go-back">取消</button>
|
|
|
</div>
|
|
|
</form>
|
|
|
<!-- panel-footer -->
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
$(function(){
|
|
|
$(function() {
|
|
|
$(document.body).off().on('submit', 'form[data-pjax]', function(event) {
|
|
|
event.preventDefault(); // stop default submit behavior
|
|
|
$.pjax.submit(event, '#pjax-container', {
|
|
|
type: 'POST'
|
|
|
});
|
|
|
});
|
|
|
|
|
|
$('.go-back').click(function() {
|
|
|
window.history.go(-1);
|
|
|
});
|
|
|
});
|
|
|
|
|
|
|
|
|
</script> |
|
|
\ No newline at end of file |
...
|
...
|
|