-
Notifications
You must be signed in to change notification settings - Fork 8
List project names #230
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
Open
niebl
wants to merge
17
commits into
fieldsoftheworld:main
Choose a base branch
from
niebl:project_list
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
List project names #230
Changes from 5 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
8aea612
wip display project names
niebl 9f1ce96
add simple list of processes
niebl 099c219
refactor into component
niebl 4251d34
add simple method to fetch and display result polygons
niebl 8211bc6
fit map to bbox
niebl 3ebf478
wip: refactor and try catch
niebl faaada9
wip: project loading indicator
niebl 0e09c03
Fixes & Lint
m-mohr b78013a
createHeaders
niebl e4099a9
Change layout
m-mohr 606ac6f
Fix watcher
m-mohr d2d6295
feat: add dialog for loading projects
niebl 0919e28
refactor: project selection dialog
niebl 77ebc0f
linting
niebl b16f28d
feat: check for incomplete processes
niebl 38ab208
Reverse entries, lint
m-mohr 384b59a
Minor improvements
m-mohr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| <template lang="html"> | ||
| <v-expansion-panel-text> | ||
| <v-list density="compact" color="transparent" class="pa-0"> | ||
| <v-list-item | ||
| v-for="project in projects" | ||
| class="group" | ||
| :key="project" | ||
| @click.stop="queryProcess(project)" | ||
| > | ||
| <v-label class="text-capitalize mb-1">{{ project }}</v-label> | ||
| </v-list-item> | ||
| </v-list> | ||
| </v-expansion-panel-text> | ||
| </template> | ||
|
|
||
| <script setup lang="ts"> | ||
| import { generateJWT } from '../functions/generate-jwt' | ||
| import useProcessing from '../composables/useProcessing' | ||
| import useMap from '../composables/useMap' | ||
|
|
||
| const { projects } = useProcessing() | ||
| const { displayGeoJSON, fitMapToBbox } = useMap() | ||
|
|
||
| const queryProcess = async (id) => { | ||
| const token = generateJWT() | ||
| const res = await fetch(`${import.meta.env.VITE_API_BASE_URL}projects/${id}`, { | ||
| headers: { | ||
| 'Content-Type': 'application/json', | ||
| Authorization: `Bearer ${token}`, | ||
| } | ||
| }).then( res => res.json() ) | ||
|
niebl marked this conversation as resolved.
Outdated
|
||
| const blob = await fetch(res.results.polygons) | ||
|
niebl marked this conversation as resolved.
Outdated
|
||
| const data = await blob.text() | ||
| const polygons = JSON.parse(data) | ||
|
niebl marked this conversation as resolved.
Outdated
|
||
| displayGeoJSON(polygons) | ||
| fitMapToBbox(res.parameters.inference.bbox) //TODO: add loading throbber | ||
| } | ||
|
|
||
| </script> | ||
|
|
||
| <style lang="css" scoped> | ||
|
|
||
| </style> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -282,5 +282,6 @@ export default function useProcessing() { | |
| isProcessing, | ||
| processBatch, | ||
| processSmallArea, | ||
| projects | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.