Changeset View
Changeset View
Standalone View
Standalone View
applets/systemmonitor/diskactivity/contents/ui/diskactivity.qml
Show All 31 Lines | 31 | onSourceAdded: { | |||
---|---|---|---|---|---|
32 | var match = source.match(/^disk\/([^\/]+)\/Rate\/wblk/); | 32 | var match = source.match(/^disk\/([^\/]+)\/Rate\/wblk/); | ||
33 | if (match) { | 33 | if (match) { | ||
34 | var rSource = "disk/" + match[1] + "/Rate/rblk" | 34 | var rSource = "disk/" + match[1] + "/Rate/rblk" | ||
35 | root.addSource(source, match[1], rSource, match[1]); | 35 | root.addSource(source, match[1], rSource, match[1]); | ||
36 | } | 36 | } | ||
37 | } | 37 | } | ||
38 | 38 | | |||
39 | delegate: DoublePlotter { | 39 | delegate: DoublePlotter { | ||
40 | downloadLabel: i18nc("Part of a read/write pair, as in: Read: 5 kb/s | Write: 0 kb/s", "Read:") | ||||
41 | uploadLabel: i18nc("Part of a read/write pair, as in: Read: 5 kb/s | Write: 0 kb/s", "Write:") | ||||
40 | function formatData(data) { | 42 | function formatData(data) { | ||
41 | return i18nc("%1 is value of data per seconds", "%1/s", KCoreAddons.Format.formatByteSize(data.value * 1024)) | 43 | return i18nc("%1 is value of data per seconds", "%1/s", KCoreAddons.Format.formatByteSize(data.value * 1024)) | ||
42 | } | 44 | } | ||
43 | } | 45 | } | ||
44 | } | 46 | } |