openflexure-microscope-server/webapp
Julian Stirling 830929a693 Split up the action button methods for monitoring and starting a task
Previously the start task method of action button handled awaiting
polling and resetting variables when the task completes. If an ongoing
task was found polling was started so that logs could be communicated
but no clean up happened when the task finished. This has been split
up and the checks for ongoing tasks improved so they also clean up
after ongoing tasks finish.

Closes #442
2025-10-30 10:28:12 +00:00
..
public Remove ImJoy as it is not maintained 2025-07-06 18:57:40 +01:00
src Split up the action button methods for monitoring and starting a task 2025-10-30 10:28:12 +00:00
.env.development Remove ImJoy as it is not maintained 2025-07-06 18:57:40 +01:00
.env.production Remove ImJoy as it is not maintained 2025-07-06 18:57:40 +01:00
.eslintrc.js Run lint:fix and accept a huge formatting change 2025-10-28 15:44:17 +00:00
.gitignore Rename js directory to webapp 2021-09-16 15:13:19 +01:00
.prettierrc.json Add prettier config, stop npm lint formatting, warn if formatting bad 2025-10-28 15:44:17 +00:00
babel.config.js Run lint:fix and accept a huge formatting change 2025-10-28 15:44:17 +00:00
CONTRIBUTING.md Rename js directory to webapp 2021-09-16 15:13:19 +01:00
LICENSE Rename js directory to webapp 2021-09-16 15:13:19 +01:00
package-lock.json Bump version for alpha3 and update changelog 2025-10-09 19:55:42 +01:00
package.json Add prettier config, stop npm lint formatting, warn if formatting bad 2025-10-28 15:44:17 +00:00
README.md Resolve "Make Walkthroughs for Software Installation" 2025-09-25 11:03:53 +00:00
vue.config.js Run lint:fix and accept a huge formatting change 2025-10-28 15:44:17 +00:00

OpenFlexure Microscope JS Client

Key info

  • Vue.js web application providing a graphical interface for the OFM

  • Once built, will be served by the API server from the host root on port 5000

  • See openflexure-microscope-server/README.md for details on local installation and building

Developer guidelines

Creating releases

Installing

Note: If you are using a Windows OS, the following commands must be executed in a Powershell terminal.

  • Install Node.js (and npm)
  • Install dependencies with npm install
  • Node v18 changes SSL, and so you need a legacy version for compatibility:
    • On Windows: $env:NODE_OPTIONS = "--openssl-legacy-provider"
    • On Linux/MacOS export NODE_OPTIONS=--openssl-legacy-provider
  • Navigate into the webapp directory with cd webapp
  • Build the static web app with npm run build

Developing

When developing it is useful to use the development server so Vue changes happen instantly without the need to rebuild. To start the development server run:

npm run serve

The development server is accessed on a different port from the microscope API. The port to access the development server is printed on the command line when you run the above command.

When the development webapp starts it cannot locate the microscope API as this is served by the microscope on port 5000. Instead it will present you with a page giving you the option to "override API origin". If you are running a development server on your computer, you should enter http://localhost:5000/.

VS Code and ESLint

To prevent the editor from interfering with ESLint, add to your project settings.json:

{
    "editor.tabSize": 2,
    "cSpell.enabled": false,
    "eslint.validate": ["vue","javascript", "javascriptreact"],
    "editor.formatOnSave": false,
    "vetur.validation.template": false,
    "editor.codeActionsOnSave": {
        "source.fixAll.eslint": true
    }
}