diff --git a/internal/graph/schema.resolvers.go b/internal/graph/schema.resolvers.go index 8c5ee0d..bde7013 100644 --- a/internal/graph/schema.resolvers.go +++ b/internal/graph/schema.resolvers.go @@ -99,7 +99,7 @@ func (r *jobResolver) EnergyFootprint(ctx context.Context, obj *schema.Job) ([]* case matchCore.MatchString(test): hwType = "Core" default: - hwType = "Hardware" + hwType = "Other" } res = append(res, &model.EnergyFootprintValue{ diff --git a/web/frontend/src/job/EnergySummary.svelte b/web/frontend/src/job/EnergySummary.svelte index 70e419f..e614865 100644 --- a/web/frontend/src/job/EnergySummary.svelte +++ b/web/frontend/src/job/EnergySummary.svelte @@ -15,6 +15,7 @@ Tooltip, Row, Col, + Icon } from "@sveltestrap/sveltestrap"; import { round } from "mathjs"; @@ -34,7 +35,22 @@ {#each job.energyFootprint as efp} -
{efp.hardware}: {efp.value} Wh ({efp.metric})
+
+ {#if efp.hardware === 'CPU'} + + {:else if efp.hardware === 'Accelerator'} + + {:else if efp.hardware === 'Memory'} + + {:else if efp.hardware === 'Core'} + + {:else} + + {/if} + +
+
+
{efp.hardware}: {efp.value} Wh ({efp.metric})
Estimated energy consumption based on metric {efp.metric} and job runtime. {/each} - -
Total Energy: {job?.energy? job.energy : 0} Wh
+ +
+ +
+
+
Total Energy: {job?.energy? job.energy : 0} Wh
{#if carbonPerkWh} - -
Carbon Emission: {carbonMass} kg
+ +
+ +
+
+
Carbon Emission: {carbonMass} kg
{/if}