fix:多余依赖删除
This commit is contained in:
@@ -208,7 +208,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
|||||||
<script>
|
<script>
|
||||||
import bus from "../../../../libs/bus";
|
import bus from "../../../../libs/bus";
|
||||||
import promqlInput from "./promqlInput";
|
import promqlInput from "./promqlInput";
|
||||||
import promqlInputPlus from "./promqlInputPlus";
|
// import promqlInputPlus from "./promqlInputPlus";
|
||||||
import chart from "../overview/chart";
|
import chart from "../overview/chart";
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
import chartBox from "../../../page/dashboard/chartBox";
|
import chartBox from "../../../page/dashboard/chartBox";
|
||||||
@@ -219,7 +219,7 @@ instance_cpu_time_ns{app="fox", proc="widget", rev="4d3a513", env="prod", job="c
|
|||||||
name: "explore",
|
name: "explore",
|
||||||
components: {
|
components: {
|
||||||
'promql-input': promqlInput,
|
'promql-input': promqlInput,
|
||||||
'promql-input-plus':promqlInputPlus,
|
// 'promql-input-plus':promqlInputPlus,
|
||||||
'chart': chart,
|
'chart': chart,
|
||||||
'chart-box': chartBox,
|
'chart-box': chartBox,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import plTable from 'pl-table'
|
|||||||
import 'pl-table/themes/index.css'
|
import 'pl-table/themes/index.css'
|
||||||
|
|
||||||
import {post, get, put, del} from './http.js'
|
import {post, get, put, del} from './http.js'
|
||||||
import {toTop, clickoutside, scrollBar, bottomBoxWindow,stringTimeParseToUnix} from './tools.js'
|
import {toTop, clickoutside, scrollBar, bottomBoxWindow,stringTimeParseToUnix,unixTimeParseToString} from './tools.js'
|
||||||
|
|
||||||
|
|
||||||
import Pagination from "./components/common/pagination"; //引入全局分页组件
|
import Pagination from "./components/common/pagination"; //引入全局分页组件
|
||||||
@@ -80,6 +80,7 @@ Vue.prototype.$delete = del;
|
|||||||
Vue.prototype.$toTop = toTop; //toTop置顶按钮方法
|
Vue.prototype.$toTop = toTop; //toTop置顶按钮方法
|
||||||
Vue.prototype.$bottomBoxWindow = bottomBoxWindow; //底部上滑框控制
|
Vue.prototype.$bottomBoxWindow = bottomBoxWindow; //底部上滑框控制
|
||||||
Vue.prototype.$stringTimeParseToUnix = stringTimeParseToUnix;
|
Vue.prototype.$stringTimeParseToUnix = stringTimeParseToUnix;
|
||||||
|
Vue.prototype.$unixTimeParseToString = unixTimeParseToString;
|
||||||
Vue.prototype.$tableHeight = { //列表页表格的高度
|
Vue.prototype.$tableHeight = { //列表页表格的高度
|
||||||
normal: 'calc(100% - 100px)', //常规高度,特例在下方定义
|
normal: 'calc(100% - 100px)', //常规高度,特例在下方定义
|
||||||
openSubList: { //打开二级列表后的高度
|
openSubList: { //打开二级列表后的高度
|
||||||
|
|||||||
@@ -338,3 +338,22 @@ export function stringTimeParseToUnix(stringTime){
|
|||||||
let time=new Date(stringTime).getTime();
|
let time=new Date(stringTime).getTime();
|
||||||
return time/1000;
|
return time/1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function unixTimeParseToString(unixTime,fmt='yyyy-MM-dd hh-mm-ss'){
|
||||||
|
let date=new Date(unixTime * 1000);
|
||||||
|
var o = {
|
||||||
|
"M+" : date.getMonth()+1, //月份
|
||||||
|
"d+" : date.getDate(), //日
|
||||||
|
"h+" : date.getHours(), //小时
|
||||||
|
"m+" : date.getMinutes(), //分
|
||||||
|
"s+" : date.getSeconds(), //秒
|
||||||
|
"q+" : Math.floor((date.getMonth()+3)/3), //季度
|
||||||
|
"S" : date.getMilliseconds() //毫秒
|
||||||
|
};
|
||||||
|
if(/(y+)/.test(fmt))
|
||||||
|
fmt=fmt.replace(RegExp.$1, (date.getFullYear()+"").substr(4 - RegExp.$1.length));
|
||||||
|
for(var k in o)
|
||||||
|
if(new RegExp("("+ k +")").test(fmt))
|
||||||
|
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));
|
||||||
|
return fmt;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user