-
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.
Added output settings panel for the calibrate drilldown (#4700)
- Loading branch information
Showing
11 changed files
with
351 additions
and
61 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
34 changes: 34 additions & 0 deletions
34
packages/client/hmi-client/src/components/widgets/tera-chart-settings-item.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,34 @@ | ||
<template> | ||
<div class="chart-settings-item"> | ||
<h6>{{ settings.name }}</h6> | ||
<div class="btn-group"> | ||
<Button label="Open chart settings" outlined severity="secondary" size="small" @click="$emit('open')" /> | ||
<Button icon="pi pi-trash" rounded text @click="$emit('remove', settings.id)" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import Button from 'primevue/button'; | ||
defineProps({ | ||
settings: { | ||
type: Object, | ||
default: () => ({}) | ||
} | ||
}); | ||
defineEmits(['open', 'remove']); | ||
</script> | ||
|
||
<style scoped> | ||
.chart-settings-item { | ||
border-left: 4px solid #667085; | ||
padding: var(--gap-3); | ||
padding-left: var(--gap-4); | ||
background: var(--surface-50); | ||
} | ||
.btn-group { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
</style> |
75 changes: 75 additions & 0 deletions
75
packages/client/hmi-client/src/components/widgets/tera-chart-settings-panel.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,75 @@ | ||
<template> | ||
<transition> | ||
<div class="chart-settings-panel" v-if="activeSettings !== null"> | ||
<header :class="{ shadow: false }"> | ||
<Button :icon="`pi pi-times`" @click="$emit('close')" text rounded size="large" /> | ||
<h4>Chart Settings</h4> | ||
</header> | ||
<div class="content"> | ||
<div v-if="annotations !== undefined"> | ||
<h5>Annotations</h5> | ||
<p>Not yet implemented</p> | ||
</div> | ||
</div> | ||
</div> | ||
</transition> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import Button from 'primevue/button'; | ||
import { ChartSetting } from '@/types/common'; | ||
import { ChartAnnotation } from '@/types/Types'; | ||
defineProps<{ | ||
activeSettings: ChartSetting | null; | ||
annotations?: ChartAnnotation[]; | ||
}>(); | ||
defineEmits(['close', 'update:settings']); | ||
</script> | ||
|
||
<style scoped> | ||
.chart-settings-panel { | ||
position: absolute; | ||
top: 0; | ||
z-index: 3; | ||
height: 100%; | ||
width: 100%; | ||
background: #fff; | ||
left: 0; | ||
&.v-enter-active, | ||
&.v-leave-active { | ||
transition: left 0.15s ease-in; | ||
left: 30%; | ||
} | ||
&.v-enter-from, | ||
&.v-leave-to { | ||
left: 100%; | ||
} | ||
header { | ||
position: sticky; | ||
top: 0; | ||
z-index: 3; | ||
display: flex; | ||
align-items: center; | ||
flex-direction: row-reverse; | ||
justify-content: space-between; | ||
padding: var(--gap-2); | ||
padding-left: var(--gap); | ||
gap: var(--gap); | ||
background-color: rgba(255, 255, 255, 0.8); | ||
backdrop-filter: blur(3px); | ||
&.shadow { | ||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.1); | ||
} | ||
button { | ||
height: 2.5rem; | ||
} | ||
} | ||
.content { | ||
padding: var(--gap-4); | ||
} | ||
} | ||
</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.