Browse Source

Platform View Changes

master
Evgeny Gagua 3 months ago
parent
commit
f0c63d9ba9
  1. 13
      lib/controller/doPlatformOperations.php
  2. 2
      lib/controller/getAddModuleWindow.php
  3. 6
      lib/controller/getMonitoringPlatformView.php
  4. 42
      lib/controller/getPlatformEditor.php

13
lib/controller/doPlatformOperations.php

@ -372,6 +372,19 @@
$LOG->reg_op( $_POST );
break;
};
case 19:{ // Change Layout
if( $OID == 0 ) {
$Data['msg']='Wrong Parameters!';
echo json_encode( $Data );
exit();
};
$LA = strtoupper( substr($_POST['OPCODE'], 0, 1 ) );
$QS = "UPDATE `metro_platforms` SET `layout`='{$LA}' WHERE `id`={$OID}";
$DATABASE->Query( $QS );
$Data['success'] = true;
$LOG->reg_op( $_POST );
break;
};
};
} else {
$Data['msg']='Wrong Parameters!';

2
lib/controller/getAddModuleWindow.php

@ -164,7 +164,7 @@ DATA_BOUNDARY;
};
echo $WTPL;
} else {
echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
echo '{ xtype: \'panel\', html: \'No Tracks On Platform!\'}';
};
} else {
header('location: /');

6
lib/controller/getMonitoringPlatformView.php

@ -124,10 +124,10 @@
$CVTPL = str_ireplace( '%%%%TITLE%%%', $TTL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%CLASS%%', 'aaBB', $CVTPL );
$CVTPL = str_ireplace( '%%%IMG%URL%%%', $URL, $CVTPL );
$CVTPL = str_ireplace( '%%%IMG%URL%%%', $URL, $CVTPL );
$CVTPL = str_ireplace( '%%MIP%%', $MM['IP4'], $CVTPL );
$CVTPL = str_ireplace( '%%MCID%%', $MM['cam_id'], $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$CTRK['side'].$MM['side'].'%%%', $CVTPL, $ITEM );
$CVTPL = str_ireplace( '%%%STATUS%%%', 'Status', $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$CTRK['side'].$MM['side'].'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $MM['id'];
};
} else {
@ -153,6 +153,8 @@
$CVTPL = str_ireplace( '%%%%TITLE%%%', $TTL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%CLASS%%', 'aaBB', $CVTPL );
$CVTPL = str_ireplace( '%%%IMG%URL%%%', $URL, $CVTPL );
$CVTPL = str_ireplace( '%%MIP%%', $MM['IP4'], $CVTPL );
$CVTPL = str_ireplace( '%%MCID%%', $MM['cam_id'], $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%%%', 'Status', $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$CTRK['side'].$MM['side'].'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $MM['id'];

42
lib/controller/getPlatformEditor.php

@ -196,6 +196,47 @@ JOJOKA;
doPlatformOperation( {$CR['id']}, 7, c, true );
}
}
},{
xtype: 'combo',
fieldLabel: "Platform Type",
id: 'pl_lay',
width: 200,
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
readOnly: false,
disableKeyFilter: true,
tpl:'<tpl for="."><div class="x-combo-list-item"><img width="16px" src="{icon}"/>&nbsp;{name}</div></tpl>',
store: new Ext.data.ArrayStore({
fields: ['abbr','name','icon'],
data: [['A','Layout A','/style/assets/pt_layout_A.png'],['B','Layout B','/style/assets/pt_layout_B.png'],['C','Layout C','/style/assets/pt_layout_C.png'],['D','Layout D','/style/assets/pt_layout_D.png'],['E','Layout E','/style/assets/pt_layout_E.png'],['F','Layout F','/style/assets/pt_layout_F.png']]
}),
valueField: 'abbr',
displayField: 'name',
value: '{$CR['layout']}',
listeners:{
select: function( t, r, i ){
t.getEl().setStyle({
'background-image': 'url(' + r.data.icon + ')',
'background-repeat': 'no-repeat',
'background-position': '3px center',
'background-size': '16px 16px',
'padding-left': '25px'
});
doPlatformOperation( {$CR['id']}, 19, r.data.abbr, true );
},
afterrender: function( t ){
t.getEl().setStyle({
'background-image': 'url(' + t.store.data.items[t.store.findExact( 'abbr', t.value )].data.icon + ')',
'background-repeat': 'no-repeat',
'background-position': '3px center',
'background-size': '16px 16px',
'padding-left': '25px'
});
}
}
},{$ROUTING}]
}]
},{
@ -209,6 +250,7 @@ JOJOKA;
layout: 'hbox',
items: [{
xtype: 'panel',
width: '40%',
id: 'scada_container',
tbar:[{
text: "{$Labels->GetLabel( '_ADD_' )}",

Loading…
Cancel
Save