Skip to content

Commit

Permalink
v3.12.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jemu75 committed Apr 17, 2021
1 parent b76727a commit aae6be0
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 31 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fhemapp",
"version": "3.12.0",
"version": "3.12.1",
"private": true,
"author": "jemu75",
"scripts": {
Expand Down
47 changes: 22 additions & 25 deletions src/components/TemplChart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@
}
},
xaxis: {
type: 'datetime',
labels: {
format: 'dd.MM.yy',
datetimeUTC: false
}
type: 'datetime'
},
yaxis: []
},
Expand Down Expand Up @@ -227,8 +223,6 @@
loadChartData() {
this.vals.fromPicker = false;
this.vals.toPicker = false;
let priAxisDef = false;
let secAxisDef = false;
if(this.item) {
this.$fhem.loading = true;
Expand All @@ -239,6 +233,8 @@
.then((res) => {
if(res.defs.length > 0) {
let idx = 0;
let priSeriesName = '';
let secSeriesName = '';
this.chart.options.yaxis.splice(0);
this.chart.series.splice(0);
Expand All @@ -249,29 +245,30 @@
let values = [];
let logData = res.data[res.data.map((e) => e.id).indexOf(idx)].data;
let secAxis = parts[4] === 'secondary' ? true : false;
if((!priAxisDef && !secAxis) || (!secAxisDef && secAxis)) {
if(!secAxis) priAxisDef = true;
if(secAxis) secAxisDef = true;
let yOptions = {
seriesName: parts[2] || '',
opposite: secAxis,
labels: {
formatter: (val) => {
let result = ''
if(val) result = val.toFixed(1) + parts[3]
return result
}
for(const vals of logData) values.push([vals.timestamp, vals.value]);
this.chart.series.push({ name: parts[2], data: values });
let secAxis = parts[4] === 'secondary' ? true : false;
let show = false;
if(!priSeriesName && !secAxis) { priSeriesName = parts[2]; show = true; }
if(!secSeriesName && secAxis) { secSeriesName = parts[2]; show = true; }
let yOptions = {
seriesName: secAxis ? secSeriesName : priSeriesName,
show: show,
opposite: secAxis,
labels: {
formatter: (val) => {
let result = ''
if(val) result = val.toFixed(1) + parts[3]
return result
}
}
this.chart.options.yaxis.push(yOptions);
}
for(const vals of logData) values.push([vals.timestamp, vals.value]);
this.chart.series.push({ name: parts[2], data: values });
this.chart.options.yaxis.push(yOptions);
idx ++;
}
Expand Down
5 changes: 3 additions & 2 deletions src/plugins/fhem.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default class Fhem extends EventEmitter {
connection: {
location: window.location.protocol + '//' + window.location.hostname,
port: window.location.port,
path: 'fhem'
path: 'fhem' //root path
},
socket: null,
session: {
Expand Down Expand Up @@ -51,7 +51,8 @@ export default class Fhem extends EventEmitter {
set loading(val) {
if(val) this.app.options.loadCount ++;
if(!val && this.app.options.loadCount > 0) this.app.options.loadCount --;
this.app.options.loading = this.app.options.loadCount > 0 ? true : false;
if(this.app.options.loadCount > 0 && !this.app.options.loading) this.app.options.loading = true;
if(this.app.options.loadCount === 0) this.app.options.loading = false;
}

set log(data) {
Expand Down
2 changes: 1 addition & 1 deletion www/fhemapp/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE html><html lang="de"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><link rel="icon" href="favicon.png"><link rel="apple-touch-icon" href="apple-touch-icon.png"><title>fhemapp</title><link href="css/chunk-03454508.55c011d2.css" rel="prefetch"><link href="css/chunk-07709945.d4481170.css" rel="prefetch"><link href="css/chunk-085bcd30.01cf6fd8.css" rel="prefetch"><link href="css/chunk-15fa718e.55c011d2.css" rel="prefetch"><link href="css/chunk-17d492e6.1bbdaac2.css" rel="prefetch"><link href="css/chunk-28a3f15f.fc346ba4.css" rel="prefetch"><link href="css/chunk-2c05d556.cb4d0868.css" rel="prefetch"><link href="css/chunk-4a62a958.b490d9b1.css" rel="prefetch"><link href="css/chunk-53c4ff2a.9398bfa8.css" rel="prefetch"><link href="css/chunk-72c6e8d8.8d89ed40.css" rel="prefetch"><link href="css/chunk-b2de1140.1bbdaac2.css" rel="prefetch"><link href="css/chunk-d4e16e04.6714eec0.css" rel="prefetch"><link href="css/chunk-dc5178fa.cb4d0868.css" rel="prefetch"><link href="css/chunk-dd03e16c.cb4d0868.css" rel="prefetch"><link href="js/chunk-03454508.a1a8b579.js" rel="prefetch"><link href="js/chunk-07709945.34fde9c6.js" rel="prefetch"><link href="js/chunk-085bcd30.d653075c.js" rel="prefetch"><link href="js/chunk-15fa718e.272996b6.js" rel="prefetch"><link href="js/chunk-17d492e6.c62e0abf.js" rel="prefetch"><link href="js/chunk-28a3f15f.fd07f95d.js" rel="prefetch"><link href="js/chunk-2c05d556.9540c0ef.js" rel="prefetch"><link href="js/chunk-2d0aa92c.79fe9aaf.js" rel="prefetch"><link href="js/chunk-2d212bf1.e1a64938.js" rel="prefetch"><link href="js/chunk-4a62a958.b5b68579.js" rel="prefetch"><link href="js/chunk-53c4ff2a.b45e78db.js" rel="prefetch"><link href="js/chunk-72c6e8d8.c00175b8.js" rel="prefetch"><link href="js/chunk-b2de1140.bb22d6b3.js" rel="prefetch"><link href="js/chunk-d4e16e04.06abbdcc.js" rel="prefetch"><link href="js/chunk-dc5178fa.753a1989.js" rel="prefetch"><link href="js/chunk-dd03e16c.69c4474b.js" rel="prefetch"><link href="css/chunk-vendors.95431e8e.css" rel="preload" as="style"><link href="js/app.fd64212c.js" rel="preload" as="script"><link href="js/chunk-vendors.71a02cd0.js" rel="preload" as="script"><link href="css/chunk-vendors.95431e8e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but fhemapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.71a02cd0.js"></script><script src="js/app.fd64212c.js"></script></body></html>
<!DOCTYPE html><html lang="de"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta name="mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-capable" content="yes"><link rel="icon" href="favicon.png"><link rel="apple-touch-icon" href="apple-touch-icon.png"><title>fhemapp</title><link href="css/chunk-03454508.55c011d2.css" rel="prefetch"><link href="css/chunk-07709945.d4481170.css" rel="prefetch"><link href="css/chunk-085bcd30.01cf6fd8.css" rel="prefetch"><link href="css/chunk-15fa718e.55c011d2.css" rel="prefetch"><link href="css/chunk-17d492e6.1bbdaac2.css" rel="prefetch"><link href="css/chunk-28a3f15f.fc346ba4.css" rel="prefetch"><link href="css/chunk-2c05d556.cb4d0868.css" rel="prefetch"><link href="css/chunk-4a62a958.b490d9b1.css" rel="prefetch"><link href="css/chunk-53c4ff2a.9398bfa8.css" rel="prefetch"><link href="css/chunk-72c6e8d8.8d89ed40.css" rel="prefetch"><link href="css/chunk-b2de1140.1bbdaac2.css" rel="prefetch"><link href="css/chunk-d4e16e04.6714eec0.css" rel="prefetch"><link href="css/chunk-dc5178fa.cb4d0868.css" rel="prefetch"><link href="css/chunk-dd03e16c.cb4d0868.css" rel="prefetch"><link href="js/chunk-03454508.a1a8b579.js" rel="prefetch"><link href="js/chunk-07709945.34fde9c6.js" rel="prefetch"><link href="js/chunk-085bcd30.d653075c.js" rel="prefetch"><link href="js/chunk-15fa718e.272996b6.js" rel="prefetch"><link href="js/chunk-17d492e6.c62e0abf.js" rel="prefetch"><link href="js/chunk-28a3f15f.fd07f95d.js" rel="prefetch"><link href="js/chunk-2c05d556.9540c0ef.js" rel="prefetch"><link href="js/chunk-2d0aa92c.79fe9aaf.js" rel="prefetch"><link href="js/chunk-2d212bf1.e1a64938.js" rel="prefetch"><link href="js/chunk-4a62a958.b5b68579.js" rel="prefetch"><link href="js/chunk-53c4ff2a.159c7677.js" rel="prefetch"><link href="js/chunk-72c6e8d8.c00175b8.js" rel="prefetch"><link href="js/chunk-b2de1140.bb22d6b3.js" rel="prefetch"><link href="js/chunk-d4e16e04.06abbdcc.js" rel="prefetch"><link href="js/chunk-dc5178fa.753a1989.js" rel="prefetch"><link href="js/chunk-dd03e16c.69c4474b.js" rel="prefetch"><link href="css/chunk-vendors.95431e8e.css" rel="preload" as="style"><link href="js/app.c1c3dcda.js" rel="preload" as="script"><link href="js/chunk-vendors.71a02cd0.js" rel="preload" as="script"><link href="css/chunk-vendors.95431e8e.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but fhemapp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.71a02cd0.js"></script><script src="js/app.c1c3dcda.js"></script></body></html>
1 change: 1 addition & 0 deletions www/fhemapp/js/app.c1c3dcda.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion www/fhemapp/js/app.fd64212c.js

This file was deleted.

1 change: 1 addition & 0 deletions www/fhemapp/js/chunk-53c4ff2a.159c7677.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion www/fhemapp/js/chunk-53c4ff2a.b45e78db.js

This file was deleted.

0 comments on commit aae6be0

Please sign in to comment.