Added QoS, Added file RouterConfig.vue, optimized stuff
This commit is contained in:
parent
c115dbc865
commit
64be911517
|
@ -32,7 +32,10 @@
|
||||||
<p>MAC Address</p>
|
<p>MAC Address</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="seperator"></div>
|
<div class="seperator"></div>
|
||||||
<form v-if="section.devices" v-for="device in section.devices">
|
<form
|
||||||
|
v-if="section.devices"
|
||||||
|
v-for="device in section.devices"
|
||||||
|
>
|
||||||
<div id="device">
|
<div id="device">
|
||||||
<p>{{ device.name }}</p>
|
<p>{{ device.name }}</p>
|
||||||
<p>{{ device.ip }}</p>
|
<p>{{ device.ip }}</p>
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
option: string,
|
option: string,
|
||||||
label?: string,
|
label?: string,
|
||||||
dropdown?: string[],
|
dropdown?: string[],
|
||||||
|
buttons?: string[],
|
||||||
subOptions?: {
|
subOptions?: {
|
||||||
name?: string,
|
name?: string,
|
||||||
class: string,
|
class: string,
|
||||||
|
@ -48,12 +49,15 @@
|
||||||
:key="form.name"
|
:key="form.name"
|
||||||
>
|
>
|
||||||
<template v-else/>
|
<template v-else/>
|
||||||
<select
|
<select v-if="form.dropdown">
|
||||||
v-if="form.dropdown"
|
|
||||||
>
|
|
||||||
<option v-for="option in form.dropdown">{{ option }}</option>
|
<option v-for="option in form.dropdown">{{ option }}</option>
|
||||||
</select>
|
</select>
|
||||||
<template v-else/>
|
<template v-else/>
|
||||||
|
<button
|
||||||
|
v-if="form.buttons"
|
||||||
|
v-for="button in form.buttons"
|
||||||
|
>{{ button }}</button>
|
||||||
|
<template v-else/>
|
||||||
<label
|
<label
|
||||||
:class="subform.class"
|
:class="subform.class"
|
||||||
v-if="form.subOptions"
|
v-if="form.subOptions"
|
||||||
|
|
25
src/data/QoS.ts
Normal file
25
src/data/QoS.ts
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
const qos = [{
|
||||||
|
id: "qosGeneral",
|
||||||
|
forms: [
|
||||||
|
{
|
||||||
|
name: "qosEnable",
|
||||||
|
class: "selectOption",
|
||||||
|
option: "checkbox",
|
||||||
|
label: "Enable QoS",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "optimizeDatabase",
|
||||||
|
class: "selectOption",
|
||||||
|
option: "checkbox",
|
||||||
|
label: "Automically update performance optizimiation database"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "optimizeDatabase",
|
||||||
|
class: "buttonOption",
|
||||||
|
option: "hidden",
|
||||||
|
buttons: ["Update Now"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}]
|
||||||
|
|
||||||
|
export default qos;
|
|
@ -14,7 +14,8 @@
|
||||||
{ name: "Device List", link: "/basic/devices" },
|
{ name: "Device List", link: "/basic/devices" },
|
||||||
{ name: "QoS", link: "/basic/qos" },
|
{ name: "QoS", link: "/basic/qos" },
|
||||||
{ name: "File Sharing", link: "/basic/fileshare" },
|
{ name: "File Sharing", link: "/basic/fileshare" },
|
||||||
{ name: "Guest Network", link: "/basic/guestnetwork" }
|
{ name: "Guest Network", link: "/basic/guestnetwork" },
|
||||||
|
{ name: "Router Configuration", link: "/basic/routerconfig" },
|
||||||
];
|
];
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -5,18 +5,7 @@
|
||||||
const pageTitle="Device List"
|
const pageTitle="Device List"
|
||||||
const pageID="deviceList"
|
const pageID="deviceList"
|
||||||
|
|
||||||
interface Sections {
|
const sections = shallowRef([] as typeof deviceListData);
|
||||||
title: string,
|
|
||||||
id: string,
|
|
||||||
devices?: {
|
|
||||||
connection: string,
|
|
||||||
name?: string,
|
|
||||||
ip: string,
|
|
||||||
mac: string,
|
|
||||||
}[]
|
|
||||||
}
|
|
||||||
|
|
||||||
const sections = shallowRef<Sections[]>([]);
|
|
||||||
|
|
||||||
sections.value = deviceListData;
|
sections.value = deviceListData;
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -5,26 +5,7 @@
|
||||||
const pageTitle="Internet Setup"
|
const pageTitle="Internet Setup"
|
||||||
const pageID="internetSetupComponent"
|
const pageID="internetSetupComponent"
|
||||||
|
|
||||||
interface Sections {
|
const sections = shallowRef([] as typeof internetSetup);
|
||||||
title?: string,
|
|
||||||
id: string,
|
|
||||||
selectedRadio?: number,
|
|
||||||
forms?: {
|
|
||||||
name?: string,
|
|
||||||
class: string,
|
|
||||||
option: string,
|
|
||||||
label?: string,
|
|
||||||
dropdown?: string[],
|
|
||||||
subOptions?: {
|
|
||||||
name?: string,
|
|
||||||
class: string,
|
|
||||||
option: string,
|
|
||||||
label?: string,
|
|
||||||
}[]
|
|
||||||
}[]
|
|
||||||
}
|
|
||||||
|
|
||||||
const sections = shallowRef<Sections[]>([]);
|
|
||||||
|
|
||||||
sections.value = internetSetup;
|
sections.value = internetSetup;
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
const fetchOverviewItems = async () => {
|
const fetchOverviewItems = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await axios.get('http://localhost:8080/overviewItems');
|
const response = await axios.get('http://192.168.122.1:8080/overviewItems');
|
||||||
|
|
||||||
overviewItems.value = [
|
overviewItems.value = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,17 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { shallowRef } from 'vue'
|
||||||
|
import BasicDashboard from '@/components/dashboard/Template.vue';
|
||||||
|
import qos from '@/data/QoS.ts';
|
||||||
|
const pageTitle="QoS Settings"
|
||||||
|
const pageID="qosComponent"
|
||||||
|
|
||||||
|
const sections = shallowRef([] as typeof qos);
|
||||||
|
|
||||||
|
sections.value = qos;
|
||||||
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<BasicDashboard :pageTitle="pageTitle" :pageID="pageID" :sections="sections"/>
|
||||||
<h2 class="title">QoS</h2>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style src="@/styles/basicDashboard.css" scoped></style>
|
<style src="@/styles/basicDashboard.css" scoped></style>
|
7
src/pages/basicDashboard/RouterConfig.vue
Normal file
7
src/pages/basicDashboard/RouterConfig.vue
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h2 class="title">Router Configuration</h2>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style src="@/styles/basicDashboard.css" scoped></style>
|
|
@ -5,26 +5,8 @@
|
||||||
const pageTitle="Wireless Settings"
|
const pageTitle="Wireless Settings"
|
||||||
const pageID="wirelessSettingsComponent"
|
const pageID="wirelessSettingsComponent"
|
||||||
|
|
||||||
interface Sections {
|
const sections = shallowRef([] as typeof wirelessSettings);
|
||||||
title?: string,
|
|
||||||
id: string,
|
|
||||||
selectedRadio?: number,
|
|
||||||
forms?: {
|
|
||||||
name?: string,
|
|
||||||
class: string,
|
|
||||||
option: string,
|
|
||||||
label?: string,
|
|
||||||
dropdown?: string[],
|
|
||||||
subOptions?: {
|
|
||||||
name?: string,
|
|
||||||
class: string,
|
|
||||||
option: string,
|
|
||||||
label?: string,
|
|
||||||
}[]
|
|
||||||
}[]
|
|
||||||
}
|
|
||||||
|
|
||||||
const sections = shallowRef<Sections[]>([]);
|
|
||||||
|
|
||||||
sections.value = wirelessSettings;
|
sections.value = wirelessSettings;
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -1,16 +1,17 @@
|
||||||
import { createRouter, createWebHistory } from "vue-router";
|
import { createRouter, createWebHistory } from "vue-router";
|
||||||
import AdvanceDashboard from '../pages/AdvancedDashboard.vue';
|
import AdvanceDashboard from '@/pages/AdvancedDashboard.vue';
|
||||||
import BasicDashboard from "../pages/BasicDashboard.vue";
|
import BasicDashboard from "@/pages/BasicDashboard.vue";
|
||||||
import LoginPage from "../pages/LoginPage.vue";
|
import LoginPage from "@/pages/LoginPage.vue";
|
||||||
import RegisterPage from "../pages/RegisterPage.vue";
|
import RegisterPage from "@/pages/RegisterPage.vue";
|
||||||
|
|
||||||
import BasicOverview from "../pages/basicDashboard/Overview.vue"
|
import BasicOverview from "@/pages/basicDashboard/Overview.vue"
|
||||||
import BasicInternetSetup from "../pages/basicDashboard/InternetSetup.vue"
|
import BasicInternetSetup from "@/pages/basicDashboard/InternetSetup.vue"
|
||||||
import BasicWireless from "../pages/basicDashboard/Wireless.vue"
|
import BasicWireless from "@/pages/basicDashboard/Wireless.vue"
|
||||||
import BasicDevicesList from "../pages/basicDashboard/DeviceList.vue"
|
import BasicDevicesList from "@/pages/basicDashboard/DeviceList.vue"
|
||||||
import BasicQoS from "../pages/basicDashboard/QoS.vue"
|
import BasicQoS from "@/pages/basicDashboard/QoS.vue"
|
||||||
import BasicFileShare from "../pages/basicDashboard/FileShare.vue"
|
import BasicFileShare from "@/pages/basicDashboard/FileShare.vue"
|
||||||
import BasicGuestNetwork from "../pages/basicDashboard/GuestNetwork.vue"
|
import BasicGuestNetwork from "@/pages/basicDashboard/GuestNetwork.vue"
|
||||||
|
import RouterConfig from "@/pages/basicDashboard/RouterConfig.vue";
|
||||||
|
|
||||||
const routes = [
|
const routes = [
|
||||||
{
|
{
|
||||||
|
@ -48,10 +49,15 @@ const routes = [
|
||||||
{
|
{
|
||||||
path: 'fileshare',
|
path: 'fileshare',
|
||||||
component: BasicFileShare,
|
component: BasicFileShare,
|
||||||
}, {
|
},
|
||||||
|
{
|
||||||
path: 'guestnetwork',
|
path: 'guestnetwork',
|
||||||
component: BasicGuestNetwork,
|
component: BasicGuestNetwork,
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
path: 'routerconfig',
|
||||||
|
component: RouterConfig,
|
||||||
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#internetSetupComponent, #wirelessSettingsComponent {
|
#internetSetupComponent, #wirelessSettingsComponent, #qosComponent {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 20px;
|
gap: 20px;
|
||||||
|
@ -129,6 +129,23 @@
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
label {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
color: inherit;
|
||||||
|
background-color: var(--dark-bg-alt-2-color);
|
||||||
|
border: none;
|
||||||
|
height: 50px;
|
||||||
|
min-width: 110px;
|
||||||
|
border-radius: 5px;
|
||||||
|
transition: 0.3s background-color;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
button:hover {
|
||||||
|
background-color: var(--dark-highlight-color);
|
||||||
|
}
|
||||||
|
|
||||||
.seperator {
|
.seperator {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
|
@ -179,6 +196,9 @@
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.buttonOption {
|
||||||
|
width: fit-content
|
||||||
|
}
|
||||||
.subSelect {
|
.subSelect {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column-reverse;
|
flex-direction: column-reverse;
|
||||||
|
|
Loading…
Reference in a new issue