mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
Added total peers in peers count
This commit is contained in:
parent
5e1769b81f
commit
2cb06bb4bb
@ -913,7 +913,8 @@ class WireguardConfiguration:
|
|||||||
"Sent": sum(list(map(lambda x: x.cumu_sent + x.total_sent, self.Peers))),
|
"Sent": sum(list(map(lambda x: x.cumu_sent + x.total_sent, self.Peers))),
|
||||||
"Receive": sum(list(map(lambda x: x.cumu_receive + x.total_receive, self.Peers)))
|
"Receive": sum(list(map(lambda x: x.cumu_receive + x.total_receive, self.Peers)))
|
||||||
},
|
},
|
||||||
"ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers)))
|
"ConnectedPeers": len(list(filter(lambda x: x.status == "running", self.Peers))),
|
||||||
|
"TotalPeers": len(self.Peers)
|
||||||
}
|
}
|
||||||
|
|
||||||
def updateConfigurationSettings(self, newData: dict) -> tuple[bool, str]:
|
def updateConfigurationSettings(self, newData: dict) -> tuple[bool, str]:
|
||||||
|
2
src/static/app/dist/assets/index.css
vendored
2
src/static/app/dist/assets/index.css
vendored
File diff suppressed because one or more lines are too long
18
src/static/app/dist/assets/index.js
vendored
18
src/static/app/dist/assets/index.js
vendored
File diff suppressed because one or more lines are too long
@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build && git commit -a",
|
||||||
"build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
|
"build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
@ -495,7 +495,9 @@ export default {
|
|||||||
<p class="mb-0 text-muted"><small>
|
<p class="mb-0 text-muted"><small>
|
||||||
<LocaleText t="Connected Peers"></LocaleText>
|
<LocaleText t="Connected Peers"></LocaleText>
|
||||||
</small></p>
|
</small></p>
|
||||||
<strong class="h4">{{configurationSummary.connectedPeers}}</strong>
|
<strong class="h4">
|
||||||
|
{{configurationSummary.connectedPeers}} / {{configurationPeers.length}}
|
||||||
|
</strong>
|
||||||
</div>
|
</div>
|
||||||
<i class="bi bi-ethernet ms-auto h2 text-muted"></i>
|
<i class="bi bi-ethernet ms-auto h2 text-muted"></i>
|
||||||
</div>
|
</div>
|
||||||
|
@ -65,7 +65,8 @@ export default {
|
|||||||
<i class="bi bi-arrow-up me-2"></i>{{c.DataUsage.Sent > 0 ? c.DataUsage.Sent.toFixed(4) : 0}} GB
|
<i class="bi bi-arrow-up me-2"></i>{{c.DataUsage.Sent > 0 ? c.DataUsage.Sent.toFixed(4) : 0}} GB
|
||||||
</small>
|
</small>
|
||||||
<small class="text-md-end col-6 col-md-3">
|
<small class="text-md-end col-6 col-md-3">
|
||||||
<span class="dot me-2" :class="{active: c.ConnectedPeers > 0}"></span>{{c.ConnectedPeers}}
|
<span class="dot me-2" :class="{active: c.ConnectedPeers > 0}"></span>
|
||||||
|
{{c.ConnectedPeers}} / {{c.TotalPeers}}
|
||||||
<LocaleText t="Peers"></LocaleText>
|
<LocaleText t="Peers"></LocaleText>
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user