-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simulation snapshot panel interactions (#913)
* add simulation dataset id to URL when choosing dataset or snapshot * add filter button to simulation list and plan snapshot list * add snapshot control bar to plan page * make console affect layout
- Loading branch information
Showing
11 changed files
with
289 additions
and
28 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 |
---|---|---|
|
@@ -101,6 +101,6 @@ | |
|
||
<style> | ||
.description { | ||
padding: 0px 16px 0; | ||
padding: 0px 16px; | ||
} | ||
</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 |
---|---|---|
|
@@ -74,6 +74,7 @@ | |
<style> | ||
.message { | ||
font-weight: 500; | ||
padding: 0px 16px; | ||
} | ||
input[type='checkbox'], | ||
|
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,51 @@ | ||
<svelte:options immutable={true} /> | ||
|
||
<script lang="ts"> | ||
import { createEventDispatcher } from 'svelte'; | ||
import type { PlanSnapshot } from '../../types/plan-snapshot'; | ||
export let snapshot: PlanSnapshot; | ||
export let numOfDirectives: number; | ||
const dispatch = createEventDispatcher(); | ||
</script> | ||
|
||
<div class="snapshot-bar"> | ||
<div class="info"> | ||
<div>Preview of plan snapshot</div> | ||
<div class="snapshot-name">{snapshot.snapshot_name}</div> | ||
<div>{numOfDirectives} directive{numOfDirectives !== 1 ? 's' : ''}</div> | ||
</div> | ||
|
||
<div class="buttons"> | ||
<button class="st-button" on:click|stopPropagation={() => dispatch('restore', snapshot)}>Restore Snapshot</button> | ||
<button class="st-button secondary" on:click={() => dispatch('close')}>Close Preview</button> | ||
</div> | ||
</div> | ||
|
||
<style> | ||
.snapshot-bar { | ||
align-items: center; | ||
background-color: var(--st-primary-10, #e6e6ff); | ||
border-bottom: 1px solid var(--st-primary-30, #a1a4fc); | ||
display: flex; | ||
justify-content: space-between; | ||
padding: 10px 16px; | ||
} | ||
.snapshot-bar .info { | ||
align-items: center; | ||
color: var(--st-primary-90, #1a237e); | ||
column-gap: 10px; | ||
display: flex; | ||
display: flex; | ||
font-weight: 500; | ||
} | ||
.snapshot-bar .info .snapshot-name { | ||
background-color: #fff; | ||
border: 1px solid var(--st-primary-30, #a1a4fc); | ||
border-radius: 16px; | ||
padding: 4px 12px; | ||
} | ||
</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
Oops, something went wrong.