Skip to content

Commit

Permalink
fix für Timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
hmt committed Jun 5, 2022
1 parent d7f160a commit c3d575b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@rollup/plugin-node-resolve": "^13.3.0",
"@rollup/plugin-typescript": "^8.1.1",
"@tsconfig/svelte": "^3.0.0",
"@types/node": "^17.0.40",
"bulma": "^0.9.2",
"fast-xml-parser": "^4.0.8",
"rollup": "^2.3.4",
Expand Down
8 changes: 5 additions & 3 deletions src/server.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import parser from "fast-xml-parser";
import { XMLParser } from "fast-xml-parser";
import sha1 from "jssha/dist/sha1"
import type { meeting } from './types'
import type {ApexOptions} from 'apexcharts'
Expand All @@ -11,7 +11,7 @@ export class Server {

url: string
status: string
interval_id: number
interval_id: Timer,
meetings: meeting[]
audio: number
video: number
Expand Down Expand Up @@ -64,6 +64,7 @@ export class Server {
curve: "straight",
},
xaxis: {
labels: {datetimeUTC: false},
type: "datetime",
},
}
Expand Down Expand Up @@ -113,6 +114,7 @@ export class Server {
this.notify_subs()
}
handle_data (xml) {
const parser = new XMLParser();
const json = parser.parse(xml);
if (json.response.returncode === "SUCCESS") {
this.status = "success"
Expand All @@ -124,7 +126,7 @@ export class Server {
this.max_t = Math.max(this.max_t, this.teilnehmer)
this.max_a = Math.max(this.max_a, this.audio)
this.max_v = Math.max(this.max_v, this.video)
const t = Date.now()
const t = Date.now();
this.m.push([t, this.meetings.length])
this.t.push([t, this.teilnehmer])
this.a.push([t, this.audio])
Expand Down
2 changes: 1 addition & 1 deletion src/store.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Writable, writable } from "svelte/store";
import { type Writable, writable } from "svelte/store";
import { Server } from './server'

let list: Server[]
Expand Down
8 changes: 6 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
"include": ["src/**/*"],
"exclude": ["node_modules/*", "__sapper__/*", "public/*"],
"compilerOptions": {
"target": "es6",
"lib": [ "es2019", "dom" ]
"target": "esnext",
"module": "esnext",
"lib": [ "es2019", "dom" ],
"types": [
"node"
]
}
}

0 comments on commit c3d575b

Please sign in to comment.