From 935b55bc407bc5486d328a35450e80920b46a743 Mon Sep 17 00:00:00 2001 From: Arild Matsson Date: Fri, 5 Apr 2024 15:04:59 +0200 Subject: [PATCH 01/12] Restructure corpus overview, fix #115, fix #154 --- CHANGELOG.md | 10 ++ src/api/backend.composable.ts | 8 +- src/components/LayoutBox.vue | 3 +- src/corpus/CorpusOverview.vue | 28 +++-- src/corpus/analysis/AnalysisPanel.vue | 106 +++++++++++++++++ src/corpus/config/ConfigPanel.vue | 2 +- src/corpus/explore/ExplorePanel.vue | 81 +++++++++++++ src/corpus/{exports => explore}/ToolPanel.vue | 11 +- src/corpus/exports/ExportsPanel.vue | 110 ------------------ src/corpus/job/JobStatus.vue | 55 +++------ src/fontawesome.ts | 2 + src/i18n/locales/en.yaml | 11 +- src/i18n/locales/sv.yaml | 11 +- src/spin/PendingContent.vue | 14 ++- src/util.test.ts | 16 +++ src/util.ts | 3 + 16 files changed, 292 insertions(+), 179 deletions(-) create mode 100644 src/corpus/analysis/AnalysisPanel.vue create mode 100644 src/corpus/explore/ExplorePanel.vue rename src/corpus/{exports => explore}/ToolPanel.vue (80%) delete mode 100644 src/corpus/exports/ExportsPanel.vue diff --git a/CHANGELOG.md b/CHANGELOG.md index 4496a5f..c967fa8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,16 @@ As this project is a user-facing application, the places in the semantic version ## [Unreleased] +### Changed + +- Restructured panels on corpus overview to better match backend concepts: + - New _Analysis_ panel with the run button from _Status_ and the downloads from _Results_ + - Renamed _Result_ to _Explore_ [#115](https://github.com/spraakbanken/mink-frontend/issues/115) + +### Fixed + +- Clarify that data installed in tools is outdated after annotation re-run [#154](https://github.com/spraakbanken/mink-frontend/issues/154) + ## [1.5.0] (2024-04-23) ### Added diff --git a/src/api/backend.composable.ts b/src/api/backend.composable.ts index efe4ced..81ef89a 100644 --- a/src/api/backend.composable.ts +++ b/src/api/backend.composable.ts @@ -65,16 +65,16 @@ export default function useMinkBackend() { const resourceInfoAll = () => spin(api.resourceInfoAll(), "corpora"); const resourceInfoOne = (corpusId: string) => - spin(api.resourceInfoOne(corpusId), `corpus/${corpusId}/job`); + spin(api.resourceInfoOne(corpusId), `corpus/${corpusId}/info`); const runJob = (corpusId: string) => spin(api.runSparv(corpusId), `corpus/${corpusId}/job`); const installKorp = (corpusId: string) => - spin(api.installKorp(corpusId), `corpus/${corpusId}/job`); + spin(api.installKorp(corpusId), `corpus/${corpusId}/install/korp`); const installStrix = (corpusId: string) => - spin(api.installStrix(corpusId), `corpus/${corpusId}/job`); + spin(api.installStrix(corpusId), `corpus/${corpusId}/install/strix`); const abortJob = (corpusId: string) => spin(api.abortJob(corpusId), `corpus/${corpusId}/job`); @@ -83,7 +83,7 @@ export default function useMinkBackend() { spin(api.listExports(corpusId), `corpus/${corpusId}/exports`); const downloadExports = (corpusId: string) => - spin(api.downloadExports(corpusId), `corpus/${corpusId}/exports`); + spin(api.downloadExports(corpusId), `corpus/${corpusId}/exports/download`); const downloadExportFiles = (corpusId: string, filename: string) => spin( diff --git a/src/components/LayoutBox.vue b/src/components/LayoutBox.vue index b399cc4..f16e938 100644 --- a/src/components/LayoutBox.vue +++ b/src/components/LayoutBox.vue @@ -6,7 +6,7 @@ defineProps<{ diff --git a/src/corpus/CorpusOverview.vue b/src/corpus/CorpusOverview.vue index 3ca3c28..db01f00 100644 --- a/src/corpus/CorpusOverview.vue +++ b/src/corpus/CorpusOverview.vue @@ -4,7 +4,8 @@ import { useCorpusState } from "@/corpus/corpusState.composable"; import ConfigPanel from "@/corpus/config/ConfigPanel.vue"; import SourcesPanel from "@/corpus/sources/SourcesPanel.vue"; import JobStatus from "@/corpus/job/JobStatus.vue"; -import ExportsPanel from "@/corpus/exports/ExportsPanel.vue"; +import AnalysisPanel from "@/corpus/analysis/AnalysisPanel.vue"; +import ExplorePanel from "@/corpus/explore/ExplorePanel.vue"; import CorpusStateHelp from "@/corpus/CorpusStateHelp.vue"; import RouteButton from "@/components/RouteButton.vue"; import LayoutBox from "@/components/LayoutBox.vue"; @@ -14,13 +15,13 @@ const { isNeedingConfig, isNeedingMeta } = useCorpusState(corpusId); diff --git a/src/corpus/analysis/AnalysisPanel.vue b/src/corpus/analysis/AnalysisPanel.vue new file mode 100644 index 0000000..9dcee2b --- /dev/null +++ b/src/corpus/analysis/AnalysisPanel.vue @@ -0,0 +1,106 @@ + + + diff --git a/src/corpus/config/ConfigPanel.vue b/src/corpus/config/ConfigPanel.vue index 44ab056..d050c77 100644 --- a/src/corpus/config/ConfigPanel.vue +++ b/src/corpus/config/ConfigPanel.vue @@ -39,7 +39,7 @@ const { th } = useLocale(); -

{{ $t("settings") }}

+

{{ $t("analysis") }}

diff --git a/src/corpus/explore/ExplorePanel.vue b/src/corpus/explore/ExplorePanel.vue new file mode 100644 index 0000000..2fb0353 --- /dev/null +++ b/src/corpus/explore/ExplorePanel.vue @@ -0,0 +1,81 @@ + + + diff --git a/src/corpus/exports/ToolPanel.vue b/src/corpus/explore/ToolPanel.vue similarity index 80% rename from src/corpus/exports/ToolPanel.vue rename to src/corpus/explore/ToolPanel.vue index 112347b..8199ba0 100644 --- a/src/corpus/exports/ToolPanel.vue +++ b/src/corpus/explore/ToolPanel.vue @@ -1,9 +1,11 @@ diff --git a/src/corpus/exports/ExportsPanel.vue b/src/corpus/exports/ExportsPanel.vue deleted file mode 100644 index 4cb2e1d..0000000 --- a/src/corpus/exports/ExportsPanel.vue +++ /dev/null @@ -1,110 +0,0 @@ - - - diff --git a/src/corpus/job/JobStatus.vue b/src/corpus/job/JobStatus.vue index d2bbd8e..827fdbb 100644 --- a/src/corpus/job/JobStatus.vue +++ b/src/corpus/job/JobStatus.vue @@ -1,5 +1,5 @@