diff --git a/package-lock.json b/package-lock.json
index 89fc311..087a442 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -9,9 +9,11 @@
"version": "0.1.0",
"dependencies": {
"axios": "^1.5.1",
+ "chart.js": "^4.4.3",
"core-js": "^3.8.3",
"leaflet": "^1.9.4",
"vue": "^2.6.14",
+ "vue-chartjs": "^5.3.1",
"vue-material": "^1.0.0-beta-16",
"vue2-leaflet": "^2.7.1"
},
@@ -1961,6 +1963,11 @@
"@jridgewell/sourcemap-codec": "^1.4.14"
}
},
+ "node_modules/@kurkle/color": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/@kurkle/color/-/color-0.3.2.tgz",
+ "integrity": "sha512-fuscdXJ9G1qb7W8VdHi+IwRqij3lBkosAm4ydQtEmbY58OzHXqQhvlxqEkoz0yssNVn38bcpRWgA9PP+OGoisw=="
+ },
"node_modules/@leichtgewicht/ip-codec": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz",
@@ -3915,6 +3922,17 @@
"node": ">=4"
}
},
+ "node_modules/chart.js": {
+ "version": "4.4.3",
+ "resolved": "https://registry.npmjs.org/chart.js/-/chart.js-4.4.3.tgz",
+ "integrity": "sha512-qK1gkGSRYcJzqrrzdR6a+I0vQ4/R+SoODXyAjscQ/4mzuNzySaMCd+hyVxitSY1+L2fjPD1Gbn+ibNqRmwQeLw==",
+ "dependencies": {
+ "@kurkle/color": "^0.3.0"
+ },
+ "engines": {
+ "pnpm": ">=8"
+ }
+ },
"node_modules/chokidar": {
"version": "3.5.3",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
@@ -10756,6 +10774,15 @@
"csstype": "^3.1.0"
}
},
+ "node_modules/vue-chartjs": {
+ "version": "5.3.1",
+ "resolved": "https://registry.npmjs.org/vue-chartjs/-/vue-chartjs-5.3.1.tgz",
+ "integrity": "sha512-rZjqcHBxKiHrBl0CIvcOlVEBwRhpWAVf6rDU3vUfa7HuSRmGtCslc0Oc8m16oAVuk0erzc1FCtH1VCriHsrz+A==",
+ "peerDependencies": {
+ "chart.js": "^4.1.1",
+ "vue": "^3.0.0-0 || ^2.7.0"
+ }
+ },
"node_modules/vue-eslint-parser": {
"version": "8.3.0",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz",
diff --git a/package.json b/package.json
index c5e5459..3667210 100644
--- a/package.json
+++ b/package.json
@@ -9,9 +9,11 @@
},
"dependencies": {
"axios": "^1.5.1",
+ "chart.js": "^4.4.3",
"core-js": "^3.8.3",
"leaflet": "^1.9.4",
"vue": "^2.6.14",
+ "vue-chartjs": "^5.3.1",
"vue-material": "^1.0.0-beta-16",
"vue2-leaflet": "^2.7.1"
},
diff --git a/src/App.vue b/src/App.vue
index 8b553fb..60732ef 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -52,6 +52,27 @@ Vue.use(MdSwitch);
Vue.use(MdTooltip);
Vue.use(MdCheckbox);
+import {
+ Chart as ChartJS,
+ Title,
+ Tooltip,
+ Legend,
+ LineElement,
+ LinearScale,
+ CategoryScale,
+ PointElement
+} from 'chart.js'
+
+ChartJS.register(
+ Title,
+ Tooltip,
+ Legend,
+ LineElement,
+ LinearScale,
+ CategoryScale,
+ PointElement
+)
+
import "@/css/buttons.css";
import "@/css/rounded.css";
import "@/css/text.css";
diff --git a/src/api/GlobalApi.js b/src/api/GlobalApi.js
index 19f0b3e..719583c 100644
--- a/src/api/GlobalApi.js
+++ b/src/api/GlobalApi.js
@@ -79,6 +79,7 @@ export default class GlobalApi {
}
getServers4Selector() {
+ this.create_server_websocket()
let r = [];
for (const srv in this.stats.servers_map) {
r.push({"srv": this.stats.servers_map[srv]['key'], "name": this.stats.servers_map[srv]['name']})
@@ -126,6 +127,8 @@ export default class GlobalApi {
this.stats["servers_map"] = response;
} else {
for (let srv in response) {
+ //blya nu ya i dolbaeb missnul
+ response[srv]['key'] = srv;
this.stats["servers_map"][srv] = response[srv];
}
}
diff --git a/src/components/ActionDialogs/Tables/PlayersGraph.vue b/src/components/ActionDialogs/Tables/PlayersGraph.vue
new file mode 100644
index 0000000..2c1ed2b
--- /dev/null
+++ b/src/components/ActionDialogs/Tables/PlayersGraph.vue
@@ -0,0 +1,70 @@
+
+ Загрузка
+