appctrl.qml 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132
  1. import QtQuick 2.6
  2. import QtQuick.Window 2.2
  3. import QtQuick.Controls 1.4 as Ctrl14
  4. import QtQuick.Controls 2.0
  5. import QtQuick.Controls.Styles 1.4
  6. import com.gfa.ipc.appctrl 1.0
  7. import com.gfa.shm._oem_ 1.0
  8. import "globals.js" as Globals
  9. Rectangle {
  10. width: Screen.width
  11. height: Screen.height
  12. function stateColor(state)
  13. {
  14. switch(state)
  15. {
  16. case QGfaAppCtrl.STATE_RUNNING:
  17. return "lightgreen";
  18. case QGfaAppCtrl.STATE_PAUSED:
  19. return "lightgrey";
  20. case QGfaAppCtrl.STATE_HANGING:
  21. return "orange";
  22. case QGfaAppCtrl.STATE_ZOMBIE:
  23. return "red";
  24. default:
  25. return "white";
  26. }
  27. }
  28. function sec2HMS(sec)
  29. {
  30. var h = parseInt(sec / 3600);
  31. sec -= h * 3600;
  32. var m = parseInt(sec / 60);
  33. sec -= m * 60;
  34. return "" + h + (m < 10 ? ":0" : ":") + m + (sec < 10 ? ":0" : ":") + sec;
  35. }
  36. /////////////////////////////////////////////////////////////////////////////////////////////////
  37. TabBar {
  38. id: idTabBar
  39. width: parent.width
  40. currentIndex: 0
  41. Repeater {
  42. id: idRep
  43. model: Globals.tabBarModel
  44. NavButton {
  45. text: modelData[0]
  46. onClicked: { idPageLoader.source = modelData[1]; }
  47. width: idTabBar.width / idRep.count
  48. }
  49. }
  50. }
  51. /////////////////////////////////////////////////////////////////////////////////////////////////
  52. Rectangle {
  53. x: 10
  54. y: 50
  55. width: 120
  56. height: 420
  57. Rectangle {
  58. x: 0
  59. y: 40
  60. width: parent.width
  61. height: 30
  62. Text {
  63. font.pixelSize: 14
  64. font.italic: true
  65. anchors.verticalCenter: parent.verticalCenter
  66. anchors.left: parent.left
  67. text: "State:"
  68. }
  69. }
  70. Rectangle {
  71. x: 0
  72. y: 70
  73. width: parent.width
  74. height: 30
  75. Text {
  76. font.pixelSize: 14
  77. font.italic: true
  78. anchors.verticalCenter: parent.verticalCenter
  79. anchors.left: parent.left
  80. text: "Cyc. cur. μs:"
  81. }
  82. }
  83. Rectangle {
  84. x: 0
  85. y: 100
  86. width: parent.width
  87. height: 30
  88. Text {
  89. font.pixelSize: 14
  90. font.italic: true
  91. anchors.verticalCenter: parent.verticalCenter
  92. anchors.left: parent.left
  93. text: "Wkt. max. μs:"
  94. }
  95. }
  96. Rectangle {
  97. x: 0
  98. y: 130
  99. width: parent.width
  100. height: 30
  101. Text {
  102. font.pixelSize: 14
  103. font.italic: true
  104. anchors.verticalCenter: parent.verticalCenter
  105. anchors.left: parent.left
  106. text: "Wkt. cur. μs:"
  107. }
  108. }
  109. Rectangle {
  110. x: 0
  111. y: 160
  112. width: parent.width
  113. height: 30
  114. Text {
  115. font.pixelSize: 14
  116. font.italic: true
  117. anchors.verticalCenter: parent.verticalCenter
  118. anchors.left: parent.left
  119. text: "CPU avg. %:"
  120. }
  121. }
  122. Rectangle {
  123. x: 0
  124. y: 190
  125. width: parent.width
  126. height: 30
  127. Text {
  128. font.pixelSize: 14
  129. font.italic: true
  130. anchors.verticalCenter: parent.verticalCenter
  131. anchors.left: parent.left
  132. text: "CPU cur. %:"
  133. }
  134. }
  135. Rectangle {
  136. x: 0
  137. y: 220
  138. width: parent.width
  139. height: 30
  140. Text {
  141. font.pixelSize: 14
  142. font.italic: true
  143. anchors.verticalCenter: parent.verticalCenter
  144. anchors.left: parent.left
  145. text: "VM RSS KiB:"
  146. }
  147. }
  148. Rectangle {
  149. x: 0
  150. y: 250
  151. width: parent.width
  152. height: 30
  153. Text {
  154. font.pixelSize: 14
  155. font.italic: true
  156. anchors.verticalCenter: parent.verticalCenter
  157. anchors.left: parent.left
  158. text: "VM Size KiB:"
  159. }
  160. }
  161. Rectangle {
  162. x: 0
  163. y: 380
  164. height: 30
  165. width: parent.width
  166. Ctrl14.Button {
  167. text: "Quit"
  168. anchors.fill: parent
  169. onClicked: Qt.quit()
  170. style: idButtonStyle
  171. }
  172. }
  173. }
  174. /////////////////////////////////////////////////////////////////////////////////////////////////
  175. Rectangle {
  176. x: 140
  177. y: 50
  178. width: 120
  179. height: 420
  180. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_REMANENT]
  181. Rectangle {
  182. x: 0
  183. y: 10
  184. width: parent.width
  185. height: 30
  186. Text {
  187. font.pointSize: 9
  188. font.bold: true
  189. anchors.centerIn: parent
  190. text: parent.parent.appInfo.name
  191. }
  192. }
  193. Rectangle {
  194. x: 0
  195. y: 40
  196. width: parent.width
  197. height: 30
  198. border.width: 1
  199. border.color: "lightgrey"
  200. radius: 5
  201. color: stateColor(parent.appInfo.state)
  202. Text {
  203. font.pixelSize: 14
  204. font.bold: true
  205. anchors.centerIn: parent
  206. text: parent.parent.appInfo.stateText
  207. }
  208. }
  209. Rectangle {
  210. x: 0
  211. y: 70
  212. width: parent.width
  213. height: 30
  214. border.width: 1
  215. border.color: "lightgrey"
  216. radius: 5
  217. Text {
  218. font.pixelSize: 14
  219. anchors.centerIn: parent
  220. text: parent.parent.appInfo.cycCur
  221. }
  222. }
  223. Rectangle {
  224. x: 0
  225. y: 100
  226. width: parent.width
  227. height: 30
  228. border.width: 1
  229. border.color: "lightgrey"
  230. radius: 5
  231. Text {
  232. font.pixelSize: 14
  233. anchors.centerIn: parent
  234. text: parent.parent.appInfo.wktMax
  235. }
  236. }
  237. Rectangle {
  238. x: 0
  239. y: 130
  240. width: parent.width
  241. height: 30
  242. border.width: 1
  243. border.color: "lightgrey"
  244. radius: 5
  245. Text {
  246. font.pixelSize: 14
  247. anchors.centerIn: parent
  248. text: parent.parent.appInfo.wktCur
  249. }
  250. }
  251. Rectangle {
  252. x: 0
  253. y: 160
  254. width: parent.width
  255. height: 30
  256. border.width: 1
  257. border.color: "lightgrey"
  258. radius: 5
  259. Text {
  260. font.pixelSize: 14
  261. anchors.centerIn: parent
  262. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  263. }
  264. }
  265. Rectangle {
  266. x: 0
  267. y: 190
  268. width: parent.width
  269. height: 30
  270. border.width: 1
  271. border.color: "lightgrey"
  272. radius: 5
  273. Text {
  274. font.pixelSize: 14
  275. anchors.centerIn: parent
  276. text: parent.parent.appInfo.cpuCur.toFixed(2)
  277. }
  278. }
  279. Rectangle {
  280. x: 0
  281. y: 220
  282. width: parent.width
  283. height: 30
  284. border.width: 1
  285. border.color: "lightgrey"
  286. radius: 5
  287. Text {
  288. font.pixelSize: 14
  289. anchors.centerIn: parent
  290. text: parent.parent.appInfo.vmRSS
  291. }
  292. }
  293. Rectangle {
  294. x: 0
  295. y: 250
  296. width: parent.width
  297. height: 30
  298. border.width: 1
  299. border.color: "lightgrey"
  300. radius: 5
  301. Text {
  302. font.pixelSize: 14
  303. anchors.centerIn: parent
  304. text: parent.parent.appInfo.vmSize
  305. }
  306. }
  307. Rectangle {
  308. x: 0
  309. y: 300
  310. height: 30
  311. width: parent.width
  312. Ctrl14.Button {
  313. anchors.fill: parent
  314. style: idButtonStyle
  315. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_RUNNING || parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  316. text: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? "Resume" : "Pause"
  317. onClicked: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? parent.parent.appInfo.resume() : parent.parent.appInfo.pause()
  318. }
  319. }
  320. Rectangle {
  321. x: 0
  322. y: 340
  323. height: 30
  324. width: parent.width
  325. Ctrl14.Button {
  326. text: "Stop"
  327. style: idButtonStyle
  328. anchors.fill: parent
  329. onClicked: parent.parent.appInfo.stop()
  330. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_ZOMBIE)
  331. }
  332. }
  333. Rectangle {
  334. x: 0
  335. y: 380
  336. height: 30
  337. width: parent.width
  338. Ctrl14.Button {
  339. text: "Kill"
  340. style: idButtonStyle
  341. anchors.fill: parent
  342. onClicked: parent.parent.appInfo.kill()
  343. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_ZOMBIE)
  344. }
  345. }
  346. }
  347. /////////////////////////////////////////////////////////////////////////////////////////////////
  348. Rectangle {
  349. x: 270
  350. y: 50
  351. width: 120
  352. height: 420
  353. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_MQTTCL]
  354. Rectangle {
  355. x: 0
  356. y: 10
  357. width: parent.width
  358. height: 30
  359. Text {
  360. font.pointSize: 9
  361. font.bold: true
  362. anchors.centerIn: parent
  363. text: parent.parent.appInfo.name
  364. }
  365. }
  366. Rectangle {
  367. x: 0
  368. y: 40
  369. width: parent.width
  370. height: 30
  371. border.width: 1
  372. border.color: "lightgrey"
  373. radius: 5
  374. color: stateColor(parent.appInfo.state)
  375. Text {
  376. font.pixelSize: 14
  377. font.bold: true
  378. anchors.centerIn: parent
  379. text: parent.parent.appInfo.stateText
  380. }
  381. }
  382. Rectangle {
  383. x: 0
  384. y: 70
  385. width: parent.width
  386. height: 30
  387. border.width: 1
  388. border.color: "lightgrey"
  389. radius: 5
  390. Text {
  391. font.pixelSize: 14
  392. anchors.centerIn: parent
  393. text: parent.parent.appInfo.cycCur
  394. }
  395. }
  396. Rectangle {
  397. x: 0
  398. y: 100
  399. width: parent.width
  400. height: 30
  401. border.width: 1
  402. border.color: "lightgrey"
  403. radius: 5
  404. Text {
  405. font.pixelSize: 14
  406. anchors.centerIn: parent
  407. text: parent.parent.appInfo.wktMax
  408. }
  409. }
  410. Rectangle {
  411. x: 0
  412. y: 130
  413. width: parent.width
  414. height: 30
  415. border.width: 1
  416. border.color: "lightgrey"
  417. radius: 5
  418. Text {
  419. font.pixelSize: 14
  420. anchors.centerIn: parent
  421. text: parent.parent.appInfo.wktCur
  422. }
  423. }
  424. Rectangle {
  425. x: 0
  426. y: 160
  427. width: parent.width
  428. height: 30
  429. border.width: 1
  430. border.color: "lightgrey"
  431. radius: 5
  432. Text {
  433. font.pixelSize: 14
  434. anchors.centerIn: parent
  435. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  436. }
  437. }
  438. Rectangle {
  439. x: 0
  440. y: 190
  441. width: parent.width
  442. height: 30
  443. border.width: 1
  444. border.color: "lightgrey"
  445. radius: 5
  446. Text {
  447. font.pixelSize: 14
  448. anchors.centerIn: parent
  449. text: parent.parent.appInfo.cpuCur.toFixed(2)
  450. }
  451. }
  452. Rectangle {
  453. x: 0
  454. y: 220
  455. width: parent.width
  456. height: 30
  457. border.width: 1
  458. border.color: "lightgrey"
  459. radius: 5
  460. Text {
  461. font.pixelSize: 14
  462. anchors.centerIn: parent
  463. text: parent.parent.appInfo.vmRSS
  464. }
  465. }
  466. Rectangle {
  467. x: 0
  468. y: 250
  469. width: parent.width
  470. height: 30
  471. border.width: 1
  472. border.color: "lightgrey"
  473. radius: 5
  474. Text {
  475. font.pixelSize: 14
  476. anchors.centerIn: parent
  477. text: parent.parent.appInfo.vmSize
  478. }
  479. }
  480. Rectangle {
  481. x: 0
  482. y: 300
  483. height: 30
  484. width: parent.width
  485. Ctrl14.Button {
  486. anchors.fill: parent
  487. style: idButtonStyle
  488. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_RUNNING || parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  489. text: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? "Resume" : "Pause"
  490. onClicked: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? parent.parent.appInfo.resume() : parent.parent.appInfo.pause()
  491. }
  492. }
  493. Rectangle {
  494. x: 0
  495. y: 340
  496. height: 30
  497. width: parent.width
  498. Ctrl14.Button {
  499. text: "Stop"
  500. style: idButtonStyle
  501. anchors.fill: parent
  502. onClicked: parent.parent.appInfo.stop()
  503. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_ZOMBIE)
  504. }
  505. }
  506. Rectangle {
  507. x: 0
  508. y: 380
  509. height: 30
  510. width: parent.width
  511. Ctrl14.Button {
  512. text: "Kill"
  513. style: idButtonStyle
  514. anchors.fill: parent
  515. onClicked: parent.parent.appInfo.kill()
  516. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_ZOMBIE)
  517. }
  518. }
  519. }
  520. /////////////////////////////////////////////////////////////////////////////////////////////////
  521. Rectangle {
  522. x: 400
  523. y: 50
  524. width: 120
  525. height: 420
  526. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_REST]
  527. Rectangle {
  528. x: 0
  529. y: 10
  530. width: parent.width
  531. height: 30
  532. Text {
  533. font.pointSize: 9
  534. font.bold: true
  535. anchors.centerIn: parent
  536. text: parent.parent.appInfo.name
  537. }
  538. }
  539. Rectangle {
  540. x: 0
  541. y: 40
  542. width: parent.width
  543. height: 30
  544. border.width: 1
  545. border.color: "lightgrey"
  546. radius: 5
  547. color: stateColor(parent.appInfo.state)
  548. Text {
  549. font.pixelSize: 14
  550. font.bold: true
  551. anchors.centerIn: parent
  552. text: parent.parent.appInfo.stateText
  553. }
  554. }
  555. Rectangle {
  556. x: 0
  557. y: 70
  558. width: parent.width
  559. height: 30
  560. border.width: 1
  561. border.color: "lightgrey"
  562. radius: 5
  563. Text {
  564. font.pixelSize: 14
  565. anchors.centerIn: parent
  566. text: parent.parent.appInfo.cycCur
  567. }
  568. }
  569. Rectangle {
  570. x: 0
  571. y: 100
  572. width: parent.width
  573. height: 30
  574. border.width: 1
  575. border.color: "lightgrey"
  576. radius: 5
  577. Text {
  578. font.pixelSize: 14
  579. anchors.centerIn: parent
  580. text: parent.parent.appInfo.wktMax
  581. }
  582. }
  583. Rectangle {
  584. x: 0
  585. y: 130
  586. width: parent.width
  587. height: 30
  588. border.width: 1
  589. border.color: "lightgrey"
  590. radius: 5
  591. Text {
  592. font.pixelSize: 14
  593. anchors.centerIn: parent
  594. text: parent.parent.appInfo.wktCur
  595. }
  596. }
  597. Rectangle {
  598. x: 0
  599. y: 160
  600. width: parent.width
  601. height: 30
  602. border.width: 1
  603. border.color: "lightgrey"
  604. radius: 5
  605. Text {
  606. font.pixelSize: 14
  607. anchors.centerIn: parent
  608. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  609. }
  610. }
  611. Rectangle {
  612. x: 0
  613. y: 190
  614. width: parent.width
  615. height: 30
  616. border.width: 1
  617. border.color: "lightgrey"
  618. radius: 5
  619. Text {
  620. font.pixelSize: 14
  621. anchors.centerIn: parent
  622. text: parent.parent.appInfo.cpuCur.toFixed(2)
  623. }
  624. }
  625. Rectangle {
  626. x: 0
  627. y: 220
  628. width: parent.width
  629. height: 30
  630. border.width: 1
  631. border.color: "lightgrey"
  632. radius: 5
  633. Text {
  634. font.pixelSize: 14
  635. anchors.centerIn: parent
  636. text: parent.parent.appInfo.vmRSS
  637. }
  638. }
  639. Rectangle {
  640. x: 0
  641. y: 250
  642. width: parent.width
  643. height: 30
  644. border.width: 1
  645. border.color: "lightgrey"
  646. radius: 5
  647. Text {
  648. font.pixelSize: 14
  649. anchors.centerIn: parent
  650. text: parent.parent.appInfo.vmSize
  651. }
  652. }
  653. Rectangle {
  654. x: 0
  655. y: 300
  656. height: 30
  657. width: parent.width
  658. Ctrl14.Button {
  659. anchors.fill: parent
  660. style: idButtonStyle
  661. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_RUNNING || parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  662. text: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? "Resume" : "Pause"
  663. onClicked: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? parent.parent.appInfo.resume() : parent.parent.appInfo.pause()
  664. }
  665. }
  666. Rectangle {
  667. x: 0
  668. y: 340
  669. height: 30
  670. width: parent.width
  671. Ctrl14.Button {
  672. text: "Stop"
  673. style: idButtonStyle
  674. anchors.fill: parent
  675. onClicked: parent.parent.appInfo.stop()
  676. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_ZOMBIE)
  677. }
  678. }
  679. Rectangle {
  680. x: 0
  681. y: 380
  682. height: 30
  683. width: parent.width
  684. Ctrl14.Button {
  685. text: "Kill"
  686. style: idButtonStyle
  687. anchors.fill: parent
  688. onClicked: parent.parent.appInfo.kill()
  689. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_ZOMBIE)
  690. }
  691. }
  692. }
  693. /////////////////////////////////////////////////////////////////////////////////////////////////
  694. Rectangle {
  695. x: 530
  696. y: 50
  697. width: 120
  698. height: 420
  699. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_DATALOGGER]
  700. Rectangle {
  701. x: 0
  702. y: 10
  703. width: parent.width
  704. height: 30
  705. Text {
  706. font.pointSize: 9
  707. font.bold: true
  708. anchors.centerIn: parent
  709. text: parent.parent.appInfo.name
  710. }
  711. }
  712. Rectangle {
  713. x: 0
  714. y: 40
  715. width: parent.width
  716. height: 30
  717. border.width: 1
  718. border.color: "lightgrey"
  719. radius: 5
  720. color: stateColor(parent.appInfo.state)
  721. Text {
  722. font.pixelSize: 14
  723. font.bold: true
  724. anchors.centerIn: parent
  725. text: parent.parent.appInfo.stateText
  726. }
  727. }
  728. Rectangle {
  729. x: 0
  730. y: 70
  731. width: parent.width
  732. height: 30
  733. border.width: 1
  734. border.color: "lightgrey"
  735. radius: 5
  736. Text {
  737. font.pixelSize: 14
  738. anchors.centerIn: parent
  739. text: parent.parent.appInfo.cycCur
  740. }
  741. }
  742. Rectangle {
  743. x: 0
  744. y: 100
  745. width: parent.width
  746. height: 30
  747. border.width: 1
  748. border.color: "lightgrey"
  749. radius: 5
  750. Text {
  751. font.pixelSize: 14
  752. anchors.centerIn: parent
  753. text: parent.parent.appInfo.wktMax
  754. }
  755. }
  756. Rectangle {
  757. x: 0
  758. y: 130
  759. width: parent.width
  760. height: 30
  761. border.width: 1
  762. border.color: "lightgrey"
  763. radius: 5
  764. Text {
  765. font.pixelSize: 14
  766. anchors.centerIn: parent
  767. text: parent.parent.appInfo.wktCur
  768. }
  769. }
  770. Rectangle {
  771. x: 0
  772. y: 160
  773. width: parent.width
  774. height: 30
  775. border.width: 1
  776. border.color: "lightgrey"
  777. radius: 5
  778. Text {
  779. font.pixelSize: 14
  780. anchors.centerIn: parent
  781. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  782. }
  783. }
  784. Rectangle {
  785. x: 0
  786. y: 190
  787. width: parent.width
  788. height: 30
  789. border.width: 1
  790. border.color: "lightgrey"
  791. radius: 5
  792. Text {
  793. font.pixelSize: 14
  794. anchors.centerIn: parent
  795. text: parent.parent.appInfo.cpuCur.toFixed(2)
  796. }
  797. }
  798. Rectangle {
  799. x: 0
  800. y: 220
  801. width: parent.width
  802. height: 30
  803. border.width: 1
  804. border.color: "lightgrey"
  805. radius: 5
  806. Text {
  807. font.pixelSize: 14
  808. anchors.centerIn: parent
  809. text: parent.parent.appInfo.vmRSS
  810. }
  811. }
  812. Rectangle {
  813. x: 0
  814. y: 250
  815. width: parent.width
  816. height: 30
  817. border.width: 1
  818. border.color: "lightgrey"
  819. radius: 5
  820. Text {
  821. font.pixelSize: 14
  822. anchors.centerIn: parent
  823. text: parent.parent.appInfo.vmSize
  824. }
  825. }
  826. Rectangle {
  827. x: 0
  828. y: 300
  829. height: 30
  830. width: parent.width
  831. Ctrl14.Button {
  832. anchors.fill: parent
  833. style: idButtonStyle
  834. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_RUNNING || parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  835. text: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? "Resume" : "Pause"
  836. onClicked: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? parent.parent.appInfo.resume() : parent.parent.appInfo.pause()
  837. }
  838. }
  839. Rectangle {
  840. x: 0
  841. y: 340
  842. height: 30
  843. width: parent.width
  844. Ctrl14.Button {
  845. text: "Stop"
  846. style: idButtonStyle
  847. anchors.fill: parent
  848. onClicked: parent.parent.appInfo.stop()
  849. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_ZOMBIE)
  850. }
  851. }
  852. Rectangle {
  853. x: 0
  854. y: 380
  855. height: 30
  856. width: parent.width
  857. Ctrl14.Button {
  858. text: "Kill"
  859. style: idButtonStyle
  860. anchors.fill: parent
  861. onClicked: parent.parent.appInfo.kill()
  862. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_ZOMBIE)
  863. }
  864. }
  865. }
  866. /////////////////////////////////////////////////////////////////////////////////////////////////
  867. Rectangle {
  868. x: 660
  869. y: 50
  870. width: 120
  871. height: 420
  872. property var appInfo: qGfaAppCtrl.appInfo[QGfaAppCtrl.APP_INDEX_SUMMARIST]
  873. Rectangle {
  874. x: 0
  875. y: 10
  876. width: parent.width
  877. height: 30
  878. Text {
  879. font.pointSize: 9
  880. font.bold: true
  881. anchors.centerIn: parent
  882. text: parent.parent.appInfo.name
  883. }
  884. }
  885. Rectangle {
  886. x: 0
  887. y: 40
  888. width: parent.width
  889. height: 30
  890. border.width: 1
  891. border.color: "lightgrey"
  892. radius: 5
  893. color: stateColor(parent.appInfo.state)
  894. Text {
  895. font.pixelSize: 14
  896. font.bold: true
  897. anchors.centerIn: parent
  898. text: parent.parent.appInfo.stateText
  899. }
  900. }
  901. Rectangle {
  902. x: 0
  903. y: 70
  904. width: parent.width
  905. height: 30
  906. border.width: 1
  907. border.color: "lightgrey"
  908. radius: 5
  909. Text {
  910. font.pixelSize: 14
  911. anchors.centerIn: parent
  912. text: parent.parent.appInfo.cycCur
  913. }
  914. }
  915. Rectangle {
  916. x: 0
  917. y: 100
  918. width: parent.width
  919. height: 30
  920. border.width: 1
  921. border.color: "lightgrey"
  922. radius: 5
  923. Text {
  924. font.pixelSize: 14
  925. anchors.centerIn: parent
  926. text: parent.parent.appInfo.wktMax
  927. }
  928. }
  929. Rectangle {
  930. x: 0
  931. y: 130
  932. width: parent.width
  933. height: 30
  934. border.width: 1
  935. border.color: "lightgrey"
  936. radius: 5
  937. Text {
  938. font.pixelSize: 14
  939. anchors.centerIn: parent
  940. text: parent.parent.appInfo.wktCur
  941. }
  942. }
  943. Rectangle {
  944. x: 0
  945. y: 160
  946. width: parent.width
  947. height: 30
  948. border.width: 1
  949. border.color: "lightgrey"
  950. radius: 5
  951. Text {
  952. font.pixelSize: 14
  953. anchors.centerIn: parent
  954. text: parent.parent.appInfo.cpuAvg.toFixed(2)
  955. }
  956. }
  957. Rectangle {
  958. x: 0
  959. y: 190
  960. width: parent.width
  961. height: 30
  962. border.width: 1
  963. border.color: "lightgrey"
  964. radius: 5
  965. Text {
  966. font.pixelSize: 14
  967. anchors.centerIn: parent
  968. text: parent.parent.appInfo.cpuCur.toFixed(2)
  969. }
  970. }
  971. Rectangle {
  972. x: 0
  973. y: 220
  974. width: parent.width
  975. height: 30
  976. border.width: 1
  977. border.color: "lightgrey"
  978. radius: 5
  979. Text {
  980. font.pixelSize: 14
  981. anchors.centerIn: parent
  982. text: parent.parent.appInfo.vmRSS
  983. }
  984. }
  985. Rectangle {
  986. x: 0
  987. y: 250
  988. width: parent.width
  989. height: 30
  990. border.width: 1
  991. border.color: "lightgrey"
  992. radius: 5
  993. Text {
  994. font.pixelSize: 14
  995. anchors.centerIn: parent
  996. text: parent.parent.appInfo.vmSize
  997. }
  998. }
  999. Rectangle {
  1000. x: 0
  1001. y: 300
  1002. height: 30
  1003. width: parent.width
  1004. Ctrl14.Button {
  1005. anchors.fill: parent
  1006. style: idButtonStyle
  1007. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_RUNNING || parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED)
  1008. text: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? "Resume" : "Pause"
  1009. onClicked: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_PAUSED) ? parent.parent.appInfo.resume() : parent.parent.appInfo.pause()
  1010. }
  1011. }
  1012. Rectangle {
  1013. x: 0
  1014. y: 340
  1015. height: 30
  1016. width: parent.width
  1017. Ctrl14.Button {
  1018. text: "Stop"
  1019. style: idButtonStyle
  1020. anchors.fill: parent
  1021. onClicked: parent.parent.appInfo.stop()
  1022. enabled: (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_NOT_RUNNING) && (parent.parent.appInfo.state !== QGfaAppCtrl.STATE_ZOMBIE)
  1023. }
  1024. }
  1025. Rectangle {
  1026. x: 0
  1027. y: 380
  1028. height: 30
  1029. width: parent.width
  1030. Ctrl14.Button {
  1031. text: "Kill"
  1032. style: idButtonStyle
  1033. anchors.fill: parent
  1034. onClicked: parent.parent.appInfo.kill()
  1035. enabled: (parent.parent.appInfo.state === QGfaAppCtrl.STATE_ZOMBIE)
  1036. }
  1037. }
  1038. }
  1039. }