-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'galaxyproject:dev' into port-history-panel-to-compositi…
…on-api-and-typescript
- Loading branch information
Showing
122 changed files
with
4,607 additions
and
1,610 deletions.
There are no files selected for viewing
This file contains 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 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
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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 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 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 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 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,82 @@ | ||
<script setup lang="ts"> | ||
import axios from "axios"; | ||
import { onMounted, type Ref, ref } from "vue"; | ||
import { withPrefix } from "@/utils/redirect"; | ||
import { rethrowSimple } from "@/utils/simple-error"; | ||
interface Props { | ||
historyId?: string; | ||
} | ||
const props = defineProps<Props>(); | ||
interface HistoryStats { | ||
nice_size: string; | ||
contents_active: { | ||
deleted?: number; | ||
hidden?: number; | ||
active?: number; | ||
}; | ||
contents_states: { | ||
error?: number; | ||
ok?: number; | ||
new?: number; | ||
running?: number; | ||
queued?: number; | ||
}; | ||
} | ||
const historyStats: Ref<HistoryStats | null> = ref(null); | ||
async function getCounts() { | ||
if (props.historyId) { | ||
try { | ||
const { data } = await axios.get( | ||
withPrefix(`/api/histories/${props.historyId}?keys=nice_size,contents_active,contents_states`) | ||
); | ||
historyStats.value = data; | ||
} catch (e) { | ||
rethrowSimple(e); | ||
} | ||
} | ||
} | ||
onMounted(() => { | ||
getCounts(); | ||
}); | ||
</script> | ||
|
||
<template> | ||
<span v-if="historyStats" class="grid-datasets"> | ||
<span v-if="historyStats.nice_size" class="mr-2"> | ||
{{ historyStats.nice_size }} | ||
</span> | ||
<span | ||
v-for="(stateCount, state) of historyStats.contents_states" | ||
:key="state" | ||
:class="`stats state-color-${state}`" | ||
:title="`${state} datasets`"> | ||
{{ stateCount }} | ||
</span> | ||
<span v-if="historyStats.contents_active.deleted" class="stats state-color-deleted" title="Deleted datasets"> | ||
{{ historyStats.contents_active.deleted }} | ||
</span> | ||
<span v-if="historyStats.contents_active.hidden" class="stats state-color-hidden" title="Hidden datasets"> | ||
{{ historyStats.contents_active.hidden }} | ||
</span> | ||
</span> | ||
</template> | ||
|
||
<style lang="scss" scoped> | ||
@import "~bootstrap/scss/bootstrap.scss"; | ||
.grid-datasets { | ||
@extend .d-flex; | ||
@extend .text-nowrap; | ||
.stats { | ||
@extend .rounded; | ||
@extend .px-1; | ||
@extend .mr-1; | ||
border-width: 1px; | ||
border-style: solid; | ||
} | ||
} | ||
</style> |
This file contains 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 was deleted.
Oops, something went wrong.
This file contains 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 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
Oops, something went wrong.