mirror of
https://github.com/netcccyun/dnsmgr.git
synced 2026-02-21 15:31:12 +08:00
93 lines
2.9 KiB
HTML
93 lines
2.9 KiB
HTML
{extend name="common/layout" /}
|
|
{block name="title"}自动部署任务账户管理{/block}
|
|
{block name="main"}
|
|
<div class="row">
|
|
<div class="col-xs-12 center-block" style="float: none;">
|
|
<div class="panel panel-default panel-intro">
|
|
<div class="panel-body">
|
|
|
|
<form onsubmit="return searchSubmit()" method="GET" class="form-inline" id="searchToolbar">
|
|
<div class="form-group">
|
|
<label>搜索</label>
|
|
<input type="text" class="form-control" name="kw" placeholder="账户名称或备注">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
|
|
<a href="javascript:searchClear()" class="btn btn-default" title="刷新SSL证书账户列表"><i class="fa fa-refresh"></i> 刷新</a>
|
|
<a href="/cert/account/add?deploy=1" class="btn btn-success"><i class="fa fa-plus"></i> 添加</a>
|
|
</form>
|
|
|
|
<table id="listTable">
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/block}
|
|
{block name="script"}
|
|
<script src="/static/js/layer/layer.js"></script>
|
|
<script src="/static/js/bootstrap-table-1.21.4.min.js"></script>
|
|
<script src="/static/js/bootstrap-table-page-jump-to-1.21.4.min.js"></script>
|
|
<script src="/static/js/custom.js"></script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
updateToolbar();
|
|
const defaultPageSize = 15;
|
|
const pageNumber = typeof window.$_GET['pageNumber'] != 'undefined' ? parseInt(window.$_GET['pageNumber']) : 1;
|
|
const pageSize = typeof window.$_GET['pageSize'] != 'undefined' ? parseInt(window.$_GET['pageSize']) : defaultPageSize;
|
|
|
|
$("#listTable").bootstrapTable({
|
|
url: '/cert/account/data?deploy=1',
|
|
pageNumber: pageNumber,
|
|
pageSize: pageSize,
|
|
classes: 'table table-striped table-hover table-bordered',
|
|
columns: [
|
|
{
|
|
field: 'id',
|
|
title: 'ID'
|
|
},
|
|
{
|
|
field: 'typename',
|
|
title: '账户类型',
|
|
formatter: function(value, row, index) {
|
|
return '<img src="/static/images/'+row.icon+'" class="type-logo"></img>'+value;
|
|
}
|
|
},
|
|
{
|
|
field: 'name',
|
|
title: '账户名称'
|
|
},
|
|
{
|
|
field: 'remark',
|
|
title: '备注'
|
|
},
|
|
{
|
|
field: 'addtime',
|
|
title: '添加时间'
|
|
},
|
|
{
|
|
field: 'action',
|
|
title: '操作',
|
|
formatter: function(value, row, index) {
|
|
var html = '<a href="/cert/account/edit?deploy=1&id='+row.id+'" class="btn btn-info btn-xs">编辑</a> <a href="javascript:delItem('+row.id+')" class="btn btn-danger btn-xs">删除</a> <a href="/cert/deploytask?aid='+row.id+'" class="btn btn-default btn-xs">任务</a>';
|
|
return html;
|
|
}
|
|
},
|
|
]
|
|
})
|
|
})
|
|
function delItem(id){
|
|
layer.confirm('确定要删除此账户吗?', {
|
|
btn: ['确定','取消']
|
|
}, function(){
|
|
$.post('/cert/account/del', {id: id, deploy: 1}, function(data){
|
|
if(data.code == 0) {
|
|
layer.msg('删除成功', {icon: 1, time:800});
|
|
$('#listTable').bootstrapTable('refresh');
|
|
} else {
|
|
layer.alert(data.msg, {icon: 2});
|
|
}
|
|
}, 'json');
|
|
});
|
|
}
|
|
</script>
|
|
{/block} |