-
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.
Merge pull request #72 from cmu-delphi/rzatserkovnyi/persistent-apikeys
Add persistence to API keys
- Loading branch information
Showing
9 changed files
with
98 additions
and
32 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
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,26 @@ | ||
<script lang="ts"> | ||
import { importGHT } from '../../../api/EpiData'; | ||
import { ghtLocations as regions } from '../../../data/data'; | ||
import { apiKey } 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 query = ''; | ||
export function importDataSet() { | ||
return importGHT({ auth, locations, query }); | ||
return importGHT({ auth: $apiKey, 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={$apiKey} | ||
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,24 @@ | ||
<script lang="ts"> | ||
import { importQuidel } from '../../../api/EpiData'; | ||
import { quidelLocations as regions } from '../../../data/data'; | ||
import { apiKey } 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 = ''; | ||
export function importDataSet() { | ||
return importQuidel({ auth, locations }); | ||
return importQuidel({ auth: $apiKey, 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={$apiKey} | ||
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,26 @@ | ||
<script lang="ts"> | ||
import { importSensors } from '../../../api/EpiData'; | ||
import { sensorLocations as regions, sensorNames } from '../../../data/data'; | ||
import { apiKey } 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 names = sensorNames[0].value; | ||
export function importDataSet() { | ||
return importSensors({ auth, names, locations }); | ||
return importSensors({ auth: $apiKey, 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={$apiKey} | ||
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