mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Carbon emissions code clean up and minor bug fixes
This commit is contained in:
committed by
Dannon Baker
parent
385831cf27
commit
e4ba07ac7e
@@ -178,7 +178,7 @@ const barChartData = computed(() => {
|
||||
if (canShowMemory) {
|
||||
data.push({
|
||||
name: "Memory",
|
||||
value: 20,
|
||||
value: getPercentage(values.memoryCarbonEmissions, values.totalCarbonEmissions),
|
||||
});
|
||||
}
|
||||
|
||||
@@ -196,10 +196,10 @@ function prettyPrintValue({
|
||||
convertValue?: (input: number) => number;
|
||||
}) {
|
||||
if (value < threshold) {
|
||||
return `≤ ${threshold}` + `${unit ? ` ${unit}` : ""}`;
|
||||
return `≤ ${threshold} ${unit ?? ""}`;
|
||||
}
|
||||
|
||||
return `${value}` + `${unit ? ` ${unit}` : ""}`;
|
||||
return `${value} ${unit ?? ""}`;
|
||||
}
|
||||
|
||||
function getPercentage(value: number, total: number) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script setup>
|
||||
<script setup lang="ts">
|
||||
import ExternalLink from "@/components/ExternalLink.vue";
|
||||
import Heading from "@/components/Common/Heading.vue";
|
||||
import Abbreviation from "@/components/Abbreviation.vue";
|
||||
import Abbreviation from "@/components/Common/Abbreviation.vue";
|
||||
|
||||
const dictionary = [
|
||||
{
|
||||
@@ -38,8 +38,6 @@ const greenAlgorithmsUrl = "https://www.green-algorithms.org/";
|
||||
<header>
|
||||
<Heading h1 separator bold size="h-lg">Carbon Emissions Calculations</Heading>
|
||||
|
||||
<Citation class="formatted-reference" :citation="greenAlgorithmsCitation" prefix="-" />
|
||||
|
||||
<p>
|
||||
Our calculations are based off of the work of the
|
||||
<ExternalLink :href="greenAlgorithmsUrl">Green Algorithms Project</ExternalLink>
|
||||
|
||||
@@ -18,7 +18,7 @@ import StorageDashboardRoutes from "entry/analysis/routes/storageDashboardRoutes
|
||||
|
||||
// child components
|
||||
import AboutGalaxy from "components/AboutGalaxy.vue";
|
||||
import CarbonEmissionsCalculations from "components/CarbonEmissions/CarbonEmissionsCalculations.vue";
|
||||
import CarbonEmissionsCalculations from "components/JobMetrics/CarbonEmissions/CarbonEmissionsCalculations";
|
||||
import Citations from "components/Citation/Citations";
|
||||
import ClientError from "components/ClientError";
|
||||
import CollectionEditView from "components/Collections/common/CollectionEditView";
|
||||
|
||||
Reference in New Issue
Block a user