From a4b0e1cc4582d0710e237198d74511d9716ef0d7 Mon Sep 17 00:00:00 2001
From: Artem Dychenko <s192441@student.pg.edu.pl>
Date: Fri, 28 Feb 2025 20:11:19 +0100
Subject: [PATCH] feat: add statistisc mock

---
 .../dashboard-statistics.component.html       |  4 +++
 src/app/interceptor/interceptor.ts            |  5 +++
 .../mocks/dashboard-statistics.json           | 33 +++++++++++++++++++
 3 files changed, 42 insertions(+)
 create mode 100644 src/app/interceptor/mocks/dashboard-statistics.json

diff --git a/src/app/components/dashboard-statistics/dashboard-statistics.component.html b/src/app/components/dashboard-statistics/dashboard-statistics.component.html
index 12e92e1..2eaf5d2 100644
--- a/src/app/components/dashboard-statistics/dashboard-statistics.component.html
+++ b/src/app/components/dashboard-statistics/dashboard-statistics.component.html
@@ -1 +1,5 @@
+
+
+
+
 <ngx-skeleton-loader count="10" />
diff --git a/src/app/interceptor/interceptor.ts b/src/app/interceptor/interceptor.ts
index 2dfdedf..1b55567 100644
--- a/src/app/interceptor/interceptor.ts
+++ b/src/app/interceptor/interceptor.ts
@@ -1,6 +1,7 @@
 import * as configurationList from './mocks/configurations.json';
 import * as configuration1 from './mocks/configuration-1.json';
 import * as configuration2 from './mocks/configuration-2.json';
+import * as dashboardStats from './mocks/dashboard-statistics.json';
 
 export const urls = [
   {
@@ -15,4 +16,8 @@ export const urls = [
     url: '/api/v1/configuration',
     json: configurationList,
   },
+  {
+    url: '/api/v1/dashboard/statistics',
+    json: dashboardStats,
+  },
 ];
diff --git a/src/app/interceptor/mocks/dashboard-statistics.json b/src/app/interceptor/mocks/dashboard-statistics.json
new file mode 100644
index 0000000..073d63b
--- /dev/null
+++ b/src/app/interceptor/mocks/dashboard-statistics.json
@@ -0,0 +1,33 @@
+{
+  "data": {
+    "id": "statistics",
+    "total_time": "01:05:30",
+    "protocols": [
+        {
+          "name": "ETH",
+          "total-packets": 1234567,
+          "total-bytes": 123456789
+        },
+        {
+          "name": "TCP",
+          "total-packets": 321312,
+          "total-bytes": 32143245
+        },
+        {
+          "name": "IPv4",
+          "total-packets": 3333,
+          "total-bytes": 777
+        },
+        {
+          "name": "IPv6",
+          "total-packets": 0,
+          "total-bytes": 0
+        }
+      ],
+    "information-rate": {
+        "min": 1.23,
+        "max": 123456,
+        "current": 123.45
+      }
+  }
+}
-- 
GitLab