This commit is contained in:
syuilo
2019-03-13 23:27:11 +09:00
parent 8bda2a1fb7
commit 7668475bd6
3 changed files with 24 additions and 4 deletions

View File

@ -23,6 +23,8 @@ import { faInbox } from '@fortawesome/free-solid-svg-icons';
import { faPaperPlane } from '@fortawesome/free-regular-svg-icons';
import ApexCharts from 'apexcharts';
const limit = 150;
export default Vue.extend({
data() {
return {
@ -124,7 +126,7 @@ export default Vue.extend({
connection.on('statsLog', this.onStatsLog);
connection.send('requestLog', {
id: Math.random().toString().substr(2, 8),
length: 100
length: limit
});
this.$once('hook:beforeDestroy', () => {
@ -137,7 +139,7 @@ export default Vue.extend({
methods: {
onStats(stats) {
this.stats.push(stats);
if (this.stats.length > 100) this.stats.shift();
if (this.stats.length > limit) this.stats.shift();
},
onStatsLog(statsLog) {