Skip to content

Commit

Permalink
Use getPacket utility method
Browse files Browse the repository at this point in the history
  • Loading branch information
Kayo Kallas authored and Futabay committed May 19, 2020
1 parent c2007a1 commit 610d47a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ait/gui/static/js/ait/gui/Plot.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import m from 'mithril'
import Dygraph from 'dygraphs';
import { getPacket } from '../util.js'

/*
* FIXME: The two Backend classes (Dygraphs and Highcharts) are not cleanly
Expand Down Expand Up @@ -80,7 +81,7 @@ class DygraphsBackend

plot (data, dntoeu) {
const pname = data['packet']
let packet = dntoeu ? data['data']['dntoeu']:data['data']['raw']
let packet = getPacket(data['data'], dntoeu)
const names = this._plot._packets[pname]

if (!names) return
Expand Down Expand Up @@ -209,7 +210,7 @@ class HighchartsBackend

plot(data, dntoeu) {
const pname = data['packet']
let packet = dntoeu ? data['data']['dntoeu']:data['data']['raw']
let packet = getPacket(data['data'], dntoeu)
const names = this._plot._packets[pname]
if (!names) return

Expand Down

0 comments on commit 610d47a

Please sign in to comment.