Skip to content

Commit

Permalink
URL for price sources
Browse files Browse the repository at this point in the history
  • Loading branch information
gskjold committed Dec 4, 2023
1 parent 0606c47 commit fd996f4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 12 deletions.
18 changes: 9 additions & 9 deletions lib/SvelteUi/app/dist/index.js

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion lib/SvelteUi/app/src/lib/Helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,11 @@ export function getPriceSourceName(code) {
if(code == "EDS") return "Energy Data Service";
if(code == "MIX") return "Mixed sources";
return "Unknown (" + code + ")";
}
}

export function getPriceSourceUrl(code) {
if(code == "EOE") return "https://transparency.entsoe.eu/-E";
if(code == "HKS") return "https://www.hvakosterstrommen.no/";
if(code == "EDS") return "https://www.energidataservice.dk/";
return "#";
}
4 changes: 2 additions & 2 deletions lib/SvelteUi/app/src/lib/PricePlot.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script>
import { zeropad, addHours, getPriceSourceName } from './Helpers.js';
import { zeropad, addHours, getPriceSourceName, getPriceSourceUrl } from './Helpers.js';
import BarChart from './BarChart.svelte';
export let json;
Expand Down Expand Up @@ -127,5 +127,5 @@
</script>

<a href="https://transparency.entsoe.eu/" target="_blank" class="text-xs float-right z-40">Provided by: {getPriceSourceName(json.source)}</a>
<a href="{getPriceSourceUrl(json.source)}" target="_blank" class="text-xs float-right z-40">Provided by: {getPriceSourceName(json.source)}</a>
<BarChart config={config} />

0 comments on commit fd996f4

Please sign in to comment.