-
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.
Merge branch 'main' into clean-up-app.vue
- Loading branch information
Showing
25 changed files
with
631 additions
and
428 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
55 changes: 55 additions & 0 deletions
55
packages/client/hmi-client/src/components/drilldown/tera-notebook-output.vue
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,55 @@ | ||
<template> | ||
<tera-resizable-panel v-if="!isHidden" :start-height="100" :resize-from-top="true" class="container"> | ||
<h6> | ||
<span>{{ name }}</span> | ||
<Button rounded text icon="pi pi-times" @click="isHidden = true" /> | ||
</h6> | ||
<code class="code-section">{{ props.traceback }}</code> | ||
</tera-resizable-panel> | ||
<div v-if="isHidden" class="container"> | ||
<h6> | ||
<span>{{ name }}</span> | ||
<Button rounded text icon="pi pi-angle-double-up" @click="isHidden = false" /> | ||
</h6> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { ref } from 'vue'; | ||
import Button from 'primevue/button'; | ||
import TeraResizablePanel from '@/components/widgets/tera-resizable-panel.vue'; | ||
const props = defineProps<{ | ||
name?: string; | ||
traceback?: string; | ||
}>(); | ||
const name = props.name ?? 'Output Console'; | ||
const isHidden = ref<boolean>(false); | ||
</script> | ||
|
||
<style scoped> | ||
.container { | ||
background-color: var(--surface-100); | ||
padding: var(--gap-small); | ||
border-radius: var(--border-radius); | ||
border: 1px solid var(--surface-border-light); | ||
/* Shadow/medium */ | ||
box-shadow: | ||
0 2px 4px -1px rgba(0, 0, 0, 0.06), | ||
0 4px 6px -1px rgba(0, 0, 0, 0.08); | ||
} | ||
.code-section { | ||
white-space: pre-wrap; | ||
} | ||
h6 { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
.hide { | ||
display: none; | ||
} | ||
</style> |
57 changes: 57 additions & 0 deletions
57
...s/client/hmi-client/src/components/intervention-policy/tera-intervention-summary-card.vue
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,57 @@ | ||
<template> | ||
<div> | ||
<aside>{{ !isEmpty(intervention.dynamicInterventions) ? 'Dynamic' : 'Static' }}</aside> | ||
<h5>{{ intervention.name }}</h5> | ||
<ul> | ||
<li v-for="(staticIntervention, index) in intervention.staticInterventions" :key="`static-${index}`"> | ||
Set {{ staticIntervention.type }} <strong>{{ staticIntervention.appliedTo }}</strong> to | ||
<strong>{{ staticIntervention.value }}</strong> starting at <strong>{{ staticIntervention.timestep }}</strong | ||
> day. | ||
</li> | ||
<li v-for="(dynamicIntervention, index) in intervention.dynamicInterventions" :key="`dynamic-${index}`"> | ||
Set {{ dynamicIntervention.type }} <strong>{{ dynamicIntervention.appliedTo }}</strong> to | ||
<strong>{{ dynamicIntervention.value }}</strong> when | ||
<strong>{{ dynamicIntervention.parameter }}</strong> crosses the threshold <strong>{{ | ||
dynamicIntervention.threshold | ||
}}</strong | ||
>. | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Intervention } from '@/types/Types'; | ||
import { isEmpty } from 'lodash'; | ||
defineProps<{ | ||
intervention: Intervention; | ||
}>(); | ||
</script> | ||
|
||
<style scoped> | ||
div { | ||
background: var(--surface-section); | ||
border: 1px solid var(--surface-border-light); | ||
border-radius: var(--border-radius-medium); | ||
padding: var(--gap-4) var(--gap-5); | ||
box-shadow: | ||
0 2px 2px -1px rgba(0, 0, 0, 0.06), | ||
0 2px 4px -1px rgba(0, 0, 0, 0.08); | ||
} | ||
ul { | ||
list-style: none; | ||
margin-top: var(--gap-2); | ||
} | ||
li + li { | ||
margin-top: var(--gap-1); | ||
} | ||
aside { | ||
color: var(--text-color-subdued); | ||
font-size: var(--font-caption); | ||
float: right; | ||
} | ||
</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
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.