apps.qml 26 KB

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