Web UI for ARGUS server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

924 lines
23 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. if( $CUser->Data['id'] > 1 ){
  4. $EID = intval( $_POST['MID'] );
  5. $QS = "SELECT * FROM server_modules WHERE id = {$EID}";
  6. $Result = $DATABASE->Query( $QS, false );
  7. if( count( $Result ) ){
  8. $CR = $Result[0];
  9. switch( $CR['type'] ){
  10. case 1: //ZLMedia
  11. $TPL =<<<EFUFU
  12. {
  13. xtype: 'form',
  14. labelAlign: 'right',
  15. autoScroll: 'auto',
  16. labelWidth: 120,
  17. items:[{
  18. border: false,
  19. frame: false,
  20. xtype: 'panel',
  21. html: '<table width="100%" border=0 class="setEd_infoPanel" id="UART"><tr><td width="65px"><img width="64px" src="/style/assets/ZL_logo.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  22. },{
  23. xtype: 'spacer',
  24. height: 5
  25. },{
  26. border: false,
  27. frame: false,
  28. xtype: 'panel',
  29. html: '<table width="100%" border=0 class="setEd_infoPanel" id="UART"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  30. },{
  31. xtype: 'spacer',
  32. height: 5
  33. },{
  34. xtype: 'combo',
  35. fieldLabel: 'Module Status',
  36. id: 'mod_ena',
  37. lazyRender:true,
  38. mode: 'local',
  39. forceSelection: true,
  40. triggerAction: 'all',
  41. editable: false,
  42. disableKeyFilter: true,
  43. store: new Ext.data.ArrayStore({
  44. fields: ['status_val','status_txt'],
  45. data: [[0,'Disabled'],[1,'Enabled']]
  46. }),
  47. value: %%%ENA_VAL%%%,
  48. valueField: 'status_val',
  49. displayField: 'status_txt',
  50. listeners:{
  51. select: function( t, r, i ){
  52. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  53. }
  54. }
  55. },{
  56. xtype: 'spacer',
  57. height: 5
  58. },{
  59. xtype: 'button',
  60. id: 'mo_edit_btn',
  61. disabled: false,
  62. width: '100%',
  63. text: 'Edit Module Config',
  64. handler: function(){
  65. }
  66. },{
  67. xtype: 'spacer',
  68. height: 5
  69. },{
  70. xtype: 'button',
  71. id: 'mo_del_btn',
  72. disabled: false,
  73. width: '100%',
  74. text: 'Remove Module',
  75. handler: function(){
  76. removeModule({$EID});
  77. }
  78. }]
  79. }
  80. EFUFU;
  81. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ZL_MEDIA_DESC_SHO_') , $TPL );
  82. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ZL_MEDIA_DESC_LOO_'), $TPL );
  83. $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL );
  84. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  85. echo $TPL;
  86. break;
  87. case 2: //DCB USB
  88. break;
  89. case 3: //Kafka
  90. $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}";
  91. $II = $DATABASE->Query( $QS );
  92. $CI = $II[0];
  93. $R_nfo = 'Broker Node:'. $CI['brocker_address'].':'.$CI['brocker_port'].((intval($CI['use_ssl'])>0)?'<img title="SSL Encription" src="/style/icons/icons/rosette.png">':'<img title="NO Encription" src="/style/icons/icons/flag_green.png">');
  94. $USSL = (intval($CI['use_ssl'])>0)?'true':'false';
  95. $TPL =<<<EFUFU
  96. {
  97. xtype: 'tabpanel',
  98. activeTab: 0,
  99. items:[{
  100. xtype: 'form',
  101. id: 'ks_fp_ms',
  102. title: '{$Labels->GetLabel('_KAFKA_BROKER_')}',
  103. labelWidth: 480,
  104. labelAlign: 'right',
  105. border: false,
  106. frame: false,
  107. items:[{
  108. xtype: 'spacer',
  109. height: 10
  110. },{
  111. xtype: 'textfield',
  112. fieldLabel: 'Broker Address',
  113. value: '{$CI['brocker_address']}'
  114. },{
  115. xtype: 'numberfield',
  116. fieldLabel: 'Broker Port',
  117. value: {$CI['brocker_port']}
  118. },{
  119. xtype: 'checkbox',
  120. fieldLabel: 'Use SSL',
  121. checked: {$USSL}
  122. },{
  123. xtype: 'button',
  124. id: 'cl_cert_select',
  125. fieldLabel: 'CA Root certificate to verify the broker\'s certificate [truststore]',
  126. text: 'Upload New',
  127. handler: function(){
  128. currentSelectedFile = 1;
  129. }
  130. },{
  131. xtype: 'button',
  132. id: 'ca_cert_select',
  133. fieldLabel: 'Client\'s certificate [keystore]',
  134. text: 'Upload New',
  135. handler: function(){
  136. currentSelectedFile = 1;
  137. }
  138. },{
  139. xtype: 'button',
  140. id: 'cl_key_select',
  141. fieldLabel: 'Client\'s key [key]',
  142. text: 'Upload New',
  143. handler: function(){
  144. currentSelectedFile = 1;
  145. }
  146. },{
  147. xtype: 'textfield',
  148. fieldLabel: 'Access Username',
  149. value: '{$CI['cred_username']}'
  150. },{
  151. xtype: 'textfield',
  152. fieldLabel: 'Access Password',
  153. value: '{$CI['cred_password']}'
  154. },{
  155. xtype: 'panel',
  156. id: 'validator',
  157. html: '<p>Vault ID: {$CI['vault_md5']}</p>'
  158. }]
  159. },{
  160. title: '{$Labels->GetLabel('_KAFKA_TOP_EVTS_')}',
  161. html: ''
  162. }],
  163. listeners:{
  164. afterrender: function(){
  165. var currentSelectedFile = 0;
  166. var up_ca = new plupload.Uploader({
  167. runtimes : 'html5,html4',
  168. browse_button : Ext.getDom('ca_cert_select'),
  169. max_file_size : '256kb',
  170. chunk_size: '10kb',
  171. max_retries: 0,
  172. multi_selection: false,
  173. max_file_count: 1,
  174. url: '/lib/controller/uploadModuleKafkaData.php',
  175. filters : [
  176. {title : "Certificate files", extensions : "pem,crt,cert,jks"}
  177. ],
  178. init: {
  179. PostInit: function() {
  180. },
  181. FilesAdded: function( up, files ) {
  182. up_ca.start();
  183. },
  184. UploadProgress: function(up, file) {
  185. if( file.percent == 100 ){
  186. alert('Umpalumpa');
  187. };
  188. },
  189. Error: function(up, err) {
  190. Ext.Msg.show({
  191. title:'Upload Status',
  192. msg: "Error #" + err.code + ": " + err.message,
  193. buttons: Ext.Msg.OK,
  194. icon: Ext.MessageBox.ERROR
  195. });
  196. }
  197. }
  198. });
  199. var up_crt = new plupload.Uploader({
  200. runtimes : 'html5,html4',
  201. browse_button : Ext.getDom('cl_cert_select'),
  202. max_file_size : '256kb',
  203. chunk_size: '10kb',
  204. max_retries: 0,
  205. multi_selection: false,
  206. max_file_count: 1,
  207. url: '/lib/controller/uploadModuleKafkaData.php',
  208. filters : [
  209. {title : "Certificate files", extensions : "pem,crt,cert,jks"}
  210. ],
  211. init: {
  212. PostInit: function() {
  213. },
  214. FilesAdded: function( up, files ) {
  215. up_crt.start();
  216. },
  217. UploadProgress: function(up, file) {
  218. if( file.percent == 100 ){
  219. alert('Umpalumpa');
  220. };
  221. },
  222. Error: function(up, err) {
  223. Ext.Msg.show({
  224. title:'Upload Status',
  225. msg: "Error #" + err.code + ": " + err.message,
  226. buttons: Ext.Msg.OK,
  227. icon: Ext.MessageBox.ERROR
  228. });
  229. }
  230. }
  231. });
  232. var up_key = new plupload.Uploader({
  233. runtimes : 'html5,html4',
  234. browse_button : Ext.getDom('cl_key_select'),
  235. max_file_size : '256kb',
  236. chunk_size: '10kb',
  237. max_retries: 0,
  238. multi_selection: false,
  239. max_file_count: 1,
  240. url: '/lib/controller/uploadModuleKafkaData.php',
  241. filters : [
  242. {title : "Certificate files", extensions : "pem,crt,cert,jks"}
  243. ],
  244. init: {
  245. PostInit: function() {
  246. },
  247. FilesAdded: function( up, files ) {
  248. up_key.start();
  249. },
  250. UploadProgress: function(up, file) {
  251. if( file.percent == 100 ){
  252. alert('Umpalumpa');
  253. };
  254. },
  255. Error: function(up, err) {
  256. Ext.Msg.show({
  257. title:'Upload Status',
  258. msg: "Error #" + err.code + ": " + err.message,
  259. buttons: Ext.Msg.OK,
  260. icon: Ext.MessageBox.ERROR
  261. });
  262. }
  263. }
  264. });
  265. up_ca.init();
  266. up_crt.init();
  267. up_key.init();
  268. }
  269. },
  270. status: 'ok',
  271. wTitle: '{$Labels->GetLabel('_KAFKA_DESC_SHO_')}'
  272. }
  273. EFUFU;
  274. echo $TPL;
  275. break;
  276. case 7: // SSDP
  277. $TPL =<<<EFUFU
  278. {
  279. xtype: 'form',
  280. labelAlign: 'right',
  281. autoScroll: 'auto',
  282. labelWidth: 120,
  283. items:[{
  284. border: false,
  285. frame: false,
  286. xtype: 'panel',
  287. html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td width="65px"><img width="64px" src="/style/assets/upnp.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  288. },{
  289. xtype: 'spacer',
  290. height: 5
  291. },{
  292. border: false,
  293. frame: false,
  294. xtype: 'panel',
  295. html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  296. },{
  297. xtype: 'spacer',
  298. height: 5
  299. },{
  300. xtype: 'combo',
  301. fieldLabel: 'Module Status',
  302. id: 'mod_ena',
  303. lazyRender:true,
  304. mode: 'local',
  305. forceSelection: true,
  306. triggerAction: 'all',
  307. editable: false,
  308. disableKeyFilter: true,
  309. store: new Ext.data.ArrayStore({
  310. fields: ['status_val','status_txt'],
  311. data: [[0,'Disabled'],[1,'Enabled']]
  312. }),
  313. value: %%%ENA_VAL%%%,
  314. valueField: 'status_val',
  315. displayField: 'status_txt',
  316. listeners:{
  317. select: function( t, r, i ){
  318. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  319. }
  320. }
  321. },{
  322. xtype: 'spacer',
  323. height: 5
  324. },{
  325. xtype: 'button',
  326. id: 'mo_del_btn',
  327. disabled: false,
  328. width: '100%',
  329. text: 'Remove Module',
  330. handler: function(){
  331. removeModule({$EID});
  332. }
  333. }]
  334. }
  335. EFUFU;
  336. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_SSDP_DESC_SHO_') , $TPL );
  337. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_SSDP_DESC_LOO_'), $TPL );
  338. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  339. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  340. echo $TPL;
  341. break;
  342. case 8: // Onvif
  343. $TPL =<<<EFUFU
  344. {
  345. xtype: 'form',
  346. labelAlign: 'right',
  347. autoScroll: 'auto',
  348. labelWidth: 120,
  349. items:[{
  350. border: false,
  351. frame: false,
  352. xtype: 'panel',
  353. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td width="65px"><img width="64px" src="/style/assets/onvif.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  354. },{
  355. xtype: 'spacer',
  356. height: 5
  357. },{
  358. border: false,
  359. frame: false,
  360. xtype: 'panel',
  361. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  362. },{
  363. xtype: 'spacer',
  364. height: 5
  365. },{
  366. xtype: 'combo',
  367. fieldLabel: 'Module Status',
  368. id: 'mod_ena',
  369. lazyRender:true,
  370. mode: 'local',
  371. forceSelection: true,
  372. triggerAction: 'all',
  373. editable: false,
  374. disableKeyFilter: true,
  375. store: {
  376. xtype: 'arraystore',
  377. fields: ['status_val','status_txt'],
  378. data: [[0,'Disabled'],[1,'Enabled']]
  379. },
  380. value: %%%ENA_VAL%%%,
  381. valueField: 'status_val',
  382. displayField: 'status_txt',
  383. listeners:{
  384. select: function( t, r, i ){
  385. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  386. }
  387. }
  388. },{
  389. xtype: 'spacer',
  390. height: 5
  391. },{
  392. xtype: 'button',
  393. id: 'mo_del_btn',
  394. disabled: false,
  395. width: '100%',
  396. text: 'Remove Module',
  397. handler: function(){
  398. removeModule({$EID});
  399. }
  400. }]
  401. }
  402. EFUFU;
  403. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ONVIF_DESC_SHO_') , $TPL );
  404. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ONVIF_DESC_LOO_'), $TPL );
  405. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  406. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  407. echo $TPL;
  408. break;
  409. case 9://Embed Video Encoder
  410. $QS="SELECT * FROM `module_embed_video_settings` WHERE `id`={$CR['aux_id']}";
  411. $II = $DATABASE->Query( $QS );
  412. $CI = $II[0];
  413. $TS = array( '320x240', '640x480', '800x600', '1280x720', '1024x768', '1920x1080' );
  414. $YY = $CI['width'].'x'.$CI['height'];
  415. for( $i=0; $i<count( $TS ); $i++ ) if( $TS[$i] == $YY ) break;
  416. $CSID =($i==count($TS))?0:$i;
  417. $TPL =<<<EFUFU
  418. {
  419. xtype: 'tabpanel',
  420. activeTab: 0,
  421. id: 'mod_set_content',
  422. saveSettings: function(){
  423. var sz = Ext.getCmp('FRM_SIZE').getValue();
  424. var prt = Ext.getCmp('WA_PORT').getValue();
  425. var cq = Ext.getCmp('COMP_QUAL').getValue();
  426. var shts = Ext.getCmp('eve_show_ts').getValue();
  427. var shlb = Ext.getCmp('eve_show_lbl').getValue();
  428. var shlo = Ext.getCmp('eve_show_logo').getValue();
  429. var tspx = Ext.getCmp('TS_POSX').getValue();
  430. var tspy = Ext.getCmp('TS_POSY').getValue();
  431. var tsts = Ext.getCmp('eve_transp_ts').getValue();
  432. var tsfo = Ext.getCmp('TS_FONT').getValue();
  433. var tsfs = Ext.getCmp('TS_FSCALE').getValue();
  434. var tsft = Ext.getCmp('TS_FTHICK').getValue();
  435. var tslt = Ext.getCmp('TS_LINET').getValue();
  436. var lblpx = Ext.getCmp('LBL_POSX').getValue();
  437. var lblpy = Ext.getCmp('LBL_POSY').getValue();
  438. var lblts = Ext.getCmp('eve_transp_lbl').getValue();
  439. var lblfo = Ext.getCmp('LBL_FONT').getValue();
  440. var lblfs = Ext.getCmp('LBL_FSCALE').getValue();
  441. var lblft = Ext.getCmp('LBL_FTHICK').getValue();
  442. var lbllt = Ext.getCmp('LBL_LINET').getValue();
  443. var logpx = Ext.getCmp('LOGO_POSX').getValue();
  444. var logpy = Ext.getCmp('LOGO_POSY').getValue();
  445. var logw = Ext.getCmp('LOGO_WIDTH').getValue();
  446. var logh = Ext.getCmp('LOGO_HEIGHT').getValue();
  447. Ext.Ajax.request({
  448. url: '/lib/controller/updateServerModuleSettings.php',
  449. params: {
  450. MID: {$EID},
  451. UID: {$UserID},
  452. SID: '{$Session}',
  453. SIZE: sz,
  454. PORT: prt,
  455. COMPRESSION: cq,
  456. SHOW1: shts,
  457. SHOW2: shlb,
  458. SHOW3: shlo,
  459. TS_POSX: tspx,
  460. TS_POSY: tspy,
  461. TS_TRANS: tsts,
  462. TS_FONT: tsfo,
  463. TS_FONT_SCALE: tsfs,
  464. TS_FONT_THICK: tsft,
  465. TS_LINE: tslt,
  466. LBL_POSX: lblpx,
  467. LBL_POSY: lblpy,
  468. LBL_TRANS: lblts,
  469. LBL_FONT: lblfo,
  470. LBL_FONT_SCALE: lblfs,
  471. LBL_FONT_THICK: lblft,
  472. LBL_LINE: lbllt,
  473. LOG_POSX: logpx,
  474. LOG_POSY: logpy,
  475. LOG_W: logw,
  476. LOG_H: logh
  477. },
  478. success: function( response, opts ){
  479. var data = Ext.decode(response.responseText);
  480. if( data.success == true ) {
  481. moduleSettingsEditorWindow.hide();
  482. } else {
  483. Ext.Msg.show({
  484. title:'{$Labels->GetLabel("_ERROR_MSG_")}',
  485. msg: data['msg'],
  486. buttons: Ext.Msg.OK,
  487. fn: function(){
  488. SettingsLidar3D.hide();
  489. },
  490. icon: Ext.MessageBox.ERROR
  491. });
  492. };
  493. },
  494. failure: failureAJAXFunction
  495. });
  496. },
  497. items:[{
  498. xtype: 'panel',
  499. title: 'Output Settings',
  500. items:[{
  501. xtype: 'panel',
  502. id: 'eve_frm_prev',
  503. html: '<canvas id="eve_frame_preview" width="760" height="400" style="background: #eeeeee; display: block; margin: 0 auto;"></canvas>',
  504. height: 400,
  505. width: 760,
  506. border: false
  507. },{
  508. xtype: 'form',
  509. labelWidth: 180,
  510. labelAlign: 'right',
  511. border: false,
  512. items: [{
  513. xtype: 'combo',
  514. fieldLabel: '{$Labels->GetLabel('_OUTPUT_FRAME_SIZE_')}',
  515. id: 'FRM_SIZE',
  516. //width: 120,
  517. typeAhead: true,
  518. triggerAction: 'all',
  519. lazyRender:true,
  520. mode: 'local',
  521. store: {
  522. xtype: 'arraystore',
  523. fields: [ 'szId', 'szText' ],
  524. data: [
  525. [0, '320x240'],
  526. [1, '640x480'],
  527. [2, '800x600'],
  528. [3, '1280x720'],
  529. [4, '1024x768'],
  530. [5, '1920x1080']
  531. ]
  532. },
  533. valueField: 'szId',
  534. displayField: 'szText',
  535. value: {$CSID},
  536. listeners:{
  537. select: updateFramePreview,
  538. change: updateFramePreview
  539. }
  540. },{
  541. xtype: 'numberfield',
  542. fieldLabel: '{$Labels->GetLabel('_EVE_PORT_')}',
  543. id: 'WA_PORT',
  544. width: 120,
  545. minValue: 1000,
  546. maxValue: 65535,
  547. value: {$CI['web_port']}
  548. },{
  549. xtype: 'slider',
  550. fieldLabel: '{$Labels->GetLabel('_EVE_COMPRESS_QUA_')}',
  551. id: 'COMP_QUAL',
  552. width: 120,
  553. minValue: 0,
  554. maxValue: 100,
  555. value: {$CI['compression_quality']}
  556. },{
  557. xtype: 'checkbox',
  558. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_TS_')}',
  559. id: 'eve_show_ts',
  560. disabled: true,
  561. checked: {$CI['show_ts']},
  562. handler: updateFramePreview
  563. },{
  564. xtype: 'checkbox',
  565. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_LBL_')}',
  566. id: 'eve_show_lbl',
  567. disabled: true,
  568. checked: {$CI['show_label']},
  569. handler: updateFramePreview
  570. },{
  571. xtype: 'checkbox',
  572. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_LOGO_')}',
  573. id: 'eve_show_logo',
  574. disabled: true,
  575. checked: {$CI['show_logo']},
  576. handler: updateFramePreview
  577. }]
  578. }]
  579. },{
  580. xtype: 'form',
  581. title: 'Time Stamp',
  582. labelWidth: 180,
  583. labelAlign: 'right',
  584. disabled: true,
  585. items:[{
  586. xtype: 'slider',
  587. fieldLabel: '{$Labels->GetLabel('_EVE_TS_POSX_')}',
  588. id: 'TS_POSX',
  589. width: 120,
  590. minValue: 0,
  591. maxValue: 100,
  592. value: {$CI['ts_x']}
  593. },{
  594. xtype: 'slider',
  595. fieldLabel: '{$Labels->GetLabel('_EVE_TS_POSY_')}',
  596. id: 'TS_POSY',
  597. width: 120,
  598. minValue: 0,
  599. maxValue: 100,
  600. value: {$CI['ts_y']}
  601. },{
  602. xtype: 'checkbox',
  603. fieldLabel: '{$Labels->GetLabel('_EVE_TRANSO_TS_')}',
  604. id: 'eve_transp_ts',
  605. checked: {$CI['ts_transperant']}
  606. },{
  607. xtype: 'combo',
  608. fieldLabel: '{$Labels->GetLabel('_EVE_FONT_TS_')}',
  609. id: 'TS_FONT',
  610. width: 120,
  611. typeAhead: true,
  612. triggerAction: 'all',
  613. lazyRender:true,
  614. mode: 'local',
  615. store: {
  616. xtype: 'arraystore',
  617. fields: [ 'szId', 'szText' ],
  618. data: [
  619. [0, 'SIMPLEX'],
  620. [1, 'PLAIN'],
  621. [2, 'DUPLEX'],
  622. [3, 'COMPLEX'],
  623. [4, 'TRIPLEX'],
  624. [5, 'COMPLEX_SMALL'],
  625. [6, 'SCRIPT_SIMPLEX'],
  626. [7, 'SCRIPT_COMPLEX']
  627. ]
  628. },
  629. valueField: 'szId',
  630. displayField: 'szText',
  631. value: {$CI['ts_font_face']}
  632. },{
  633. xtype: 'slider',
  634. fieldLabel: '{$Labels->GetLabel('_EVE_TS_FSCALE_')}',
  635. id: 'TS_FSCALE',
  636. width: 120,
  637. minValue: 0.0,
  638. maxValue: 4.0,
  639. value: {$CI['ts_font_scale']}
  640. },{
  641. xtype: 'slider',
  642. fieldLabel: '{$Labels->GetLabel('_EVE_TS_FTHICK_')}',
  643. id: 'TS_FTHICK',
  644. width: 120,
  645. minValue: 1,
  646. maxValue: 8.0,
  647. value: {$CI['ts_font_thickness']}
  648. },{
  649. xtype: 'combo',
  650. fieldLabel: '{$Labels->GetLabel('_EVE_TS_LINE_T_')}',
  651. id: 'TS_LINET',
  652. width: 120,
  653. typeAhead: true,
  654. triggerAction: 'all',
  655. lazyRender:true,
  656. mode: 'local',
  657. store: {
  658. xtype: 'arraystore',
  659. fields: [ 'szId', 'szText' ],
  660. data: [
  661. [0, 'THIN'],
  662. [1, 'ANTIALIAZED'],
  663. [2, 'THICK']
  664. ]
  665. },
  666. valueField: 'szId',
  667. displayField: 'szText',
  668. value: {$CI['ts_line_type']}
  669. }]
  670. },{
  671. xtype: 'form',
  672. title: 'Label',
  673. labelWidth: 180,
  674. labelAlign: 'right',
  675. disabled: true,
  676. items:[{
  677. xtype: 'slider',
  678. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_POSX_')}',
  679. id: 'LBL_POSX',
  680. width: 120,
  681. minValue: 0,
  682. maxValue: 100,
  683. value: {$CI['label_x']}
  684. },{
  685. xtype: 'slider',
  686. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_POSY_')}',
  687. id: 'LBL_POSY',
  688. width: 120,
  689. minValue: 0,
  690. maxValue: 100,
  691. value: {$CI['label_y']}
  692. },{
  693. xtype: 'checkbox',
  694. fieldLabel: '{$Labels->GetLabel('_EVE_TRANSO_LBL_')}',
  695. id: 'eve_transp_lbl',
  696. checked: {$CI['label_transperant']}
  697. },{
  698. xtype: 'combo',
  699. fieldLabel: '{$Labels->GetLabel('_EVE_FONT_LBL_')}',
  700. id: 'LBL_FONT',
  701. width: 120,
  702. typeAhead: true,
  703. triggerAction: 'all',
  704. lazyRender:true,
  705. mode: 'local',
  706. store:{
  707. xtype: 'arraystore',
  708. fields: [ 'szId', 'szText' ],
  709. data: [
  710. [0, 'SIMPLEX'],
  711. [1, 'PLAIN'],
  712. [2, 'DUPLEX'],
  713. [3, 'COMPLEX'],
  714. [4, 'TRIPLEX'],
  715. [5, 'COMPLEX_SMALL'],
  716. [6, 'SCRIPT_SIMPLEX'],
  717. [7, 'SCRIPT_COMPLEX']
  718. ]
  719. },
  720. valueField: 'szId',
  721. displayField: 'szText',
  722. value: {$CI['label_font_face']}
  723. },{
  724. xtype: 'slider',
  725. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_FSCALE_')}',
  726. id: 'LBL_FSCALE',
  727. width: 120,
  728. minValue: 0.0,
  729. maxValue: 4.0,
  730. value: {$CI['label_font_scale']}
  731. },{
  732. xtype: 'slider',
  733. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_FTHICK_')}',
  734. id: 'LBL_FTHICK',
  735. width: 120,
  736. minValue: 1,
  737. maxValue: 8.0,
  738. value: {$CI['label_font_thickness']}
  739. },{
  740. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_LINE_T_')}',
  741. xtype: 'combo',
  742. id: 'LBL_LINET',
  743. width: 120,
  744. typeAhead: true,
  745. triggerAction: 'all',
  746. lazyRender:true,
  747. mode: 'local',
  748. store: {
  749. xtype: 'arraystore',
  750. fields: [ 'szId', 'szText' ],
  751. data: [
  752. [0, 'THIN'],
  753. [1, 'ANTIALIAZED'],
  754. [2, 'THICK']
  755. ]
  756. },
  757. valueField: 'szId',
  758. displayField: 'szText',
  759. value: {$CI['label_line_type']}
  760. }]
  761. },{
  762. xtype: 'form',
  763. title: 'Logo',
  764. labelWidth: 180,
  765. labelAlign: 'right',
  766. disabled: true,
  767. items:[{
  768. xtype: 'slider',
  769. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_POSX_')}',
  770. id: 'LOGO_POSX',
  771. width: 120,
  772. minValue: 0,
  773. maxValue: 100,
  774. value: {$CI['logo_x']}
  775. },{
  776. xtype: 'slider',
  777. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_POSY_')}',
  778. id: 'LOGO_POSY',
  779. width: 120,
  780. minValue: 0,
  781. maxValue: 100,
  782. value: {$CI['logo_y']}
  783. },{
  784. xtype: 'numberfield',
  785. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_WIDTH_')}',
  786. id: 'LOGO_WIDTH',
  787. width: 120,
  788. minValue: 0,
  789. maxValue: 256,
  790. value: {$CI['logo_w']}
  791. },{
  792. xtype: 'numberfield',
  793. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_HEIGHT_')}',
  794. id: 'LOGO_HEIGHT',
  795. width: 120,
  796. minValue: 0,
  797. maxValue: 256,
  798. value: {$CI['logo_h']}
  799. },{
  800. xtype: 'panel',
  801. id: 'eve_logo_ph',
  802. html: '<center><img width="100px" id="eve_logo_img" src="/lib/controller/data/assets/images/7shields.png"></center>'
  803. },{
  804. xtype: 'panel',
  805. html: '<input id="eve_logo_upload" style="width: 120px;" type="file" onchange="uploadEveLogo();"/>'
  806. }]
  807. }],
  808. listeners: {
  809. afterlayout: updateFramePreview
  810. },
  811. status: 'ok',
  812. wTitle: '{$Labels->GetLabel('_EMBED_VIDEO_ENCODER_')}'
  813. }
  814. EFUFU;
  815. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_EVE_DESC_SHO_') , $TPL );
  816. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_EVE_DESC_LOO_'), $TPL );
  817. $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL );
  818. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  819. $Data['status'] = 'ok';
  820. $Data['title'] = $Labels->GetLabel('_EMBED_VIDEO_ENCODER_');
  821. $Data['content'] = json_decode( $TPL );
  822. echo $TPL; //json_encode($Data);
  823. break;
  824. case 10: //Modem
  825. $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}";
  826. $II = $DATABASE->Query( $QS );
  827. $CI = $II[0];
  828. $R_nfo = 'Broker Node:'. $CI['brocker_address'].':'.$CI['brocker_port'].((intval($CI['use_ssl'])>0)?'<img title="SSL Encription" src="/style/icons/icons/rosette.png">':'<img title="NO Encription" src="/style/icons/icons/flag_green.png">');
  829. $TPL =<<<EFUFU
  830. {
  831. xtype: 'form',
  832. labelAlign: 'right',
  833. autoScroll: 'auto',
  834. labelWidth: 120,
  835. items:[{
  836. border: false,
  837. frame: false,
  838. xtype: 'panel',
  839. html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td width="65px"><img width="64px" src="/style/assets/modem.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'
  840. },{
  841. xtype: 'spacer',
  842. height: 5
  843. },{
  844. border: false,
  845. frame: false,
  846. xtype: 'panel',
  847. html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  848. },{
  849. xtype: 'spacer',
  850. height: 5
  851. },{
  852. xtype: 'combo',
  853. fieldLabel: 'Module Status',
  854. id: 'mod_ena',
  855. lazyRender:true,
  856. mode: 'local',
  857. forceSelection: true,
  858. triggerAction: 'all',
  859. editable: false,
  860. disableKeyFilter: true,
  861. store: {
  862. xtype: 'arraystore',
  863. fields: ['status_val','status_txt'],
  864. data: [[0,'Disabled'],[1,'Enabled']]
  865. },
  866. value: %%%ENA_VAL%%%,
  867. valueField: 'status_val',
  868. displayField: 'status_txt',
  869. listeners:{
  870. select: function( t, r, i ){
  871. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  872. }
  873. }
  874. },{
  875. xtype: 'spacer',
  876. height: 5
  877. },{
  878. xtype: 'button',
  879. id: 'mo_edit_btn',
  880. disabled: false,
  881. width: '100%',
  882. text: 'Edit Module Config',
  883. handler: function(){
  884. }
  885. },{
  886. xtype: 'spacer',
  887. height: 5
  888. },{
  889. xtype: 'button',
  890. id: 'mo_del_btn',
  891. disabled: false,
  892. width: '100%',
  893. text: 'Remove Module',
  894. handler: function(){
  895. removeModule({$EID});
  896. }
  897. }]
  898. }
  899. EFUFU;
  900. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_KAFKA_DESC_SHO_') , $TPL );
  901. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_KAFKA_DESC_LOO_'), $TPL );
  902. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  903. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  904. echo $TPL;
  905. break;
  906. };
  907. } else {
  908. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  909. };
  910. } else {
  911. header('location: /');
  912. };
  913. ?>