-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
96 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
export default class ApiKeySelections { | ||
cdc = ''; | ||
fluView = ''; | ||
ght = ''; | ||
quidel = ''; | ||
sensors = ''; | ||
twitter = ''; | ||
} | ||
|
||
export function getApiKeySelections() { | ||
try { | ||
if (localStorage.getItem('api')) { | ||
return JSON.parse(localStorage.getItem('api')!) as ApiKeySelections; | ||
} | ||
return new ApiKeySelections(); | ||
} catch { | ||
localStorage.removeItem('api'); | ||
return new ApiKeySelections(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
<script lang="ts"> | ||
import { importGHT } from '../../../api/EpiData'; | ||
import { ghtLocations as regions } from '../../../data/data'; | ||
import { apiKeySelections } from '../../../store'; | ||
import SelectField from '../inputs/SelectField.svelte'; | ||
import TextField from '../inputs/TextField.svelte'; | ||
export let id: string; | ||
let locations = regions[0].value; | ||
let auth = ''; | ||
let auth = $apiKeySelections.ght; | ||
let query = ''; | ||
export function importDataSet() { | ||
return importGHT({ auth, locations, query }); | ||
} | ||
</script> | ||
|
||
<TextField id="{id}-auth" name="auth" label="Authorizaton Token" bind:value={auth} placeholder="authorization token" /> | ||
<TextField | ||
id="{id}-auth" | ||
name="auth" | ||
label="Authorizaton Token" | ||
bind:value={$apiKeySelections.ght} | ||
placeholder="authorization token" | ||
/> | ||
<SelectField id="{id}-r" label="Location" bind:value={locations} options={regions} /> | ||
<TextField id="{id}-query" name="query" label="Search Query or Topic" bind:value={query} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,25 @@ | ||
<script lang="ts"> | ||
import { importQuidel } from '../../../api/EpiData'; | ||
import { quidelLocations as regions } from '../../../data/data'; | ||
import { apiKeySelections } from '../../../store'; | ||
import SelectField from '../inputs/SelectField.svelte'; | ||
import TextField from '../inputs/TextField.svelte'; | ||
export let id: string; | ||
let locations = regions[0].value; | ||
let auth = ''; | ||
let auth = $apiKeySelections.quidel; | ||
export function importDataSet() { | ||
return importQuidel({ auth, locations }); | ||
} | ||
</script> | ||
|
||
<TextField id="{id}-auth" name="auth" label="Authorizaton Token" bind:value={auth} placeholder="authorization token" /> | ||
<TextField | ||
id="{id}-auth" | ||
name="auth" | ||
label="Authorizaton Token" | ||
bind:value={$apiKeySelections.quidel} | ||
placeholder="authorization token" | ||
/> | ||
<SelectField id="{id}-r" label="Location" bind:value={locations} options={regions} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,27 @@ | ||
<script lang="ts"> | ||
import { importSensors } from '../../../api/EpiData'; | ||
import { sensorLocations as regions, sensorNames } from '../../../data/data'; | ||
import { apiKeySelections } from '../../../store'; | ||
import SelectField from '../inputs/SelectField.svelte'; | ||
import TextField from '../inputs/TextField.svelte'; | ||
export let id: string; | ||
let locations = regions[0].value; | ||
let auth = ''; | ||
let auth = $apiKeySelections.sensors; | ||
let names = sensorNames[0].value; | ||
export function importDataSet() { | ||
return importSensors({ auth, names, locations }); | ||
} | ||
</script> | ||
|
||
<TextField id="{id}-auth" name="auth" label="Authorizaton Token" bind:value={auth} placeholder="authorization token" /> | ||
<TextField | ||
id="{id}-auth" | ||
name="auth" | ||
label="Authorizaton Token" | ||
bind:value={$apiKeySelections.sensors} | ||
placeholder="authorization token" | ||
/> | ||
<SelectField id="{id}-s" label="Name" bind:value={names} options={sensorNames} name="sensor" /> | ||
<SelectField id="{id}-r" label="Location" bind:value={locations} options={regions} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters