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.

786 lines
20 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  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. title: '{$Labels->GetLabel('_KAFKA_BROKER_')}',
  102. labelWidth: 200,
  103. labelAlign: 'right',
  104. border: false,
  105. frame: false,
  106. items:[{
  107. xtype: 'spacer',
  108. height: 10
  109. },{
  110. xtype: 'textfield',
  111. fieldLabel: 'Broker Address',
  112. value: '{$CI['brocker_address']}'
  113. },{
  114. xtype: 'numberfield',
  115. fieldLabel: 'Broker Port',
  116. value: {$CI['brocker_port']}
  117. },{
  118. xtype: 'checkbox',
  119. fieldLabel: 'Use SSL',
  120. checked: {$USSL}
  121. },{
  122. xtype: 'panel',
  123. html: 'CA certificate file for verifying the broker\'s certificate [cert]'
  124. },{
  125. xtype: 'panel',
  126. html: 'Client\'s certificate [pem]'
  127. },{
  128. xtype: 'panel',
  129. html: 'Client\'s key [key]'
  130. },{
  131. xtype: 'panel',
  132. html: 'Key password, if any'
  133. }]
  134. },{
  135. title: '{$Labels->GetLabel('_KAFKA_TOP_EVTS_')}',
  136. html: ''
  137. }],
  138. status: 'ok',
  139. wTitle: '{$Labels->GetLabel('_KAFKA_DESC_SHO_')}'
  140. }
  141. EFUFU;
  142. echo $TPL;
  143. break;
  144. case 7: // SSDP
  145. $TPL =<<<EFUFU
  146. {
  147. xtype: 'form',
  148. labelAlign: 'right',
  149. autoScroll: 'auto',
  150. labelWidth: 120,
  151. items:[{
  152. border: false,
  153. frame: false,
  154. xtype: 'panel',
  155. 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>'
  156. },{
  157. xtype: 'spacer',
  158. height: 5
  159. },{
  160. border: false,
  161. frame: false,
  162. xtype: 'panel',
  163. html: '<table width="100%" border=0 class="setEd_infoPanel" id="SSDP"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  164. },{
  165. xtype: 'spacer',
  166. height: 5
  167. },{
  168. xtype: 'combo',
  169. fieldLabel: 'Module Status',
  170. id: 'mod_ena',
  171. lazyRender:true,
  172. mode: 'local',
  173. forceSelection: true,
  174. triggerAction: 'all',
  175. editable: false,
  176. disableKeyFilter: true,
  177. store: new Ext.data.ArrayStore({
  178. fields: ['status_val','status_txt'],
  179. data: [[0,'Disabled'],[1,'Enabled']]
  180. }),
  181. value: %%%ENA_VAL%%%,
  182. valueField: 'status_val',
  183. displayField: 'status_txt',
  184. listeners:{
  185. select: function( t, r, i ){
  186. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  187. }
  188. }
  189. },{
  190. xtype: 'spacer',
  191. height: 5
  192. },{
  193. xtype: 'button',
  194. id: 'mo_del_btn',
  195. disabled: false,
  196. width: '100%',
  197. text: 'Remove Module',
  198. handler: function(){
  199. removeModule({$EID});
  200. }
  201. }]
  202. }
  203. EFUFU;
  204. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_SSDP_DESC_SHO_') , $TPL );
  205. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_SSDP_DESC_LOO_'), $TPL );
  206. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  207. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  208. echo $TPL;
  209. break;
  210. case 8: // Onvif
  211. $TPL =<<<EFUFU
  212. {
  213. xtype: 'form',
  214. labelAlign: 'right',
  215. autoScroll: 'auto',
  216. labelWidth: 120,
  217. items:[{
  218. border: false,
  219. frame: false,
  220. xtype: 'panel',
  221. 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>'
  222. },{
  223. xtype: 'spacer',
  224. height: 5
  225. },{
  226. border: false,
  227. frame: false,
  228. xtype: 'panel',
  229. html: '<table width="100%" border=0 class="setEd_infoPanel" id="ONVIF"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  230. },{
  231. xtype: 'spacer',
  232. height: 5
  233. },{
  234. xtype: 'combo',
  235. fieldLabel: 'Module Status',
  236. id: 'mod_ena',
  237. lazyRender:true,
  238. mode: 'local',
  239. forceSelection: true,
  240. triggerAction: 'all',
  241. editable: false,
  242. disableKeyFilter: true,
  243. store: {
  244. xtype: 'arraystore',
  245. fields: ['status_val','status_txt'],
  246. data: [[0,'Disabled'],[1,'Enabled']]
  247. },
  248. value: %%%ENA_VAL%%%,
  249. valueField: 'status_val',
  250. displayField: 'status_txt',
  251. listeners:{
  252. select: function( t, r, i ){
  253. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  254. }
  255. }
  256. },{
  257. xtype: 'spacer',
  258. height: 5
  259. },{
  260. xtype: 'button',
  261. id: 'mo_del_btn',
  262. disabled: false,
  263. width: '100%',
  264. text: 'Remove Module',
  265. handler: function(){
  266. removeModule({$EID});
  267. }
  268. }]
  269. }
  270. EFUFU;
  271. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ONVIF_DESC_SHO_') , $TPL );
  272. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ONVIF_DESC_LOO_'), $TPL );
  273. $TPL = str_ireplace( '%%%LOINFO%%%',$Labels->GetLabel('_MOD_NO_NEDCONF_'), $TPL );
  274. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  275. echo $TPL;
  276. break;
  277. case 9://Embed Video Encoder
  278. $QS="SELECT * FROM `module_embed_video_settings` WHERE `id`={$CR['aux_id']}";
  279. $II = $DATABASE->Query( $QS );
  280. $CI = $II[0];
  281. $TS = array( '320x240', '640x480', '800x600', '1280x720', '1024x768', '1920x1080' );
  282. $YY = $CI['width'].'x'.$CI['height'];
  283. for( $i=0; $i<count( $TS ); $i++ ) if( $TS[$i] == $YY ) break;
  284. $CSID =($i==count($TS))?0:$i;
  285. $TPL =<<<EFUFU
  286. {
  287. xtype: 'tabpanel',
  288. activeTab: 0,
  289. id: 'mod_set_content',
  290. saveSettings: function(){
  291. var sz = Ext.getCmp('FRM_SIZE').getValue();
  292. var prt = Ext.getCmp('WA_PORT').getValue();
  293. var cq = Ext.getCmp('COMP_QUAL').getValue();
  294. var shts = Ext.getCmp('eve_show_ts').getValue();
  295. var shlb = Ext.getCmp('eve_show_lbl').getValue();
  296. var shlo = Ext.getCmp('eve_show_logo').getValue();
  297. var tspx = Ext.getCmp('TS_POSX').getValue();
  298. var tspy = Ext.getCmp('TS_POSY').getValue();
  299. var tsts = Ext.getCmp('eve_transp_ts').getValue();
  300. var tsfo = Ext.getCmp('TS_FONT').getValue();
  301. var tsfs = Ext.getCmp('TS_FSCALE').getValue();
  302. var tsft = Ext.getCmp('TS_FTHICK').getValue();
  303. var tslt = Ext.getCmp('TS_LINET').getValue();
  304. var lblpx = Ext.getCmp('LBL_POSX').getValue();
  305. var lblpy = Ext.getCmp('LBL_POSY').getValue();
  306. var lblts = Ext.getCmp('eve_transp_lbl').getValue();
  307. var lblfo = Ext.getCmp('LBL_FONT').getValue();
  308. var lblfs = Ext.getCmp('LBL_FSCALE').getValue();
  309. var lblft = Ext.getCmp('LBL_FTHICK').getValue();
  310. var lbllt = Ext.getCmp('LBL_LINET').getValue();
  311. var logpx = Ext.getCmp('LOGO_POSX').getValue();
  312. var logpy = Ext.getCmp('LOGO_POSY').getValue();
  313. var logw = Ext.getCmp('LOGO_WIDTH').getValue();
  314. var logh = Ext.getCmp('LOGO_HEIGHT').getValue();
  315. Ext.Ajax.request({
  316. url: '/lib/controller/updateServerModuleSettings.php',
  317. params: {
  318. MID: {$EID},
  319. UID: {$UserID},
  320. SID: '{$Session}',
  321. SIZE: sz,
  322. PORT: prt,
  323. COMPRESSION: cq,
  324. SHOW1: shts,
  325. SHOW2: shlb,
  326. SHOW3: shlo,
  327. TS_POSX: tspx,
  328. TS_POSY: tspy,
  329. TS_TRANS: tsts,
  330. TS_FONT: tsfo,
  331. TS_FONT_SCALE: tsfs,
  332. TS_FONT_THICK: tsft,
  333. TS_LINE: tslt,
  334. LBL_POSX: lblpx,
  335. LBL_POSY: lblpy,
  336. LBL_TRANS: lblts,
  337. LBL_FONT: lblfo,
  338. LBL_FONT_SCALE: lblfs,
  339. LBL_FONT_THICK: lblft,
  340. LBL_LINE: lbllt,
  341. LOG_POSX: logpx,
  342. LOG_POSY: logpy,
  343. LOG_W: logw,
  344. LOG_H: logh
  345. },
  346. success: function( response, opts ){
  347. var data = Ext.decode(response.responseText);
  348. if( data.success == true ) {
  349. moduleSettingsEditorWindow.hide();
  350. } else {
  351. Ext.Msg.show({
  352. title:'{$Labels->GetLabel("_ERROR_MSG_")}',
  353. msg: data['msg'],
  354. buttons: Ext.Msg.OK,
  355. fn: function(){
  356. SettingsLidar3D.hide();
  357. },
  358. icon: Ext.MessageBox.ERROR
  359. });
  360. };
  361. },
  362. failure: failureAJAXFunction
  363. });
  364. },
  365. items:[{
  366. xtype: 'panel',
  367. title: 'Output Settings',
  368. items:[{
  369. xtype: 'panel',
  370. id: 'eve_frm_prev',
  371. html: '<canvas id="eve_frame_preview" width="760" height="400" style="background: #eeeeee; display: block; margin: 0 auto;"></canvas>',
  372. height: 400,
  373. width: 760,
  374. border: false
  375. },{
  376. xtype: 'form',
  377. labelWidth: 180,
  378. labelAlign: 'right',
  379. border: false,
  380. items: [{
  381. xtype: 'combo',
  382. fieldLabel: '{$Labels->GetLabel('_OUTPUT_FRAME_SIZE_')}',
  383. id: 'FRM_SIZE',
  384. //width: 120,
  385. typeAhead: true,
  386. triggerAction: 'all',
  387. lazyRender:true,
  388. mode: 'local',
  389. store: {
  390. xtype: 'arraystore',
  391. fields: [ 'szId', 'szText' ],
  392. data: [
  393. [0, '320x240'],
  394. [1, '640x480'],
  395. [2, '800x600'],
  396. [3, '1280x720'],
  397. [4, '1024x768'],
  398. [5, '1920x1080']
  399. ]
  400. },
  401. valueField: 'szId',
  402. displayField: 'szText',
  403. value: {$CSID},
  404. listeners:{
  405. select: updateFramePreview,
  406. change: updateFramePreview
  407. }
  408. },{
  409. xtype: 'numberfield',
  410. fieldLabel: '{$Labels->GetLabel('_EVE_PORT_')}',
  411. id: 'WA_PORT',
  412. width: 120,
  413. minValue: 1000,
  414. maxValue: 65535,
  415. value: {$CI['web_port']}
  416. },{
  417. xtype: 'slider',
  418. fieldLabel: '{$Labels->GetLabel('_EVE_COMPRESS_QUA_')}',
  419. id: 'COMP_QUAL',
  420. width: 120,
  421. minValue: 0,
  422. maxValue: 100,
  423. value: {$CI['compression_quality']}
  424. },{
  425. xtype: 'checkbox',
  426. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_TS_')}',
  427. id: 'eve_show_ts',
  428. disabled: true,
  429. checked: {$CI['show_ts']},
  430. handler: updateFramePreview
  431. },{
  432. xtype: 'checkbox',
  433. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_LBL_')}',
  434. id: 'eve_show_lbl',
  435. disabled: true,
  436. checked: {$CI['show_label']},
  437. handler: updateFramePreview
  438. },{
  439. xtype: 'checkbox',
  440. fieldLabel: '{$Labels->GetLabel('_EVE_SHOW_LOGO_')}',
  441. id: 'eve_show_logo',
  442. disabled: true,
  443. checked: {$CI['show_logo']},
  444. handler: updateFramePreview
  445. }]
  446. }]
  447. },{
  448. xtype: 'form',
  449. title: 'Time Stamp',
  450. labelWidth: 180,
  451. labelAlign: 'right',
  452. disabled: true,
  453. items:[{
  454. xtype: 'slider',
  455. fieldLabel: '{$Labels->GetLabel('_EVE_TS_POSX_')}',
  456. id: 'TS_POSX',
  457. width: 120,
  458. minValue: 0,
  459. maxValue: 100,
  460. value: {$CI['ts_x']}
  461. },{
  462. xtype: 'slider',
  463. fieldLabel: '{$Labels->GetLabel('_EVE_TS_POSY_')}',
  464. id: 'TS_POSY',
  465. width: 120,
  466. minValue: 0,
  467. maxValue: 100,
  468. value: {$CI['ts_y']}
  469. },{
  470. xtype: 'checkbox',
  471. fieldLabel: '{$Labels->GetLabel('_EVE_TRANSO_TS_')}',
  472. id: 'eve_transp_ts',
  473. checked: {$CI['ts_transperant']}
  474. },{
  475. xtype: 'combo',
  476. fieldLabel: '{$Labels->GetLabel('_EVE_FONT_TS_')}',
  477. id: 'TS_FONT',
  478. width: 120,
  479. typeAhead: true,
  480. triggerAction: 'all',
  481. lazyRender:true,
  482. mode: 'local',
  483. store: {
  484. xtype: 'arraystore',
  485. fields: [ 'szId', 'szText' ],
  486. data: [
  487. [0, 'SIMPLEX'],
  488. [1, 'PLAIN'],
  489. [2, 'DUPLEX'],
  490. [3, 'COMPLEX'],
  491. [4, 'TRIPLEX'],
  492. [5, 'COMPLEX_SMALL'],
  493. [6, 'SCRIPT_SIMPLEX'],
  494. [7, 'SCRIPT_COMPLEX']
  495. ]
  496. },
  497. valueField: 'szId',
  498. displayField: 'szText',
  499. value: {$CI['ts_font_face']}
  500. },{
  501. xtype: 'slider',
  502. fieldLabel: '{$Labels->GetLabel('_EVE_TS_FSCALE_')}',
  503. id: 'TS_FSCALE',
  504. width: 120,
  505. minValue: 0.0,
  506. maxValue: 4.0,
  507. value: {$CI['ts_font_scale']}
  508. },{
  509. xtype: 'slider',
  510. fieldLabel: '{$Labels->GetLabel('_EVE_TS_FTHICK_')}',
  511. id: 'TS_FTHICK',
  512. width: 120,
  513. minValue: 1,
  514. maxValue: 8.0,
  515. value: {$CI['ts_font_thickness']}
  516. },{
  517. xtype: 'combo',
  518. fieldLabel: '{$Labels->GetLabel('_EVE_TS_LINE_T_')}',
  519. id: 'TS_LINET',
  520. width: 120,
  521. typeAhead: true,
  522. triggerAction: 'all',
  523. lazyRender:true,
  524. mode: 'local',
  525. store: {
  526. xtype: 'arraystore',
  527. fields: [ 'szId', 'szText' ],
  528. data: [
  529. [0, 'THIN'],
  530. [1, 'ANTIALIAZED'],
  531. [2, 'THICK']
  532. ]
  533. },
  534. valueField: 'szId',
  535. displayField: 'szText',
  536. value: {$CI['ts_line_type']}
  537. }]
  538. },{
  539. xtype: 'form',
  540. title: 'Label',
  541. labelWidth: 180,
  542. labelAlign: 'right',
  543. disabled: true,
  544. items:[{
  545. xtype: 'slider',
  546. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_POSX_')}',
  547. id: 'LBL_POSX',
  548. width: 120,
  549. minValue: 0,
  550. maxValue: 100,
  551. value: {$CI['label_x']}
  552. },{
  553. xtype: 'slider',
  554. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_POSY_')}',
  555. id: 'LBL_POSY',
  556. width: 120,
  557. minValue: 0,
  558. maxValue: 100,
  559. value: {$CI['label_y']}
  560. },{
  561. xtype: 'checkbox',
  562. fieldLabel: '{$Labels->GetLabel('_EVE_TRANSO_LBL_')}',
  563. id: 'eve_transp_lbl',
  564. checked: {$CI['label_transperant']}
  565. },{
  566. xtype: 'combo',
  567. fieldLabel: '{$Labels->GetLabel('_EVE_FONT_LBL_')}',
  568. id: 'LBL_FONT',
  569. width: 120,
  570. typeAhead: true,
  571. triggerAction: 'all',
  572. lazyRender:true,
  573. mode: 'local',
  574. store:{
  575. xtype: 'arraystore',
  576. fields: [ 'szId', 'szText' ],
  577. data: [
  578. [0, 'SIMPLEX'],
  579. [1, 'PLAIN'],
  580. [2, 'DUPLEX'],
  581. [3, 'COMPLEX'],
  582. [4, 'TRIPLEX'],
  583. [5, 'COMPLEX_SMALL'],
  584. [6, 'SCRIPT_SIMPLEX'],
  585. [7, 'SCRIPT_COMPLEX']
  586. ]
  587. },
  588. valueField: 'szId',
  589. displayField: 'szText',
  590. value: {$CI['label_font_face']}
  591. },{
  592. xtype: 'slider',
  593. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_FSCALE_')}',
  594. id: 'LBL_FSCALE',
  595. width: 120,
  596. minValue: 0.0,
  597. maxValue: 4.0,
  598. value: {$CI['label_font_scale']}
  599. },{
  600. xtype: 'slider',
  601. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_FTHICK_')}',
  602. id: 'LBL_FTHICK',
  603. width: 120,
  604. minValue: 1,
  605. maxValue: 8.0,
  606. value: {$CI['label_font_thickness']}
  607. },{
  608. fieldLabel: '{$Labels->GetLabel('_EVE_LBL_LINE_T_')}',
  609. xtype: 'combo',
  610. id: 'LBL_LINET',
  611. width: 120,
  612. typeAhead: true,
  613. triggerAction: 'all',
  614. lazyRender:true,
  615. mode: 'local',
  616. store: {
  617. xtype: 'arraystore',
  618. fields: [ 'szId', 'szText' ],
  619. data: [
  620. [0, 'THIN'],
  621. [1, 'ANTIALIAZED'],
  622. [2, 'THICK']
  623. ]
  624. },
  625. valueField: 'szId',
  626. displayField: 'szText',
  627. value: {$CI['label_line_type']}
  628. }]
  629. },{
  630. xtype: 'form',
  631. title: 'Logo',
  632. labelWidth: 180,
  633. labelAlign: 'right',
  634. disabled: true,
  635. items:[{
  636. xtype: 'slider',
  637. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_POSX_')}',
  638. id: 'LOGO_POSX',
  639. width: 120,
  640. minValue: 0,
  641. maxValue: 100,
  642. value: {$CI['logo_x']}
  643. },{
  644. xtype: 'slider',
  645. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_POSY_')}',
  646. id: 'LOGO_POSY',
  647. width: 120,
  648. minValue: 0,
  649. maxValue: 100,
  650. value: {$CI['logo_y']}
  651. },{
  652. xtype: 'numberfield',
  653. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_WIDTH_')}',
  654. id: 'LOGO_WIDTH',
  655. width: 120,
  656. minValue: 0,
  657. maxValue: 256,
  658. value: {$CI['logo_w']}
  659. },{
  660. xtype: 'numberfield',
  661. fieldLabel: '{$Labels->GetLabel('_EVE_LOGO_HEIGHT_')}',
  662. id: 'LOGO_HEIGHT',
  663. width: 120,
  664. minValue: 0,
  665. maxValue: 256,
  666. value: {$CI['logo_h']}
  667. },{
  668. xtype: 'panel',
  669. id: 'eve_logo_ph',
  670. html: '<center><img width="100px" id="eve_logo_img" src="/lib/controller/data/assets/images/7shields.png"></center>'
  671. },{
  672. xtype: 'panel',
  673. html: '<input id="eve_logo_upload" style="width: 120px;" type="file" onchange="uploadEveLogo();"/>'
  674. }]
  675. }],
  676. listeners: {
  677. afterlayout: updateFramePreview
  678. },
  679. status: 'ok',
  680. wTitle: '{$Labels->GetLabel('_EMBED_VIDEO_ENCODER_')}'
  681. }
  682. EFUFU;
  683. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_EVE_DESC_SHO_') , $TPL );
  684. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_EVE_DESC_LOO_'), $TPL );
  685. $TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL );
  686. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  687. $Data['status'] = 'ok';
  688. $Data['title'] = $Labels->GetLabel('_EMBED_VIDEO_ENCODER_');
  689. $Data['content'] = json_decode( $TPL );
  690. echo $TPL; //json_encode($Data);
  691. break;
  692. case 10: //Modem
  693. $QS="SELECT * FROM `modules_kafka` WHERE `module_id`={$CR['aux_id']}";
  694. $II = $DATABASE->Query( $QS );
  695. $CI = $II[0];
  696. $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">');
  697. $TPL =<<<EFUFU
  698. {
  699. xtype: 'form',
  700. labelAlign: 'right',
  701. autoScroll: 'auto',
  702. labelWidth: 120,
  703. items:[{
  704. border: false,
  705. frame: false,
  706. xtype: 'panel',
  707. 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>'
  708. },{
  709. xtype: 'spacer',
  710. height: 5
  711. },{
  712. border: false,
  713. frame: false,
  714. xtype: 'panel',
  715. html: '<table width="100%" border=0 class="setEd_infoPanel" id="KAFKA"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>'
  716. },{
  717. xtype: 'spacer',
  718. height: 5
  719. },{
  720. xtype: 'combo',
  721. fieldLabel: 'Module Status',
  722. id: 'mod_ena',
  723. lazyRender:true,
  724. mode: 'local',
  725. forceSelection: true,
  726. triggerAction: 'all',
  727. editable: false,
  728. disableKeyFilter: true,
  729. store: {
  730. xtype: 'arraystore',
  731. fields: ['status_val','status_txt'],
  732. data: [[0,'Disabled'],[1,'Enabled']]
  733. },
  734. value: %%%ENA_VAL%%%,
  735. valueField: 'status_val',
  736. displayField: 'status_txt',
  737. listeners:{
  738. select: function( t, r, i ){
  739. if( r.data.status_val ) enableModule({$EID}); else disableModule({$EID});
  740. }
  741. }
  742. },{
  743. xtype: 'spacer',
  744. height: 5
  745. },{
  746. xtype: 'button',
  747. id: 'mo_edit_btn',
  748. disabled: false,
  749. width: '100%',
  750. text: 'Edit Module Config',
  751. handler: function(){
  752. }
  753. },{
  754. xtype: 'spacer',
  755. height: 5
  756. },{
  757. xtype: 'button',
  758. id: 'mo_del_btn',
  759. disabled: false,
  760. width: '100%',
  761. text: 'Remove Module',
  762. handler: function(){
  763. removeModule({$EID});
  764. }
  765. }]
  766. }
  767. EFUFU;
  768. $TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_KAFKA_DESC_SHO_') , $TPL );
  769. $TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_KAFKA_DESC_LOO_'), $TPL );
  770. $TPL = str_ireplace( '%%%LOINFO%%%',$R_nfo , $TPL );
  771. $TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL );
  772. echo $TPL;
  773. break;
  774. };
  775. } else {
  776. echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
  777. };
  778. } else {
  779. header('location: /');
  780. };
  781. ?>