Skip to content

Commit

Permalink
fixing metadata import items (#131)
Browse files Browse the repository at this point in the history
* fixing items

* version increment
  • Loading branch information
BryonLewis authored Apr 18, 2024
1 parent 843ba2a commit d429715
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,71 +114,73 @@ export default defineComponent({
<template>
<v-card>
<h2>Custom Timeline List</h2>
<v-row dense>
<v-select
v-model="addTimeline"
:items="availableTimelines"
item-text="name"
label="Timeline"
>
<template #item="{ item }">
<span>Name: {{ item.name }} Type: {{ item.type }} </span>
</template>
</v-select>
<v-btn
:disabled="!addTimeline"
@click="$emit('add-timeline', { name: addTimeline, type: returnTimelineType(addTimeline) })"
>
Add Timeline
</v-btn>
</v-row>
<v-row dense>
<v-text-field
v-model.number="baseHeight"
type="number"
label="Max Timeline Area Height"
style="max-width: 150px;"
:rules="[v => (v >= 50) || 'Value needs to be 50 or higher']"
@change="$emit('update-height', $event)"
/>
</v-row>
<v-row
v-for="(timeline, index) in timelineConfig.timelines"
:key="timeline.name"
dense
>
<v-col cols="3">
{{ timeline.name }}
</v-col>
<v-col>
<span>Height:</span>
{{ timeline.maxHeight }}
</v-col>
<v-col>
<span>Order:</span>
{{ timeline.order }}
</v-col>
<v-col>
<span>Dismissable:</span>
{{ timeline.dismissable }}
</v-col>
<v-col>
<span>Type:</span>
{{ timeline.type }}
</v-col>
<v-spacer />
<v-col>
<v-icon @click="editTimeline(index)">
mdi-pencil
</v-icon>
<v-icon
color="error"
@click="deleteTimeline(index)"
<v-card-text>
<v-row dense>
<v-select
v-model="addTimeline"
:items="availableTimelines"
item-text="name"
label="Timeline"
>
<template #item="{ item }">
<span>Name: {{ item.name }} Type: {{ item.type }} </span>
</template>
</v-select>
<v-btn
:disabled="!addTimeline"
@click="$emit('add-timeline', { name: addTimeline, type: returnTimelineType(addTimeline) })"
>
mdi-delete
</v-icon>
</v-col>
</v-row>
Add Timeline
</v-btn>
</v-row>
<v-row dense>
<v-text-field
v-model.number="baseHeight"
type="number"
label="Max Timeline Area Height"
style="max-width: 150px;"
:rules="[v => (v >= 50) || 'Value needs to be 50 or higher']"
@change="$emit('update-height', $event)"
/>
</v-row>
<v-row
v-for="(timeline, index) in timelineConfig.timelines"
:key="timeline.name"
dense
>
<v-col cols="3">
{{ timeline.name }}
</v-col>
<v-col>
<span>Height:</span>
{{ timeline.maxHeight }}
</v-col>
<v-col>
<span>Order:</span>
{{ timeline.order }}
</v-col>
<v-col>
<span>Dismissable:</span>
{{ timeline.dismissable }}
</v-col>
<v-col>
<span>Type:</span>
{{ timeline.type }}
</v-col>
<v-spacer />
<v-col>
<v-icon @click="editTimeline(index)">
mdi-pencil
</v-icon>
<v-icon
color="error"
@click="deleteTimeline(index)"
>
mdi-delete
</v-icon>
</v-col>
</v-row>
</v-card-text>
<div v-if="editingTimeline">
<v-card
class="pa-3"
Expand Down
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dive-dsa",
"version": "1.10.4",
"version": "1.10.5",
"author": {
"name": "Kitware, Inc.",
"email": "Bryon.Lewis@kitware.com"
Expand Down
1 change: 1 addition & 0 deletions client/src/ConfigurationManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export default class ConfigurationManager {
const { timelines } = this.configuration.value.timelineConfigs;
if (timelines.length === 1) {
this.configuration.value.timelineConfigs.timelines = [];
this.configuration.value.timelineConfigs.maxHeight = 175;
} else if (timelines[index]) {
timelines.splice(index, 1);
}
Expand Down
4 changes: 3 additions & 1 deletion client/src/components/AttributeFilter/AttributeKeyFilter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineComponent({

<template>
<div>
<v-row no-gutters>
<v-row no-gutters dense>
<h4>{{ !timeline ? 'Key' : 'Timeline' }} Filter</h4>
<v-spacer />
<tooltip-btn
Expand All @@ -103,6 +103,7 @@ export default defineComponent({
<v-row
no-gutters
class="align-center"
dense
>
<v-checkbox
:input-value="attributeFilter.active"
Expand All @@ -117,6 +118,7 @@ export default defineComponent({
<v-row
v-for="item in attributeFilter.appliedTo"
:key="item"
dense
>
<div
class="type-color-box"
Expand Down
3 changes: 2 additions & 1 deletion client/src/components/FilterList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export default defineComponent({
<v-row
class="border-highlight"
align="center"
dense
>
<v-col
id="type-header"
Expand Down Expand Up @@ -301,7 +302,7 @@ export default defineComponent({
v-model="data.filterText"
type="text"
placeholder="Search types"
class="mx-2 mt-2 shrink input-box"
class="mx-2 mt-2 mb-1 shrink input-box"
>
<div class="pb-2 overflow-y-hidden">
<v-virtual-scroll
Expand Down
4 changes: 4 additions & 0 deletions server/dive_server/views_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,11 @@ def process_metadata(
for rootObj in modified_key_paths:
root = rootObj['root']
modified_path = rootObj['modified_path']
if modified_path is None:
continue
resource_path = remove_before_folder(resource_path, root)
if resource_path is None:
continue
resource_path = resource_path.replace(
f'/Video {item[matcher]}', f'/{item[matcher]}'
)
Expand Down

0 comments on commit d429715

Please sign in to comment.