Merge branch 'master' of /home/git/monitoring
This commit is contained in:
10242
package-lock.json
generated
10242
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
6
public/js/app.js
vendored
6
public/js/app.js
vendored
@@ -65949,6 +65949,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
@@ -66032,6 +66033,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
@@ -66068,6 +66070,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
@@ -66104,6 +66107,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
@@ -66140,6 +66144,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
@@ -66364,6 +66369,7 @@ var render = function() {
|
|||||||
"div",
|
"div",
|
||||||
[
|
[
|
||||||
_c("dygraphs", {
|
_c("dygraphs", {
|
||||||
|
ref: "dg",
|
||||||
attrs: {
|
attrs: {
|
||||||
width: "800",
|
width: "800",
|
||||||
graphData: _vm.series,
|
graphData: _vm.series,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<dygraphs width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
<dygraphs ref="dg" width="800" :graphData="series" :graphOptions="options"></dygraphs>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
@@ -38,12 +38,12 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="counter > 0" :key="counter">
|
<div v-if="counter > 0" :key="counter">
|
||||||
<network-graph v-show="settings['network'].show" :raw_data="chartData"></network-graph>
|
<network-graph ref="network" v-show="settings['network'].show" :raw_data="chartData"></network-graph>
|
||||||
<temp-graph ref="temp" v-show="settings['temp'].show" :raw_data="chartData" style="display: block; "></temp-graph>
|
<temp-graph ref="temp" v-show="settings['temp'].show" :raw_data="chartData"></temp-graph>
|
||||||
<memory-graph v-show="settings['memory'].show" :raw_data="chartData" style="display: block; "></memory-graph>
|
<memory-graph ref="memory" v-show="settings['memory'].show" :raw_data="chartData"></memory-graph>
|
||||||
<load-graph v-show="settings['load'].show" :raw_data="chartData"></load-graph>
|
<load-graph ref="load" v-show="settings['load'].show" :raw_data="chartData"></load-graph>
|
||||||
<processes-graph v-show="settings['processes'].show" :raw_data="chartData"></processes-graph>
|
<processes-graph ref="processes" v-show="settings['processes'].show" :raw_data="chartData"></processes-graph>
|
||||||
<disk-graph v-show="settings['disk'].show" :raw_data="chartData"></disk-graph>
|
<disk-graph ref="disk" v-show="settings['disk'].show" :raw_data="chartData"></disk-graph>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@@ -51,17 +51,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
$(document).ready( function() {
|
$(document).ready( function() {
|
||||||
var settings = { "network": { name:"Network",show: false, prefix: "netstat",suffix: { "recv": "Received", "sent": "Send Bytes" }, units:"B"},
|
Cookies.set('test','test2');
|
||||||
|
var settings = { "network": { name:"Network",show: false, prefix: "netstat",suffix: { "recv": "Received", "sent": "Send Bytes" }, units:"B"},
|
||||||
"temp": {name:"Temerature",show: false,prefix: null,units:"C"},
|
"temp": {name:"Temerature",show: false,prefix: null,units:"C"},
|
||||||
"memory": {name:"Memory",show: false,prefix:"memory", suffix: {"free":"Free Memory", "total": "Total Memory","used":"Used Memory"},units: "KB"},
|
"memory": {name:"Memory",show: false,prefix:"memory", suffix: {"free":"Free Memory", "total": "Total Memory","used":"Used Memory"},units: "KB"},
|
||||||
"load": {name:"Load",show: false, prefix:null, units:"%"},
|
"load": {name:"Load",show: false, prefix:null, units:"%"},
|
||||||
"disk": {name:"Disk",show: false,prefix:"disk",suffix: {"free":"Free Memory", "total": "Total Memory","used":"Used Memory"}, units:"MB"},
|
"disk": {name:"Disk",show: false,prefix:"disk",suffix: {"free":"Free Memory", "total": "Total Memory","used":"Used Memory"}, units:"MB"},
|
||||||
"processes": {name:"Processes",show:false,prefix: null,units:""}};
|
"processes": {name:"Processes",show:false,prefix: null,units:""}};
|
||||||
|
|
||||||
function sleep (time) {
|
|
||||||
return new Promise((resolve) => setTimeout(resolve, time));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
var app = new Vue({
|
var app = new Vue({
|
||||||
el: "#app",
|
el: "#app",
|
||||||
@@ -81,7 +77,10 @@
|
|||||||
settings[s].show = false;
|
settings[s].show = false;
|
||||||
};
|
};
|
||||||
settings[key].show = true;
|
settings[key].show = true;
|
||||||
console.log(key);
|
console.log('Change tab:',key);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
app.$refs[key].$refs.dg._data._graph.resize();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
displayResults: function () {
|
displayResults: function () {
|
||||||
|
|
||||||
@@ -90,7 +89,11 @@
|
|||||||
} else {
|
} else {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (s in settings) {
|
||||||
|
settings[s].show = false;
|
||||||
|
};
|
||||||
|
app.settings["network"].show = true;
|
||||||
|
|
||||||
axios.get('{{ url('/data') }}', {
|
axios.get('{{ url('/data') }}', {
|
||||||
params: {
|
params: {
|
||||||
@@ -100,21 +103,9 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then(function (response) {
|
.then(function (response) {
|
||||||
|
|
||||||
for (s in app.settings) {
|
|
||||||
app.settings[s].show = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
app.chartData = response.data;
|
app.chartData = response.data;
|
||||||
app.counter += 1;
|
app.counter += 1;
|
||||||
|
|
||||||
sleep(1000).then(() => {
|
|
||||||
for (s in app.settings) {
|
|
||||||
app.settings[s].show = false;
|
|
||||||
}
|
|
||||||
app.settings["network"].show = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user