mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-04-13 08:14:11 +00:00
URL for price sources
This commit is contained in:
18
lib/SvelteUi/app/dist/index.js
vendored
18
lib/SvelteUi/app/dist/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -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 "#";
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user