35 changed files with 2830 additions and 68 deletions
-
2lib/1.json
-
16lib/controller/getDashBoardItems.php
-
326lib/controller/getDeviceStatus.php
-
1lib/controller/getHistoryEvents.php
-
30lib/controller/getReportLayout.php
-
241lib/controller/getSensorDetectionEditor.php
-
62lib/controller/rest_gw.php
-
28lib/controller/settings/node_0.js
-
374lib/controller/settings/node_1.js
-
40lib/controller/settings/node_10.js
-
62lib/controller/settings/node_11.js
-
40lib/controller/settings/node_12.js
-
62lib/controller/settings/node_13.js
-
62lib/controller/settings/node_14.js
-
62lib/controller/settings/node_15.js
-
372lib/controller/settings/node_2.js
-
413lib/controller/settings/node_3.js
-
95lib/controller/settings/node_4.js
-
439lib/controller/settings/node_5.js
-
16lib/controller/settings/tpl.js
-
28lib/controller/updateLocation.php
-
2lib/javascript/jsapi_dynamic/mojo_map.js
-
103lib/javascript/jsapi_dynamic/mojo_settings.js
-
2lib/php/db/MySQL_class.php
-
2lib/php/db/MySQLi_class.php
-
2lib/php/db/VS_ObjectHelper_class.php
-
2lib/php/db/VS_Object_class.php
-
2lib/php/db/VS_Tree_class.php
-
2lib/php/db/gz_class.php
-
2lib/php/db/language_class.php
-
2lib/php/db/language_json_class.php
-
2lib/php/db/logio_class.php
-
2lib/php/db/user_class.php
-
2lib/php/utm/gPoint.php
-
BINstyle/assets/3b4ad2078aa0b06e78fa417e2e47bf32.png
2
lib/1.json
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,326 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
$UID = intval( $CUser->Data['id'] ); |
||||
|
$ACCESS = intval( $CUser->Data['access'] ); |
||||
|
if( $UID > 1 ){ |
||||
|
$SiteID = intval( $_POST['SITE'] ); |
||||
|
$LastNID = intval( $_POST['LNID'] ); |
||||
|
$LastTS = intval( $_POST['SPID'] ); |
||||
|
$LLID = intval( $_POST['LSID'] ); |
||||
|
$DEV_ID = intval( $_POST['DEVID'] ); |
||||
|
$Data = array(); |
||||
|
$ServerWasHuped = false; |
||||
|
$ServerIsOnLine = true; |
||||
|
$Data['status'] = 'OK'; |
||||
|
$Data['CTS'] = time(); |
||||
|
$Data['nodes'] = array(); |
||||
|
$QS = "SELECT * FROM nodes WHERE `id`={$DEV_ID}"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $result ) > 0 ){ |
||||
|
|
||||
|
foreach( $result as $R ){ |
||||
|
$CN = array(); |
||||
|
$CN['id'] = $R['id']; |
||||
|
$CN['type'] = intval($R['type']); |
||||
|
$CN['status'] = intval($R['online']); |
||||
|
if( $CN['status'] || 1 ){ |
||||
|
switch( $R['type'] ){ |
||||
|
case ARGUS_SERVER:{ |
||||
|
/* |
||||
|
$QS="SELECT * FROM `servers` WHERE `id`={$R['aux_id']}"; |
||||
|
$zult = $DATABASE->Query( $QS ); |
||||
|
if( $zult[0]['online'] == 1 ){ |
||||
|
$STS = intval( $zult[0]['ts'] ); |
||||
|
$CN['CTS'] = $Data['CTS']; |
||||
|
$CN['STS'] = $STS; |
||||
|
if( ( $CN['CTS'] - $STS ) > 1 ){ //3 seconds offline
|
||||
|
$ServerIsOnLine = false; |
||||
|
$CN['status'] = 0; |
||||
|
} else { |
||||
|
$CN['status'] = 1; |
||||
|
}; |
||||
|
} else { |
||||
|
$ServerIsOnLine = false; |
||||
|
$CN['status'] = 0; |
||||
|
}; |
||||
|
$CN['cpu1'] = intval( $zult[0]['stat_cpu1'] * 2.5 ); |
||||
|
$CN['cpu5'] = intval( $zult[0]['stat_cpu5'] ); |
||||
|
$CN['cpu15'] = intval( $zult[0]['stat_cpu15'] * 2.5 ); |
||||
|
$CN['mem'] = intval( $zult[0]['stat_mem']*100 ); |
||||
|
$CN['disk']= intval( $zult[0]['stat_disk']*100 ); |
||||
|
*/ |
||||
|
break; |
||||
|
}; |
||||
|
case ARGUS_ALS_SENSOR: |
||||
|
case ARGUS_LFS_SENSOR: |
||||
|
case ARGUS_PLS_200_SENSOR: |
||||
|
case ARGUS_PLS_360_SENSOR: |
||||
|
case ARGUS_NET_PLS_200:{ |
||||
|
$QS = "SELECT `data_status`,`max_range`,`x`,`y`,`z` FROM `lrf_sensors` WHERE `id`={$R['aux_id']}"; |
||||
|
$JJ = $DATABASE->Query( $QS ); |
||||
|
$CS = $JJ[0]; |
||||
|
$CN['status'] = $CS['data_status']; |
||||
|
$CN['masks_status'] = 0; |
||||
|
$CN['masks_exist'] = 0; |
||||
|
$QS = "SELECT * FROM `lrf_masks` WHERE `sensor_id`={$R['aux_id']}"; |
||||
|
$JJ = $DATABASE->Query( $QS ); |
||||
|
if( count( $JJ ) ) foreach( $JJ as $J ) { |
||||
|
$CN['masks_exist'] |= (1<<intval($J['layer'])); |
||||
|
if( $J['status'] == 'E' ) $CN['masks_status'] |= (1<<intval($J['layer'])); |
||||
|
}; |
||||
|
// check draw
|
||||
|
if( $LastTS > 0 ){ |
||||
|
$QS = "SELECT `id` FROM `lrf_draw` WHERE `node_id`={$R['id']} AND `ts` > {$LastTS}"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
if( count( $R ) ){ |
||||
|
$CN['reload_draw'] = true; |
||||
|
} else { |
||||
|
$CN['reload_draw'] = false; |
||||
|
}; |
||||
|
} else { |
||||
|
$CN['reload_draw'] = true; |
||||
|
}; |
||||
|
$SENSORRANGE = floatval( $CS['max_range'] ); |
||||
|
//Check Frozen Bubbles in any state of sensor
|
||||
|
$QS = "SELECT `CENTER_X`,`CENTER_Y`, `BLOCK_COUNS` FROM `target_bubbles`"; |
||||
|
$UJ = $DATABASE->Query( $QS ); |
||||
|
$CN['bubbles'] = array(); |
||||
|
if( count( $UJ ) ){ |
||||
|
$SX = floatval( $CS['x'] ); |
||||
|
$SY = floatval( $CS['y'] ); |
||||
|
foreach( $UJ as $FB ){ |
||||
|
$BC = intval( $FB['BLOCK_COUNS'] ); |
||||
|
$C_X = floatval( $FB['CENTER_X'] ) - $SX; |
||||
|
$C_Y = floatval( $FB['CENTER_Y'] ) - $SY; |
||||
|
$DFC = sqrt( pow( $C_X, 2 ) + pow( $C_Y, 2 ) ); |
||||
|
if( $DFC < $SENSORRANGE || 1 ){ |
||||
|
$azimuth = rad2deg( atan2( $C_Y , $C_X ) ); |
||||
|
if( $azimuth < 0 ) $azimuth += 360.0; |
||||
|
$CT = array(); |
||||
|
$CT['digital'] = intval( 2048.0 * $DFC / $SENSORRANGE ); |
||||
|
$CT['az'] = $azimuth; |
||||
|
if( $BC < 3 ){ |
||||
|
$CT['color'] = '0F0FFF'; |
||||
|
$CT['stroke'] = '080880'; |
||||
|
} else { |
||||
|
$CT['color'] = 'FFFFFF'; |
||||
|
$CT['stroke'] = '808080'; |
||||
|
}; |
||||
|
$CN['bubbles'][] = $CT; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
if( ( $CN['status'] == 5 ) || 1 ){ |
||||
|
// check Targets
|
||||
|
$CN['targets'] = array(); |
||||
|
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=10 OR evt_type=11 OR evt_type=12 OR evt_type=13 OR evt_type=14 OR evt_type=52 OR evt_type=53 OR evt_type=54 OR evt_type=39 OR evt_type=40 OR evt_type=41 OR evt_type=42 OR evt_type=43 OR evt_type=44 OR evt_type=45 OR evt_type=46 OR evt_type=47 OR evt_type=48 OR evt_type=49 OR evt_type=86 OR evt_type=87 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32"; |
||||
|
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) AND (UNIX_TIMESTAMP(NOW())-ts)<60 ORDER BY id DESC LIMIT 32";
|
||||
|
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY ts, ts_ms DESC LIMIT 32";
|
||||
|
//echo $QS . "\n\n";
|
||||
|
$zult = $ZIZI->Query( $QS ); |
||||
|
if( count( $zult ) ){ |
||||
|
$CT = array(); |
||||
|
foreach( $zult as $Z ){ |
||||
|
$TT = intval( $Z['evt_type'] ); |
||||
|
if( ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ) break; |
||||
|
//if( !( $TT == 10 || $TT == 11 ||$TT == 12 ||$TT == 13 || $TT == 14 || $TT == 36 ) ) continue;
|
||||
|
//$CT['type'] = $TT;
|
||||
|
if( $TT == 85 ){ |
||||
|
$CT['digital'] = intval( 2048.0 * floatval( $Z['range'] ) / $SENSORRANGE ); |
||||
|
} else { |
||||
|
$CT['digital'] = intval( $Z['range_digital']); |
||||
|
}; |
||||
|
if( $SYS['local_binding'] == 0 ){ |
||||
|
$CT['lat'] = floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $Z['lon'] ); |
||||
|
} else { |
||||
|
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] ); |
||||
|
}; |
||||
|
$CT['az'] = floatval( $Z['azimuth'] ); |
||||
|
if( $TT > 38 ){ |
||||
|
if( $TT == 86 || $TT == 87 ){ |
||||
|
if( $TT == 86 ){ |
||||
|
$CT['color'] = '00FFFF'; |
||||
|
$CT['stroke'] = '008080'; |
||||
|
} else { |
||||
|
$CT['color'] = 'FFFF00'; |
||||
|
$CT['stroke'] = '808000'; |
||||
|
}; |
||||
|
} else { |
||||
|
$CT['color'] = 'ff00ff'; |
||||
|
$CT['stroke'] = '800080'; |
||||
|
}; |
||||
|
} else { |
||||
|
$CT['color'] = 'ff0000'; |
||||
|
$CT['stroke'] = '800000'; |
||||
|
}; |
||||
|
$CN['targets'][] = $CT; |
||||
|
}; |
||||
|
//if( count( $CN['targets'] ) ) $CN['status'] = 5;
|
||||
|
}; |
||||
|
/* |
||||
|
// check Filter
|
||||
|
$CN['pops'] = array(); |
||||
|
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=85 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32"; |
||||
|
$zult = $ZIZI->Query( $QS ); |
||||
|
if( count( $zult ) ){ |
||||
|
$CT = array(); |
||||
|
foreach( $zult as $Z ){ |
||||
|
$TT = intval( $Z['evt_type'] ); |
||||
|
if( ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ) break; |
||||
|
//if( !( $TT == 10 || $TT == 11 ||$TT == 12 ||$TT == 13 || $TT == 14 || $TT == 36 ) ) continue;
|
||||
|
//$CT['type'] = $TT;
|
||||
|
$CT['digital'] = intval( $Z['range_digital']); |
||||
|
if( $SYS['local_binding'] == 0 ){ |
||||
|
$CT['lat'] = floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $Z['lon'] ); |
||||
|
} else { |
||||
|
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] ); |
||||
|
}; |
||||
|
$CT['az'] = floatval( $Z['azimuth'] ); |
||||
|
if( $TT > 38 ){ |
||||
|
$CT['color'] = 'ff00ff'; |
||||
|
$CT['stroke'] = '800080'; |
||||
|
} else { |
||||
|
$CT['color'] = 'ff0000'; |
||||
|
$CT['stroke'] = '800000'; |
||||
|
}; |
||||
|
$CN['pops'][] = $CT; |
||||
|
}; |
||||
|
//if( count( $CN['targets'] ) ) $CN['status'] = 5;
|
||||
|
}; |
||||
|
*/ |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case ARGUS_3D_SENSOR:{ |
||||
|
$QS = "SELECT `data_status` FROM `lrf_sensors` WHERE `id`={$R['aux_id']}"; |
||||
|
$JJ = $DATABASE->Query( $QS ); |
||||
|
$CS = $JJ[0]; |
||||
|
$CN['status'] = intval($CS['data_status']); |
||||
|
$CN['masks_status'] = 0; |
||||
|
$CN['masks_exist'] = 0; |
||||
|
// check draw
|
||||
|
if( $LastTS > 0 ){ |
||||
|
$QS = "SELECT `id` FROM `lrf_draw` WHERE `node_id`={$R['id']} AND `ts` > {$LastTS}"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
if( count( $R ) ){ |
||||
|
$CN['reload_draw'] = true; |
||||
|
} else { |
||||
|
$CN['reload_draw'] = false; |
||||
|
}; |
||||
|
} else { |
||||
|
$CN['reload_draw'] = true; |
||||
|
}; //663552
|
||||
|
$CN['master_present'] = false; |
||||
|
$CN['slave_present'] = false; |
||||
|
$CN['stat_present'] = false; |
||||
|
if( $CN['status'] ){ |
||||
|
$CN['master_present'] = true; |
||||
|
//$QS = "SELECT * FROM `lrf_runtime_status` WHERE `lrf_id`={$R['aux_id']}";
|
||||
|
//$Stat = $DATABASE->Query( $QS );
|
||||
|
//if( count( $Stat ) ){
|
||||
|
// $CS = $Stat[0];
|
||||
|
// $MP = array();
|
||||
|
// $GP = array();
|
||||
|
// $WP = array();
|
||||
|
// for( $idx = 0; $idx < 8; $idx++ ){
|
||||
|
// $MP[] = round( floatval( $CS['master_mp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// $GP[] = round( floatval( $CS['master_gp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// $WP[] = round( floatval( $CS['master_wp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// };
|
||||
|
// for( $idx = 0; $idx < 8; $idx++ ){
|
||||
|
// $MP[] = round( floatval( $CS['slave_mp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// $GP[] = round( floatval( $CS['slave_gp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// $WP[] = round( floatval( $CS['slave_wp_' . $idx ] ) / 663552.0, 2 );
|
||||
|
// };
|
||||
|
// $CN['runtime']['gp'] = $GP;
|
||||
|
// $CN['runtime']['mp'] = $MP;
|
||||
|
// $CN['runtime']['wp'] = $WP;
|
||||
|
// $CN['stat_present'] = true;
|
||||
|
// if( $CS['twinc']!= 0 ) $CN['slave_present'] = true;
|
||||
|
//};
|
||||
|
|
||||
|
// check Targets
|
||||
|
$CN['targets'] = array(); |
||||
|
$QS="SELECT * FROM events WHERE ( node_id={$CN['id']} OR node_id=1 ) AND ( evt_type=11 OR evt_type=12 OR evt_type=8 OR evt_type=52 OR evt_type=53 OR evt_type=54 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32"; |
||||
|
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=11 OR evt_type=14) ORDER BY id DESC LIMIT 32";
|
||||
|
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) AND (UNIX_TIMESTAMP(NOW())-ts)<60 ORDER BY id DESC LIMIT 32";
|
||||
|
//$QS="SELECT * FROM events_cloud WHERE node_id={$CN['id']} AND ( evt_type=13 OR evt_type=14) ORDER BY ts, ts_ms DESC LIMIT 32";
|
||||
|
//echo $QS . "\n\n";
|
||||
|
$zult = $ZIZI->Query( $QS ); |
||||
|
$colors = array( 0x00f6ff, 0x6c00ff, 0xff5400, 0x00ff24, 0x00aeff, 0xbaff00, 0xff0000, 0x0024ff ); |
||||
|
$CN['debug']=count( $zult ); |
||||
|
if( count( $zult ) ){ |
||||
|
$CT = array(); |
||||
|
foreach( $zult as $Z ){ |
||||
|
$TT = intval( $Z['evt_type'] ); |
||||
|
if( ( $TT == 8 ) || ( $TT == 52 ) || ( $TT == 53 ) || ( $TT == 54 ) ){ |
||||
|
//$CN['debug2']='break by evt!';
|
||||
|
break; |
||||
|
} |
||||
|
$CN['status'] = 5; // Alarmed
|
||||
|
$CT['range'] = floatval($Z['range']); |
||||
|
$CT['digital'] = intval( $Z['range_digital']); |
||||
|
if( $SYS['local_binding'] == 0 ){ |
||||
|
$CT['lat'] = floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $Z['lon'] ); |
||||
|
} else { |
||||
|
$CT['lat'] = floatval( $SYS['anchor_lat'] ) + floatval( $Z['lat'] ); |
||||
|
$CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] ); |
||||
|
}; |
||||
|
$CT['az'] = floatval($Z['azimuth']); |
||||
|
$CT['el'] = floatval($Z['elevation']); |
||||
|
if( isset( $Z['lrf_id'] ) ){ |
||||
|
$CT['color'] = $colors[intval($Z['lrf_id'])]; |
||||
|
} else { |
||||
|
$CT['color'] = 0xff0000; |
||||
|
}; |
||||
|
$CN['targets'][] = $CT; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case ARGUS_ANALOG_STATIC_CAMERA: |
||||
|
case ARGUS_ANALOG_PTZ_CAMERA: |
||||
|
case ARGUS_IP_STATIC_CAMERA: |
||||
|
case ARGUS_IP_PTZ_CAMERA: |
||||
|
case 14: |
||||
|
case 15:{ |
||||
|
if( $ServerIsOnLine ){ |
||||
|
$QS="SELECT * FROM `media_streams` WHERE `id`={$R['aux_parameter']}"; |
||||
|
$SR=$DATABASE->Query( $QS ); |
||||
|
if( count( $SR ) ) { |
||||
|
$ST = $SR[0]; |
||||
|
if( $ST['valid'] == 1 ){ |
||||
|
$CN['valid'] = true; |
||||
|
$QS="SELECT * FROM `module_eve` WHERE `id`=1"; |
||||
|
$S=$DATABASE->Query( $QS ); |
||||
|
//$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].':' . $S[0]['web_port'] .'/stream?id='. $R['aux_parameter'];
|
||||
|
if( $SSL_INSTALLLED ){ |
||||
|
$CN['src'] = 'https://' . $_SERVER['SERVER_ADDR'].'/video_feed/stream?id='. $R['aux_parameter']; |
||||
|
} else { |
||||
|
$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].'/video_feed/stream?id='. $R['aux_parameter']; |
||||
|
//$CN['src'] = 'http://' . $_SERVER['SERVER_ADDR'].'/video_feed/preview?id='. $R['aux_parameter'];
|
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
$CN['valid'] = false; |
||||
|
$CN['src'] = "/style/assets/no-signal.png"; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
$Data['nodes'][] = $CN; |
||||
|
}; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['status']='LOGOUT'; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
?>
|
||||
@ -0,0 +1,62 @@ |
|||||
|
<?php |
||||
|
|
||||
|
// users.php
|
||||
|
header("Content-Type: application/json; charset=UTF-8"); |
||||
|
header("Access-Control-Allow-Origin: *"); |
||||
|
header("Access-Control-Allow-Methods: GET, POST"); |
||||
|
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With"); |
||||
|
|
||||
|
//require_once 'config.php';
|
||||
|
|
||||
|
$method = $_SERVER['REQUEST_METHOD']; |
||||
|
|
||||
|
switch ($method) { |
||||
|
case 'GET': |
||||
|
// Check if an ID is passed in the query string: /users.php?id=1
|
||||
|
if (isset($_GET['id'])) { |
||||
|
$stmt = $pdo->prepare("SELECT id, name, email FROM users WHERE id = ?"); |
||||
|
$stmt->execute([$_GET['id']]); |
||||
|
$user = $stmt->fetch(); |
||||
|
|
||||
|
if ($user) { |
||||
|
echo json_encode($user); |
||||
|
} else { |
||||
|
http_response_code(404); |
||||
|
echo json_encode(["message" => "User not found."]); |
||||
|
} |
||||
|
} else { |
||||
|
// Retrieve all users
|
||||
|
$stmt = $pdo->query("SELECT id, name, email FROM users"); |
||||
|
$users = $stmt->fetchAll(); |
||||
|
echo json_encode($users); |
||||
|
} |
||||
|
break; |
||||
|
|
||||
|
case 'POST': |
||||
|
// Retrieve raw JSON data from the request body
|
||||
|
$input = json_decode(file_get_contents("php://input"), true); |
||||
|
|
||||
|
/*if (!empty($input['name']) && !empty($input['email'])) { |
||||
|
$stmt = $pdo->prepare("INSERT INTO users (name, email) VALUES (?, ?)"); |
||||
|
$stmt->execute([$input['name'], $input['email']]); |
||||
|
|
||||
|
http_response_code(201); // Created
|
||||
|
echo json_encode([ |
||||
|
"message" => "User created successfully.", |
||||
|
"id" => $pdo->lastInsertId() |
||||
|
]); |
||||
|
} else { |
||||
|
*/ |
||||
|
http_response_code(400); // Bad Request
|
||||
|
echo json_encode(["message" => "Incomplete data. Name and email are required.", "INPUT" => $input ]); |
||||
|
//}
|
||||
|
break; |
||||
|
|
||||
|
default: |
||||
|
http_response_code(405); // Method Not Allowed
|
||||
|
echo json_encode(["message" => "HTTP method not supported."]); |
||||
|
break; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
?>
|
||||
@ -0,0 +1,28 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
showServerToolBox(%%%NODEID%%%); |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
width: 258, |
||||
|
height: 240, |
||||
|
border: false, |
||||
|
title: '%%%SYSSERVERNAME%%%', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%"><tr><td><p id="status_%%%NODEID%%%_txt">%%%SERVERSTATUS%%%</p></td><td width="16px"><img id="status_%%%NODEID%%%_img" src="/style/icons/icons/%%%SERVERSTATUSIMG%%%"></td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%" border=0><tr><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_donut0_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut0_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut0_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_%%%NODEID%%%_totalValue0">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_donut1_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut1_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut1_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_%%%NODEID%%%_totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_donut2_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut2_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_%%%NODEID%%%_donut2_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_%%%NODEID%%%_totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
height: 80, |
||||
|
frame: true, |
||||
|
border: false, |
||||
|
autoScroll: true, |
||||
|
items: %%%MODULES%%% |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,374 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
tools: [{ |
||||
|
id:'toggle', |
||||
|
handler: function( a, b, p ){ |
||||
|
fsDrawID = %%%NODEID%%%; |
||||
|
fullScreen( 'div_radar_%%%NODEID%%%' ); |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", nW+'%' ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(p){ |
||||
|
masks_statuses[%%%NODEID%%%] = 0; |
||||
|
masks_exist[%%%NODEID%%%] = 0; |
||||
|
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
|
||||
|
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
|
||||
|
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
|
||||
|
|
||||
|
var W = p.getWidth(); |
||||
|
var H = 9*(W/16) - 28; |
||||
|
if( %%%APPTYPE%%% == 2 ){ |
||||
|
H = PanelH - p.ownerCt.getHeight() + 64; |
||||
|
if( H > ( W * 0.5625 )+ 32 ){ |
||||
|
H = ( W * 0.5625 ) + 32; |
||||
|
}; |
||||
|
} else { |
||||
|
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); |
||||
|
}; |
||||
|
|
||||
|
//alert( H );
|
||||
|
//var W = 16*(H/9);
|
||||
|
//p.ownerCt.setWidth( W );
|
||||
|
p.setHeight( H ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 ); |
||||
|
//alert( W+" "+H );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
|
||||
|
//if( H > W ){
|
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
|
||||
|
//} else {
|
||||
|
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 ); |
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
|
||||
|
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false ); |
||||
|
//};
|
||||
|
//alert( W +' '+ ( H+130 ) );
|
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
var el = document.getElementById('div_radar_%%%NODEID%%%'); |
||||
|
el.addEventListener( "fullscreenchange", ( evt )=>{ |
||||
|
if( document.fullscreenElement ){ |
||||
|
} else { |
||||
|
if( fsDrawID ){ |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", H-80 );//'86%' );
|
||||
|
fsDrawID = 0; |
||||
|
}; |
||||
|
}; |
||||
|
}); |
||||
|
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% ); |
||||
|
} |
||||
|
}, |
||||
|
//layout: 'hbox',
|
||||
|
layout:'border', |
||||
|
items:[{ |
||||
|
id: 'cp_radar_%%%NODEID%%%', |
||||
|
region: 'center', |
||||
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>', |
||||
|
width: '56%' |
||||
|
},{ |
||||
|
region: 'east', |
||||
|
collapsible: true, |
||||
|
minSize: 75, // defaults to 50
|
||||
|
maxSize: 220, |
||||
|
frame: false, |
||||
|
border: false, |
||||
|
collapsed: true, |
||||
|
collapseMode: 'mini', |
||||
|
title: '%%%LABEL%%%TOOLBOX%%%', |
||||
|
floatable: true, |
||||
|
animFloat: false, |
||||
|
autoHide: true, |
||||
|
id: 'toolbox_%%%NODEID%%%', |
||||
|
//unstyled: true,
|
||||
|
margins: '5 0 0 5', |
||||
|
//cmargins: '5 0 5 5',
|
||||
|
width: 200, |
||||
|
items:[{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_clear_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
text: '%%%LABEL%%%CLEALARM%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( 1, 125,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_draw_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%DRABACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 3,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_study_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%STUBACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_study_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 2,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '%%%LABEL%%%MASKEDITOR%%%', |
||||
|
id: 'DMED_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
handler: function(){ |
||||
|
showMaskEditor( false, 0, %%%NODEID%%% ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
title: '%%%LABEL%%%MASKMNGR%%%', |
||||
|
height: 70, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'small',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_0', |
||||
|
iconCls: 'mask_zone1_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 0 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium', |
||||
|
id: 'mz_btn_%%%NODEID%%%_1', |
||||
|
iconCls: 'mask_zone2_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 1 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 1 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '19%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_2', |
||||
|
iconCls: 'mask_zone3_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 2 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 2 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_3', |
||||
|
iconCls: 'mask_zone4_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 3 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 3 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_4', |
||||
|
iconCls: 'mask_zone5_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 4 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 4 ); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: '100%', |
||||
|
enableToggle: true, |
||||
|
id: 'cp_ack_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%ACKNOLAGE%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){ |
||||
|
//doMaskOperation( %%%NODEID%%%, 1, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 1 ); |
||||
|
} else { |
||||
|
//doMaskOperation( %%%NODEID%%%, 0, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
}/*,{ |
||||
|
xtype: 'panel', |
||||
|
title: 'Detection Sensitivity', |
||||
|
height: 95, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
text: 'Factory', |
||||
|
id: 'DDSPBTN0', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_factory', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Low', |
||||
|
id: 'DDSPBTN1', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_low', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Meduim', |
||||
|
id: 'DDSPBTN2', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_medium', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'High', |
||||
|
id: 'DDSPBTN3', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_high', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
}] |
||||
|
}*/] |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 12 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 25 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 50 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
width: 800, |
||||
|
height: 28, |
||||
|
html: '' |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
%%%CAM_CTRL_HOME_BTN_BIND%%% |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,40 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
%%%CAM_CTRL_HOME_BTN_BIND%%% |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
%%%CAM_CTRL_HOME_BTN_BIND%%% |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,62 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
%%%CAM_CTRL_HOME_BTN_BIND%%% |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,372 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
tools: [{ |
||||
|
id:'toggle', |
||||
|
handler: function( a, b, p ){ |
||||
|
fsDrawID = %%%NODEID%%%; |
||||
|
fullScreen( 'div_radar_%%%NODEID%%%' ); |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", nW+'%' ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(p){ |
||||
|
masks_statuses[%%%NODEID%%%] = 0; |
||||
|
masks_exist[%%%NODEID%%%] = 0; |
||||
|
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
|
||||
|
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
|
||||
|
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
|
||||
|
|
||||
|
var W = p.getWidth(); |
||||
|
var H = 9*(W/16) - 28; |
||||
|
if( %%%APPTYPE%%% == 1 || %%%APPTYPE%%% == 4 ){ |
||||
|
H = PanelH - p.ownerCt.getHeight() + 64; |
||||
|
if( H > ( W * 0.5625 )+ 32 ){ |
||||
|
H = ( W * 0.5625 ) + 32; |
||||
|
}; |
||||
|
} else { |
||||
|
H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); |
||||
|
}; |
||||
|
//var W = 16*(H/9);
|
||||
|
//p.ownerCt.setWidth( W );
|
||||
|
p.setHeight( H ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 ); |
||||
|
//alert( W+" "+H );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
|
||||
|
//if( H > W ){
|
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
|
||||
|
//} else {
|
||||
|
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 ); |
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
|
||||
|
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false ); |
||||
|
//};
|
||||
|
//alert( W +' '+ ( H+130 ) );
|
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
var el = document.getElementById('div_radar_%%%NODEID%%%'); |
||||
|
el.addEventListener( "fullscreenchange", ( evt )=>{ |
||||
|
if( document.fullscreenElement ){ |
||||
|
} else { |
||||
|
if( fsDrawID ){ |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", H-80 );//'86%' );
|
||||
|
fsDrawID = 0; |
||||
|
}; |
||||
|
}; |
||||
|
}); |
||||
|
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% ); |
||||
|
} |
||||
|
}, |
||||
|
//layout: 'hbox',
|
||||
|
layout:'border', |
||||
|
items:[{ |
||||
|
id: 'cp_radar_%%%NODEID%%%', |
||||
|
region: 'center', |
||||
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>', |
||||
|
width: '56%' |
||||
|
},{ |
||||
|
region: 'east', |
||||
|
collapsible: true, |
||||
|
minSize: 75, // defaults to 50
|
||||
|
maxSize: 220, |
||||
|
frame: false, |
||||
|
border: false, |
||||
|
collapsed: true, |
||||
|
collapseMode: 'mini', |
||||
|
title: '%%%LABEL%%%TOOLBOX%%%', |
||||
|
floatable: true, |
||||
|
animFloat: false, |
||||
|
autoHide: true, |
||||
|
id: 'toolbox_%%%NODEID%%%', |
||||
|
//unstyled: true,
|
||||
|
margins: '5 0 0 5', |
||||
|
//cmargins: '5 0 5 5',
|
||||
|
width: 200, |
||||
|
items:[{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_clear_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
text: '%%%LABEL%%%CLEALARM%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( 1, 125,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_draw_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%DRABACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 3,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_study_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%STUBACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_study_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 2,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '%%%LABEL%%%MASKEDITOR%%%', |
||||
|
id: 'DMED_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
handler: function(){ |
||||
|
showMaskEditor( false, 0, %%%NODEID%%% ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
title: '%%%LABEL%%%MASKMNGR%%%', |
||||
|
height: 70, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'small',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_0', |
||||
|
iconCls: 'mask_zone1_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 0 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium', |
||||
|
id: 'mz_btn_%%%NODEID%%%_1', |
||||
|
iconCls: 'mask_zone2_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 1 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 1 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '19%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_2', |
||||
|
iconCls: 'mask_zone3_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 2 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 2 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_3', |
||||
|
iconCls: 'mask_zone4_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 3 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 3 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_4', |
||||
|
iconCls: 'mask_zone5_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 4 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 4 ); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: '100%', |
||||
|
enableToggle: true, |
||||
|
id: 'cp_ack_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%ACKNOLAGE%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){ |
||||
|
//doMaskOperation( %%%NODEID%%%, 1, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 1 ); |
||||
|
} else { |
||||
|
//doMaskOperation( %%%NODEID%%%, 0, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
}/*,{ |
||||
|
xtype: 'panel', |
||||
|
title: 'Detection Sensitivity', |
||||
|
height: 95, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
text: 'Factory', |
||||
|
id: 'DDSPBTN0', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_factory', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Low', |
||||
|
id: 'DDSPBTN1', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_low', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Meduim', |
||||
|
id: 'DDSPBTN2', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_medium', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'High', |
||||
|
id: 'DDSPBTN3', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_high', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
}] |
||||
|
}*/] |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 12 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 25 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 50 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
width: 800, |
||||
|
height: 28, |
||||
|
html: '' |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,413 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
tools: [{ |
||||
|
id:'toggle', |
||||
|
handler: function( a, b, p ){ |
||||
|
fsDrawID = %%%NODEID%%%; |
||||
|
fullScreen( 'div_radar_%%%NODEID%%%' ); |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", nW+'%' ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(p){ |
||||
|
masks_statuses[%%%NODEID%%%] = 0; |
||||
|
masks_exist[%%%NODEID%%%] = 0; |
||||
|
//alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
|
||||
|
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
|
||||
|
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
|
||||
|
|
||||
|
var W = p.getWidth(); |
||||
|
var H = PanelH - 15;// 9*(W/16) - 28;
|
||||
|
//alert( W + ' '+ H );
|
||||
|
//var W = 16*(H/9);
|
||||
|
//p.ownerCt.setWidth( W );
|
||||
|
p.setHeight( H ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 ); |
||||
|
//alert( W+" "+H );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
|
||||
|
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
|
||||
|
//if( H > W ){
|
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
|
||||
|
//} else {
|
||||
|
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 ); |
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
|
||||
|
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false ); |
||||
|
//};
|
||||
|
//alert( W +' '+ ( H+130 ) );
|
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
var el = document.getElementById('div_radar_%%%NODEID%%%'); |
||||
|
el.addEventListener( "fullscreenchange", ( evt )=>{ |
||||
|
if( document.fullscreenElement ){ |
||||
|
} else { |
||||
|
if( fsDrawID ){ |
||||
|
var el = document.getElementById('draw_svg_'+fsDrawID ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", H-80 );//'86%' );
|
||||
|
fsDrawID = 0; |
||||
|
}; |
||||
|
}; |
||||
|
}); |
||||
|
settingsSelectedDevice = %%%NODEID%%%; |
||||
|
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% ); |
||||
|
window.setTimeout( fetchDeviceStatus, 20*%%%NODEID%%%, %%%NODEID%%% ); |
||||
|
} |
||||
|
}, |
||||
|
//layout: 'hbox',
|
||||
|
layout:'border', |
||||
|
items:[{ |
||||
|
id: 'cp_radar_%%%NODEID%%%', |
||||
|
region: 'center', |
||||
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>', |
||||
|
width: '56%' |
||||
|
},{ |
||||
|
region: 'east', |
||||
|
collapsible: true, |
||||
|
minSize: 75, // defaults to 50
|
||||
|
maxSize: 220, |
||||
|
frame: false, |
||||
|
border: false, |
||||
|
collapsed: true, |
||||
|
collapseMode: 'mini', |
||||
|
title: '%%%LABEL%%%TOOLBOX%%%', |
||||
|
floatable: true, |
||||
|
animFloat: false, |
||||
|
autoHide: true, |
||||
|
id: 'toolbox_%%%NODEID%%%', |
||||
|
//unstyled: true,
|
||||
|
margins: '5 0 0 5', |
||||
|
//cmargins: '5 0 5 5',
|
||||
|
width: 200, |
||||
|
items:[{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_clear_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
text: '%%%LABEL%%%CLEALARM%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( 1, 125,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_draw_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%DRABACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 3,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_study_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%STUBACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_study_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 2,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '%%%LABEL%%%MASKEDITOR%%%', |
||||
|
id: 'DMED_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: false, |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
handler: function(){ |
||||
|
showMaskEditor( false, 0, %%%NODEID%%% ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
title: '%%%LABEL%%%MASKMNGR%%%', |
||||
|
height: 70, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'small',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_0', |
||||
|
iconCls: 'mask_zone1_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 0 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium', |
||||
|
id: 'mz_btn_%%%NODEID%%%_1', |
||||
|
iconCls: 'mask_zone2_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 1 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 1 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '19%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_2', |
||||
|
iconCls: 'mask_zone3_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 2 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 2 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_3', |
||||
|
iconCls: 'mask_zone4_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 3 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 3 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_4', |
||||
|
iconCls: 'mask_zone5_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 4 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 4 ); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: '100%', |
||||
|
enableToggle: true, |
||||
|
id: 'cp_ack_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%ACKNOLAGE%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){ |
||||
|
//doMaskOperation( %%%NODEID%%%, 1, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 1 ); |
||||
|
} else { |
||||
|
//doMaskOperation( %%%NODEID%%%, 0, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
height: 95, |
||||
|
frame: false, |
||||
|
border: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
width: 80,// 201 202
|
||||
|
enableToggle: false, |
||||
|
id: 'cp_dbf_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%FREZBUBLE%%%', |
||||
|
iconCls: 'ctrl_panel_freeze_bf_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: false, |
||||
|
handler: function(){ |
||||
|
doNodeNCQ( 1, 210, '' ); |
||||
|
//if( Ext.getCmp('cp_dbf_btn_%%%NODEID%%%').pressed){
|
||||
|
//doMaskOperation( %%%NODEID%%%, 1, 4 );
|
||||
|
// doAckOperation( %%%NODEID%%%, 1 );
|
||||
|
//} else {
|
||||
|
//doMaskOperation( %%%NODEID%%%, 0, 4 );
|
||||
|
// doAckOperation( %%%NODEID%%%, 0 );
|
||||
|
//};
|
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: 80,// 201 202
|
||||
|
enableToggle: true, |
||||
|
id: 'cp_daf_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%DELBUBLE%%%', |
||||
|
iconCls: 'ctrl_panel_delete_bf_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: false, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('cp_daf_btn_%%%NODEID%%%').pressed){ |
||||
|
selectROI_mode = 2; |
||||
|
} else { |
||||
|
selectROI_mode = 0; |
||||
|
}; |
||||
|
} |
||||
|
}], |
||||
|
}/*,{ |
||||
|
xtype: 'panel', |
||||
|
title: 'Detection Sensitivity', |
||||
|
height: 95, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
text: 'Factory', |
||||
|
id: 'DDSPBTN0', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_factory', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Low', |
||||
|
id: 'DDSPBTN1', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_low', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Meduim', |
||||
|
id: 'DDSPBTN2', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_medium', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'High', |
||||
|
id: 'DDSPBTN3', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_high', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
}] |
||||
|
}*/] |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 12 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 25 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 50 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
width: 800, |
||||
|
height: 28, |
||||
|
html: '' |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 320, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
||||
|
showSensorToolBox( %%%NODEID%%% ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" width="200" height="210"></canvas></center>', |
||||
|
height: '260px' |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=12; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=25; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=50; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,439 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
//width: 258,
|
||||
|
//height: 336,
|
||||
|
title: '%%%NODENAME%%%', |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
tools: [{ |
||||
|
id:'toggle', |
||||
|
handler: function( a, b, p ){ |
||||
|
fsDrawID = %%%NODEID%%%; |
||||
|
exitFromFF = function(){ |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( nodeTHREEviewers[%%%NODEID%%%].container.clientWidth, (nodeTHREEviewers[%%%NODEID%%%].container.clientHeight-60) ); |
||||
|
exitFromFF = null; |
||||
|
}; |
||||
|
fullScreen( 'div_radar_%%%NODEID%%%' ); |
||||
|
|
||||
|
//var el = document.getElementById('draw_svg_'+fsDrawID );
|
||||
|
//var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 );
|
||||
|
//el.removeAttribute("width");
|
||||
|
//el.setAttribute( "width", nW+'%' );
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( window.screen.width, window.screen.height );//200 );
|
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
beforedestroy: function(){ |
||||
|
if( typeof nodeTHREEviewers[%%%NODEID%%%] !== 'undefined' ){ |
||||
|
//nodeTHREEviewers[%%%NODEID%%%].container
|
||||
|
// object.geometry.dispose(); object.material.dispose(); scene.remove( object );
|
||||
|
stopAnimation(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.renderLists.dispose(); |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].renderer; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].scene; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].mesh; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].geometry; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].material; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].texture; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].camera; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%]; |
||||
|
}; |
||||
|
return true; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var W = p.getWidth(); |
||||
|
var H = W + 28; |
||||
|
//if( %%%APPTYPE%%% == 2 ){
|
||||
|
// H = PanelH - p.ownerCt.getHeight() + 64;
|
||||
|
// if( H > ( W * 0.5625 )+ 32 ){
|
||||
|
// H = ( W * 0.5625 ) + 32;
|
||||
|
// };
|
||||
|
//} else {
|
||||
|
// H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
|
||||
|
//};
|
||||
|
//alert( W + ' koko ' + H );
|
||||
|
p.setHeight( H ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H );//- 70 );
|
||||
|
//Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H );// - 70 );
|
||||
|
var el = document.getElementById( 'div_radar_%%%NODEID%%%' ) |
||||
|
//el.removeAttribute("height");
|
||||
|
el.removeAttribute("style"); |
||||
|
el.setAttribute("style","display: block; padding: 5px; width: \'100%\'; height:"+(H-20)+"px"); |
||||
|
//el.setAttribute( "height", H-20 );//'86%' );
|
||||
|
//cleanupDraw( %%%NODEID%%% );
|
||||
|
//drawZoomLevels[%%%NODEID%%%]=100;
|
||||
|
//const panorama = new PANOLENS.ImagePanorama( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' );
|
||||
|
//const viewer = new PANOLENS.Viewer({container: 'targ_canvas_%%%NODEID%%%' });
|
||||
|
//viewer.add( panorama );
|
||||
|
nodeTHREEviewers[%%%NODEID%%%] = {}; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container = document.getElementById( 'div_radar_%%%NODEID%%%' ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].camera = new THREE.PerspectiveCamera( 100, 1, 1, 600 ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].camera.fov = 75; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene = new THREE.Scene(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].geometry = new THREE.SphereGeometry( 500, 60, 40 ); |
||||
|
// invert the geometry on the x-axis so that all of the faces point inward
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].geometry.scale( -1, 1, 1 ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].texture = new THREE.TextureLoader().load( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].material = new THREE.MeshBasicMaterial( { map: nodeTHREEviewers[%%%NODEID%%%].texture } ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].mesh = new THREE.Mesh( nodeTHREEviewers[%%%NODEID%%%].geometry, nodeTHREEviewers[%%%NODEID%%%].material ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene.add( nodeTHREEviewers[%%%NODEID%%%].mesh ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene.add( l3dMapOverlayMesh ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer = new THREE.WebGLRenderer(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setPixelRatio( 1 ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( nodeTHREEviewers[%%%NODEID%%%].container.clientWidth, (H-80) ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.appendChild( nodeTHREEviewers[%%%NODEID%%%].renderer.domElement ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.style.touchAction = 'none'; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.myVID = %%%NODEID%%%; |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'pointerdown', onPointerDown ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'wheel', onDocumentMouseWheel ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targets = new Array(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targetShowCopunter = 0; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targetIndex = 0; |
||||
|
|
||||
|
//addl3dTarget( %%%NODEID%%%, 200, Math.PI/4, Math.PI/4 );
|
||||
|
//addl3dTarget( %%%NODEID%%%, 150, 0, 0 );
|
||||
|
//document.addEventListener( 'wheel', onDocumentMouseWheel );
|
||||
|
/* |
||||
|
container.addEventListener( 'dragover', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
event.dataTransfer.dropEffect = 'copy'; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('dragenter', function () { |
||||
|
|
||||
|
document.body.style.opacity = 0.5; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('dragleave', function () { |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('drop', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
|
||||
|
const reader = new FileReader(); |
||||
|
reader.addEventListener( 'load', function ( event ) { |
||||
|
|
||||
|
material.map.image.src = event.target.result; |
||||
|
material.map.needsUpdate = true; |
||||
|
|
||||
|
} ); |
||||
|
reader.readAsDataURL( event.dataTransfer.files[ 0 ] ); |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
*/ |
||||
|
/* |
||||
|
document.addEventListener( 'dragover', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
event.dataTransfer.dropEffect = 'copy'; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'dragenter', function () { |
||||
|
|
||||
|
document.body.style.opacity = 0.5; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'dragleave', function () { |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'drop', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
|
||||
|
const reader = new FileReader(); |
||||
|
reader.addEventListener( 'load', function ( event ) { |
||||
|
|
||||
|
material.map.image.src = event.target.result; |
||||
|
material.map.needsUpdate = true; |
||||
|
|
||||
|
} ); |
||||
|
reader.readAsDataURL( event.dataTransfer.files[ 0 ] ); |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
*/ |
||||
|
//animateTargets();
|
||||
|
animate(); |
||||
|
|
||||
|
//
|
||||
|
|
||||
|
//window.addEventListener( 'resize', onWindowResize );
|
||||
|
} |
||||
|
}, |
||||
|
layout:'border', |
||||
|
items:[{ |
||||
|
id: 'cp_radar_%%%NODEID%%%', |
||||
|
region: 'center', |
||||
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"></div>', |
||||
|
width: '56%' |
||||
|
},{ |
||||
|
region: 'east', |
||||
|
collapsible: true, |
||||
|
minSize: 75, // defaults to 50
|
||||
|
maxSize: 220, |
||||
|
frame: false, |
||||
|
border: false, |
||||
|
collapsed: true, |
||||
|
collapseMode: 'mini', |
||||
|
title: '%%%LABEL%%%TOOLBOX%%%', |
||||
|
floatable: true, |
||||
|
animFloat: false, |
||||
|
autoHide: true, |
||||
|
id: 'toolbox_%%%NODEID%%%', |
||||
|
//unstyled: true,
|
||||
|
margins: '5 0 0 5', |
||||
|
//cmargins: '5 0 5 5',
|
||||
|
width: 200, |
||||
|
items:[{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_clear_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
text: '%%%LABEL%%%CLEALARM%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( 1, 125,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_draw_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%DRABACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 3,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'cp_study_btn_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
text: '%%%LABEL%%%STUBACKGROUND%%%', |
||||
|
iconCls: 'ctrl_panel_study_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doDeviceOperation( %%%NODEID%%%, 2,'', true ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '%%%LABEL%%%MASKEDITOR%%%', |
||||
|
id: 'DMED_%%%NODEID%%%', |
||||
|
width: '100%', |
||||
|
disabled: true, |
||||
|
iconCls: 'ctrl_panel_drawscan_sm', |
||||
|
handler: function(){ |
||||
|
showMaskEditor( false, 0, %%%NODEID%%% ); |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
title: '%%%LABEL%%%MASKMNGR%%%', |
||||
|
height: 70, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'small',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_0', |
||||
|
iconCls: 'mask_zone1_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 0 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium', |
||||
|
id: 'mz_btn_%%%NODEID%%%_1', |
||||
|
iconCls: 'mask_zone2_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 1 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 1 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '19%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_2', |
||||
|
iconCls: 'mask_zone3_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 2 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 2 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_3', |
||||
|
iconCls: 'mask_zone4_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 3 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 3 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
enableToggle: true, |
||||
|
width: '20%', |
||||
|
scale: 'medium',//scale: 'large',
|
||||
|
id: 'mz_btn_%%%NODEID%%%_4', |
||||
|
iconCls: 'mask_zone5_btn', |
||||
|
iconAlign: 'top', |
||||
|
pressed: false, |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){ |
||||
|
doMaskOperation( %%%NODEID%%%, 1, 4 ); |
||||
|
} else { |
||||
|
doMaskOperation( %%%NODEID%%%, 0, 4 ); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: '100%', |
||||
|
enableToggle: true, |
||||
|
id: 'cp_ack_btn_%%%NODEID%%%', |
||||
|
text: '%%%LABEL%%%ACKNOLAGE%%%', |
||||
|
iconCls: 'ctrl_panel_clean_sm', |
||||
|
iconAlign: 'left', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){ |
||||
|
//doMaskOperation( %%%NODEID%%%, 1, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 1 ); |
||||
|
} else { |
||||
|
//doMaskOperation( %%%NODEID%%%, 0, 4 );
|
||||
|
doAckOperation( %%%NODEID%%%, 0 ); |
||||
|
}; |
||||
|
} |
||||
|
}/*,{ |
||||
|
xtype: 'panel', |
||||
|
title: 'Detection Sensitivity', |
||||
|
height: 95, |
||||
|
frame: true, |
||||
|
flex: 1, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
text: 'Factory', |
||||
|
id: 'DDSPBTN0', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_factory', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Low', |
||||
|
id: 'DDSPBTN1', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_low', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'Meduim', |
||||
|
id: 'DDSPBTN2', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_medium', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: 'High', |
||||
|
id: 'DDSPBTN3', |
||||
|
width: 80, |
||||
|
iconCls: 'detection_btn_high', |
||||
|
enableToggle: true, |
||||
|
toggleGroup: 'det_sens_btn_grp', |
||||
|
disabled: true, |
||||
|
scale: 'large', |
||||
|
iconAlign: 'top' |
||||
|
}] |
||||
|
}*/] |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'panel', |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
width: 800, |
||||
|
height: 28, |
||||
|
html: '' |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
[{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px', |
||||
|
items:[ |
||||
|
%%%ITEMS%%% |
||||
|
] |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
}] |
||||
Binary file not shown.
|
After Width: 681 | Height: 107 | Size: 13 KiB |
Write
Preview
Loading…
Cancel
Save
Reference in new issue