Richard Bowman
3059683186
Enable logging
...
`logging.basicConfig` doesn't work when run via `uvicorn`.
I now explicitly get the root logger and set its level to INFO,
which means we now see logs on the terminal.
2023-12-13 00:51:41 +00:00
Richard Bowman
94e1619056
Use safer metadata dependency
...
Retrieving metadata pre-action risks stale metadata being
returned if DirectThingClients are used. I've switched to
the safer callable dependency, which is guaranteed to be fresh.
2023-12-12 23:40:12 +00:00
Richard Bowman
d9711522d5
Detect static directories
...
Simplified code and removed hard-coded list of static dirs.
2023-12-12 22:55:50 +00:00
Richard Bowman
753514c24b
Added v2 API routes and hard-coded static files to support Connect
...
Connect looks for /routes and /api/v2/streams/snapshot
These are now present and working.
I've also hard coded the static files directory - fixing this
properly is a work in progress.
2023-12-11 23:59:11 +00:00
Richard Bowman
7c662b2787
Added capture buttons to navigate pane
2023-12-11 22:23:32 +00:00
Richard Bowman
60f854b7db
Return None if calibration matrix is missing
...
Previously, we raised an exception (and thus HTTP error
code) if the CSM matrix was requested and not yet set.
Now, we just return None, and I've added a (not-network-exposed)
function that will raise an HTTPException if it's missing.
2023-12-01 21:29:14 +00:00
Richard Bowman
e3265b1dff
await readThingProperty correctly
2023-12-01 21:27:38 +00:00
Richard Bowman
9817b4963a
Handle missing Thing better in thingFormUrl
...
We now give a helpful error message if the Thing is not found,
rather than returning null. There's an argument to return
`undefined` instead of raising an error, returning undefined
is the default behaviour.
2023-12-01 21:14:24 +00:00
Richard Bowman
146fccfa80
comment out problematic fetch
2023-12-01 02:43:31 +00:00
Richard Bowman
0cd8ecd2d5
Add error checking to mixin thing functions
...
Now we'll get an error if undefined URLs are about to be fetched.
The error will contain thing and affordance, for debugging.
2023-12-01 02:43:17 +00:00
Richard Bowman
ee641f5cd2
Comment out 2 problematic tabs
2023-12-01 02:31:59 +00:00
Richard Bowman
f87594e7af
Hide error from CSM if it's uncalibrated
...
The error still appears in the console - should be fixed
eventually.
2023-12-01 02:31:49 +00:00
Richard Bowman
a31c0aa835
Error handling for CSM calibration check
2023-12-01 02:24:14 +00:00
Richard Bowman
5d87a7582e
Format fixes
2023-12-01 02:23:58 +00:00
Richard Bowman
59e0cf5905
Fix action URLs
2023-12-01 02:22:49 +00:00
Richard Bowman
a6e8c7ab93
Return HTTP error properly if CSM is uncalibrated
2023-12-01 02:18:28 +00:00
Richard Bowman
65c881fea1
Make calibrateXYUri a computed property
...
This makes it properly reactive again.
2023-12-01 01:46:11 +00:00
Richard Bowman
f97dcb6abc
More tidying up to use new thing property functions
2023-12-01 01:45:45 +00:00
Richard Bowman
89cf58e8c7
Prepend thing description base URL
2023-12-01 01:45:22 +00:00
Richard Bowman
623cb5e8cb
Use central read/write property, fix length issue
...
.length was failing if value was undefined - now worked around.
2023-12-01 01:44:22 +00:00
Richard Bowman
ccf9b38c34
Use thingAvailable via computed prop
...
Computed properties are needed to make things reactive.
2023-12-01 01:28:08 +00:00
Richard Bowman
55305a67f4
Remove old print statement
2023-12-01 00:58:29 +00:00
Richard Bowman
471a89cc72
Update paneCapture with new-style thing access
2023-12-01 00:56:13 +00:00
Richard Bowman
ca6988ca99
Update statusPane with new-style thing access
2023-12-01 00:55:56 +00:00
Richard Bowman
9c3c2bb043
Update CSMSettings to use new-style access
...
Also deleted a lot of old code (which wasn't running)
2023-12-01 00:55:25 +00:00
Richard Bowman
ba76561065
Update calibration modal to use cached TDs and new URLs
2023-12-01 00:54:54 +00:00
Richard Bowman
c2ec060df9
Switch to using TDs in the store
2023-11-30 23:22:10 +00:00
Richard Bowman
8865d88e20
Remove unnecessary components
2023-11-30 23:22:00 +00:00
Richard Bowman
54df1faeeb
Linter fixes
2023-11-30 23:21:45 +00:00
Richard Bowman
f1f6ed5f80
Provide centralised readproperty, writeproperty, and action URLs
2023-11-30 22:51:10 +00:00
Richard Bowman
6c48444126
Removed vestigial code from CSMSettings
2023-11-30 09:14:04 +00:00
Richard Bowman
b47ac8b828
Remove unused URL computed props
2023-11-30 00:20:26 +00:00
Richard Bowman
8de79ad7e8
Delete unused print statements
2023-11-30 00:20:10 +00:00
Richard Bowman
24bfb4c253
Remove vestigial stage settings
2023-11-30 00:02:53 +00:00
Richard Bowman
488493385f
Combine the various property controls into one component
...
propertyControl now handles several different property types,
based on the thing description. This reduces duplication and
should keep the code cleaner.
In the future this will become a part of a labthings-vue package,
I hope!
2023-11-29 23:54:00 +00:00
Richard Bowman
e5e5be7369
Added settings manager to store arbitrary metadata
2023-11-29 23:38:28 +00:00
Richard Bowman
b6ed55caba
Fixed module docstring
2023-11-29 23:38:12 +00:00
Richard Bowman
b9605fa2a0
Added module docstring
2023-11-29 23:37:54 +00:00
Richard Bowman
595101248e
Removed node-wot but kept centralised TD store
...
I had intended to store a ConsumedThing for each Thing, in
a module in the store. Until that is possible (will require some
more attention to dependency management) I will just store
the TDs instead.
This commit includes a lot of the code I wrote for node-wot use,
but without any dependence on node-wot.
2023-11-29 22:43:55 +00:00
Richard Bowman
20a7fd52b1
Reinstate move_and_measure
2023-11-28 23:47:53 +00:00
Richard Bowman
291bbde9cf
Don't raise an exception if thing_state called before calibration
...
It's helpful to raise an exception if we access the calibration
before it's been set - but thing state should not raise exceptions,
just return an empty dict if the data is not there yet.
2023-11-28 21:06:42 +00:00
Richard Bowman
45d2884159
Merge remote-tracking branch 'origin/v3' into v3-webapp
2023-11-15 22:00:37 +00:00
Richard Bowman
1d24701dfd
Fix shutdown/restart buttons
2023-11-02 21:33:42 +00:00
Richard Bowman
27c74bff6e
Add shutdown/restart actions
2023-11-02 21:18:59 +00:00
Richard Bowman
65f467af64
Fix "About" page
2023-11-02 21:17:31 +00:00
Richard Bowman
4e7fa44a73
Remove microscope settings
...
microscope name should be defined in config, by a
separate program/service
2023-11-02 20:34:42 +00:00
Richard Bowman
27b1f42935
Updated camera stage mapping settings
2023-11-02 20:32:15 +00:00
Richard Bowman
c5c02eb029
Linted
2023-11-02 20:30:54 +00:00
Richard Bowman
7bbc105fc6
Expose last calibration and thing_state
2023-11-02 20:29:22 +00:00
Richard Bowman
79752a2a4c
Camera settings for labthings-picamera2
...
I've updated URLs and tidied things a bit, so that we can
now adjust the key camera settings with the new camera
drivers.
2023-11-02 16:54:22 +00:00