Skip to content

Commit

Permalink
fix(ui): remove duplicated associations list
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Nov 23, 2020
1 parent dedd327 commit 17280f5
Showing 1 changed file with 25 additions and 60 deletions.
85 changes: 25 additions & 60 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -422,33 +422,36 @@
></v-select>
</v-flex>

<v-flex v-if="group.node && group.group" xs12 sm6 md4>
<v-flex v-if="group.group && group.associations" xs12 sm6 md4>
<v-list subheader>
<v-subheader>Associations</v-subheader>
<v-list-item
<v-template
v-for="(ass, index) in group.associations"
:key="index"
>
<v-list-item-content>
<v-list-item-title
>Node:
<b>{{
nodes[ass.nodeId]._name || ass.nodeId
}}</b></v-list-item-title
>
<v-list-item-subtitle
v-if="ass.endpoint >= 0"
class="text--primary"
>Endpoint:
<b>{{ ass.endpoint }}</b></v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-icon>
<v-icon @click="removeAssociation(ass)" color="red">
delete
</v-icon>
</v-list-item-icon>
</v-list-item>
<v-list-item dense>
<v-list-item-content>
<v-list-item-title
>Node:
<b>{{
nodes[ass.nodeId]._name || ass.nodeId
}}</b></v-list-item-title
>
<v-list-item-subtitle
v-if="ass.endpoint >= 0"
class="text--primary"
>Endpoint:
<b>{{ ass.endpoint }}</b></v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-icon>
<v-icon @click="removeAssociation(ass)" color="red">
delete
</v-icon>
</v-list-item-icon>
</v-list-item>
<v-divider></v-divider>
</v-template>
<v-list-item v-if="group.associations.length === 0">
<v-list-item-content>
No assocaitions
Expand Down Expand Up @@ -483,44 +486,6 @@
/>
</v-flex>

<v-flex v-if="group.group && group.associations" xs12 sm6 md4>
<v-list subheader>
<v-subheader>Associations</v-subheader>
<v-template
v-for="(ass, index) in group.associations"
:key="index"
>
<v-list-item dense>
<v-list-item-content>
<v-list-item-title
>Node:
<b>{{
nodes[ass.nodeId]._name || ass.nodeId
}}</b></v-list-item-title
>
<v-list-item-subtitle
v-if="ass.endpoint >= 0"
class="text--primary"
>Endpoint:
<b>{{ ass.endpoint }}</b></v-list-item-subtitle
>
</v-list-item-content>
<v-list-item-icon>
<v-icon @click="removeAssociation(ass)" color="red">
delete
</v-icon>
</v-list-item-icon>
</v-list-item>
<v-divider></v-divider>
</v-template>
<v-list-item v-if="group.associations.length === 0">
<v-list-item-content>
No assocaitions
</v-list-item-content>
</v-list-item>
</v-list>
</v-flex>

<v-flex xs12>
<v-btn
v-if="group.node && group.target && group.group"
Expand Down

0 comments on commit 17280f5

Please sign in to comment.