appctrl.qml 26 KB

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