diff --git a/src/assets/app.scss b/src/assets/app.scss
index c237e41..9ffdf58 100644
--- a/src/assets/app.scss
+++ b/src/assets/app.scss
@@ -72,3 +72,13 @@ h3 {
.p-badge {
background: theme('colors.gray.300');
}
+
+.p-buttonset .p-button:first-of-type:not(:only-of-type) {
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.p-buttonset .p-button:last-of-type:not(:only-of-type) {
+ border-top-left-radius: 0;
+ border-bottom-left-radius: 0;
+}
diff --git a/src/components/Workflows.vue b/src/components/Workflows.vue
index 52fa17d..d14bb8e 100644
--- a/src/components/Workflows.vue
+++ b/src/components/Workflows.vue
@@ -5,20 +5,20 @@
import WorkflowsTable from "@/components/workflows/WorkflowsTable.vue"
import { useI18n } from "vue-i18n"
import { mapGtId, setEvalColors } from "@/helpers/utils"
- import { store } from "@/helpers/store"
import Filters from "@/components/workflows/filters/Filters.vue"
import SelectButton from "primevue/selectbutton"
import WorkflowsTimeline from "@/components/workflows/WorkflowsTimeline.vue"
import filtersStore from "@/store/filters-store"
+ import workflowsStore from "@/store/workflows-store"
const { t } = useI18n()
const data = ref([])
const filteredData = ref([])
- const defs = ref({})
const router = useRouter()
const route = useRoute()
+ const loading = ref(false)
const options = ref([
{ name: t('timeline'), value: 'timeline' },
@@ -37,54 +37,39 @@
onMounted(async () => {
await router.isReady()
- const filtered = options.value.filter((option) => {
+ loading.value = true
+
+ const option = options.value.find((option) => {
return route.query.view && route.query.view === option.value
})
- selectedOption.value = filtered.length > 0 ? filtered[0] : options.value[0]
-
- let gtList = store.gtList
-
- if (!gtList.length) {
- gtList = await api.getGroundTruth()
- store.setGTList(gtList)
- }
-
- let workflows = store.workflows
-
- if (!workflows.length) {
- workflows = await api.getWorkflows()
- store.setWorkflows(workflows)
- }
-
- const runs = []
- for await (let gt of gtList) {
- try {
- const latestRuns = await api.getLatestRuns(gt.id,)
- if (latestRuns.length > 0) {
- runs.push(...latestRuns)
- }
- } catch (e) {
- }
+ if (option) {
+ selectedOption.value = option
}
- data.value = runs
- defs.value = await api.getEvalDefinitions()
+ workflowsStore.runs = await api.getRuns()
+ workflowsStore.gt = await api.getGroundTruth()
+ workflowsStore.workflows = await api.getWorkflows()
- filteredData.value = data.value
+ loading.value = false
- setEvalColors(data.value)
+ setEvalColors(workflowsStore.runs)
})
-
-
-
-
-
-
-
-
+
+ Loading...
+
+
+
+
+
+
+
+
+
+
+