Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web build of blackbox explorer #697

Merged
merged 18 commits into from
Mar 26, 2024

Conversation

chmelevskij
Copy link
Member

@chmelevskij chmelevskij commented Jan 28, 2024

This is attempt to port blackbox explorer to web with final goal it becoming offline PWA.

To try it out in the browser

yarn start

It will create dev server on http://loclahost:5173:

Live

https://blackbox-viewer.netlify.app/

Copy link

sonarcloud bot commented Jan 28, 2024

Quality Gate Failed Quality Gate failed

Failed conditions

B Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

idea Catch issues before they fail your Quality Gate with our IDE extension SonarLint SonarLint

This comment has been minimized.

@nerdCopter
Copy link
Member

nerdCopter commented Jan 29, 2024

WOW, it mostly works.

issue:
image
sometimes the zoom icon disappears as well.

issue, but BBE continues to work:
image

Linux, Debian 12, Firefox 115.7.0 ESR:

  • video open .mp4 works/plays!
  • video export issue:
    image

import/export workspace worked.

export .csv worked.

@chmelevskij
Copy link
Member Author

@nerdCopter I'm even surprised that much worked 😆

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within a week.

@chmelevskij
Copy link
Member Author

@nerdCopter where is the zoom icon usually located? I don't think I have it on the usual build 🤔
Screenshot 2024-03-03 at 15 42 59

This comment has been minimized.

@haslinghuis
Copy link
Member

After doing graph setup - click on motors for example - then this pops up:

image

click in the upper right corner to get the zoom sliders

image

This comment has been minimized.

@nerdCopter
Copy link
Member

6f797448
scale sliders working as expected:
image

image

@mituritsyn
Copy link
Contributor

mituritsyn commented Mar 5, 2024

everything works except the button to open a new window, logically it should be hidden, or should open a new tab with explorer.
Checked:
-log upload
-workspace load
-all analyse plots for gyro data
-log header view
-file drag n drop

@nerdCopter
Copy link
Member

nerdCopter commented Mar 5, 2024

in Chrome, even video export works. save-file comes after the export process.
(export fails in Firefox as expected)

@mituritsyn
Copy link
Contributor

mituritsyn commented Mar 5, 2024

oups have an error

graph_map.js:263 Uncaught TypeError: Cannot read properties of undefined (reading 'mapTrailAltitudeColored')
    at MapGrapher.redrawFlightTrail (graph_map.js:263:39)
    at MapGrapher.redrawAll (graph_map.js:252:10)
    at MapGrapher.setCurrentTime (graph_map.js:414:10)
    at animationLoop (main.js:307:24)

in linux terminal:

$ yarn dev
yarn run v1.22.21
$ vite

  VITE v5.0.12  ready in 399 ms

  ➜  Local:   http://localhost:5173/
  ➜  Network: use --host to expose
  ➜  press h + enter to show help
Error: The following dependencies are imported but could not be resolved:

  nw.gui (imported by /media/qw/45F882895DB21671/Git/blackbox-log-viewer/js/main.js)

Are they installed?
    at file:///media/qw/45F882895DB21671/Git/blackbox-log-viewer/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:65506:23
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///media/qw/45F882895DB21671/Git/blackbox-log-viewer/node_modules/vite/dist/node/chunks/dep-9A4-l-43.js:64906:38
^C

and after this can't open any log

After restart can't reproduce with same file

@chmelevskij
Copy link
Member Author

@mituritsyn thanks for looking into it.
Do you know the exact steps to reproduce

graph_map.js:263 Uncaught TypeError: Cannot read properties of undefined (reading 'mapTrailAltitudeColored')
    at MapGrapher.redrawFlightTrail (graph_map.js:263:39)
    at MapGrapher.redrawAll (graph_map.js:252:10)
    at MapGrapher.setCurrentTime (graph_map.js:414:10)
    at animationLoop (main.js:307:24)

?

@nerdCopter
Copy link
Member

We would need a 4.5 with GPS positioning log for testing. (i do not have any)

@mituritsyn
Copy link
Contributor

@mituritsyn thanks for looking into it. Do you know the exact steps to reproduce

Sorry, can't reproduce anymore. I loaded a log, check some functions, then upload another log and got this error. Initially I thought it is related to log, but I can't reproduce this issue with those files anymore

first btfl_001 (7).txt

second LOG00034.txt

@mituritsyn
Copy link
Contributor

We would need a 4.5 with GPS positioning log for testing. (i do not have any)

check second log from comment above

@nerdCopter
Copy link
Member

6f797448 with LOG00034.txt: same error. multiple executions.
image

works fine on NWjs app.

@chmelevskij
Copy link
Member Author

@nerdCopter @mituritsyn the map issue should be fixed now.

@haslinghuis
Copy link
Member

haslinghuis commented Mar 10, 2024

Might be a problem with master - with graph_spectrum - have not checked yet.

EDIT: confirm - this is an issue with master - not this PR

image

@haslinghuis
Copy link
Member

Great work @chmelevskij - working now

@chmelevskij
Copy link
Member Author

@haslinghuis fixed on here.

It seems to be a common problem due to how config/settings are handled. essentially race conditions everywhere and sometimes it's hard to spot if you already changed settings.

@haslinghuis
Copy link
Member

Yes - lot of spaghetti and global vars in this code base. Reworked configurator lexical scoping - but did not find the time yet here.

@demvlad
Copy link
Contributor

demvlad commented Mar 23, 2024

@demvlad can you please upload accompanying log file?

I apologize, but i can not repeate this error. All work fine today!

@mituritsyn
Copy link
Contributor

is there a way to save workspace? now I have to reload workspace each time I update the page

@haslinghuis
Copy link
Member

@chmelevskij let's do it. Please rebase so we can merge it.

Copy link

netlify bot commented Mar 26, 2024

Deploy Preview for origin-blackbox-logviewer ready!

Name Link
🔨 Latest commit 7870c10
🔍 Latest deploy log https://app.netlify.com/sites/origin-blackbox-logviewer/deploys/660313c4234afc0008d48270
😎 Deploy Preview https://deploy-preview-697--origin-blackbox-logviewer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

sonarcloud bot commented Mar 26, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
16 Security Hotspots
5.3% Duplication on New Code (required ≤ 3%)
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@chmelevskij chmelevskij merged commit 21cdfca into betaflight:master Mar 26, 2024
5 of 6 checks passed
demvlad pushed a commit to demvlad/blackbox-log-viewer that referenced this pull request Mar 27, 2024
* use vite to build webapp version
* use all the files as esm modules
* remove old nwjs related workflows and nwjs
demvlad pushed a commit to demvlad/blackbox-log-viewer that referenced this pull request Mar 27, 2024
* use vite to build webapp version
* use all the files as esm modules
* remove old nwjs related workflows and nwjs
demvlad pushed a commit to demvlad/blackbox-log-viewer that referenced this pull request Mar 27, 2024
* use vite to build webapp version
* use all the files as esm modules
* remove old nwjs related workflows and nwjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants