Commit ce430e29 by Johannes Edmeier

reflect selected application in router url

parent 6ba113e8
......@@ -89,22 +89,25 @@
applications: {
type: Array,
default: () => []
},
selected: {
type: String,
default: null
}
},
directives: {onClickaway},
data: () => ({
selected: null,
errors: []
}),
methods: {
select(name) {
this.selected = name;
this.$router.push(`/applications/${name}`);
},
deselect() {
this.selected = null;
this.$router.push('/applications');
},
showDetails(instance) {
this.$router.push(`/instances/${instance.id}`)
this.$router.push(`/instances/${instance.id}`);
},
async unregister(item) {
try {
......
......@@ -52,7 +52,7 @@
</div>
<div v-for="group in statusGroups" :key="group.status">
<p class="heading" v-text="group.status"/>
<applications-list :applications="group.applications"/>
<applications-list :applications="group.applications" :selected="selected"/>
</div>
<div v-if="statusGroups.length === 0">
<p class="is-muted">No applications registered.</p>
......@@ -73,7 +73,11 @@
default: () => [],
},
error: {
type: Object,
type: null,
default: null
},
selected: {
type: String,
default: null
}
},
......@@ -105,7 +109,8 @@
export default component;
export const view = {
path: '/applications',
path: '/applications/:selected?',
props: true,
name: 'applications',
handle: handle,
order: 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment