Summary: | Network Monitor plasmoid cannot show transfer rates in byte-based units anymore | ||
---|---|---|---|
Product: | [Plasma] plasmashell | Reporter: | JanKusanagi <jan-bugs> |
Component: | System Monitor widgets | Assignee: | Marco Martin <notmart> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | bugseforuns, jan-bugs, nate, pditchev, slartibart70 |
Priority: | NOR | ||
Version: | 5.10.4 | ||
Target Milestone: | 1.0 | ||
Platform: | Mageia RPMs | ||
OS: | Linux | ||
Latest Commit: | https://cgit.kde.org/plasma-workspace.git/commit/?id=d21cb2e7a95b1dad92a13d5e7242f45e4aa9111f | Version Fixed In: | 5.18.0 |
Sentry Crash Report: |
Description
JanKusanagi
2017-08-01 19:38:09 UTC
I would also recommend to have a specific option available for the measurement units (bits/sec or (k)bytes/sec, ...) in the 'network monitor settings' This should be configurable, yeah. Here's the patched back to kibibytes /usr/share/plasma/plasmoids/org.kde.plasma.systemmonitor.net/contents/ui/net.qml if anyone wants to patch up to sane units themselves (just replace the file contents with the code below and restart plasmashell with `killall plasmashell && plasmashell` : ``` /* * Copyright 2015 Marco Martin <mart@kde.org> * * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License as * published by the Free Software Foundation; either version 2 or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details * * You should have received a copy of the GNU Library General Public * License along with this program; if not, write to the * Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import QtQuick 2.0 import QtQuick.Layouts 1.1 import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons Applet { id: root onSourceAdded: { if (source.indexOf("network/interfaces/lo/") !== -1) { return; } var match = source.match(/^network\/interfaces\/(\w+)\/transmitter\/data$/); if (match) { var rxSource = "network/interfaces/" + match[1] + "/receiver/data"; root.addSource(source, match[1], rxSource, match[1]); } } delegate: DoublePlotter { function formatData(data) { var value = data.value if (value > 1024) { return i18nc("%1 is the displayed data transfer speed in mebibytes per second", "%1 MiB/s", (value / 1024).toFixed(1)); } return i18nc("%1 is the displayed data transfer speed in kibibytes per second", "%1 KiB/s", (value)); } } } ``` author George Vogiatzis <Gvgeo@protonmail.com> 2019-12-21 10:07:06 -0700 committer Nate Graham <nate@kde.org> 2019-12-21 10:12:47 -0700 commit d21cb2e7a95b1dad92a13d5e7242f45e4aa9111f (patch) tree f079801040382a47cab99997c92905575b969acb parent cd6e94a776f6336a6c13811eac4db9a4fa24ba2a (diff) Add byte display option in Network Monitor plasmoidHEADmaster Summary: Add the option to select between byte and bit display in Network Monitor plasmoid. Bug: 383019 {F7826928} Reviewers: #vdg, #plasma, ngraham Reviewed By: #vdg, ngraham Subscribers: ngraham, plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D26124 Diffstat -rw-r--r-- applets/systemmonitor/common/contents/config/main.xml 8 -rw-r--r-- applets/systemmonitor/net/contents/config/config.qml 5 -rw-r--r-- applets/systemmonitor/net/contents/ui/displayConfig.qml 54 -rw-r--r-- applets/systemmonitor/net/contents/ui/net.qml 20 |