+
+
+
Data Usage
-
- 3.42 / 4.00 GB
-
-
-
-
- Valid Until
+
+ {{ props.config.data.toFixed(4) }} / {{ totalDataLimit ? parseFloat(totalDataLimit).toFixed(4) : 'Unlimited'}} GB
-
- 3.42 / 4.00 GB
-
+
+
+
+
+
+ Valid Until
+
+
+ {{ dateLimit ? dateLimit : 'Unlimited Time' }}
+
+
+
+
diff --git a/src/static/client/src/main.js b/src/static/client/src/main.js
index 5aeee18..119afb2 100644
--- a/src/static/client/src/main.js
+++ b/src/static/client/src/main.js
@@ -6,8 +6,14 @@ import router from "@/router/router.js";
import {createPinia} from "pinia";
import 'bootstrap/dist/js/bootstrap.bundle.js'
+import {clientStore} from "@/stores/clientStore.js";
-createApp(App)
- .use(createPinia())
- .use(router)
- .mount('#app')
+const app = createApp(App)
+
+app.use(createPinia())
+const store = clientStore()
+await fetch("/client/api/serverInformation").then(res => res.json()).then(res => store.serverInformation = res.data)
+
+
+app.use(router)
+app.mount("#app")
\ No newline at end of file
diff --git a/src/static/client/src/stores/clientStore.js b/src/static/client/src/stores/clientStore.js
index e92390e..c05aa29 100644
--- a/src/static/client/src/stores/clientStore.js
+++ b/src/static/client/src/stores/clientStore.js
@@ -7,6 +7,7 @@ import {axiosGet} from "@/utilities/request.js";
export const clientStore = defineStore('clientStore', {
state: () => ({
+ serverInformation: {},
notifications: [],
configurations: [],
clientProfile: {
@@ -36,21 +37,6 @@ export const clientStore = defineStore('clientStore', {
const data = await axiosGet("/api/configurations")
if (data){
this.configurations = data.data
- this.configurations.forEach(c => {
- console.log(
- c.jobs.sort((x, y) => {
- if (dayjs(x.CreationDate).isBefore(y.CreationDate)){
- return 1
- }else if (dayjs(x.CreationDate).isAfter(y.CreationDate)){
- return -1
- }else{
- return 0
- }
- })
-
- )
- console.log(c.jobs.find(x => x.Field === 'date'))
- })
}else{
this.newNotification("Failed to fetch configurations", "danger")
}
diff --git a/src/static/client/src/views/index.vue b/src/static/client/src/views/index.vue
index 960a0d1..5b5efc5 100644
--- a/src/static/client/src/views/index.vue
+++ b/src/static/client/src/views/index.vue
@@ -13,6 +13,10 @@ const configurations = computed(() => {
onMounted(async () => {
await store.getConfigurations()
loading.value = false;
+
+ setInterval(async () => {
+ await store.getConfigurations()
+ }, 5000)
})