Commit c817894
authored
Added imagery JSON URL field under External Apps section in workspaces settings page (#9)
This pull request enhances the workspace settings page by adding support
for uploading, validating, and saving external application
configurations, specifically for "Imagery JSON Definition" and "Long
Form Quest JSON Definition". It introduces JSON schema validation for
the imagery configuration, improves the user interface with
drag-and-drop file support, and updates documentation and dependencies
accordingly.
**External app configuration enhancements:**
* Added two new configuration fields to the workspace settings page:
"AVIV ScoutRoute Long Form Quest JSON Definition" and "Imagery JSON
Definition", both supporting direct JSON input or drag-and-drop file
upload. Helpful links to schema and example files are provided for both.
([pages/workspace/[id]/settings.vueL33-R77](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L33-R77))
* Implemented drag-and-drop handlers for both configuration fields, with
visual feedback and error handling for invalid files.
([pages/workspace/[id]/settings.vueL33-R77](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L33-R77),
[pages/workspace/[id]/settings.vueL94-R136](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L94-R136),
[pages/workspace/[id]/settings.vueL124-R247](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L124-R247),
[pages/workspace/[id]/settings.vueR261-R268](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1R261-R268))
**Validation and saving logic:**
* Integrated `ajv` and `ajv-formats` libraries to validate the "Imagery
JSON Definition" against a remote JSON schema before saving. User
receives clear feedback if the JSON is invalid or does not match the
schema.
([package.jsonR15-R16](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R15-R16),
[pages/workspace/[id]/settings.vueR117-R118](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1R117-R118),
[pages/workspace/[id]/settings.vueL124-R247](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L124-R247))
* Updated the save logic to persist both the imagery and quest
definitions together, with improved error handling and success messages.
([pages/workspace/[id]/settings.vueL124-R247](diffhunk://#diff-df660f7ed890a7937381f40d9ea64aafa7852e4f8a13ebd03f31b4a360dbe5a1L124-R247))
**Documentation and environment variables:**
* Added new environment variables in `README.md` for the imagery and
quest schema/example URLs, ensuring the frontend can dynamically link to
the correct resources.
**Dependency updates:**
* Added `ajv` and `ajv-formats` as new dependencies in `package.json`
for JSON schema validation.
Ticket: https://dev.azure.com/TDEI-UW/TDEI/_workitems/edit/2326
<img width="1624" height="977" alt="2326"
src="https://github.com/user-attachments/assets/c1cbd491-3d3c-4b81-81e2-183ff7eb1fa4"
/>File tree
4 files changed
+299
-61
lines changed- pages/workspace/[id]
- services
4 files changed
+299
-61
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
22 | 26 | | |
23 | 27 | | |
24 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
0 commit comments