-
Notifications
You must be signed in to change notification settings - Fork 2
feat(save_and_load): add import/export methods #249
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
Conversation
…persistence create project manager plugin for import/export operations update tests for new functionality and async loading
…ns/OpenGeodeWeb-Front into feat/save_and_load
…b-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JulienChampagnol que penses tu de cette proposition ?
composables/project_manager.js
Outdated
| params: {}, | ||
| }) | ||
| }) | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
| .then(function () { | ||
| return viewerStore.ws_connect() | ||
| }) | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
|
|
||
| return infraStore | ||
| .create_connection() | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
| const dataStyleStore = useDataStyleStore() | ||
| return dataStyleStore.importStores(snapshot.dataStyle) | ||
| }) | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
| .then(function () { | ||
| return hybridViewerStore.importStores(snapshot.hybridViewer) | ||
| }) | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
| treeviewStore.isImporting = true | ||
|
|
||
| return Promise.resolve() | ||
| .then(function () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
|
|
||
| treeviewStore.isImporting = true | ||
|
|
||
| return Promise.resolve() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Prefer await to then()/catch()/finally()
composables/project_manager.js
Outdated
| defaultName | ||
| const name = serverName.endsWith(".zip") | ||
| ? serverName.replace(/\.zip$/i, ".vease") | ||
| : serverName.endsWith(".vease") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Unexpected nested ternary expression without parentheses.
| } | ||
| } | ||
|
|
||
| const exportStores = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Unexpected block statement surrounding arrow body; move the returned value immediately after the =>.
| const promises = [] | ||
| for (const id of ids) { | ||
| const meta = dataBaseStore.itemMetaDatas(id) | ||
| const objectType = meta?.object_type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Optional chaining is not allowed.
| panelWidth.value = width | ||
| } | ||
|
|
||
| function exportStores() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Expected a function expression.
| } | ||
| } | ||
|
|
||
| async function importStores(snapshot) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Expected a function expression.
| [] | ||
| } | ||
|
|
||
| function finalizeImportSelection() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Expected a function expression.
| model_id: model_id.value, | ||
| isTreeCollection: isTreeCollection.value, | ||
| selectedTree: selectedTree.value, | ||
| selectionIds: selection.value.map((c) => c.id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Identifier name is too short (< 2).
|
|
||
| pendingSelectionIds.value = | ||
| snapshot?.selectionIds || | ||
| (snapshot?.selection || []).map((c) => c.id) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Identifier name is too short (< 2).
| panelWidth.value = snapshot?.panelWidth || 300 | ||
| model_id.value = snapshot?.model_id || "" | ||
| isTreeCollection.value = snapshot?.isTreeCollection || false | ||
| selectedTree.value = snapshot?.selectedTree || null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Optional chaining is not allowed.
| selectedTree.value = snapshot?.selectedTree || null | ||
|
|
||
| pendingSelectionIds.value = | ||
| snapshot?.selectionIds || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Optional chaining is not allowed.
|
|
||
| pendingSelectionIds.value = | ||
| snapshot?.selectionIds || | ||
| (snapshot?.selection || []).map((c) => c.id) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Optional chaining is not allowed.
| function finalizeImportSelection() { | ||
| const ids = pendingSelectionIds.value || [] | ||
| const rebuilt = [] | ||
| if (!ids.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Use .length === 0 when checking length is zero.
| panelWidth.value = snapshot?.panelWidth || 300 | ||
| model_id.value = snapshot?.model_id || "" | ||
| isTreeCollection.value = snapshot?.isTreeCollection || false | ||
| selectedTree.value = snapshot?.selectedTree || null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reported by reviewdog 🐶
Do not use null literals
…ns/OpenGeodeWeb-Front into feat/save_and_load
…b-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
…ns/OpenGeodeWeb-Front into feat/save_and_load
|
🎉 This PR is included in version 9.14.0-rc.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 9.14.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
…persistence
create project manager plugin for import/export operations update tests for new functionality and async loading