diff options
author | Anatoly Kozlov <AnKozlov@luxoft.com> | 2018-04-04 17:03:23 +0200 |
---|---|---|
committer | Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com> | 2018-04-06 06:19:51 +0000 |
commit | 05eed267c65953fc85261b5b278b4addf40ae927 (patch) | |
tree | e5a0b3db0f3c5dec415eb68b6447b44099f0e0fd | |
parent | 80f4c7706db4372757b96311c2befc538e90f638 (diff) |
[sysui] Performance monitor
- Add logos of the companies working on the project
- Add detailed information about every running application
Task-number: QTAUTO-953
Change-Id: If758f8120708cc9c42e337b0e548a32d13c5f129
Reviewed-by: Daniel d'Andrada <daniel.dandrada@luxoft.com>
Reviewed-by: Bramastyo Harimukti Santoso <bramastyo.harimukti.santoso@pelagicore.com>
-rw-r--r-- | imports/assets/gfx/hero-about.png | 3 | ||||
-rw-r--r-- | imports/assets/gfx/logo-kdab.png | 3 | ||||
-rw-r--r-- | imports/assets/gfx/logo-luxoft.png | 3 | ||||
-rw-r--r-- | imports/assets/gfx/logo-theqtcompany.png | 3 | ||||
-rw-r--r-- | imports/assets/translations/cs_CZ.ts | 8 | ||||
-rw-r--r-- | imports/assets/translations/de_DE.ts | 13 | ||||
-rw-r--r-- | imports/assets/translations/en_GB.ts | 13 | ||||
-rw-r--r-- | imports/assets/translations/en_US.ts | 13 | ||||
-rw-r--r-- | imports/assets/translations/ja_JP.ts | 13 | ||||
-rw-r--r-- | imports/assets/translations/ko_KR.ts | 13 | ||||
-rw-r--r-- | imports/assets/translations/zh_CN.ts | 13 | ||||
-rw-r--r-- | sysui/about/About.qml | 50 | ||||
-rw-r--r-- | sysui/about/AboutRunningApps.qml | 65 |
13 files changed, 111 insertions, 102 deletions
diff --git a/imports/assets/gfx/hero-about.png b/imports/assets/gfx/hero-about.png deleted file mode 100644 index 406533ea..00000000 --- a/imports/assets/gfx/hero-about.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bee2869b51901343e8beb3e02c5b7a0e6696dc0be7b22093fde388df1eabbf39 -size 958841 diff --git a/imports/assets/gfx/logo-kdab.png b/imports/assets/gfx/logo-kdab.png new file mode 100644 index 00000000..10cfd84e --- /dev/null +++ b/imports/assets/gfx/logo-kdab.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ccd227efaf6ae27ea455fcfd59b1b8c8bc8993908783ee1a057920303ed4ef3a +size 13866 diff --git a/imports/assets/gfx/logo-luxoft.png b/imports/assets/gfx/logo-luxoft.png new file mode 100644 index 00000000..4bfa4289 --- /dev/null +++ b/imports/assets/gfx/logo-luxoft.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ef0ac873a50540268a689cc20b533fca930d31fc224dc58f735d1251935793d3 +size 12214 diff --git a/imports/assets/gfx/logo-theqtcompany.png b/imports/assets/gfx/logo-theqtcompany.png new file mode 100644 index 00000000..dd844267 --- /dev/null +++ b/imports/assets/gfx/logo-theqtcompany.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c6a60de402e3292c88f4333e3c74746d66efdd9b731a84d78d4bf6bd81d40493 +size 15405 diff --git a/imports/assets/translations/cs_CZ.ts b/imports/assets/translations/cs_CZ.ts index 7cb3868b..0819be45 100644 --- a/imports/assets/translations/cs_CZ.ts +++ b/imports/assets/translations/cs_CZ.ts @@ -10,12 +10,12 @@ <message> <source>Bringing stunning UX to the road</source> - <translation>Přinášíme ohromující + <translation type="vanished">Přinášíme ohromující UX na cestu</translation> </message> <message> <source>QtAuto - Agile UX Development</source> - <translation>QtAuto - Agilní UX vývoj</translation> + <translation type="vanished">QtAuto - Agilní UX vývoj</translation> </message> <message> <source>Monitor</source> @@ -71,6 +71,10 @@ UX na cestu</translation> <source>Running applications:</source> <translation>Spuštěné aplikace:</translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/de_DE.ts b/imports/assets/translations/de_DE.ts index 7d784d57..e72171ef 100644 --- a/imports/assets/translations/de_DE.ts +++ b/imports/assets/translations/de_DE.ts @@ -16,15 +16,6 @@ <translation>Laufende Programme</translation> </message> <message> - <source>Bringing stunning -UX to the road</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation type="unfinished"></translation> - </message> - <message> <source>System</source> <translation type="unfinished"></translation> </message> @@ -70,6 +61,10 @@ UX to the road</source> <source>Running applications:</source> <translation>Laufende Programme:</translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/en_GB.ts b/imports/assets/translations/en_GB.ts index 12748ad4..230ce952 100644 --- a/imports/assets/translations/en_GB.ts +++ b/imports/assets/translations/en_GB.ts @@ -8,15 +8,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>Bringing stunning -UX to the road</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation type="unfinished"></translation> - </message> - <message> <source>System</source> <translation type="unfinished"></translation> </message> @@ -62,6 +53,10 @@ UX to the road</source> <source>Running applications:</source> <translation type="unfinished"></translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/en_US.ts b/imports/assets/translations/en_US.ts index a63b2b96..3690e7a2 100644 --- a/imports/assets/translations/en_US.ts +++ b/imports/assets/translations/en_US.ts @@ -4,15 +4,6 @@ <context> <name>About</name> <message> - <source>Bringing stunning -UX to the road</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Running Apps</source> <translation type="unfinished"></translation> </message> @@ -62,6 +53,10 @@ UX to the road</source> <source>Running applications:</source> <translation type="unfinished"></translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/ja_JP.ts b/imports/assets/translations/ja_JP.ts index 257e6193..9ae3c852 100644 --- a/imports/assets/translations/ja_JP.ts +++ b/imports/assets/translations/ja_JP.ts @@ -8,15 +8,6 @@ <translation type="vanished">マーケティング</translation> </message> <message> - <source>Bringing stunning -UX to the road</source> - <translation></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation></translation> - </message> - <message> <source>Monitor</source> <translation type="vanished">モニター</translation> </message> @@ -70,6 +61,10 @@ UX to the road</source> <source>Running applications:</source> <translation>アプリケーションの実行:</translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/ko_KR.ts b/imports/assets/translations/ko_KR.ts index bef84e38..0c4f0911 100644 --- a/imports/assets/translations/ko_KR.ts +++ b/imports/assets/translations/ko_KR.ts @@ -8,15 +8,6 @@ <translation type="vanished">마케팅</translation> </message> <message> - <source>Bringing stunning -UX to the road</source> - <translation></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation></translation> - </message> - <message> <source>Monitor</source> <translation type="vanished">모니터</translation> </message> @@ -77,6 +68,10 @@ UX to the road</source> <source>Running applications:</source> <translation>실행중인 응용 프로그램 :</translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/imports/assets/translations/zh_CN.ts b/imports/assets/translations/zh_CN.ts index 43d96afa..b01eb7dd 100644 --- a/imports/assets/translations/zh_CN.ts +++ b/imports/assets/translations/zh_CN.ts @@ -8,15 +8,6 @@ <translation type="vanished">营销</translation> </message> <message> - <source>Bringing stunning -UX to the road</source> - <translation></translation> - </message> - <message> - <source>QtAuto - Agile UX Development</source> - <translation></translation> - </message> - <message> <source>Monitor</source> <translation type="vanished">监控</translation> </message> @@ -77,6 +68,10 @@ UX to the road</source> <source>Running applications:</source> <translation>运行中的App:</translation> </message> + <message> + <source>CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB</source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>AddWidgetPopup</name> diff --git a/sysui/about/About.qml b/sysui/about/About.qml index 0f38c429..b662d059 100644 --- a/sysui/about/About.qml +++ b/sysui/about/About.qml @@ -46,7 +46,8 @@ NeptunePopup { property var applicationModel - bottomPadding: Style.hspan(0.35) + topPadding: NeptuneStyle.dp(20) + bottomPadding: NeptuneStyle.dp(20) property string currentTabName: tabBar.currentItem.name @@ -54,34 +55,28 @@ NeptunePopup { id: mainLayout readonly property real contentSideMargin: Style.hspan(1.5) - Image { + RowLayout { Layout.fillWidth: true - source: Style.gfx("hero-about") - asynchronous: true - - Label { - id: slogan - anchors.top: parent.top - anchors.topMargin: parent.height * 0.1 - anchors.left: parent.left - anchors.leftMargin: parent.width * 0.04 - anchors.right: parent.right - anchors.rightMargin: parent.width * 0.45 - // manual line break to ensure it looks the best instead of leaving it up - // to automatic word-wrapping - text: qsTr("Bringing stunning\nUX to the road") - verticalAlignment: Text.AlignTop - font.pixelSize: NeptuneStyle.fontSizeXXL - font.weight: Font.Bold + Layout.leftMargin: mainLayout.contentSideMargin + Layout.rightMargin: mainLayout.contentSideMargin + spacing: NeptuneStyle.dp(50) + Image { + Layout.fillWidth: true + Layout.preferredWidth: parent.width / 3 + fillMode: Image.PreserveAspectFit + source: Style.gfx("logo-theqtcompany") } - - Label { - anchors.top: slogan.bottom - anchors.topMargin: font.pixelSize * 0.5 - anchors.left: slogan.left - text: qsTr("QtAuto - Agile UX Development") - font.weight: Font.DemiBold - font.pixelSize: NeptuneStyle.fontSizeL + Image { + Layout.fillWidth: true + Layout.preferredWidth: parent.width / 3 + fillMode: Image.PreserveAspectFit + source: Style.gfx("logo-luxoft") + } + Image { + Layout.fillWidth: true + Layout.preferredWidth: parent.width / 3 + fillMode: Image.PreserveAspectFit + source: Style.gfx("logo-kdab") } } @@ -112,6 +107,7 @@ NeptunePopup { StackLayout { Layout.fillWidth: true Layout.fillHeight: true + Layout.topMargin: NeptuneStyle.dp(10) Layout.leftMargin: mainLayout.contentSideMargin Layout.rightMargin: mainLayout.contentSideMargin Layout.bottomMargin: Style.vspan(0.3) diff --git a/sysui/about/AboutRunningApps.qml b/sysui/about/AboutRunningApps.qml index 884e983e..44f20219 100644 --- a/sysui/about/AboutRunningApps.qml +++ b/sysui/about/AboutRunningApps.qml @@ -31,9 +31,11 @@ import QtQuick 2.8 import QtQuick.Controls 2.3 +import QtApplicationManager 1.0 import com.pelagicore.styles.neptune 3.0 import utils 1.0 +import controls 1.0 Item { id: root @@ -60,6 +62,26 @@ Item { Instantiator { model: root.applicationModel delegate: QtObject { + property ProcessMonitor monitor: ProcessMonitor { + applicationId: model.appInfo.id + reportingInterval: 1000 + memoryReportingEnabled: root.visible + cpuLoadReportingEnabled: root.visible + onMemoryReportingChanged: { + var mPSS = (memoryPss.total / 1e6).toFixed(0) + var mRSS = (memoryRss.total / 1e6).toFixed(0) + var mVirtual = (memoryVirtual.total / 1e6).toFixed(0) + var indx = runningAppsModel.getAppIndex(model.appInfo.id); + runningAppsModel.setProperty(indx, "memoryPSS", mPSS) + runningAppsModel.setProperty(indx, "memoryRSS", mRSS) + runningAppsModel.setProperty(indx, "memoryVirtual", mVirtual) + } + onCpuLoadReportingChanged: { + var indx = runningAppsModel.getAppIndex(model.appInfo.id); + runningAppsModel.setProperty(indx, "cpuLoad", (load * 100).toFixed(1)) + } + } + property var con: Connections { target: model.appInfo onRunningChanged: { @@ -82,7 +104,13 @@ Item { id: runningAppsModel function appendAppInfo(appInfo) { - append({"appInfo":appInfo}); + append({ + "appInfo": appInfo, + "memoryPSS": "0", + "memoryRSS": "0", + "memoryVirtual": "0", + "cpuLoad": "0.0" + }); } function removeAppInfo(appInfo) { var i; @@ -94,32 +122,37 @@ Item { } } } + function getAppIndex(id) { + for (var j = 0; j < count; j++) { + var item = get(j); + if (item.appInfo.id === id) { + return j; + } + } + return -1; + } } ListView { id: listView + clip: true model: runningAppsModel anchors.top: description.bottom anchors.left: parent.left - anchors.leftMargin: Style.hspan(1) anchors.right: parent.right - anchors.rightMargin: Style.hspan(1) anchors.bottom: parent.bottom - delegate: Row { - height: Style.vspan(1) - Button { - width: Style.hspan(2) - height: parent.height - flat: true - text: "X" - onClicked: model.appInfo.stop() - } - Label { - text: model.appInfo.name - height: parent.height - } + delegate: ListItem { + width: parent.width + height: NeptuneStyle.dp(110) + rightToolSymbol: Style.symbol("ic-close") + text: model.appInfo.name + subText: qsTr("CPU: %L1 %; Virtual: %L2 MB; RSS: %L3 MB; PSS: %L4 MB"). + arg(model.cpuLoad).arg(model.memoryVirtual). + arg(model.memoryRSS).arg(model.memoryPSS) + onRightToolClicked: model.appInfo.stop() } + ScrollIndicator.vertical: ScrollIndicator {} } } |