mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-23 22:18:26 +01:00
Uses == and fixes error messages
This commit is contained in:
@@ -10,8 +10,13 @@ export default {
|
|||||||
visibleContainers(newValue) {
|
visibleContainers(newValue) {
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
if (this.$route.query.name) {
|
if (this.$route.query.name) {
|
||||||
const [container, _] = this.visibleContainers.filter((c) => c.name.includes(this.$route.query.name));
|
const [container, _] = this.visibleContainers.filter((c) => c.name == this.$route.query.name);
|
||||||
|
if (container) {
|
||||||
this.$router.push({ name: "container", params: { id: container.id } });
|
this.$router.push({ name: "container", params: { id: container.id } });
|
||||||
|
} else {
|
||||||
|
console.error(`No containers found matching name=${this.$route.query.name}. Redirecting to /`);
|
||||||
|
this.$router.push({ name: "default" });
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
console.error(`Expection query parameter name to be set. Redirecting to /`);
|
console.error(`Expection query parameter name to be set. Redirecting to /`);
|
||||||
this.$router.push({ name: "default" });
|
this.$router.push({ name: "default" });
|
||||||
|
|||||||
Reference in New Issue
Block a user