-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the ability to delete cache values via UI (#21)
Showing
65 changed files
with
820 additions
and
90 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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
.vscode | ||
node_modules | ||
coverage | ||
coverage-cypress | ||
cypress/videos | ||
.DS_Store | ||
*.log | ||
dist | ||
|
Empty file.
Binary file added
BIN
+62 KB
.yarn/cache/@codemirror-autocomplete-npm-6.8.1-1f5b668006-8599cd91de.zip
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6.68 KB
.yarn/cache/@codemirror-lang-json-npm-6.0.1-ffd8179ab1-e9e87d50ff.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+166 KB
.yarn/cache/@fortawesome-fontawesome-common-types-npm-6.4.0-8174465a2e-a9b79136ca.zip
Binary file not shown.
Binary file added
BIN
+355 KB
.yarn/cache/@fortawesome-free-regular-svg-icons-npm-6.4.0-2f59fc26d1-a52689349b.zip
Binary file not shown.
Binary file added
BIN
+2.62 MB
.yarn/cache/@fortawesome-free-solid-svg-icons-npm-6.4.0-be633fc4ad-efdd168862.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+91.7 KB
.yarn/cache/@replit-codemirror-indentation-markers-npm-6.4.2-13a00ba292-4f86101033.zip
Binary file not shown.
Binary file added
BIN
+15 KB
.yarn/cache/@sphinxxxx-color-conversion-npm-2.2.2-26d4f4f80f-73d07e5b0d.zip
Binary file not shown.
Binary file removed
BIN
-23 KB
.yarn/cache/@zerodevx-svelte-json-view-npm-1.0.5-6577eb35fe-e469cfc268.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
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,54 @@ | ||
<script> | ||
/** | ||
* A very basic Breadcrumb | ||
*/ | ||
export let cacheEntry; | ||
export let onCacheClick; | ||
</script> | ||
|
||
<ul> | ||
<li> | ||
{#if cacheEntry != null} | ||
<a | ||
data-cy-id="cache-breadcrumb-link" | ||
href="/Cache" | ||
on:click={(e) => { | ||
e.preventDefault(); | ||
onCacheClick(); | ||
}}>Cache</a | ||
> | ||
{:else} | ||
<li>Cache</li> | ||
{/if} | ||
</li> | ||
<li><div class="split">/</div></li> | ||
{#if cacheEntry != null} | ||
<li>{cacheEntry.id}</li> | ||
{/if} | ||
</ul> | ||
|
||
<style> | ||
ul { | ||
display: flex; | ||
align-items: center; | ||
flex-wrap: wrap; | ||
flex: 0 1 auto; | ||
list-style-type: none; | ||
margin: 0; | ||
padding: 0 5px; | ||
} | ||
li { | ||
align-items: center; | ||
display: inline-flex; | ||
font-size: 14px; | ||
} | ||
ul > :last-child { | ||
color: var(--gc-cerulean); | ||
} | ||
.split { | ||
padding: 0 4px 0 2px; | ||
} | ||
</style> |
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,9 +1,31 @@ | ||
<script> | ||
export let row; | ||
export let col; | ||
export let onEdit; | ||
console.log(row, col); | ||
const value = row[col.key]; | ||
let value, cyID; | ||
$: value = row[col.key]; | ||
$: cyID = col.key === 'edit' ? `edit-${row.id}` : col.key; | ||
</script> | ||
|
||
<span data-cy-id="cache-{col.key}">{value}</span> | ||
<div class="Cell"> | ||
{#if col.key === 'edit'} | ||
<button | ||
inline | ||
data-cy-id="cache-cell-{cyID}" | ||
on:click={() => { | ||
onEdit(row.id); | ||
}}>Edit</button | ||
> | ||
{:else} | ||
<span data-cy-id="cache-cell-{cyID}">{value}</span> | ||
{/if} | ||
</div> | ||
|
||
<style> | ||
.Cell { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
</style> |
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,56 @@ | ||
<script> | ||
import { JSONEditor } from 'svelte-jsoneditor'; | ||
export let cacheEntry; | ||
export let onDelete; | ||
export let onUpdateResponse; | ||
let changes = null; | ||
function onChange(prev, curr) { | ||
changes = curr.json; | ||
} | ||
</script> | ||
|
||
<div data-cy-id="cache-detail" class="Wrapper"> | ||
<button data-cy-id="cache-delete" on:click={() => onDelete(cacheEntry.id)} | ||
>Delete</button | ||
> | ||
<div class="Request"> | ||
<div>Request</div> | ||
<JSONEditor | ||
content={{ json: cacheEntry.request }} | ||
readOnly | ||
mainMenuBar={false} | ||
/> | ||
</div> | ||
<div> | ||
<div> | ||
Response | ||
<button | ||
class="inline" | ||
disabled={changes === null} | ||
on:click={() => { | ||
onUpdateResponse(changes); | ||
changes = null; | ||
}}>Update (not yet implemented)</button | ||
> | ||
</div> | ||
<JSONEditor content={{ json: cacheEntry.response }} {onChange} /> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.inline { | ||
display: inline; | ||
} | ||
.Wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
margin-top: 10px; | ||
width: 100%; | ||
} | ||
.Request { | ||
margin-bottom: 20px; | ||
height: 50%; | ||
} | ||
</style> |
Oops, something went wrong.