Fix duplications of data, sort query list, visual improvements
This commit is contained in:
+1
-1
@@ -10,7 +10,7 @@ console.log("api host:", import.meta.env.VITE_API_HOST);
|
||||
type Section = "aggregator" | "fileManager";
|
||||
|
||||
const App: Component = () => {
|
||||
const [getSection, setSection] = createSignal<Section>("aggregator");
|
||||
const [getSection, setSection] = createSignal<Section>("fileManager");
|
||||
|
||||
const section = () => getSection() === "aggregator" ? <Aggregator /> : <FileManager />;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
export const apiHost = import.meta.env.VITE_API_HOST;
|
||||
|
||||
export const cityList = ["Ainaži", "Alūksne", "Bauska", "Dagda", "Daugavgrīva", "Daugavpils", "Dobele", "Gulbene", "Jelgava", "Kalnciems", "Kolka", "Kuldīga", "Lielpēči", "Liepāja", "Madona", "Mērsrags", "Pāvilosta", "Piedruja", "Priekuļi", "Rēzekne", "Rīga", "Rucava", "Rūjiena", "Saldus", "Sigulda", "Sīļi", "Skrīveri", "Skulte", "Stende", "Ventspils", "Vičaki", "Zīlāni", "Zosēni", "Ainaži", "Alūksne", "Bauska", "Dagda", "Daugavgrīva", "Daugavpils", "Dobele", "Gulbene", "Jelgava", "Kalnciems", "Kolka", "Kuldīga", "Lielpēči", "Liepāja", "Madona", "Mērsrags", "Pāvilosta", "Piedruja", "Priekuļi", "Rēzekne", "Rīga", "Rucava", "Rūjiena", "Saldus", "Sigulda", "Sīļi", "Skrīveri", "Skulte", "Stende", "Ventspils", "Vičaki", "Zīlāni", "Zosēni"];
|
||||
export const cityList = ["Ainaži", "Alūksne", "Bauska", "Dagda", "Daugavgrīva", "Daugavpils", "Dobele", "Gulbene", "Jelgava", "Kalnciems", "Kolka", "Kuldīga", "Lielpēči", "Liepāja", "Madona", "Mērsrags", "Pāvilosta", "Piedruja", "Priekuļi", "Rēzekne", "Rīga", "Rucava", "Rūjiena", "Saldus", "Sigulda", "Sīļi", "Skrīveri", "Skulte", "Stende", "Ventspils", "Vičaki", "Zīlāni", "Zosēni"];
|
||||
|
||||
export const weatherField = ["tempMax", "tempMin", "tempAvg", "precipitation", "windAvg", "windMax", "visibilityMin", "visibilityAvg", "snowAvg", "atmPressire", "dewPoint", "humidity", "sunDuration", "phenomena"];
|
||||
|
||||
|
||||
@@ -7,12 +7,12 @@ export const FileContent: Component<{getFileName: Accessor<string>}> = (props) =
|
||||
if (fileName === "") return;
|
||||
await new Promise(resolve => setTimeout(resolve, 500))
|
||||
const response = await fetch(`${apiHost}/api/show/file/${fileName}`);
|
||||
const text = await response.text();
|
||||
const text = await response.json();
|
||||
return text;
|
||||
}
|
||||
|
||||
const [contentResource] = createResource(props.getFileName, fetchFileContent);
|
||||
const lines = () => contentResource()?.split("<br/>") ?? ["empty..."];
|
||||
const lines = () => contentResource();
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user