You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
3.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for HTML5 for Windows version 5.2.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>服务器状态监测-数据仓库管理</title>
<link rel="stylesheet" href="../../static/css/weadmin.css"/>
<!-- 让IE8/9支持媒体查询从而兼容栅格 -->
<!--[if lt IE 9]>
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<div class="weadmin-nav">
<span class="layui-breadcrumb">
<a href="">首页</a>
<a href="">服务器状态监测</a>
<a>
<cite>数据仓库管理</cite></a>
</span>
<a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right"
href="javascript:location.replace(location.href);" title="刷新">
<i class="layui-icon layui-icon-refresh-3" style="line-height:30px"></i></a>
</div>
<div class="weadmin-body">
<table class="layui-table" lay-filter="idTest" id="idTest"></table>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="showMapping">查看表结构</a>
</script>
</div>
<script src="../../lib/layui/layui.js"></script>
<script type="text/javascript">
layui.extend({
admin: '{/}../../static/js/admin'
});
layui.use(['jquery', 'admin', 'table'], function () {
var $ = layui.jquery,
admin = layui.admin,
table = layui.table;
$.ajax({
type: 'GET',
dataType: 'json',
url: '/baseService/bigData/getIndexInfo',
success: function (data) {
var list = [];
for (var k in data) {
list.push(data[k]);
}
table.render({
elem: '#idTest'
, data: list
, cols: [[
{field: 'index', title: '表名', align: 'center'}
, {field: 'docs_count', title: '记录数', align: 'center'}
, {field: 'docs_deleted', title: '删除记录数', align: 'center'}
, {field: 'store_size', title: '存储容量', align: 'center'}
, {field: 'uuid', title: '标识', align: 'center'}
, {field: 'pri', title: '分片数', align: 'center'}
, {field: 'rep', title: '备份数', align: 'center'}
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', width: 100}
]]
, page: false
, height: 'full'
, limit: 1000
, done: function () {
}
});
}
});
//显示表结构
table.on('tool(idTest)', function (obj) {
var data = obj.data;
if (obj.event === 'showMapping') {
var indexName = data.index;
$.ajax({
type: "GET",
dataType: "json",
async: false,
url: "/baseService/bigData/getMapping?indexName=" + indexName,
success: function (data) {
var last = JSON.stringify(data);
layer.alert(last, {
title: '表结构信息',
skin: 'layui-layer-lan'
, closeBtn: 0
, anim: 4 //动画类型
});
}
});
}
}
);
})
</script>
</body>
</html>