forked from galaxyproject/galaxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add title/footer component to job metrics and parameters.
- Loading branch information
Showing
3 changed files
with
57 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,31 @@ | ||
<script setup lang="ts"> | ||
import JobMetrics from "@/components/JobMetrics/JobMetrics.vue"; | ||
interface JobMetricsProps { | ||
jobId: string; | ||
title?: string; | ||
footer?: string; | ||
} | ||
withDefaults(defineProps<JobMetricsProps>(), { | ||
title: null, | ||
footer: null, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<b-card nobody> | ||
<b-card-title v-if="title"> | ||
<b>{{ title }}</b> | ||
</b-card-title> | ||
<JobMetrics | ||
class="job-metrics" | ||
:job-id="args.job_id" | ||
:job-id="jobId" | ||
:should-show-aws-estimate="false" | ||
:should-show-carbon-emissions-estimates="false" | ||
:include-title="false" /> | ||
<b-card-footer v-if="footer"> | ||
{{ footer }} | ||
</b-card-footer> | ||
</b-card> | ||
</template> | ||
|
||
<script> | ||
import JobMetrics from "components/JobMetrics/JobMetrics"; | ||
export default { | ||
components: { | ||
JobMetrics, | ||
}, | ||
props: { | ||
args: { | ||
type: Object, | ||
default: null, | ||
}, | ||
}, | ||
}; | ||
</script> |
41 changes: 24 additions & 17 deletions
41
client/src/components/Markdown/Elements/JobParameters.vue
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 |
---|---|---|
@@ -1,21 +1,28 @@ | ||
<script setup lang="ts"> | ||
import JobParameters from "@/components/JobParameters/JobParameters.vue"; | ||
interface JobParametersProps { | ||
jobId: string; | ||
param?: string; | ||
title?: string; | ||
footer?: string; | ||
} | ||
withDefaults(defineProps<JobParametersProps>(), { | ||
param: undefined, | ||
title: null, | ||
footer: null, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<b-card nobody> | ||
<JobParameters class="job-parameters" :job-id="args.job_id" :param="args.param" :include-title="false" /> | ||
<b-card-title v-if="title"> | ||
<b>{{ title }}</b> | ||
</b-card-title> | ||
<JobParameters class="job-parameters" :job-id="jobId" :param="param" :include-title="false" /> | ||
<b-card-footer v-if="footer"> | ||
{{ footer }} | ||
</b-card-footer> | ||
</b-card> | ||
</template> | ||
|
||
<script> | ||
import JobParameters from "components/JobParameters/JobParameters"; | ||
export default { | ||
components: { | ||
JobParameters, | ||
}, | ||
props: { | ||
args: { | ||
type: Object, | ||
default: null, | ||
}, | ||
}, | ||
}; | ||
</script> |
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