diff --git a/static/index.html b/static/index.html index 62d76e3cb..640d3faf7 100644 --- a/static/index.html +++ b/static/index.html @@ -5,22 +5,9 @@ LMP @@ -31,13 +18,62 @@
-

Linux Microscope

-
- - + +
+ +

Linux Microscope

+
+ + + +
+
+ + +
- -
+ + + + + + + + + + + + + + +
+ CollectTime + + submit +
+
+
@@ -61,26 +96,39 @@ el: '#app', data: function() { return { + tableHeight:document.documentElement.clientHeight - 270, checkList:[], + selectedList:[], collectTypes:[ - {label:"cpuutilize", key:"cpuutilize", type:"bcc"}, - {label:"irq", key:"irq", type:"bcc"}, - {label:"memusage", key:"memusage", type:"bcc"}, - {label:"picknexttask", key:"picknexttask", type:"bcc"}, - {label:"runqlen", key:"runqlen", type:"bcc"}, - {label:"vfsstat", key:"vfsstat", type:"bcc"}, - {label:"ContainerNet", key:"ContainerNet", type:"bcc"}, - {label:"dcache", key:"dcache", type:"bcc"}, + {name:"cpuutilize", type:"bcc"}, + {name:"irq", type:"bcc"}, + {name:"memusage", type:"bcc"}, + {name:"picknexttask", type:"bcc"}, + {name:"runqlen", type:"bcc"}, + {name:"vfsstat", type:"bcc"}, + {name:"ContainerNet", type:"bcc"}, + {name:"dcache", type:"bcc"}, ], inputTime:"0", } }, methods:{ + handleSelectionChange(selections) { + this.selectedList = selections; + }, submit() { + if (this.selectedList.length == 0) { + this.$message({ + message: '请选择采集项', + type: 'warning' + }); + } + var plugins = {}; - for (var i = 0; i < this.checkList.length; i++) { - var collect = this.checkList[i]; - plugins[`${collect}`] = "bcc"; + for (var i = 0; i < this.selectedList.length; i++) { + var collect = this.selectedList[i]; + var name = collect.name + plugins[`${name}`] = collect.type; } var collectParam = {};