From d93105b9e995e837d942a3ae72c8d1f8f492cec6 Mon Sep 17 00:00:00 2001 From: Evgeny Gagua Date: Sun, 17 Aug 2025 12:02:38 +0300 Subject: [PATCH] AGP Last LA version --- index.php | 9 +- lib/1.json | 2 +- lib/controller/dash/node_3.js | 2 +- lib/controller/doApplicationOperation.php | 19 + lib/controller/doCameraOperation.php | 17 +- lib/controller/doFilterOperation.php | 4 +- lib/controller/getApplicationSettings.php | 495 ++++++++++++ lib/controller/getCameraEditor.php | 28 +- lib/controller/getHistoryEvents.php | 2 +- lib/controller/getMetroFusionEditor.php | 54 +- lib/controller/getStatus.php | 10 +- lib/controller/uploadDeviceMask.php | 3 +- .../jsapi_dynamic/mojo_dashboard.js | 12 +- .../jsapi_dynamic/mojo_global_vars.js | 3 +- lib/javascript/jsapi_dynamic/mojo_main.js | 546 ++++++++----- lib/javascript/jsapi_dynamic/mojo_masks.js | 752 ++++++++++++++++++ lib/javascript/jsapi_dynamic/mojo_reports.js | 8 +- lib/javascript/jsapi_dynamic/mojo_settings.js | 374 ++------- lib/javascript/jsapi_dynamic/mojo_windows.js | 188 +++++ .../jsapi_dynamic/rgoose_devices.js | 745 ----------------- lib/javascript/jsapi_static/mojo_general.js | 5 + lib/javascript/jsapi_static/mojo_portal.js | 239 ++++++ lib/version.var | 2 +- 23 files changed, 2240 insertions(+), 1279 deletions(-) create mode 100644 lib/controller/getApplicationSettings.php create mode 100644 lib/javascript/jsapi_dynamic/mojo_masks.js create mode 100644 lib/javascript/jsapi_dynamic/mojo_windows.js create mode 100644 lib/javascript/jsapi_static/mojo_portal.js diff --git a/index.php b/index.php index 5a74e39..95a4ee4 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ if( $CUser->Data['id'] > 1 ){ if( $CUser->Data['access'] > 5 ){ UI_PageHeaderExt( - 'mojo_general.js', + array('mojo_general.js','mojo_portal.js'), array( 'mojo_global_vars.js', 'mojo_reports.js', @@ -13,18 +13,19 @@ 'rgoose_modules.js', 'mojo_monitoring.js', 'mojo_map.js', - //'rgoose_location_editor.js', + 'mojo_masks.js', 'mojo_dashboard.js', 'mojo_users.js', 'mojo_logs.js', 'mojo_metro.js', 'mojo_settings.js', + 'mojo_windows.js?w='.((isset($_GET['w']))?intval($_GET['w']):0), 'mojo_main.js' ) ); } else { UI_PageHeaderExt( - 'mojo_general.js', + array('mojo_general.js','mojo_portal.js'), array( 'mojo_global_vars.js', 'mojo_reports.js', @@ -33,8 +34,10 @@ 'rgoose_modules.js', 'mojo_monitoring.js', 'mojo_map.js', + 'mojo_masks.js', 'mojo_dashboard.js', 'mojo_settings.js', + 'mojo_windows.js?w='.((isset($_GET['w']))?intval($_GET['w']):0), 'mojo_main.js' ) ); diff --git a/lib/1.json b/lib/1.json index 04601bd..a26cdec 100644 --- a/lib/1.json +++ b/lib/1.json @@ -1 +1 @@ -{"___ENABLED__":"Enabled","__ADD__":"Add","__DISABLED__":"Disabled","__LOGIN__":"Login","__LOGIN_ID__":"Login ID","__LOGOUT__":"Logout","__NARROWER__":"Narrower","__OFFLINE__":"Offline","__ONLINE__":"Online","__PAGEWASGENIN__":"The page was generated in","__PASSWORD__":"Password","__PTZ_CONTROL__":"PTZ Control","__SECOND__":"second","__SECONDS__":"seconds","__SSl_DOWNLOAD__":"Please Download our Root CA certificate and Install it into your System (see instructions below)","__SSl_NO_CERT__":"The Working Certificate for %IP% Not Installed.","__SSl_WELCOME__":"For Security Reason and smooth workink via SSL encryption we provide SSL Certificato to install into Client Computer","__UPLOAD__":"Upload","__WIDER__":"Wider","__ZERO_SHIFT__":"Zero Shift","_ACC_LOG_":"Security Log","_ACCESS_ADMIN_":"Admin","_ACCESS_DENIED_":"Access Denied","_ACCESS_FACTORY_":"Factory Defined","_ACCESS_LEVEL_":"Access Level","_ACCESS_LOGIN_":"Access Login","_ACCESS_MINIMAL_":"Minimal Access","_ACCESS_OPERATOR_":"Operator","_ACCESS_PASSWORD_":"Access Password","_ACTION_":"Action","_ADD_":"Add","_ADD_CAM_DIAL_TTL_":"Add IP Camera","_ADD_CAMERA2SITE_":"Add Camera to Site","_ADD_CONNECTION_":"Add Connection","_ADD_E2U_DIAL_TTL_":"Add Ethernet To Serial Adapter","_ADD_EVT_FILTER_":"Add Event Filter","_ADD_FILTER_":"Add Filter","_ADD_IP_CAMERA_":"Add IP Camera","_ADD_MEDIA_SERVER_":"Add Media Server","_ADD_MODULE_":"Add Module","_ADD_NEW_PHN_":"Add New Phone Number","_ADD_NEW_WTR_":"Add New Record","_ADD_REMOTE_UART_":"Add Remote UART","_ADD_USER_":"Add User","_ADM_SETTINGS_":"Admin Settings","_ADMIN_":"Admin","_ADV_TAB_":"Advanced Settings","_AJX_REQFAILURE_":"Ajax Request failed!","_ALARMED_":"Alarmed","_ALT_SHORT_LBL_":"Alt","_ANAL_SOURCES_LST_":"Analogue Video Sources","_APLY_DBBACKUP_":"Restore","_APP_TITLE_":"Argus Security System","_APPLICA_MNGMNT_":"Application Settings","_APPLY_CHANGES_":"Apply Changes","_APPLY_SETTINGS_":"Apply Settings","_AS_MODULE_":"Add Server Module","_ASSIGN_CAMERA_":"Assign Camera","_AUTH_MODE_0_":"Authorization Mode","_AXIS_ROT_":"Axis Rotation","_AZIMUTH_":"Azimuth","_BACKUP_SETTINGS_":"Backup\/Restore","_BOT_PIC_BOUND_":"Bottom Picture Boundary (pixels)","_BOTTOM_SENSOR_":"Bottom Sensor","_BROWSE_":"Browse","_BTN_CLR_AHIST_":"Clear All History","_BTN_CLR_SELECTED_":"Clear Selected","_BUSY_":"Busy","_CAC_TAB_":"Credentials","_CALL_ONLY_":"Call Only","_CAM_AH_TIME_":"Time After Alarm","_CAM_AH_TOKEN_":"Home Preset Token","_CAM_ASS_LIST_":"Assigned Cameras","_CAM_AUTO_HOMING_":"Enable Automatic Home Return","_CAM_CUSTOMZ_":"Custom Zoom","_CAM_DET_LIST_":"Detected Cameras","_CAM_FIXEDZ_":"Fixed Zoom","_CAM_FOCALL_":"Focal Length","_CAM_IP_ADDRESS_":"Camera IP Address","_CAM_LABEL_":"Camera Label","_CAM_LENS_SETTINGS_":"Lens Settings","_CAM_MAP_NAME_":"Camera Name","_CAM_MAX_RANGE_":"Maximal Range","_CAM_PANANGS_":"Tottal Pan Angles","_CAM_PANMOD_":"Pan Model","_CAM_PROTO_ID_":"Camera ID","_CAM_PTZ_AAC_":"PTZ Auto Axeleration","_CAM_PTZ_MAC_":"PTZ Manual Axeleration","_CAM_SENS_SIZE_":"Sensor Size","_CAM_TILTANGS_":"Tottal Tilt Angles","_CAM_TILTMOD_":"Tilt Model","_CAM_TM_ALL_":"All Targets","_CAM_TM_ALL_FAR_":"ALL Far","_CAM_TM_ALL_NEAR_":"All Near","_CAM_TM_REGULAR_":"Regular","_CAM_TM_REVERSED_":"Reversed","_CAM_TM_RSHIFTED_":"Rev-Shifted","_CAM_TM_SHIFTED_":"Shifted","_CAM_TM_STRICT_VISIBLE_":"Strict Visible Targets","_CAM_TRIGGERING_MODE_":"Alarm Triggering Mode","_CAM_VARIOZ_":"Simple Zoom","_CAM_ZOOM_PERC_":"Zoom Percents","_CAM_ZOOMMO_":"Zoom Mode","_CAM_ZOOMR_":"Zoom Ratio","_CAMERA_MNGMNT_":"Cameras","_CANCEL_":"Cancel","_CHOOSEF_":"Choose File","_CLEAR_":"Clear","_CLEAR_ALARM_":"Clear Alarm","_CLEAR_SITE_":"Delete All","_CLOSE_":"Close","_CON_2_IP_CAM_":"Connect to IP Camera","_CONNECT_2_":"Connect to","_CONNECT_2_SEL_":"Connect To Selected","_CREA_ANAL_CAM_":"Create Analog Camera","_CREATE_CUSTOM_MAP_":"Creeate Custom Map","_CREATE_NEW_LBL_":"Create New","_CREATED_":"Created","_CTL_SERVER_NODE_":"Control Server Node","_CUSTOM_MSG_":"Custom Message","_DASHBOARD_":"Dashboard","_DATETIME_":"Time","_DB_BACKUP_":"Select Restore File","_DB_FILE_HAS_DOWNLOADED_":"Settings File has been Downloaded","_DB_STAT_CON_0_":"Connected ... Geting Info","_DB_STAT_CON_UNA_":"Connection is Unavailable","_DB_STAT_STUDY_":"Studing","_DB_UPLOAD_BACKUP_":"Uploading Settings","_DC_AUTO_ENA_":"Enable Dry Contact Control","_DC_CONTROL_SET_":"Dry Contact Control","_DC_TIME_WINDOW_":"Dry Contact Time Window","_DC_WM_NC_":"Normally Close","_DC_WM_NO_":"Normally Open","_DC_WORK_MODE_":"Dry Contact Work Mode","_DEBUGGING_MODE_":"Debugging Mode","_DEL_SELECTED_":"Delete Selected","_DEL_USER_":"Remove User","_DELETE_":"Delete","_DESCRIPTION_":"Description","_DET_GENWORKS_":"General Tasks","_DET_IP_CAMERA_LST_":"Detected IP Cameras List","_DET_SENSITIVITY_":"Detection Sensitivity Profile","_DET_SET_WIDTH_T_":"Width Table","_DET_SETTINGS_":"Detection Settings","_DEV_ACK_BTN_":"Detection Bypass","_DEV_ACK_BTN2_":"Detections Bypassed","_DEV_ACK_START_":"Are you sure want to Bypass current detections?","_DEV_ACK_STOP_":"Are you sure want to cancel detection Bypass?","_DEV_CTLPANEL_SHRT_":"Device Control","_DEV_ITYPE_FLD_":"Sensor Installed","_DEV_MISTMATT1_":"Please decide what to do","_DEV_PL_ANG_":"At an Angle","_DEV_PL_HORI_":"Horizontally","_DEV_PL_VERT_":"Vertically","_DEV_RANGE_FLD_":"Max Range","_DEV_TYPE_3D_":"3DLRF Sensor","_DEV_TYPE_ALS_":"ALS Sensor","_DEV_TYPE_FLD_":"Sensor Type","_DEV_TYPE_LFS_":"LFS Sensor","_DEV_TYPE_NPLS200_":"New PLS200 Sensor (Network)","_DEV_TYPE_PLS200_":"PLS200 Sensor","_DEV_TYPE_PLS360_":"PLS360 Sensor","_DEVICE_IP_":"IP Address","_DEVICE_NAME_":"Device Name","_DEVICE_PORT_":"Port","_DISCONNECTED_":"Disconnected","_DLG_ADD_3DSENS_":"Add 3DLRF Sensor","_DLG_ADD_ALS_":"Add ALS Sensor","_DLG_ADD_LFS_":"Add LFS Sensor","_DLG_ADD_PLS200_":"Add PLS200 Sensor","_DLG_ADD_PLS360_":"Add PLS360 Sensor","_DLG_CON_SEVER_NODE_":"Will be Connected to","_DOWNLOAD_SETTINGS_":"Download Current Settings","_DRAW_BACKGROUND_":"Draw Background","_EDIT_":"Edit","_EDIT_CUR_MAP_":"Edit Current Map","_EDIT_LRF3D_SETTINGS_":"Edit Lidar 3D Settings","_EDIT_USER_":"Edit User","_EDIT_USER_CRACCES_":"Edit User Credentials and Access","_EDIT_WTR_":"Edit Width Table Record","_EDT_CONNECTIONS_":"Edit Connections","_EDT_LOCATIONS_":"Edit Locations","_ELEVATION_":"Elevation","_EMBED_VIDEO_ENCODER_":"Embed Video Encoder Module","_ERROR_MSG_":"Error Message","_EVE_COMPRESS_QUA_":"Compression Quality","_EVE_DESC_LOO_":"Video Encoder Module provides Imaging Capture functionality to ARGUS server. Can capture Analog Video from USB grabber\/USB WebCam or Digital Stream from IP Camera","_EVE_DESC_SHO_":"LibAV(ffmpeg) Internal Video Encoder","_EVE_FONT_LBL_":"Font Type","_EVE_FONT_TS_":"Font Type","_EVE_LBL_FSCALE_":"Label Font Scale","_EVE_LBL_FTHICK_":"Label Font Thickness","_EVE_LBL_LINE_T_":"Label Line Type","_EVE_LBL_POSX_":"Label X","_EVE_LBL_POSY_":"Label Y","_EVE_LOGO_HEIGHT_":"Logo Height","_EVE_LOGO_POSX_":"Logo X","_EVE_LOGO_POSY_":"Logo Y","_EVE_LOGO_WIDTH_":"Logo Width","_EVE_PORT_":"Web Access Port","_EVE_SHOW_LBL_":"Show Label","_EVE_SHOW_LOGO_":"Show Custom Logo","_EVE_SHOW_TS_":"Show TimeStamp","_EVE_TRANSO_LBL_":"Transparent BG","_EVE_TRANSO_TS_":"Transparent BG","_EVE_TS_FSCALE_":"Font Scale","_EVE_TS_FTHICK_":"Font Thickness","_EVE_TS_LINE_T_":"Font Line Type","_EVE_TS_POSX_":"TimeStamp X","_EVE_TS_POSY_":"TimeStamp Y","_EVENT_":"Event","_EVENT_LOG_":"Event Log","_EVT_ARCHIVE_":"Events Archive","_EVT_MONITOR_":"Live Monitor","_EVT_MONITOR_IPI_":"SingleIPI Mode","_EVT_MSG_ACKOFF_":"Bypass Mask Deleted","_EVT_MSG_ACKON_":"Bypass Mask Added","_EVT_MSG_B2DTRG_":"Black 2D Target","_EVT_MSG_B3DTRG_":"3D Black Target","_EVT_MSG_BUMO_":"Device Is BUSY","_EVT_MSG_COM_JAMED_":"Communication Jamed","_EVT_MSG_CONNECTED_":"Connected","_EVT_MSG_DISCONNECTED_":"Disconnection","_EVT_MSG_EVT_CLOMA_":"Event Closed Manual","_EVT_MSG_EVT_END_":"Event Ended","_EVT_MSG_EVT_START_":"Event Started","_EVT_MSG_FLIPO_":"Flip Complete","_EVT_MSG_MASKOFF_":"Turning Off Masking Area","_EVT_MSG_MASKON_":"Turning On Masking Area","_EVT_MSG_ROI_":"Region Of Interest","_EVT_MSG_SCANC_":"Scan Complete","_EVT_MSG_STUMO_":"Device Enters Into Study Mode","_EVT_MSG_TF_BSD_":"[Train Filter] Bottom Sensor Detection","_EVT_MSG_TF_CT_":"[Train Filter] Check Target","_EVT_MSG_TF_DD_":"[Train Filter] Detection Disabled","_EVT_MSG_TF_DIFD_":"[Train Filter] Differential Detection","_EVT_MSG_TF_RD_":"[Train Filter] Regular Detection","_EVT_MSG_TF_SUSPA_":"[Train Filter] Suspicious Activity","_EVT_MSG_TF_SUSPD_":"[Train Filter] Suspicious Detection","_EVT_MSG_TF_SUSPN_":"[Train Filter] Suspicious NACK","_EVT_MSG_TF_TD_":"[Train Filter] Train Detected","_EVT_MSG_TF_TUPD_":"[Train Filter] Train Updated","_EVT_MSG_TF_USD_":"[Train Filter] Upper Sensor Detection","_EVT_MSG_VIFDEC_":"Video Framerate Decreased","_EVT_MSG_VIFINC_":"Video Framerate Increased","_EVT_MSG_W2DTRG_":"White 2D Target","_EVT_MSG_W3DTRG_":"3D White Target","_FACT_DEFAULT_":"Set by Factory","_FACTORY_RESET_":"Reset to Factory Defaults","_FHM_PROPS_":"FlyHunter Module Properties","_FILE_NAME_":"File Name","_FISONMODULE_":"Files Saved on Module","_FOUNDER_":"Founder","_FRAME_FORMAT_":"Frame Format","_FRAME_SIZE_":"Frame Size","_FROM_ANCH_":"from Anchor","_FUSION_ENGINE_":"Fusion Engine","_GEN_INSTANCE_ID_":"Generate New Identity","_GENERAL_":"General","_GENERAL_NFO_":"General Info","_GEO_LOCATION_":"Geo Locations","_GO_HOME_":"Go Home","_GUEST_":"Guest","_HARDWARE_":"Hardware","_ID_":"id","_INFO_":"Information","_INFO_MSG_":"Information Message","_INSTANCE_ID_":"Instance Identity","_INTER_MAP_":"Internet Map","_ISSURES_":"Issue Reset","_KAFKA_BROKER_":"Kafka Broker","_KAFKA_DESC_LOO_":"Sends Events from ARGUS server to a KAFKA Broker Node","_KAFKA_DESC_SHO_":"KAFKA Broker Proxy","_KAFKA_TOP_EVTS_":"Kafka Topics and Events","_LAST_ACCESS_":"Last Access","_LAT_":"Latitude","_LAT_SHORT_LBL_":"Lat","_LAYER_ATTRIB_":"Layer Attribution","_LEFT_PIC_BOUND_":"Left Picture Boundary (pixels)","_Loading_Calo_":"Loading Dates","_LOC_MAP_LBL_":"Location Map","_LOC_TAB_":"Location\/Orientation","_LOCAL_PIC_MAP_":"Local Picture Map","_LOCK_USER_":"Lock User","_LOGIN_":"Login","_LOGIN_0_":"Login:","_LOGOUT_":"Logout","_LON_":"Longitude","_LON_SHORT_LBL_":"Lon","_MA_CIRCLE__":"Circular","_MA_ROUND_":"Square","_MAINTENENCE_":"Maintenence","_MANUADD_CAMERA_":"Manually add IP Camera","_MAP_":"Map","_MAP_CENTER_MODE_":"Map Centre Mode","_MAP_COORD_SYSTEM_":"Map Cordinate System","_MAP_CUST_LBL_":"Custom Map","_MAP_HEIGHT_":"Map Height (meters)","_MAP_LEFT_CORCORD_":"Left Upper Corner Cordinate","_MAP_MONITORING_":"Map Monitoring","_MAP_NAME_":"Map Name","_MAP_PICTURE_":"Map Picture","_MAP_REG_LBL_":"Regular WGS84 Map (reqires Internet)","_MAP_RIGHT_CORCORD_":"Right Bottom Corner Cordinate","_MAP_TYP_LBL_":"Map Type","_MAP_WIDTH_":"Map Width (meters)","_MAS_LRF_DET_SET_":"Master LRF Detection Settings","_MASK_EDITOR_":"Mask Editor","_MASK_MANAGER_":"Masking Management","_MAX_NATURAL_ZOOM_":"Max Natural Zoom","_MAX_ZOOM_":"Max Zoom","_MEMO_":"Memo","_METERS_":"Meters","_METERS_RANGE_":"Meters","_MOD_NO_NEDCONF_":"Module does not need to be configured.","_MODEM_DESC_LOO_":"Provides WAN connectivity over cellular networks (UMTS, 4G, LTE). Also sends Events via SMS","_MODEM_DESC_SHO_":"Cellular Modem Manager","_MODULE_":"Module","_MONIT_LAYOUT_":"Monitoring Layout","_MONITORING_":"Monitoring","_MSG_CAM_NOT_ASS_":"Camera is Not Assigned to the System","_MSG_CAM_PROC_2_SET_":"Proceed to Cameras Settings to Assign One","_MSG_CAM_PROC_NOT_ASS_":"Camera is Not Assigned to the SystemPlease Assign One","_MSG_SELITEMFROMMAP_":"Select Item From Map","_NAME_LABEL_":"Name\/Label","_NAME_MAP_":"Map Name","_NET_SETTINGS_":"Connections","_NEW_PASSWORD_":"New Password","_NO_PTZ_":"No PTZ Control","_NO_SENSORS_DEF_":"No Sensors Defined","_NO_UARTS_DEF_":"No UART Defined","_OK_":"Ok","_ONVIF_DESC_LOO_":"OnVif module allows you to discover and communicate with the network cameras which supports the ONVIF specifications on the same subnet.","_ONVIF_DESC_SHO_":"OnVif LAN Discovery Module","_ORIENTATION_":"Orientation","_OUTPUT_FRAME_SIZE_":"Output Frame Size","_PASSWORD_0_":"Password:","_PHONE_NUMBER_":"Phone Number","_Please_Wait_":"Please Wait","_PLS_CONFIRM_":"Please Confirm","_PLS_SEL_CAL_DATE_":"Please Select a Date from the Calendar from the right","_PLS_SEL_LEFT_ITEM_":"Please select item from the left to view more info.","_POINTER_":"[ptr]","_POSITION_":"Position","_PROF_SETTINGS_":"Profile Settings","_PROGRESS_":"Progress","_PROPERTIES_":"Properties","_PROTO_DEVICE_ID_":"Protocol ID","_PROV_CAC_":"Please Provide Camera Access Credentials.","_PTZ_TAB_":"PTZ Settings","_QERY_MSG_":"Question Message","_RANGE_":"Range","_READY_":"Ready","_READY_TO_UPLO_":"Ready to Upload","_REGULAR_":"Regular","_RELOAD_":"Reload","_REMOVE_CAMERA_":"Remove Camera","_REMOVE_SENSOR_":"Remove Sensor","_REP_PASSWORD_":"Repeate Password","_REPO_HISTORY_":"Reports\/History","_REPORT_STORAGE_":"Reports\/History Storage","_REQ_FAILURE_":"Failure","_RES_ETHERNET_DESC_":"Ethernet Network Adapter","_RES_EZ_UART_DESC_":"UART connected via Ethernet","_RES_HW_UART_DESC_":"UART connected to a Server Appliance","_RES_INFO_":"Resource Information","_RES_WAN_DESC_":"WAN Adapter (Broadband Internet)","_RES_WIFI_DESC_":"WiFi Network Adapter","_RESETSTATUS_":"Reset Status","_RESOURCES_":"Resources","_RIGHT_PIC_BOUND_":"Right Picture Boundary (pixels)","_RSET_CREDENTIALS_":"Reset Credentials","_RUS_DELETE_MODULE_":"Are you sure delete Module?","_SARE_SAVED_":"Settings Are Saved","_SAVE_":"Save","_SCREEN_RESIZE_":"Resize Screen","_SEC_SYSTEM_":"","_SELE_ANIMAGE_":"Select an image","_SELE_DBBACKUP_":"Restore Settings","_SENDTOSENS_":"Send to Sensor","_SENS_ACKS_":"Default Bypass Size","_SENS_ACKT_":"Default Bypass Shape","_SENS_APPLY_RES_":"Apply To Device and Reset","_SENS_AUTOR_ENA_":"Auto Reset Enabled","_SENS_AUTOR_INTER_":"Auto Reset Interleave","_SENS_AUTOR_TO_":"Auto Timeout","_SENS_BZSHIFT_":"Board Zero Shift","_SENS_DEL_FROTH_":"Delete Frozen Threshold","_SENS_DIS_FROTH_":"Disable Frozen Threshold","_SENS_DO_FULLR_":"Issue Sensor Full Reset","_SENS_DO_READALL_":"Read All Settings from Sensor","_SENS_DO_SAVEALL_":"Save All Settings to Sensor","_SENS_ENA_FROTH_":"Enable Frozen Threshold","_SENS_FFTH_":"Freeze First Threshold","_SENS_FIN_FROTH_":"Finish Frozen Threshold Study","_SENS_HTEMP_":"Heater Temperature","_SENS_JUMODI_":"Just Moving Distance","_SENS_JUMORA_":"Just Moving Radial","_SENS_JUMOTA_":"Just Moving Targets","_SENS_NOBLA_":"No Black Targets","_SENS_SCANSPEED_":"Scan Speed","_SENS_SFTH_":"Save First Threshold","_SENS_STATUS_":"Sensor's Status","_SENSOR_CONNECTION_":"Sensors","_SENSOR_MAX_RANGE_":"Max Range","_SENSOR_PLACE_":"Sensor Placeholder","_SERIAL_":"Serial","_SERV_CTLPANEL_SHRT_":"Server Control","_SERV_FACTORY_DESC_":"Restore factory settings, clear database and detection settings","_SERV_FACTORY_OP_":"Restore Factory Settings","_SERV_FACTORY_QM_":"All settings will be clearedThe only admin<\/b> user will be preserved.The Report History will be keept intact.","_SERV_HW_DET_DESC_":"Run a hardware discovery process to recognize recently connected devices such as a USB serial port or USB video.","_SERV_HW_DET_OP_":"Detect new Hardware","_SERV_HW_DET_QM_":"Are you sure to run a hardware discovery process.That will prevent detection events for few seconds.","_SERV_HW_DET_QT_":"Hardware Detection","_SERV_LOG_":"Server Log","_SERV_OSRESET_DESC_":"Restart the host operating system to apply any recent system configuration changes","_SERV_OSRESET_OP_":"Restart Host Computer","_SERV_RESTART_DESC_":"Restart the management application to initialize all components and apply any configuration changes.","_SERV_RESTART_OP_":"Restart Control Application","_SERV_RESTART_QM_":"Are you sure to restart control application?","_SERV_RESTART_QT_":"Restart Backend","_SERVER_MODULES_":"Modules","_SET_CHANGED_WOULD_SAVE_":"Some Settings are ChangedThay will be Unsaved!","_SET_CREDENTIALS_":"Set Credentials","_SETTING_SAVE_OK_":"All changes saved sucessfully","_SETTINGS_":"Settings","_SETTINGS_CHANGED_":"Settings Changed","_SITE_DEL_ALL_ABO_":"Are you sure to delete all devices and settings?","_SITE_PROP_LBL_":"Site Properties","_SITE_TITLE_":"ARGUS Security System","_SIZE_":"Size","_SLV_LRF_DET_SET_":"Slave LRF Detection Settings","_SMM_ADD_ADDIT_":"Add Additional Equipment","_SMM_ADD_LSEN_":"Add Laser Sensor","_SMS_ONLY_":"SMS Only","_SND_FILES2_DEV__":"Send Files to Device","_SOUND_":"Sound","_SOURCE_":"Source","_SSDP_DESC_LOO_":"SSDP announcer allows you announce on your LAN a ARGUS server","_SSDP_DESC_SHO_":"SSDP announcer daemon for UPnP\/DLNA","_SSL_CERT_INVALID__":"Provided Certificate is Invalid","_SSL_CERT_IP_NO_":"Provided Certificate Valid For Other IP Address","_SSL_CERT_VALID_INSTA":"The Certificate is Valid and will be applied intact (it will take few minutes). The System is going to reboot.","_SSL_NO_EXT_CERT_":"No x509 Extensions defined in Certificate","_SSL_NO_IP_CERT_":"No Ip Addresses in Certificate","_SSL_PROVIDE_CERT_":"Please Provide Valid Certificate for %IP% signed by Dr. Frucht Systems.<\/br>You may request one at www.smartsecsystems.com<\/a>","_SSL_VALID_BUT_":"The Certificate is Valid. However:","_STATIC_CONNECTION_":"Static Connection","_STATUS_":"Status","_STORE_DAYS_":"Keep Report History Days","_STORE_EMPTY_SPACE_":"Preserve Empty Space on System","_STREAMS_":"Streams","_STUDY_BACKGROUND_":"Study Background","_SUCCESS_":"Success","_SWU_DASHBOARD_":"Software Update Management","_SYS_ANCHORT_LBL_":"System Anchor","_SYS_DASHBOARD_":"System Overview","_SYS_GENERAL_":"General","_SYS_MAP_":"System Map","_SYS_SETTINGS_":"System Settings","_TARGET_FILTERS_":"Filters","_TARGETING_TAB_":"Alarm Settings","_TCP_CLIENT_":"TCP Client","_TCP_SERVER_":"TCP Server","_TILE_URL_MAP_":"Tiles URL Pattern","_TIME_":"Time","_TOOLBOX_":"Toolbox","_TOP_PIC_BOUND_":"Top Picture Boundary (pixels)","_TYPE_":"Type","_UART_PORT_":"UART Port","_UDP_CLIENT_":"UDP Client","_UDP_SERVER_":"UDP Server","_UNLOCK_USER_":"Unlock User","_UPDATE_LBL_":"Update","_UPDATING_DATA_":"Updating Data","_UPGRADE_MNGMNT_":"Upgrade\/Backup","_UPLO_DONE_":"Already Uploaded","_UPLO_IN_PROGRESS_":"Uploading","_UPLOA2MODULE_":"Upload to Module","_UPLOAD_PACKAGE_":"Upload Package","_UPPER_SENSOR_":"Upper Sensor","_USER_":"User","_USER_LOGIN_":"User Login","_USERS_MNGMT_":"Users Management","_VERSION_":"Version","_VIDEO_ENCODER_":"Video","_VIDEO_FILE_HAS_DOWNLOADED_":"Video File has been Downloaded","_WDEV_DET_WIZ0_":"Device Type","_WDEV_DET_WIZ1_":"Instalation Type","_WDEV_DET_WIZ2_":"Environment","_WDEV_DET_WIZ3_":"Something Else","_WDEV_DET_WIZT_":"Sensor Setup Detection Wizard","_WDEV_MISTMATCH_":"Device Is Different","_WIDTH_":"Width","_WIDTH_CORRECT_":"Width Correction","_WORKING_MODE_":"Working Mode","_WRO_VAL_MSG_":"You Entered Wrong ValuesPlease Correct and Continue.","_WRO_VALUES_":"Wrong Values","_ZL_MEDIA_DESC_LOO_":"Support multiple protocols (RTSP\/RTMP\/HLS\/HTTP-FLV\/WebSocket-FLV\/GB28181\/HTTP-TS\/WebSocket-TS\/HTTP-fMP4\/WebSocket-fMP4\/MP4\/WebRTC), support protocol interconversion.","_ZL_MEDIA_DESC_SHO_":"ZLMediaKit Server - Streaming Encoder","05b048d7242cb7b8b57cfa3b1d65ecea":"Gamma","0737d367234baa9eb0d7d93044d4cdcb":"AGC","0e6ebfbce4a1d380a356f7d0ca501db2":"Zoom Frame","1f9d92d5edaba165f934540a3525112a":"Tilt Frame","20e57f32ba12b9cd13ebe9ef5e32d949":"Invert","210ab9e731c9c36c2c38db15c28a8d1c":"Volume","3a5769e56038d8308b08f8741077d943":"Odd Field Offset","3b2d7435a9d67b3630988c398af85da5":"Sharpness","442348a3a2d4dc460bf2e86b1e97bd71":"Power Line","4cf296191801ec357d2aa0ad3a484cba":"Manual WB","5f458c0f2db08c33596b0e7a8dbc0e5b":"Manual Exp.","71a6b6f094346a8832df801c8428ea06":"Hue","885cd2552e1136cfd94ae863668e8942":"Even Field Offset","aa71a2ef3fb13c2642ea72645a698cb8":"Brightness","AUTO_DRAW":"Automatic Draw","b4e67baf7b29f6474d4ac44008dafed4":"BL Compensation","b914f4cdf61e27d144e5ceef61eec7a2":"Automute","bba4e31fa5d5b2fee356b87111a52aa3":"Horizontal Flip","c8fd07f040a8f2dc85f5b2d3804ea3db":"Contrast","cc0d5ee2cdb80bf82426e9def9f9bf7c":"Pan Frame","def9cbe59ce34853e7081f62b095e348":"Mute","ed063c64d46ede5916894e6ac2ab9ce1":"Auto WB","Error_Message":"Error Message","ETHERNET_PROP":"Ethernet","facdbb51cba54d1eccbdd8bd670e7b33":"Auto Exp.","fb520ff39848b91b70496ecf6c67f68e":"Compression Quality","fd71ed58ae07cc75900a5169e6f9c287":"Saturation","FILTER_AFP":"Authorised Persons Filter","FILTER_TRAIN":"Train Target Filter","FRAMEGRAB_PROP":"Analog Video","MOD_TYPE":"Module Type","MODE_ACCESS_POINT":"Access Point","MODE_DISABLED":"Disabled","MODE_ETHDYNAMIC":"Dynamic Address (DHCP)","MODE_ETHROUTER":"Static Address Router","MODE_ETHSTATIC":"Static Address","MODULE_DCBUSB":"USB Dry Contact Control Module","MODULE_EMB_VIDO":"Internal Video Encoder","MODULE_FLYHUNT":"FlyHunter Drone Control","MODULE_GPS":"GPS Time Sync Module","MODULE_KAFKA":"Kafka Data Proxy","MODULE_MODEM_MAN":"Modem Manager","MODULE_NETWORK":"Network Module [TBD]","MODULE_ONVIF_DIS":"OnVif Discovery","MODULE_SSDP":"Network Announcer","MODULE_ZLMEDIA":"ZLMedia Server","SENS_NAME":"Sensor's Name","SENS_RANGE":"Sensor Range","SENS_TYPE":"Sensor's Type","SERV_BLD_TAG":"Build Tag","SERV_NAME":"Server Name","SETIAL_TAG":"Serial Tag","SRV_STATUS_OFF":"Server is Offline","SRV_STATUS_ON":"Server is Online","SYS_MSG_DEVINV":"The Connected Device is Different from","SYS_SERVNAME":"Argus Server","UART_COM_BITS":"Bits","UART_COM_PARITY":"Parity","UART_COM_SBITS":"Stop Bits","UART_COM_SPEED":"Com Speed","UART_LINE_PROP":"UART","VIRTUALIP_PROP":"Virtual IP","VPN_TUN_PROP":"VPN Tunel","WAN_LINE_PROP":"WAN Connection","WIFI_PROP":"WiFi","_EVT_MSG_TF_OM_DIS_":"Disabled by AUX Module","_EVT_MSG_TF_OM_TD_":"AUX Module: Detects Train","_EVT_MSG_TF_OM_TG_":"AUX Module: Train is Gone","_EVT_MSG_TF_OM_EXPIRED_":"AUX Detection Expired","_SENS_DO_FULLDRAW_":"Request Full Draw","_REMOTE_SERVER_ADDRESS_":"Remote Server IPv4","_REMOTE_SERVER_PORT_":"Remote Server Port","_USE_REMOTE_SERVER_":"Use Remote Server","_SKIP_LOCAL_REPORTS_":"Skip Local Reports","_CAM_PTZ_MODE_":"PTZ Mode","_CAM_IR_ECO_":"IR Economode","_CAM_PRES_EDIT_":"Edit Presets","_CAM_PRES_EDITOR_":"Preset Editor","_CAM_PRES_SSELECT_":"Selected Sensor","_CAM_PRES_LOBACK_":"Load Background","_CAM_PRES_DELALL_":"Delete All Presets","_CAM_PRES_COUNT_":"Presets Count","_CAM_PRES_COLS_":"Presets Columns","_CAM_PRES_ROWS_":"Presets Rows","_CAM_PRES_IROFF_":"IR Off Preset","_CAM_PRES_IRON_":"IR ON Preset","_CAM_PRES_IRAUTO_":"IR Auto Preset","_CAM_PRES_IRWIPER_":"Wiper Preset","__SET__":"Set","_CAM_PRES_REMBG_":"Remove Sensor Draw","_CAM_PREF_ONLY_":"Only Targets from Bound Sensor","_SENS_BOCAM_":"Bind to Camera","_CHANGE_CREDENTIALS_":"Change Credebtials","_CONNECTION_":"Connection","_SELD_MODEM_":"Selected Modem","_CALL_HU_DELAY_":"Call Hangup Dalay (seconds)","__MODE__":"Mode","_AUTOMATIC_":"Automatic"} \ No newline at end of file +{"___ENABLED__":"Enabled","__ADD__":"Add","__DISABLED__":"Disabled","__LOGIN__":"Login","__LOGIN_ID__":"Login ID","__LOGOUT__":"Logout","__NARROWER__":"Narrower","__OFFLINE__":"Offline","__ONLINE__":"Online","__PAGEWASGENIN__":"The page was generated in","__PASSWORD__":"Password","__PTZ_CONTROL__":"PTZ Control","__SECOND__":"second","__SECONDS__":"seconds","__SSl_DOWNLOAD__":"Please Download our Root CA certificate and Install it into your System (see instructions below)","__SSl_NO_CERT__":"The Working Certificate for %IP% Not Installed.","__SSl_WELCOME__":"For Security Reason and smooth workink via SSL encryption we provide SSL Certificato to install into Client Computer","__UPLOAD__":"Upload","__WIDER__":"Wider","__ZERO_SHIFT__":"Zero Shift","_ACC_LOG_":"Security Log","_ACCESS_ADMIN_":"Admin","_ACCESS_DENIED_":"Access Denied","_ACCESS_FACTORY_":"Factory Defined","_ACCESS_LEVEL_":"Access Level","_ACCESS_LOGIN_":"Access Login","_ACCESS_MINIMAL_":"Minimal Access","_ACCESS_OPERATOR_":"Operator","_ACCESS_PASSWORD_":"Access Password","_ACTION_":"Action","_ADD_":"Add","_ADD_CAM_DIAL_TTL_":"Add IP Camera","_ADD_CAMERA2SITE_":"Add Camera to Site","_ADD_CONNECTION_":"Add Connection","_ADD_E2U_DIAL_TTL_":"Add Ethernet To Serial Adapter","_ADD_EVT_FILTER_":"Add Event Filter","_ADD_FILTER_":"Add Filter","_ADD_IP_CAMERA_":"Add IP Camera","_ADD_MEDIA_SERVER_":"Add Media Server","_ADD_MODULE_":"Add Module","_ADD_NEW_PHN_":"Add New Phone Number","_ADD_NEW_WTR_":"Add New Record","_ADD_REMOTE_UART_":"Add Remote UART","_ADD_USER_":"Add User","_ADM_SETTINGS_":"Admin Settings","_ADMIN_":"Admin","_ADV_TAB_":"Advanced Settings","_AJX_REQFAILURE_":"Ajax Request failed!","_ALARMED_":"Alarmed","_ALT_SHORT_LBL_":"Alt","_ANAL_SOURCES_LST_":"Analogue Video Sources","_APLY_DBBACKUP_":"Restore","_APP_TITLE_":"Argus Security System","_APPLICA_MNGMNT_":"Application Settings","_APPLY_CHANGES_":"Apply Changes","_APPLY_SETTINGS_":"Apply Settings","_AS_MODULE_":"Add Server Module","_ASSIGN_CAMERA_":"Assign Camera","_AUTH_MODE_0_":"Authorization Mode","_AXIS_ROT_":"Axis Rotation","_AZIMUTH_":"Azimuth","_BACKUP_SETTINGS_":"Backup\/Restore","_BOT_PIC_BOUND_":"Bottom Picture Boundary (pixels)","_BOTTOM_SENSOR_":"Bottom Sensor","_BROWSE_":"Browse","_BTN_CLR_AHIST_":"Clear All History","_BTN_CLR_SELECTED_":"Clear Selected","_BUSY_":"Busy","_CAC_TAB_":"Credentials","_CALL_ONLY_":"Call Only","_CAM_AH_TIME_":"Time After Alarm","_CAM_AH_TOKEN_":"Home Preset Token","_CAM_ASS_LIST_":"Assigned Cameras","_CAM_AUTO_HOMING_":"Enable Automatic Home Return","_CAM_CUSTOMZ_":"Custom Zoom","_CAM_DET_LIST_":"Detected Cameras","_CAM_FIXEDZ_":"Fixed Zoom","_CAM_FOCALL_":"Focal Length","_CAM_IP_ADDRESS_":"Camera IP Address","_CAM_LABEL_":"Camera Label","_CAM_LENS_SETTINGS_":"Lens Settings","_CAM_MAP_NAME_":"Camera Name","_CAM_MAX_RANGE_":"Maximal Range","_CAM_PANANGS_":"Tottal Pan Angles","_CAM_PANMOD_":"Pan Model","_CAM_PROTO_ID_":"Camera ID","_CAM_PTZ_AAC_":"PTZ Auto Axeleration","_CAM_PTZ_MAC_":"PTZ Manual Axeleration","_CAM_SENS_SIZE_":"Sensor Size","_CAM_TILTANGS_":"Tottal Tilt Angles","_CAM_TILTMOD_":"Tilt Model","_CAM_TM_ALL_":"All Targets","_CAM_TM_ALL_FAR_":"ALL Far","_CAM_TM_ALL_NEAR_":"All Near","_CAM_TM_REGULAR_":"Regular","_CAM_TM_REVERSED_":"Reversed","_CAM_TM_RSHIFTED_":"Rev-Shifted","_CAM_TM_SHIFTED_":"Shifted","_CAM_TM_STRICT_VISIBLE_":"Strict Visible Targets","_CAM_TRIGGERING_MODE_":"Alarm Triggering Mode","_CAM_VARIOZ_":"Simple Zoom","_CAM_ZOOM_PERC_":"Zoom Percents","_CAM_ZOOMMO_":"Zoom Mode","_CAM_ZOOMR_":"Zoom Ratio","_CAMERA_MNGMNT_":"Cameras","_CANCEL_":"Cancel","_CHOOSEF_":"Choose File","_CLEAR_":"Clear","_CLEAR_ALARM_":"Clear Alarm","_CLEAR_SITE_":"Delete All","_CLOSE_":"Close","_CON_2_IP_CAM_":"Connect to IP Camera","_CONNECT_2_":"Connect to","_CONNECT_2_SEL_":"Connect To Selected","_CREA_ANAL_CAM_":"Create Analog Camera","_CREATE_CUSTOM_MAP_":"Creeate Custom Map","_CREATE_NEW_LBL_":"Create New","_CREATED_":"Created","_CTL_SERVER_NODE_":"Control Server Node","_CUSTOM_MSG_":"Custom Message","_DASHBOARD_":"Dashboard","_DATETIME_":"Time","_DB_BACKUP_":"Select Restore File","_DB_FILE_HAS_DOWNLOADED_":"Settings File has been Downloaded","_DB_STAT_CON_0_":"Connected ... Geting Info","_DB_STAT_CON_UNA_":"Connection is Unavailable","_DB_STAT_STUDY_":"Studing","_DB_UPLOAD_BACKUP_":"Uploading Settings","_DC_AUTO_ENA_":"Enable Dry Contact Control","_DC_CONTROL_SET_":"Dry Contact Control","_DC_TIME_WINDOW_":"Dry Contact Time Window","_DC_WM_NC_":"Normally Close","_DC_WM_NO_":"Normally Open","_DC_WORK_MODE_":"Dry Contact Work Mode","_DEBUGGING_MODE_":"Debugging Mode","_DEL_SELECTED_":"Delete Selected","_DEL_USER_":"Remove User","_DELETE_":"Delete","_DESCRIPTION_":"Description","_DET_GENWORKS_":"General Tasks","_DET_IP_CAMERA_LST_":"Detected IP Cameras List","_DET_SENSITIVITY_":"Detection Sensitivity Profile","_DET_SET_WIDTH_T_":"Width Table","_DET_SETTINGS_":"Detection Settings","_DEV_ACK_BTN_":"Detection Bypass","_DEV_ACK_BTN2_":"Detections Bypassed","_DEV_ACK_START_":"Are you sure want to Bypass current detections?","_DEV_ACK_STOP_":"Are you sure want to cancel detection Bypass?","_DEV_CTLPANEL_SHRT_":"Device Control","_DEV_ITYPE_FLD_":"Sensor Installed","_DEV_MISTMATT1_":"Please decide what to do","_DEV_PL_ANG_":"At an Angle","_DEV_PL_HORI_":"Horizontally","_DEV_PL_VERT_":"Vertically","_DEV_RANGE_FLD_":"Max Range","_DEV_TYPE_3D_":"3DLRF Sensor","_DEV_TYPE_ALS_":"ALS Sensor","_DEV_TYPE_FLD_":"Sensor Type","_DEV_TYPE_LFS_":"LFS Sensor","_DEV_TYPE_NPLS200_":"New PLS200 Sensor (Network)","_DEV_TYPE_PLS200_":"PLS200 Sensor","_DEV_TYPE_PLS360_":"PLS360 Sensor","_DEVICE_IP_":"IP Address","_DEVICE_NAME_":"Device Name","_DEVICE_PORT_":"Port","_DISCONNECTED_":"Disconnected","_DLG_ADD_3DSENS_":"Add 3DLRF Sensor","_DLG_ADD_ALS_":"Add ALS Sensor","_DLG_ADD_LFS_":"Add LFS Sensor","_DLG_ADD_PLS200_":"Add PLS200 Sensor","_DLG_ADD_PLS360_":"Add PLS360 Sensor","_DLG_CON_SEVER_NODE_":"Will be Connected to","_DOWNLOAD_SETTINGS_":"Download Current Settings","_DRAW_BACKGROUND_":"Draw Background","_EDIT_":"Edit","_EDIT_CUR_MAP_":"Edit Current Map","_EDIT_LRF3D_SETTINGS_":"Edit Lidar 3D Settings","_EDIT_USER_":"Edit User","_EDIT_USER_CRACCES_":"Edit User Credentials and Access","_EDIT_WTR_":"Edit Width Table Record","_EDT_CONNECTIONS_":"Edit Connections","_EDT_LOCATIONS_":"Edit Locations","_ELEVATION_":"Elevation","_EMBED_VIDEO_ENCODER_":"Embed Video Encoder Module","_ERROR_MSG_":"Error Message","_EVE_COMPRESS_QUA_":"Compression Quality","_EVE_DESC_LOO_":"Video Encoder Module provides Imaging Capture functionality to ARGUS server. Can capture Analog Video from USB grabber\/USB WebCam or Digital Stream from IP Camera","_EVE_DESC_SHO_":"LibAV(ffmpeg) Internal Video Encoder","_EVE_FONT_LBL_":"Font Type","_EVE_FONT_TS_":"Font Type","_EVE_LBL_FSCALE_":"Label Font Scale","_EVE_LBL_FTHICK_":"Label Font Thickness","_EVE_LBL_LINE_T_":"Label Line Type","_EVE_LBL_POSX_":"Label X","_EVE_LBL_POSY_":"Label Y","_EVE_LOGO_HEIGHT_":"Logo Height","_EVE_LOGO_POSX_":"Logo X","_EVE_LOGO_POSY_":"Logo Y","_EVE_LOGO_WIDTH_":"Logo Width","_EVE_PORT_":"Web Access Port","_EVE_SHOW_LBL_":"Show Label","_EVE_SHOW_LOGO_":"Show Custom Logo","_EVE_SHOW_TS_":"Show TimeStamp","_EVE_TRANSO_LBL_":"Transparent BG","_EVE_TRANSO_TS_":"Transparent BG","_EVE_TS_FSCALE_":"Font Scale","_EVE_TS_FTHICK_":"Font Thickness","_EVE_TS_LINE_T_":"Font Line Type","_EVE_TS_POSX_":"TimeStamp X","_EVE_TS_POSY_":"TimeStamp Y","_EVENT_":"Event","_EVENT_LOG_":"Event Log","_EVT_ARCHIVE_":"Events Archive","_EVT_MONITOR_":"Live Monitor","_EVT_MONITOR_IPI_":"SingleIPI Mode","_EVT_MSG_ACKOFF_":"Bypass Mask Deleted","_EVT_MSG_ACKON_":"Bypass Mask Added","_EVT_MSG_B2DTRG_":"Black 2D Target","_EVT_MSG_B3DTRG_":"3D Black Target","_EVT_MSG_BUMO_":"Device Is BUSY","_EVT_MSG_COM_JAMED_":"Communication Jamed","_EVT_MSG_CONNECTED_":"Connected","_EVT_MSG_DISCONNECTED_":"Disconnection","_EVT_MSG_EVT_CLOMA_":"Event Closed Manual","_EVT_MSG_EVT_END_":"Event Ended","_EVT_MSG_EVT_START_":"Event Started","_EVT_MSG_FLIPO_":"Flip Complete","_EVT_MSG_MASKOFF_":"Turning Off Masking Area","_EVT_MSG_MASKON_":"Turning On Masking Area","_EVT_MSG_ROI_":"Region Of Interest","_EVT_MSG_SCANC_":"Scan Complete","_EVT_MSG_STUMO_":"Device Enters Into Study Mode","_EVT_MSG_TF_BSD_":"[LTF] Detection","_EVT_MSG_TF_CT_":"[TF] Check Target","_EVT_MSG_TF_DD_":"[LTF] Disabled","_EVT_MSG_TF_DIFD_":"[LTF] Differential Detection","_EVT_MSG_TF_RD_":"[LTF] Regular Detection","_EVT_MSG_TF_SUSPA_":"[LTF] Suspicious Start","_EVT_MSG_TF_SUSPD_":"[LTF] Suspicious Detection","_EVT_MSG_TF_SUSPN_":"[TF] Suspicious Mode End","_EVT_MSG_TF_TD_":"[UTF] Train Detected","_EVT_MSG_TF_TUPD_":"[UTF] Train Updated","_EVT_MSG_TF_USD_":"[UTF] Upper Sensor Detection","_EVT_MSG_VIFDEC_":"Video Framerate Decreased","_EVT_MSG_VIFINC_":"Video Framerate Increased","_EVT_MSG_W2DTRG_":"White 2D Target","_EVT_MSG_W3DTRG_":"3D White Target","_FACT_DEFAULT_":"Set by Factory","_FACTORY_RESET_":"Reset to Factory Defaults","_FHM_PROPS_":"FlyHunter Module Properties","_FILE_NAME_":"File Name","_FISONMODULE_":"Files Saved on Module","_FOUNDER_":"Founder","_FRAME_FORMAT_":"Frame Format","_FRAME_SIZE_":"Frame Size","_FROM_ANCH_":"from Anchor","_FUSION_ENGINE_":"Fusion Engine","_GEN_INSTANCE_ID_":"Generate New Identity","_GENERAL_":"General","_GENERAL_NFO_":"General Info","_GEO_LOCATION_":"Geo Locations","_GO_HOME_":"Go Home","_GUEST_":"Guest","_HARDWARE_":"Hardware","_ID_":"id","_INFO_":"Information","_INFO_MSG_":"Information Message","_INSTANCE_ID_":"Instance Identity","_INTER_MAP_":"Internet Map","_ISSURES_":"Issue Reset","_KAFKA_BROKER_":"Kafka Broker","_KAFKA_DESC_LOO_":"Sends Events from ARGUS server to a KAFKA Broker Node","_KAFKA_DESC_SHO_":"KAFKA Broker Proxy","_KAFKA_TOP_EVTS_":"Kafka Topics and Events","_LAST_ACCESS_":"Last Access","_LAT_":"Latitude","_LAT_SHORT_LBL_":"Lat","_LAYER_ATTRIB_":"Layer Attribution","_LEFT_PIC_BOUND_":"Left Picture Boundary (pixels)","_Loading_Calo_":"Loading Dates","_LOC_MAP_LBL_":"Location Map","_LOC_TAB_":"Location\/Orientation","_LOCAL_PIC_MAP_":"Local Picture Map","_LOCK_USER_":"Lock User","_LOGIN_":"Login","_LOGIN_0_":"Login:","_LOGOUT_":"Logout","_LON_":"Longitude","_LON_SHORT_LBL_":"Lon","_MA_CIRCLE__":"Circular","_MA_ROUND_":"Square","_MAINTENENCE_":"Maintenence","_MANUADD_CAMERA_":"Manually add IP Camera","_MAP_":"Map","_MAP_CENTER_MODE_":"Map Centre Mode","_MAP_COORD_SYSTEM_":"Map Cordinate System","_MAP_CUST_LBL_":"Custom Map","_MAP_HEIGHT_":"Map Height (meters)","_MAP_LEFT_CORCORD_":"Left Upper Corner Cordinate","_MAP_MONITORING_":"Map Monitoring","_MAP_NAME_":"Map Name","_MAP_PICTURE_":"Map Picture","_MAP_REG_LBL_":"Regular WGS84 Map (reqires Internet)","_MAP_RIGHT_CORCORD_":"Right Bottom Corner Cordinate","_MAP_TYP_LBL_":"Map Type","_MAP_WIDTH_":"Map Width (meters)","_MAS_LRF_DET_SET_":"Master LRF Detection Settings","_MASK_EDITOR_":"Mask Editor","_MASK_MANAGER_":"Masking Management","_MAX_NATURAL_ZOOM_":"Max Natural Zoom","_MAX_ZOOM_":"Max Zoom","_MEMO_":"Memo","_METERS_":"Meters","_METERS_RANGE_":"Meters","_MOD_NO_NEDCONF_":"Module does not need to be configured.","_MODEM_DESC_LOO_":"Provides WAN connectivity over cellular networks (UMTS, 4G, LTE). Also sends Events via SMS","_MODEM_DESC_SHO_":"Cellular Modem Manager","_MODULE_":"Module","_MONIT_LAYOUT_":"Monitoring Layout","_MONITORING_":"Monitoring","_MSG_CAM_NOT_ASS_":"Camera is Not Assigned to the System","_MSG_CAM_PROC_2_SET_":"Proceed to Cameras Settings to Assign One","_MSG_CAM_PROC_NOT_ASS_":"Camera is Not Assigned to the SystemPlease Assign One","_MSG_SELITEMFROMMAP_":"Select Item From Map","_NAME_LABEL_":"Name\/Label","_NAME_MAP_":"Map Name","_NET_SETTINGS_":"Connections","_NEW_PASSWORD_":"New Password","_NO_PTZ_":"No PTZ Control","_NO_SENSORS_DEF_":"No Sensors Defined","_NO_UARTS_DEF_":"No UART Defined","_OK_":"Ok","_ONVIF_DESC_LOO_":"OnVif module allows you to discover and communicate with the network cameras which supports the ONVIF specifications on the same subnet.","_ONVIF_DESC_SHO_":"OnVif LAN Discovery Module","_ORIENTATION_":"Orientation","_OUTPUT_FRAME_SIZE_":"Output Frame Size","_PASSWORD_0_":"Password:","_PHONE_NUMBER_":"Phone Number","_Please_Wait_":"Please Wait","_PLS_CONFIRM_":"Please Confirm","_PLS_SEL_CAL_DATE_":"Please Select a Date from the Calendar from the right","_PLS_SEL_LEFT_ITEM_":"Please select item from the left to view more info.","_POINTER_":"[ptr]","_POSITION_":"Position","_PROF_SETTINGS_":"Profile Settings","_PROGRESS_":"Progress","_PROPERTIES_":"Properties","_PROTO_DEVICE_ID_":"Protocol ID","_PROV_CAC_":"Please Provide Camera Access Credentials.","_PTZ_TAB_":"PTZ Settings","_QERY_MSG_":"Question Message","_RANGE_":"Range","_READY_":"Ready","_READY_TO_UPLO_":"Ready to Upload","_REGULAR_":"Regular","_RELOAD_":"Reload","_REMOVE_CAMERA_":"Remove Camera","_REMOVE_SENSOR_":"Remove Sensor","_REP_PASSWORD_":"Repeate Password","_REPO_HISTORY_":"Reports\/History","_REPORT_STORAGE_":"Reports\/History Storage","_REQ_FAILURE_":"Failure","_RES_ETHERNET_DESC_":"Ethernet Network Adapter","_RES_EZ_UART_DESC_":"UART connected via Ethernet","_RES_HW_UART_DESC_":"UART connected to a Server Appliance","_RES_INFO_":"Resource Information","_RES_WAN_DESC_":"WAN Adapter (Broadband Internet)","_RES_WIFI_DESC_":"WiFi Network Adapter","_RESETSTATUS_":"Reset Status","_RESOURCES_":"Resources","_RIGHT_PIC_BOUND_":"Right Picture Boundary (pixels)","_RSET_CREDENTIALS_":"Reset Credentials","_RUS_DELETE_MODULE_":"Are you sure delete Module?","_SARE_SAVED_":"Settings Are Saved","_SAVE_":"Save","_SCREEN_RESIZE_":"Resize Screen","_SEC_SYSTEM_":"","_SELE_ANIMAGE_":"Select an image","_SELE_DBBACKUP_":"Restore Settings","_SENDTOSENS_":"Send to Sensor","_SENS_ACKS_":"Default Bypass Size","_SENS_ACKT_":"Default Bypass Shape","_SENS_APPLY_RES_":"Apply To Device and Reset","_SENS_AUTOR_ENA_":"Auto Reset Enabled","_SENS_AUTOR_INTER_":"Auto Reset Interleave","_SENS_AUTOR_TO_":"Auto Timeout","_SENS_BZSHIFT_":"Board Zero Shift","_SENS_DEL_FROTH_":"Delete Frozen Threshold","_SENS_DIS_FROTH_":"Disable Frozen Threshold","_SENS_DO_FULLR_":"Issue Sensor Full Reset","_SENS_DO_READALL_":"Read All Settings from Sensor","_SENS_DO_SAVEALL_":"Save All Settings to Sensor","_SENS_ENA_FROTH_":"Enable Frozen Threshold","_SENS_FFTH_":"Freeze First Threshold","_SENS_FIN_FROTH_":"Finish Frozen Threshold Study","_SENS_HTEMP_":"Heater Temperature","_SENS_JUMODI_":"Just Moving Distance","_SENS_JUMORA_":"Just Moving Radial","_SENS_JUMOTA_":"Just Moving Targets","_SENS_NOBLA_":"No Black Targets","_SENS_SCANSPEED_":"Scan Speed","_SENS_SFTH_":"Save First Threshold","_SENS_STATUS_":"Sensor's Status","_SENSOR_CONNECTION_":"Sensors","_SENSOR_MAX_RANGE_":"Max Range","_SENSOR_PLACE_":"Sensor Placeholder","_SERIAL_":"Serial","_SERV_CTLPANEL_SHRT_":"Server Control","_SERV_FACTORY_DESC_":"Restore factory settings, clear database and detection settings","_SERV_FACTORY_OP_":"Restore Factory Settings","_SERV_FACTORY_QM_":"All settings will be clearedThe only admin<\/b> user will be preserved.The Report History will be keept intact.","_SERV_HW_DET_DESC_":"Run a hardware discovery process to recognize recently connected devices such as a USB serial port or USB video.","_SERV_HW_DET_OP_":"Detect new Hardware","_SERV_HW_DET_QM_":"Are you sure to run a hardware discovery process.That will prevent detection events for few seconds.","_SERV_HW_DET_QT_":"Hardware Detection","_SERV_LOG_":"Server Log","_SERV_OSRESET_DESC_":"Restart the host operating system to apply any recent system configuration changes","_SERV_OSRESET_OP_":"Restart Host Computer","_SERV_RESTART_DESC_":"Restart the management application to initialize all components and apply any configuration changes.","_SERV_RESTART_OP_":"Restart Control Application","_SERV_RESTART_QM_":"Are you sure to restart control application?","_SERV_RESTART_QT_":"Restart Backend","_SERVER_MODULES_":"Modules","_SET_CHANGED_WOULD_SAVE_":"Some Settings are ChangedThay will be Unsaved!","_SET_CREDENTIALS_":"Set Credentials","_SETTING_SAVE_OK_":"All changes saved sucessfully","_SETTINGS_":"Settings","_SETTINGS_CHANGED_":"Settings Changed","_SITE_DEL_ALL_ABO_":"Are you sure to delete all devices and settings?","_SITE_PROP_LBL_":"Site Properties","_SITE_TITLE_":"ARGUS Security System","_SIZE_":"Size","_SLV_LRF_DET_SET_":"Slave LRF Detection Settings","_SMM_ADD_ADDIT_":"Add Additional Equipment","_SMM_ADD_LSEN_":"Add Laser Sensor","_SMS_ONLY_":"SMS Only","_SND_FILES2_DEV__":"Send Files to Device","_SOUND_":"Sound","_SOURCE_":"Source","_SSDP_DESC_LOO_":"SSDP announcer allows you announce on your LAN a ARGUS server","_SSDP_DESC_SHO_":"SSDP announcer daemon for UPnP\/DLNA","_SSL_CERT_INVALID__":"Provided Certificate is Invalid","_SSL_CERT_IP_NO_":"Provided Certificate Valid For Other IP Address","_SSL_CERT_VALID_INSTA":"The Certificate is Valid and will be applied intact (it will take few minutes). The System is going to reboot.","_SSL_NO_EXT_CERT_":"No x509 Extensions defined in Certificate","_SSL_NO_IP_CERT_":"No Ip Addresses in Certificate","_SSL_PROVIDE_CERT_":"Please Provide Valid Certificate for %IP% signed by Dr. Frucht Systems.<\/br>You may request one at www.smartsecsystems.com<\/a>","_SSL_VALID_BUT_":"The Certificate is Valid. However:","_STATIC_CONNECTION_":"Static Connection","_STATUS_":"Status","_STORE_DAYS_":"Keep Report History Days","_STORE_EMPTY_SPACE_":"Preserve Empty Space on System","_STREAMS_":"Streams","_STUDY_BACKGROUND_":"Study Background","_SUCCESS_":"Success","_SWU_DASHBOARD_":"Software Update Management","_SYS_ANCHORT_LBL_":"System Anchor","_SYS_DASHBOARD_":"System Overview","_SYS_GENERAL_":"General","_SYS_MAP_":"System Map","_SYS_SETTINGS_":"System Settings","_TARGET_FILTERS_":"Filters","_TARGETING_TAB_":"Alarm Settings","_TCP_CLIENT_":"TCP Client","_TCP_SERVER_":"TCP Server","_TILE_URL_MAP_":"Tiles URL Pattern","_TIME_":"Time","_TOOLBOX_":"Toolbox","_TOP_PIC_BOUND_":"Top Picture Boundary (pixels)","_TYPE_":"Type","_UART_PORT_":"UART Port","_UDP_CLIENT_":"UDP Client","_UDP_SERVER_":"UDP Server","_UNLOCK_USER_":"Unlock User","_UPDATE_LBL_":"Update","_UPDATING_DATA_":"Updating Data","_UPGRADE_MNGMNT_":"Upgrade\/Backup","_UPLO_DONE_":"Already Uploaded","_UPLO_IN_PROGRESS_":"Uploading","_UPLOA2MODULE_":"Upload to Module","_UPLOAD_PACKAGE_":"Upload Package","_UPPER_SENSOR_":"Upper Sensor","_USER_":"User","_USER_LOGIN_":"User Login","_USERS_MNGMT_":"Users Management","_VERSION_":"Version","_VIDEO_ENCODER_":"Video","_VIDEO_FILE_HAS_DOWNLOADED_":"Video File has been Downloaded","_WDEV_DET_WIZ0_":"Device Type","_WDEV_DET_WIZ1_":"Instalation Type","_WDEV_DET_WIZ2_":"Environment","_WDEV_DET_WIZ3_":"Something Else","_WDEV_DET_WIZT_":"Sensor Setup Detection Wizard","_WDEV_MISTMATCH_":"Device Is Different","_WIDTH_":"Width","_WIDTH_CORRECT_":"Width Correction","_WORKING_MODE_":"Working Mode","_WRO_VAL_MSG_":"You Entered Wrong ValuesPlease Correct and Continue.","_WRO_VALUES_":"Wrong Values","_ZL_MEDIA_DESC_LOO_":"Support multiple protocols (RTSP\/RTMP\/HLS\/HTTP-FLV\/WebSocket-FLV\/GB28181\/HTTP-TS\/WebSocket-TS\/HTTP-fMP4\/WebSocket-fMP4\/MP4\/WebRTC), support protocol interconversion.","_ZL_MEDIA_DESC_SHO_":"ZLMediaKit Server - Streaming Encoder","05b048d7242cb7b8b57cfa3b1d65ecea":"Gamma","0737d367234baa9eb0d7d93044d4cdcb":"AGC","0e6ebfbce4a1d380a356f7d0ca501db2":"Zoom Frame","1f9d92d5edaba165f934540a3525112a":"Tilt Frame","20e57f32ba12b9cd13ebe9ef5e32d949":"Invert","210ab9e731c9c36c2c38db15c28a8d1c":"Volume","3a5769e56038d8308b08f8741077d943":"Odd Field Offset","3b2d7435a9d67b3630988c398af85da5":"Sharpness","442348a3a2d4dc460bf2e86b1e97bd71":"Power Line","4cf296191801ec357d2aa0ad3a484cba":"Manual WB","5f458c0f2db08c33596b0e7a8dbc0e5b":"Manual Exp.","71a6b6f094346a8832df801c8428ea06":"Hue","885cd2552e1136cfd94ae863668e8942":"Even Field Offset","aa71a2ef3fb13c2642ea72645a698cb8":"Brightness","AUTO_DRAW":"Automatic Draw","b4e67baf7b29f6474d4ac44008dafed4":"BL Compensation","b914f4cdf61e27d144e5ceef61eec7a2":"Automute","bba4e31fa5d5b2fee356b87111a52aa3":"Horizontal Flip","c8fd07f040a8f2dc85f5b2d3804ea3db":"Contrast","cc0d5ee2cdb80bf82426e9def9f9bf7c":"Pan Frame","def9cbe59ce34853e7081f62b095e348":"Mute","ed063c64d46ede5916894e6ac2ab9ce1":"Auto WB","Error_Message":"Error Message","ETHERNET_PROP":"Ethernet","facdbb51cba54d1eccbdd8bd670e7b33":"Auto Exp.","fb520ff39848b91b70496ecf6c67f68e":"Compression Quality","fd71ed58ae07cc75900a5169e6f9c287":"Saturation","FILTER_AFP":"Authorised Persons Filter","FILTER_TRAIN":"Train Target Filter","FRAMEGRAB_PROP":"Analog Video","MOD_TYPE":"Module Type","MODE_ACCESS_POINT":"Access Point","MODE_DISABLED":"Disabled","MODE_ETHDYNAMIC":"Dynamic Address (DHCP)","MODE_ETHROUTER":"Static Address Router","MODE_ETHSTATIC":"Static Address","MODULE_DCBUSB":"USB Dry Contact Control Module","MODULE_EMB_VIDO":"Internal Video Encoder","MODULE_FLYHUNT":"FlyHunter Drone Control","MODULE_GPS":"GPS Time Sync Module","MODULE_KAFKA":"Kafka Data Proxy","MODULE_MODEM_MAN":"Modem Manager","MODULE_NETWORK":"Network Module [TBD]","MODULE_ONVIF_DIS":"OnVif Discovery","MODULE_SSDP":"Network Announcer","MODULE_ZLMEDIA":"ZLMedia Server","SENS_NAME":"Sensor's Name","SENS_RANGE":"Sensor Range","SENS_TYPE":"Sensor's Type","SERV_BLD_TAG":"Build Tag","SERV_NAME":"Server Name","SETIAL_TAG":"Serial Tag","SRV_STATUS_OFF":"Server is Offline","SRV_STATUS_ON":"Server is Online","SYS_MSG_DEVINV":"The Connected Device is Different from","SYS_SERVNAME":"Argus Server","UART_COM_BITS":"Bits","UART_COM_PARITY":"Parity","UART_COM_SBITS":"Stop Bits","UART_COM_SPEED":"Com Speed","UART_LINE_PROP":"UART","VIRTUALIP_PROP":"Virtual IP","VPN_TUN_PROP":"VPN Tunel","WAN_LINE_PROP":"WAN Connection","WIFI_PROP":"WiFi","_EVT_MSG_TF_OM_DIS_":"[TF] Disabled by AUX Module","_EVT_MSG_TF_OM_TD_":"[TF] AUX Detects Train","_EVT_MSG_TF_OM_TG_":"[TF] AUX Train is Gone","_EVT_MSG_TF_OM_EXPIRED_":"[TF] AUX Status Expired","_SENS_DO_FULLDRAW_":"Request Full Draw","_REMOTE_SERVER_ADDRESS_":"Remote Server IPv4","_REMOTE_SERVER_PORT_":"Remote Server Port","_USE_REMOTE_SERVER_":"Use Remote Server","_SKIP_LOCAL_REPORTS_":"Skip Local Reports","_CAM_PTZ_MODE_":"PTZ Mode","_CAM_IR_ECO_":"IR Economode","_CAM_PRES_EDIT_":"Edit Presets","_CAM_PRES_EDITOR_":"Preset Editor","_CAM_PRES_SSELECT_":"Selected Sensor","_CAM_PRES_LOBACK_":"Load Background","_CAM_PRES_DELALL_":"Delete All Presets","_CAM_PRES_COUNT_":"Presets Count","_CAM_PRES_COLS_":"Presets Columns","_CAM_PRES_ROWS_":"Presets Rows","_CAM_PRES_IROFF_":"IR Off Preset","_CAM_PRES_IRON_":"IR ON Preset","_CAM_PRES_IRAUTO_":"IR Auto Preset","_CAM_PRES_IRWIPER_":"Wiper Preset","__SET__":"Set","_CAM_PRES_REMBG_":"Remove Sensor Draw","_CAM_PREF_ONLY_":"Only Targets from Bound Sensor","_SENS_BOCAM_":"Bind to Camera","_CHANGE_CREDENTIALS_":"Change Credebtials","_CONNECTION_":"Connection","_SELD_MODEM_":"Selected Modem","_CALL_HU_DELAY_":"Call Hangup Dalay (seconds)","__MODE__":"Mode","_AUTOMATIC_":"Automatic","_MULTI_LAYOUT_":"Multy Display Monitoring","_MULTYDIS_ENA_":"Multy Display Mode","_BACKUP_SERVER_ADDRESS_":"Backup Server IPv4","_BACKUP_SERVER_PORT_":"Backup Server Port","_EVT_MSG_TF_TD_EXPIRED_":"[UTF] Train is Gone","_EVT_MSG_TF_SUSP_EXPIRED_":"[TF] Suspicious Blocking End"} \ No newline at end of file diff --git a/lib/controller/dash/node_3.js b/lib/controller/dash/node_3.js index 2d08f0e..a025800 100644 --- a/lib/controller/dash/node_3.js +++ b/lib/controller/dash/node_3.js @@ -143,7 +143,7 @@ text: '%%%LABEL%%%MASKEDITOR%%%', id: 'DMED_%%%NODEID%%%', width: '100%', - disabled: true, + disabled: false, iconCls: 'ctrl_panel_drawscan_sm', handler: function(){ showMaskEditor( false, 0, %%%NODEID%%% ); diff --git a/lib/controller/doApplicationOperation.php b/lib/controller/doApplicationOperation.php index 91bbef8..e54687a 100644 --- a/lib/controller/doApplicationOperation.php +++ b/lib/controller/doApplicationOperation.php @@ -72,6 +72,11 @@ $PARAM = $DATABASE->escape( $_POST['OPCODE'] ); $QS = "UPDATE `system_props` SET `remote_ip`='{$PARAM}' WHERE `id`=1"; $DATABASE->Query( $QS ); + if( strlen( $PARAM ) < 8 ){ + //Disable connection + $QS = "UPDATE `system_props` SET `use_remote_server`=0 WHERE `id`=1"; + $DATABASE->Query( $QS ); + }; break; }; case 9:{//Remote Port @@ -99,6 +104,20 @@ $DATABASE->Query( $QS ); break; }; + case 12:{//Backup IP + $PARAM = $DATABASE->escape( $_POST['OPCODE'] ); + $QS = "UPDATE `system_props` SET `remote_backup_ip`='{$PARAM}' WHERE `id`=1"; + $DATABASE->Query( $QS ); + break; + }; + case 13:{//Backup Port + $PARAM = intval( $_POST['OPCODE'] ); + if( $PARAM < 1000 ) $PARAM = 0; + if( $PARAM > 65535 ) $PARAM = 0; + $QS = "UPDATE `system_props` SET `remote_backup_port`={$PARAM} WHERE `id`=1"; + $DATABASE->Query( $QS ); + break; + }; }; } else { $Data['msg']='Wrong Parameters!'; diff --git a/lib/controller/doCameraOperation.php b/lib/controller/doCameraOperation.php index 680df66..5ba8567 100644 --- a/lib/controller/doCameraOperation.php +++ b/lib/controller/doCameraOperation.php @@ -16,8 +16,6 @@ break; }; case 1:{ - // - break; }; case 2:{ @@ -399,8 +397,10 @@ }; $HTK = '1'; $onvif->ptz_SetPreset( $TK, $HTK ); - //$QS = "UPDATE `cameras` SET `home_token` = '{$HTK}' WHERE `id`={$CameraID}"; - //$DATABASE->Query( $QS ); + //Old Method (LA Metro) + $QS = "UPDATE `cameras` SET `home_token` = '{$HTK}' WHERE `id`={$CameraID}"; + $DATABASE->Query( $QS ); + //New Presets mode $QS="DELETE FROM `cameras_presets` WHERE `preset_id`={$CameraID} AND `role`=2"; $DATABASE->Query( $QS ); $QS = "INSERT INTO `cameras_presets`(`preset_id`,`role`,`token`,`column`,`row`) VALUES({$CameraID},2,'{$HTK}',0,0)"; @@ -1069,6 +1069,15 @@ $Data['status'] = 'ok-39'; break; }; + case 41:{ + //Set Enable - Disable + // CamID == Node ID + $Param = intval( $_POST['OPCODE'] ); + $QS = "UPDATE `nodes` SET `enable`={$Param} WHERE `id`={$CameraID}"; + $DATABASE->Query( $QS ); + $Data['status'] = 'ok-41'; + break; + }; }; break; }; diff --git a/lib/controller/doFilterOperation.php b/lib/controller/doFilterOperation.php index 748a1a4..940fc32 100644 --- a/lib/controller/doFilterOperation.php +++ b/lib/controller/doFilterOperation.php @@ -67,7 +67,9 @@ if( isset( $_POST['TTR'] ) ) $TTR=intval( $_POST['TTR'] ); else $TTR = 0; if( isset( $_POST['WIZ'] ) ) $WIZ=intval( $_POST['WIZ'] ); else $WIZ = 0; if( isset( $_POST['DBG'] ) ) $DBG=intval( $_POST['DBG'] ); else $DBG = 0; - $QS = "UPDATE `target_filter_train` SET `TRAIN_DETECT`={$DTR},`TRAIN_WIDTH`={$WIZ},`DECISION_TIME`={$DTM},`SUSPECT_TIME`={$STM},`TRACK_TRAIN`={$TTR},`DEBUG`={$DBG} WHERE `id`={$JJ['aux_id']}"; + if( isset( $_POST['ATM'] ) ) $ATM=intval( $_POST['ATM'] ); else $ATM = 0; + if( isset( $_POST['MRG'] ) ) $MRG=floatval( $_POST['MRG'] ); else $MRG = 0; + $QS = "UPDATE `target_filter_train` SET `TRAIN_DETECT`={$DTR},`TRAIN_WIDTH`={$WIZ},`DECISION_TIME`={$DTM},`SUSPECT_TIME`={$STM},`TRACK_TRAIN`={$TTR},`DEBUG`={$DBG}, `UPPER_RESTART`={$ATM}, `MINIMAL_RANGE`={$MRG} WHERE `id`={$JJ['aux_id']}"; break; }; case 10: $QS = "UPDATE `target_filter_train` SET `DEBUG`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; break; diff --git a/lib/controller/getApplicationSettings.php b/lib/controller/getApplicationSettings.php new file mode 100644 index 0000000..0d41274 --- /dev/null +++ b/lib/controller/getApplicationSettings.php @@ -0,0 +1,495 @@ +Data['id'] ); + $ACCESS = intval( $CUser->Data['access'] ); + if( $UID > 1 ){ + $Data['status']='na'; + $TY = intval( $_POST['TYP'] ); + $QS="SELECT * FROM system_props LIMIT 1"; + $RV = $DATABASE->Query( $QS ); + if( count( $RV ) ){ + $AP_DATA = $RV[0]; + if( $AP_DATA['hw_info'] == '' ) $AP_DATA['hw_info'] = 'MUST_DO_DETECTION'; + if( $AP_DATA['os_info'] == '' ) $AP_DATA['os_info'] = 'MUST_RESTART_SERVER'; + } else { + $AP_DATA = array( + 'anchor_lat'=>0, + 'anchor_lon'=>0, + 'anchor_alt'=>0, + 'type'=>0, + 'name'=>'INITIAL_SETUP_MODE', + 'os_info'=>'MUST_RESTART_SERVER', + 'hw_info'=>'MUST_DO_DETECTION' + ); + }; + $QS="SELECT `site_id`, `version_string` FROM `servers` LIMIT 1"; + $RR = $DATABASE->Query( $QS ); + if( count( $RR ) ){ + $AP_DATA['site_id'] = intval( $RR[0]['site_id']); + $AP_DATA['build'] = $RR[0]['version_string']; + } else { + $AP_DATA['site_id'] = 1; + $AP_DATA['build'] = 'undefined-build'; + }; + switch( $TY ){ + case 0:{ + + $Data['status']='ok'; + $QS = "SELECT `identity` FROM `servers` LIMIT 1"; + $TT = $DATABASE->Query( $QS ); + if( count( $TT ) ){ + $IDT = $TT[0]['identity']; + } else { + $IDT = "----No-Identity-Set---"; + }; + $Data['content']=<<', + height: 130 + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'textfield', + fieldLabel: "{$Labels->GetLabel( '_INSTANCE_ID_' )}", + width: 300, + value: '{$IDT}' + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'button', + text: "{$Labels->GetLabel( '_GEN_INSTANCE_ID_' )}", + width: 550, + handler: function(){ + doApplicationOperation( 3, 0 ); + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'combo', + fieldLabel: "{$Labels->GetLabel('_DEBUGGING_MODE_')}", + editable: false, + typeAhead: true, + width: 300, + triggerAction: 'all', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + fields: ['sid', 'snam'], + data: [[0,"{$Labels->GetLabel('__DISABLED__')}"], [1,"{$Labels->GetLabel('___ENABLED__')}"]] + }), + value: '{$AP_DATA['work_mode']}', + valueField: 'sid', + displayField: 'snam', + listeners:{ + select: function( t, r, i ){ + doApplicationOperation( 1, i ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'combo', + fieldLabel: "{$Labels->GetLabel('_USE_REMOTE_SERVER_')}", + editable: false, + typeAhead: true, + width: 300, + triggerAction: 'all', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + fields: ['sid', 'snam'], + data: [[0,"{$Labels->GetLabel('__DISABLED__')}"], [1,"{$Labels->GetLabel('___ENABLED__')}"]] + }), + value: '{$AP_DATA['use_remote_server']}', + valueField: 'sid', + displayField: 'snam', + listeners:{ + select: function( t, r, i ){ + doApplicationOperation( 10, i ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'textfield', + fieldLabel: "{$Labels->GetLabel('_REMOTE_SERVER_ADDRESS_')}", + width: 300, + value: '{$AP_DATA['remote_ip']}', + listeners:{ + change: function( a, c, b ){ + doApplicationOperation( 8, c ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'numberfield', + fieldLabel: "{$Labels->GetLabel('_REMOTE_SERVER_PORT_')}", + width: 300, + value: '{$AP_DATA['remote_port']}', + listeners:{ + change: function( a, c, b ){ + doApplicationOperation( 9, c ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'textfield', + fieldLabel: "{$Labels->GetLabel('_BACKUP_SERVER_ADDRESS_')}", + width: 300, + value: '{$AP_DATA['remote_backup_ip']}', + listeners:{ + change: function( a, c, b ){ + doApplicationOperation( 12, c ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'numberfield', + fieldLabel: "{$Labels->GetLabel('_BACKUP_SERVER_PORT_')}", + width: 300, + value: '{$AP_DATA['remote_backup_port']}', + listeners:{ + change: function( a, c, b ){ + doApplicationOperation( 13, c ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'combo', + fieldLabel: "{$Labels->GetLabel('_SKIP_LOCAL_REPORTS_')}", + editable: false, + typeAhead: true, + width: 300, + triggerAction: 'all', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + fields: ['sid', 'snam'], + data: [[0,"{$Labels->GetLabel('__DISABLED__')}"], [1,"{$Labels->GetLabel('___ENABLED__')}"]] + }), + value: '{$AP_DATA['skip_local_report']}', + valueField: 'sid', + displayField: 'snam', + listeners:{ + select: function( t, r, i ){ + doApplicationOperation( 11, i ); + } + } + }] +DATA_BOUNDARY; + break; + }; + case 1:{ + $Data['status']='ok'; + $Data['content']=<<GetLabel('_SITE_PROP_LBL_')}", + flex: 1, + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 8, + textAlign: 'center' + }, + items:[{ + border: false, + id: 'lab_123', + html: "{$Labels->GetLabel('_SYS_ANCHORT_LBL_')} "+((MAP_IS_LOCAL)?'Pos X':"{$Labels->GetLabel('_LON_SHORT_LBL_')}")+':' + },{ + xtype: 'numberfield', + width: 100, + decimalPrecision: 8, + id: 'siteLon', + value: SiteLon + },{ + border: false, + id: 'lab_124', + html: ((MAP_IS_LOCAL)?'Pos Y':"{$Labels->GetLabel('_LAT_SHORT_LBL_')}")+':' + },{ + xtype: 'numberfield', + id: 'siteLat', + decimalPrecision: 8, + width: 100, + value: SiteLat + },{ + border: false, + html: "{$Labels->GetLabel('_ALT_SHORT_LBL_')}:" + },{ + xtype: 'numberfield', + decimalPrecision: 2, + width: 100, + id: 'siteAlt', + value: SiteAlt + },{ + xtype: 'button', + text: "{$Labels->GetLabel('_UPDATE_LBL_')}", + handler: updateSiteAnchor + },{ + xtype: 'panel', + frame: false, + border: false, + rowspan: 2, + html: ((MAP_IS_LOCAL)?'':'') + },{ + border: false, + html: "{$Labels->GetLabel('_MAP_TYP_LBL_')}:" + },{ + xtype: 'combo', + disabled: false, + typeAhead: true, + triggerAction: 'all', + id: 'siteMap', + lazyRender:true, + colspan: 3, + mode: 'local', + store: mapListStore, + value: MAP_ID, + valueField: 'map_id', + displayField: 'map_name', + listeners:{ + select: function(){ + updateSiteMap(); + LoadNodesList(); + } + } + },{ + xtype: 'button', + disabled: false, + text: "{$Labels->GetLabel('_DELETE_')}", + handler: function(){ + deleteCurrentMap(); + } + },{ + + xtype: 'button', + id: 'add-c_map-btn', + disabled: false, + text: "{$Labels->GetLabel('_CREATE_NEW_LBL_')}", + handler: function(){ + createNewMap(); + } + }] + }] + },{ + frame: true, + border: false, + xtype: 'panel', + flex: 1, + height: PanelH, + columnWidth: 0.17, + layout: 'fit', + id: 'prop_content', + items:[{ + html: "
{$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_')}
" + }] + }] +DATA_BOUNDARY; + break; + }; + case 4:{ + $Data['status']='ok'; + $Data['content']=<<GetLabel('_MULTYDIS_ENA_')}", + editable: false, + typeAhead: true, + width: 300, + triggerAction: 'all', + lazyRender:true, + mode: 'local', + disabled: true, + store: new Ext.data.ArrayStore({ + fields: ['sid', 'snam'], + data: [[0,"{$Labels->GetLabel('__DISABLED__')}"], [1,"{$Labels->GetLabel('___ENABLED__')}"]] + }), + value: '{$AP_DATA['skip_local_report']}', + valueField: 'sid', + displayField: 'snam', + listeners:{ + select: function( t, r, i ){ + if( i ){ + showMultyLayoutEditor(); + }; + //doApplicationOperation( 11, i ); + } + } + },{ + xtype: 'spacer', + height: 10 + },{ + xtype: 'panel', + layout: 'fit', + height: PanelH - 190, + id: 'mui_editor', + border: true, + frame: false, + disabled: true, + items:[{ + xtype:'portal', + region:'center', + margins:'35 5 5 0', + items:[{ + columnWidth:.33, + style:'padding:10px 0 10px 10px', + items:[/*{ + title: 'Grid in a Portlet', + layout:'fit', + rowspan: 2, + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + },{ + title: 'Another Panel 1', + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + }] + },{ + columnWidth:.33, + style:'padding:10px 0 10px 10px', + items:[{ + title: 'Panel 2', + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + },{ + title: 'Another Panel 2', + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + }] + },{ + columnWidth:.33, + style:'padding:10px', + items:[{ + title: 'Panel 3', + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + },{ + title: 'Another Panel 3', + colspan: 2, + tools: [{ + id:'gear', + handler: function(){ + Ext.Msg.alert('Message', 'The Settings tool was clicked.'); + } + },{ + id:'close', + handler: function(e, target, panel){ + panel.ownerCt.remove(panel, true); + } + }], + html: 'chucha' + }*/] + }] + + /* + * Uncomment this block to test handling of the drop event. You could use this + * to save portlet position state for example. The event arg e is the custom + * event defined in Ext.ux.Portal.DropZone. + */ + // ,listeners: { + // 'drop': function(e){ + // Ext.Msg.alert('Portlet Dropped', e.panel.title + '
Column: ' + + // e.columnIndex + '
Position: ' + e.position); + // } + // } + }] + }] +DATA_BOUNDARY; + break; + }; + }; + $Data['messages'] = ob_get_clean(); + echo json_encode( $Data ); + } else { + header('location: /'); + }; +?> \ No newline at end of file diff --git a/lib/controller/getCameraEditor.php b/lib/controller/getCameraEditor.php index f9b96ce..1f18806 100644 --- a/lib/controller/getCameraEditor.php +++ b/lib/controller/getCameraEditor.php @@ -407,7 +407,7 @@ CHUPAKABRA; activeTab: 0, bbar:[{$BBAR_BTN}], items: [{ - title: '{$Labels->GetLabel('_CAC_TAB_')}', + title: '{$Labels->GetLabel('_GENERAL_')}', id: 'cam_info', frame: false, border: false, @@ -427,6 +427,32 @@ CHUPAKABRA; frame: false, labelAlign: 'right', items:[{ + xtype: 'combo', + id: 'cam_status_ed', + fieldLabel: '{$Labels->GetLabel('_STATUS_')}', + lazyRender: true, + mode: 'local', + forceSelection: true, + triggerAction: 'all', + editable: false, + disableKeyFilter: true, + store: new Ext.data.ArrayStore({ + fields: ['mode','mode_txt'], + data: [ + [0,'{$Labels->GetLabel('__DISABLED__')}'], + [1,'{$Labels->GetLabel('___ENABLED__')}'] + ] + }), + valueField: 'mode', + displayField: 'mode_txt', + value: '{$Node['enable']}', + width: 200, + listeners:{ + select: function( a, c, b ){ + doCamOperation( {$Node['id']}, 41, b, true ); + } + } + },{ xtype: 'checkbox', id: 'cam_manassign', fieldLabel: '{$Labels->GetLabel('_STATIC_CONNECTION_')}', diff --git a/lib/controller/getHistoryEvents.php b/lib/controller/getHistoryEvents.php index 7ca0a00..e5da79c 100644 --- a/lib/controller/getHistoryEvents.php +++ b/lib/controller/getHistoryEvents.php @@ -26,7 +26,7 @@ $CR['node_name'] = $NodeNames[$CR['node_id']]; $CR['rts'] = $DTS; $CR['ts'] = intval( $REC['ts'] ); - $CR['ms'] = intval( $REC['ts_ms'] ); + $CR['ms'] = sprintf( "%03d",intval( $REC['ts_ms'] )); $CR['dts'] = date( "Y-m-d H:i:s.{$CR['ms']}", $CR['ts'] ); $CR['type'] = intval( $REC['evt_type'] ); $CR['range'] = sprintf( "%0.2f", floatval( $REC['range'] )); diff --git a/lib/controller/getMetroFusionEditor.php b/lib/controller/getMetroFusionEditor.php index f39235d..ba9c41d 100644 --- a/lib/controller/getMetroFusionEditor.php +++ b/lib/controller/getMetroFusionEditor.php @@ -39,7 +39,7 @@ lskdjflsdsdf; border: true, title: 'Train Filter Fusion Engine Settings', frame: true, - labelWidth: 150, + labelWidth: 200, labelAlign: 'right', layout: 'form', height: PanelH, @@ -49,9 +49,11 @@ lskdjflsdsdf; var odtr = (Ext.getCmp('ups_tdetect').getValue())?1:0; var odtm = Ext.getCmp('ups_dtime').getValue(); var ostm = Ext.getCmp('ups_stime').getValue(); + var oatm = Ext.getCmp('ups_atime').getValue(); + var omrg = Ext.getCmp('ups_mrange').getValue(); var ottr = (Ext.getCmp('ups_ttrain').getValue())?1:0; var owid = Ext.getCmp('ups_width').getValue(); - var odbg = (Ext.getCmp('ups_dbg').getValue())?1:0; + var odbg = (Ext.getCmp('ups_dbg').getValue())?1:0; Ext.Ajax.request({ url: '/lib/controller/doFilterOperation.php', params: { @@ -64,7 +66,9 @@ lskdjflsdsdf; STM: ostm, TTR: ottr, WIZ: owid, - DBG: odbg + DBG: odbg, + ATM: oatm, + MRG: omrg }, success: function( response, opts ){ Ext.Msg.show({ @@ -79,35 +83,51 @@ lskdjflsdsdf; } }], items:[{ - xtype: 'numberfield', - id: 'ups_width', - fieldLabel: 'Train Width', - value: '{$SD['TRAIN_WIDTH']}' + xtype: 'checkbox', + id: 'ups_dbg', + fieldLabel: 'Debugging Mode', + checked: parseInt('{$SD['DEBUG']}') },{ xtype: 'checkbox', id: 'ups_tdetect', fieldLabel: 'Detect Train', checked: parseInt('{$SD['TRAIN_DETECT']}') + },{ + xtype: 'checkbox', + id: 'ups_ttrain', + fieldLabel: 'Track Train', + checked: parseInt('{$SD['TRACK_TRAIN']}') + },{ + xtype: 'spacer', + html: '
' },{ xtype: 'numberfield', id: 'ups_dtime', - fieldLabel: 'Decision Time', + fieldLabel: '[UTF] No Train Time', value: '{$SD['DECISION_TIME']}' + },{ + xtype: 'numberfield', + id: 'ups_atime', + fieldLabel: '[UTF] Restart Senor Hours', + value: '{$SD['UPPER_RESTART']}' + },{ + xtype: 'spacer', + html: '
' },{ xtype: 'numberfield', id: 'ups_stime', - fieldLabel: 'Suspect Train Time', + fieldLabel: '[LTF] Suspect Time', value: '{$SD['SUSPECT_TIME']}' },{ - xtype: 'checkbox', - id: 'ups_ttrain', - fieldLabel: 'Track Train', - checked: parseInt('{$SD['TRACK_TRAIN']}') + xtype: 'numberfield', + id: 'ups_width', + fieldLabel: '[LTF] Suspicious Width', + value: '{$SD['TRAIN_WIDTH']}' },{ - xtype: 'checkbox', - id: 'ups_dbg', - fieldLabel: 'Debugging Mode', - checked: parseInt('{$SD['DEBUG']}') + xtype: 'numberfield', + id: 'ups_mrange', + fieldLabel: '[LTF] Minimal Range', + value: '{$SD['MINIMAL_RANGE']}' }] %%%JUMPAPA%%% diff --git a/lib/controller/getStatus.php b/lib/controller/getStatus.php index 70de8e7..f416af9 100644 --- a/lib/controller/getStatus.php +++ b/lib/controller/getStatus.php @@ -122,7 +122,7 @@ 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 ) ORDER BY ts DESC, ts_ms DESC LIMIT 32"; + $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 ) 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"; @@ -143,7 +143,13 @@ $CT['lon'] = floatval( $SYS['anchor_lon'] ) + floatval( $Z['lon'] ); }; $CT['az'] = floatval( $Z['azimuth'] ); - $CT['color'] = 0xff0000; + if( $TT > 38 ){ + $CT['color'] = 'ff00ff'; + $CT['stroke'] = '800080'; + } else { + $CT['color'] = 'ff0000'; + $CT['stroke'] = '800000'; + }; $CN['targets'][] = $CT; }; //if( count( $CN['targets'] ) ) $CN['status'] = 5; diff --git a/lib/controller/uploadDeviceMask.php b/lib/controller/uploadDeviceMask.php index aa7c854..ef52125 100644 --- a/lib/controller/uploadDeviceMask.php +++ b/lib/controller/uploadDeviceMask.php @@ -16,7 +16,8 @@ $NPC = 0; $DeleteMasks = true; // NOJOB $result = $DATABASE->Query( $QS, false ); - if( $SHX == $SHY ) $Process = 0; else $Process = 1; + $Process = 1; + if( $SHX == $SHY ) $Process = 0; if( count( $result ) && $MHEI ){ if( $Process == 1 ){ $SCALE = 288.0 / floatval( $MHEI ); diff --git a/lib/javascript/jsapi_dynamic/mojo_dashboard.js b/lib/javascript/jsapi_dynamic/mojo_dashboard.js index 3ad8297..8500d0b 100644 --- a/lib/javascript/jsapi_dynamic/mojo_dashboard.js +++ b/lib/javascript/jsapi_dynamic/mojo_dashboard.js @@ -64,7 +64,7 @@ function log_et_Renderer( value, meta, record ){ case 42: ov = "GetLabel('_EVT_MSG_TF_TD_');?>"; break; case 43: ov = "GetLabel('_EVT_MSG_TF_TUPD_');?>"; break; case 44: ov = "GetLabel('_EVT_MSG_TF_SUSPA_');?>"; break; - case 45: ov = "GetLabel('_EVT_MSG_TF_SUSPN_');?>"; break; + case 79: ov = "GetLabel('_EVT_MSG_TF_SUSPN_');?>"; break; case 46: ov = "GetLabel('_EVT_MSG_TF_RD_');?>"; break; case 47: ov = "GetLabel('_EVT_MSG_TF_DD_');?>"; break; case 48: ov = "GetLabel('_EVT_MSG_TF_SUSPD_');?>"; break; @@ -86,12 +86,14 @@ function log_et_Renderer( value, meta, record ){ case 74: ov = "GetLabel('_EVT_MSG_TF_OM_UP_');?>"; break; case 75: ov = "GetLabel('_EVT_MSG_TF_OM_TG_');?>"; break; case 76: ov = "GetLabel('_EVT_MSG_TF_OM_EXPIRED_');?>"; break; + case 77: ov = "GetLabel('_EVT_MSG_TF_TD_EXPIRED_');?>"; break; + case 78: ov = "GetLabel('_EVT_MSG_TF_SUSP_EXPIRED_');?>"; break; default: ov = "GetLabel('_EVENT_');?> ["+value+"]"; }; return '
'+ov+'
'; }; function no_target_filter( value, meta, record ){ - if( record.data.type >9 && record.data.type < 37 ) return value; + if( record.data.type >9 && record.data.type < 52 ) return value; return ''; }; var log_ColModel_ops = { @@ -798,10 +800,10 @@ function draw2DTargets( a ){ cc.setAttributeNS(null, "cx", x ); cc.setAttributeNS(null, "cy", y ); cc.setAttributeNS(null, "r", ""+(6*rz)+"" ); - cc.setAttributeNS(null, "stroke", "#800000" ); + cc.setAttributeNS(null, "stroke", "#"+targets_2d[a][idx].stroke ); cc.setAttributeNS(null, "stroke-width", ""+(2*rz)+"" ); cc.setAttributeNS(null, "stroke-opacity", ""+(1.0-ok*idx)); - cc.setAttributeNS(null, "fill", "#ff0000" ); + cc.setAttributeNS(null, "fill", "#"+targets_2d[a][idx].color ); cc.setAttributeNS(null, "fill-opacity", ""+(1.0-ok*idx)); cc.setAttributeNS(null, "id", "targ_"+a+"_"+idx ); csvg.appendChild( cc ); @@ -1642,7 +1644,7 @@ function fetchSiteStatus(){ if( data.nodes[i].targets.length ){ targets_2d[data.nodes[i].id]=[]; for( idx = 0; idx < data.nodes[i].targets.length; idx++) - targets_2d[data.nodes[i].id][idx]={ range: data.nodes[i].targets[idx].digital, az: data.nodes[i].targets[idx].az }; + targets_2d[data.nodes[i].id][idx]={ range: data.nodes[i].targets[idx].digital, az: data.nodes[i].targets[idx].az, color: data.nodes[i].targets[idx].color, stroke: data.nodes[i].targets[idx].stroke }; draw2DTargets( data.nodes[i].id ); } else { cleanup2DDraw( data.nodes[i].id ); diff --git a/lib/javascript/jsapi_dynamic/mojo_global_vars.js b/lib/javascript/jsapi_dynamic/mojo_global_vars.js index 9a31ddf..866eabd 100644 --- a/lib/javascript/jsapi_dynamic/mojo_global_vars.js +++ b/lib/javascript/jsapi_dynamic/mojo_global_vars.js @@ -9,7 +9,8 @@ var ap_title=''; var winW=Data['width']);?>; var winH=Data['height']);?>; var my_access=Data['access']);?>; -var initView=Data['last_content_view']);?>; +var initView=[Data['last_content_view']);?>]; + var content_lvl0= -1; var content_lvl1= -1; var content_lvl2= -1; diff --git a/lib/javascript/jsapi_dynamic/mojo_main.js b/lib/javascript/jsapi_dynamic/mojo_main.js index 98b87f5..e4ad947 100644 --- a/lib/javascript/jsapi_dynamic/mojo_main.js +++ b/lib/javascript/jsapi_dynamic/mojo_main.js @@ -105,12 +105,22 @@ function playSound( t ){ }; }; -function doRefresh(){ - window.location="/?t="+123; +function doRefresh(){ + if( mWindowID ){ + window.location="/?w="+mWindowID+"&t=" + uuidv4(); + } else { + refreshAuxWindows(); + window.location="/?t=" + uuidv4(); + }; }; function doLogout(){ - window.location = '/login.php?UID=1'; + if( mWindowID ){ + window.location = '/login.php?w='+mWindowID+'&UID=1'; + } else { + closeAuxWindows(); + window.location = '/login.php?UID=1'; + }; }; function stopStatusUpdater(){ @@ -125,13 +135,6 @@ function failureAJAXFunction( responce, opts ){ window.clearInterval( tlInterval ); tlInterval = null; }; - //playSound(); - //Ext.Msg.show({ - // title:'GetLabel('_REQ_FAILURE_');?>', - // msg: 'GetLabel('_AJX_REQFAILURE_');?>', - // buttons: Ext.Msg.OK, - // icon: Ext.MessageBox.INFO - //}); doLogout(); }; @@ -209,26 +212,6 @@ function sessionValidator(){ }); }; -function doCheckWindowSize(){ - if (parseInt(navigator.appVersion)>3) { - if (navigator.appName=="Netscape") { - winW2 = window.innerWidth; - winH2 = window.innerHeight; - if ( winH2<700 ) winH2=700; - }; - if (navigator.appName.indexOf("Microsoft")!=-1) { - winW2 = document.body.offsetWidth; - winH2 = document.body.offsetHeight; - if ( winH2<700 ) winH2=700; - }; - }; - if ( winW2 != winW || winH2!=winH ){ - updateUserScreenResolution( winW2, winH2 ); - }; -}; - - - var NotificationStack = null; function tryKeepScreenAlive(minutes) { @@ -307,10 +290,14 @@ Ext.onReady(function(){ doCheckWindowSize(); + //initMultiWindows(); + loadSystemDevices(); gSessionValidatorInterval = window.setInterval( sessionValidator, 1000 ); NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25}); - //window.onresize = doCheckWindowSize; + + window.onresize = doCheckWindowSize; + Ext.QuickTips.init(); if( ssEnabled ){ @@ -323,198 +310,365 @@ Ext.onReady(function(){ }); }; - - var viewport = new Ext.Viewport({ - id: 'main_viewport', - layout:'border', - frame: false, - border: false, - items: [{ - xtype: 'panel', - region: 'north', - baseCls: 'x-plain', - height: 60, - //layout: 'fit', - layout: 'hbox', + if( mWindowID == 0 ){ + var viewport = new Ext.Viewport({ + id: 'main_viewport', + layout:'border', frame: false, border: false, - items:[{ + items: [{ xtype: 'panel', - width: '100%', - layout: 'table', + region: 'north', baseCls: 'x-plain', - layoutConfig: { - columns: 13 - }, + height: 60, + //layout: 'fit', + layout: 'hbox', frame: false, - border: true, - margins: {top:10, right:10, bottom:10, left:10}, + border: false, items:[{ xtype: 'panel', + width: '100%', + layout: 'table', baseCls: 'x-plain', + layoutConfig: { + columns: 13 + }, frame: false, - border: false, - margins: {top:5, right:20, bottom:0, left:20}, - html: '' - },{ - xtype: 'spacer', - width: 10 - },{ - xtype: 'button', - text: 'GetLabel('_MONITORING_');?>', - id: 'tbtn_0', - iconCls: 'mon', - scale: 'large', - enableToggle: true, - //pressed: (Math.floor(initView/100)==0), - allowDepress: false, - toggleGroup: 'gopa_gopa', - toggleHandler: function( bt, state ){ - if( state ) showContent( 0 ); - } - },{ - xtype: 'spacer', - width: 10 - },{ - xtype: 'button', - text: 'GetLabel('_REPO_HISTORY_');?>', - id: 'tbtn_1', - iconCls: 'rep', - scale: 'large', - enableToggle: true, - //pressed: (Math.floor(initView/100)==1), - allowDepress: false, - toggleGroup: 'gopa_gopa', - toggleHandler: function( bt, state ){ - if( state ) showContent( 1000 ); - } - },{ - xtype: 'spacer', - width: 10 - },{ - xtype: 'button', - text: 'GetLabel('_SETTINGS_');?>', - id: 'tbtn_2', - iconCls: 'cog', - scale: 'large', - enableToggle: true, - allowDepress: false, - toggleGroup: 'gopa_gopa', - toggleHandler: function( bt, state ){ - if( state ) showContent( 2000 ); - } - },{ - xtype: 'spacer', - width: 10 - },{ - xtype: 'panel', - baseCls: 'x-plain', - frame: false, - border: false, - margins: {top:5, right:0, bottom:0, left:0}, - width: PanelW - Data['language']) == 4)?'-90':'';?>, - html: '

'+ap_title+'

' - },{ - xtype: 'spacer', - width: 10 - },{ + border: true, + margins: {top:10, right:10, bottom:10, left:10}, + items:[{ + xtype: 'panel', + baseCls: 'x-plain', + frame: false, + border: false, + margins: {top:5, right:20, bottom:0, left:20}, + html: '' + },{ + xtype: 'spacer', + width: 10 + },{ xtype: 'button', - id: 'logout_btn', - text: 'Logout', - iconCls: 'lout', + text: 'GetLabel('_MONITORING_');?>', + id: 'tbtn_0', + iconCls: 'mon', scale: 'large', - style:'text-align: right;', - handler: doLogout - }{ + enableToggle: true, + //pressed: (Math.floor(initView/100)==0), + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 0 ); + } + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'button', + text: 'GetLabel('_REPO_HISTORY_');?>', + id: 'tbtn_1', + iconCls: 'rep', + scale: 'large', + enableToggle: true, + //pressed: (Math.floor(initView/100)==1), + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 1000 ); + } + },{ + xtype: 'spacer', + width: 10 + },{ xtype: 'button', - id: 'snd_mode_btn', - text: 'GetLabel('_SOUND_');?>', - iconCls: 'snd'+SoundMode, + text: 'GetLabel('_SETTINGS_');?>', + id: 'tbtn_2', + iconCls: 'cog', scale: 'large', - style:'text-align: right;', - handler: function(){ - if( SoundMode == 0 ){ - SoundMode = 3; - SoundEnable = true; - } else { - SoundMode --; - if( SoundMode == 0 ) SoundEnable = false; - }; - Ext.getCmp('snd_mode_btn').setIconClass( 'snd'+SoundMode ); - playSound(); - doApplicationOperation( 6, SoundMode ); + enableToggle: true, + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 2000 ); } },{ xtype: 'spacer', width: 10 },{ + xtype: 'panel', + baseCls: 'x-plain', + frame: false, + border: false, + margins: {top:5, right:0, bottom:0, left:0}, + width: PanelW - Data['language']) == 4)?'-90':'';?>, + html: '

'+ap_title+'

' + },{ + xtype: 'spacer', + width: 10 + },{ xtype: 'button', id: 'logout_btn', - text: 'GetLabel('_LOGOUT_');?>', + text: 'Logout', iconCls: 'lout', scale: 'large', style:'text-align: right;', handler: doLogout } - ] - }] - },{ - xtype: 'panel', - id:'left_side_menu', - region:'west', - bsaseCls:'x-plain', - layout: 'fit', - collapsible: true, - split: true, - width: 180, - minWidth: 180, - maxWidth: 180, - hidden: (Math.floor(initView/100)==0), - margins: '5 0 5 5', - cmargins:'5 5 5 5', - items: [] - },{ - xtype: 'panel', - region:'center', - margins: '5 5 5 0', - id: 'main_content', - //title: 'GetLabel('_SYS_DASHBOARD_');?>', - items:[{ - xtype: 'portal', - id: 'main_portal', + } else { + ?>{ + xtype: 'button', + id: 'snd_mode_btn', + text: 'GetLabel('_SOUND_');?>', + iconCls: 'snd'+SoundMode, + scale: 'large', + style:'text-align: right;', + handler: function(){ + if( SoundMode == 0 ){ + SoundMode = 3; + SoundEnable = true; + } else { + SoundMode --; + if( SoundMode == 0 ) SoundEnable = false; + }; + Ext.getCmp('snd_mode_btn').setIconClass( 'snd'+SoundMode ); + playSound(); + doApplicationOperation( 6, SoundMode ); + } + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'button', + id: 'logout_btn', + text: 'GetLabel('_LOGOUT_');?>', + iconCls: 'lout', + scale: 'large', + style:'text-align: right;', + handler: doLogout + } + ] + }] + },{ + xtype: 'panel', + id:'left_side_menu', + region:'west', + bsaseCls:'x-plain', + layout: 'fit', + collapsible: true, + split: true, + width: 180, + minWidth: 180, + maxWidth: 180, + hidden: (Math.floor(initView/100)==0), + margins: '5 0 5 5', + cmargins:'5 5 5 5', + items: [] + },{ + xtype: 'panel', + region:'center', + margins: '5 5 5 0', + id: 'main_content', + //title: 'GetLabel('_SYS_DASHBOARD_');?>', + items:[{ + xtype: 'portal', + id: 'main_portal', + frame: false, + border: false, + items:{ + html: '' + }//, + //listeners:{ + // drop: function( a ){ + // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position ); + // } + //} + }] + },{ + xtype: 'panel', + region:'east', + id:'right_side_menu', + //title: '', + margins: '5 5 5 0', + //id: 'help_content', frame: false, border: false, - items:{ - html: '' - }//, - //listeners:{ - // drop: function( a ){ - // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position ); - // } - //} - }] - },{ - xtype: 'panel', - region:'east', - id:'right_side_menu', - //title: '', - margins: '5 5 5 0', - //id: 'help_content', + collapsible: false, + split:true, + width:200, + minWidth: 150, + maxWidth: 200, + items:[] + }] + }); + } else { + var viewport = new Ext.Viewport({ + id: 'main_viewport', + layout:'border', frame: false, border: false, - collapsible: false, - split:true, - width:200, - minWidth: 150, - maxWidth: 200, - items:[] - }] - }); - showContent( initView ); + items: [{ + xtype: 'panel', + region: 'north', + baseCls: 'x-plain', + height: 60, + //layout: 'fit', + layout: 'hbox', + frame: false, + border: false, + items:[{ + xtype: 'panel', + width: '100%', + layout: 'table', + baseCls: 'x-plain', + layoutConfig: { + columns: 10 + }, + frame: false, + border: true, + margins: {top:10, right:10, bottom:10, left:10}, + items:[{ + xtype: 'panel', + baseCls: 'x-plain', + frame: false, + border: false, + margins: {top:5, right:20, bottom:0, left:20}, + html: '' + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'button', + text: 'GetLabel('_MONITORING_');?>', + id: 'tbtn_0', + iconCls: 'mon', + scale: 'large', + menu:{ + xtype: 'menu', + activeItem: 0, + items: [{ + text: 'GetLabel('_MONITORING_');?>[0]'//, + //iconCls: 'mon', + //scale: 'large' + },{ + text: 'GetLabel('_MONITORING_');?>[1]'//, + //iconCls: 'mon', + //scale: 'large' + }] + }, + enableToggle: true, + //pressed: (Math.floor(initView/100)==0), + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 0 ); + } + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'button', + text: 'GetLabel('_REPO_HISTORY_');?>', + id: 'tbtn_1', + iconCls: 'rep', + scale: 'large', + enableToggle: true, + //pressed: (Math.floor(initView/100)==1), + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 1000 ); + } + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'button', + text: 'GetLabel('_SETTINGS_');?>', + id: 'tbtn_2', + iconCls: 'cog', + scale: 'large', + enableToggle: true, + allowDepress: false, + toggleGroup: 'gopa_gopa', + toggleHandler: function( bt, state ){ + if( state ) showContent( 2000 ); + } + },{ + xtype: 'spacer', + width: 10 + },{ + xtype: 'panel', + baseCls: 'x-plain', + frame: false, + border: false, + margins: {top:5, right:0, bottom:0, left:0}, + width: PanelW - Data['language']) == 4)?'-90':'';?>, + html: '

'+ap_title+'

' + },{ + xtype: 'spacer', + width: 10 + }] + }] + },{ + xtype: 'panel', + id:'left_side_menu', + region:'west', + bsaseCls:'x-plain', + layout: 'fit', + collapsible: true, + split: true, + width: 180, + minWidth: 180, + maxWidth: 180, + hidden: (Math.floor(initView/100)==0), + margins: '5 0 5 5', + cmargins:'5 5 5 5', + items: [] + },{ + xtype: 'panel', + region:'center', + margins: '5 5 5 0', + id: 'main_content', + //title: 'GetLabel('_SYS_DASHBOARD_');?>', + items:[{ + xtype: 'portal', + id: 'main_portal', + frame: false, + border: false, + items:{ + html: '' + }//, + //listeners:{ + // drop: function( a ){ + // updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position ); + // } + //} + }] + },{ + xtype: 'panel', + region:'east', + id:'right_side_menu', + //title: '', + margins: '5 5 5 0', + //id: 'help_content', + frame: false, + border: false, + collapsible: false, + split:true, + width:200, + minWidth: 150, + maxWidth: 200, + items:[] + }] + }); + }; + if( initView[mWindowID]!= undefined ){ + showContent( initView[mWindowID] ); + } else { + initView[mWindowID] = 0; + showContent( initView[mWindowID] ); + }; }); \ No newline at end of file diff --git a/lib/javascript/jsapi_dynamic/mojo_masks.js b/lib/javascript/jsapi_dynamic/mojo_masks.js new file mode 100644 index 0000000..b2caf7d --- /dev/null +++ b/lib/javascript/jsapi_dynamic/mojo_masks.js @@ -0,0 +1,752 @@ +// + + + +var ME_max_range = 100; +var absDrawMapSizes = [[4096,4096],[2304,288]]; +var deviceMapScaling = 1.0; +var deviceMapTopShift = 100; +var deviceMapLeftShift = 100; +var cMapImageWidth = 0; +var cMapImageHeight = 0; +var cMapCanvasWidth = 0; +var cMapCanvasHeight = 0; +var cMapType = 0; +var cMaskLRF = 0; +var cMaskID = 0; +var maskEditorDiv = null; +var MEPanel = null; +function handleFSMaskEditorClose( event ){ + if ( document.fullscreenElement || + document.webkitFullscreenElement || + document.mozFullScreenElement || + document.msFullscreenElement ){ + } else { + MEPanel.destroy(); + maskEditorDiv.remove(); + MaskEditorActive = false; + maskEditorDiv = null; + MEPanel = null; + document.removeEventListener( 'fullscreenchange', handleFSMaskEditorClose ); + }; +}; + +function hideMaskEditor(){ + MaskEditorActive = false; + if( + document.fullscreenElement || + document.webkitFullscreenElement || + document.mozFullScreenElement || + document.msFullscreenElement + ){ + if( document.exitFullscreen ){ + document.exitFullscreen(); + }else if( document.mozCancelFullScreen ){ + document.mozCancelFullScreen(); + }else if( document.webkitExitFullscreen ){ + document.webkitExitFullscreen(); + }else if( document.msExitFullscreen ){ + document.msExitFullscreen(); + }; + // Removal Done by event! + //maskEditorDiv.remove(); + //maskEditorDiv = null; + //document.removeEventListener( 'fullscreenchange', handleFSMaskEditorClose ); + }; +}; +var values = { + paths: 50, + minPoints: 5, + maxPoints: 15, + minRadius: 30, + maxRadius: 90 +}; + +var hitOptions = { + segments: true, + stroke: true, + fill: true, + tolerance: 10 +}; + +var polycolors = new Array(); +var polyindex = 0; +var poligones = new Array(); + +var segment = null; +var path = null; +var MaskProject = null; +var MaskEditorMode = 0; + +function onMouseDown(event) { + segment = path = null; + var hitResult = MaskProject.hitTest( event.point, hitOptions ); + if (!hitResult) return; + + if( event.modifiers.shift ){ + if (hitResult.type == 'segment') { + hitResult.segment.remove(); + }; + return; + }; + if( hitResult ){ + path = hitResult.item; + if( hitResult.type == 'segment' ){ + segment = hitResult.segment; + path.fullySelected = false; + segment.selected = true; + } else if( hitResult.type == 'stroke' ){ + var location = hitResult.location; + segment = path.insert(location.index + 1, event.point); + //path.smooth(); + path.fullySelected = false; + segment.selected = true; + } else if ( hitResult.type == 'fill' ){ + path.fullySelected = true; + }; + } + //movePath = ; + //if( movePath ) MaskProject.activeLayer.addChild(hitResult.item); +} +var c_m_X = 0; +var c_m_Y = 0; +function onMouseMove( e ) { + //e.preventDefault(); + //e.stopPropagation(); + var mx = parseInt( e.offsetX - deviceMapLeftShift ); + var my = parseInt( e.offsetY - deviceMapTopShift ); + console.log( "e.ox:"+cMapImageWidth+" e.oy:"+cMapCanvasWidth+" mx:"+mx+" my:"+my ); + if( ( mx != c_m_X ) || ( my!= c_m_Y ) ){ + c_m_X = mx; + c_m_Y = my; + var t = Ext.getCmp('me_coords_panel'); + if( t!= undefined ){ + var k = 2048 / ( cMapImageWidth ); + var j = 2048 / ( cMapImageHeight ); + var jaja = parseInt( mx * k - 1024 ); + var juju = parseInt( my * j - 1024 ); + if( juju != 0 ){ + if( juju < 0 ){ + az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+90).toFixed(1); + } else { + az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+270).toFixed(1); + }; + } else { + if( jaja < 0 ) { + az = 90; + } else { + az = 270; + }; + }; + range = ( ( ME_max_range / 1024 ) * Math.sqrt( Math.pow( jaja, 2 ) + Math.pow( juju, 2 ) )).toFixed(2); + t.update('Range:' + range + ' m. Azimuth:' + az + '°'); + }; + }; +} +function onPathMouseMove( event ) { + //event.preventDefault(); + //event.stopPropagation(); + var mx = event.point.x;// - deviceMapLeftShift; + var my = event.point.y;// - deviceMapTopShift; + if( ( mx != c_m_X ) || ( my != c_m_Y ) ){ + c_m_X = mx; + c_m_Y = my; + var t = Ext.getCmp('me_coords_panel'); + if( t!= undefined ){ + t.update(''+c_m_X+'x'+c_m_Y+''); + }; + }; + //MaskProject.activeLayer.selected = false; + //if( event.item ) { + //event.item.selected = true; + // event.item.fullySelected = true; + //}; +} + +function onMouseDrag(event) { + var mx = event.point.x - deviceMapLeftShift; + var my = event.point.y - deviceMapTopShift; + //var mx = parseInt( event.offsetX - deviceMapLeftShift ); + //var my = parseInt( event.offsetY - deviceMapTopShift ); + if( ( mx != c_m_X ) || ( my != c_m_Y ) ){ + c_m_X = mx; + c_m_Y = my; + var t = Ext.getCmp('me_coords_panel'); + if( t!= undefined ){ + var k = 2048 / ( cMapImageWidth ); + var j = 2048 / ( cMapImageHeight ); + var jaja = parseInt( c_m_X * k - 1024 ); + var juju = parseInt( c_m_Y * j - 1024 ); + if( juju != 0 ){ + if( juju < 0 ){ + az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+90).toFixed(1); + } else { + az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+270).toFixed(1); + }; + } else { + if( jaja < 0 ) { + az = 90; + } else { + az = 270; + }; + }; + range = ( ( ME_max_range / 1024 ) * Math.sqrt( Math.pow( jaja, 2 ) + Math.pow( juju, 2 ) )).toFixed(2); + t.update('Range:' + range + ' m. Azimuth:' + az + '°'); + }; + }; + if( segment ){ + //segment.point += event.delta; + segment.point = event.point; + //path.smooth(); + }; + //else if (path) { + // path.position += event.delta; + //} +} + +function SaveCurrentMask( NodeID, MaskID, LRFID ){ + var serial = MaskProject.exportJSON(); + Ext.Ajax.request({ + url: '/lib/controller/uploadDeviceMask.php', + params: { + NID: NodeID, + UID: 'Data['id'];?>', + SID: '', + MID: MaskID, + LID: LRFID, + MDTA: serial, + MIH: cMapImageHeight, + MIW: cMapImageWidth, + MSHX: deviceMapLeftShift, + MSHY: deviceMapTopShift, + DSTD: 1 + }, + success: function( response, opts ){ + //var data = Ext.decode(response.responseText); + //hideMaskEditor(); + }, + failure: failureAJAXFunction + }); +} + + +function doMaskOperation( NodeID, Cmd, Mid = 0, LRFID = 0 ){ + Ext.Ajax.request({ + url: '/lib/controller/doMaskOperation.php', + params: { + NID: NodeID, + UID: 'Data['id'];?>', + SID: '', + CMD: Cmd, + MID: Mid, + LID: LRFID + }, + success: function( response, opts ){ + load2DMasks( NodeID ); + }, + failure: failureAJAXFunction + }); +} + +function showMaskEditor( fromDevTool, DevType, NodeID ){ + //alert( "DevType: "+DevType + " Dev Map size: "+ absDrawMapSizes[DevType][0]+"x"+absDrawMapSizes[DevType][1] ); + cMapType = DevType; + //alert( "Scale:"+ window.screen.height +" "+ window.screen.width ); + if( cMapType == 1 ){ + deviceMapScaling = ( window.screen.height * window.devicePixelRatio - 130 - ( deviceMapTopShift * 2 )) / absDrawMapSizes[cMapType][1]; + } else { + deviceMapScaling = ( window.screen.width * window.devicePixelRatio - 30 - ( deviceMapLeftShift * 2 )) / absDrawMapSizes[cMapType][0]; + }; + cMapImageHeight = deviceMapScaling * absDrawMapSizes[cMapType][1]; + cMapImageWidth = deviceMapScaling * absDrawMapSizes[cMapType][0]; + cMapCanvasWidth = cMapImageWidth + (deviceMapLeftShift * 2); + cMapCanvasHeight = cMapImageHeight + (deviceMapTopShift * 2); + //alert( "Scale:"+ deviceMapScaling ); + if( fromDevTool ){ + detectionProfileWindow.hide(); + }; + if( + document.fullscreenElement || + document.webkitFullscreenElement || + document.mozFullScreenElement || + document.msFullscreenElement + ){ + //fs mode allready + hideMaskEditor(); + }else{ + if( maskEditorDiv == null ){ + maskEditorDiv = document.createElement("div"); + maskEditorDiv.style.height="200px"; + maskEditorDiv.style.width="200px"; + maskEditorDiv.style.position="relative"; + //var svg = document.getElementById('draw_svg_'+parseInt( NodeID ) ); + //var svgCode = window.btoa(svg.outerHTML); + //maskEditorDiv.style.background = "url(data:image/svg+xml;base64," + svgCode + ")"; + //maskEditorDiv.style.background = 'solid red;'; + //maskEditorDiv.style.backgroundImage = "url('style/wicons/011.png')"; + //append div as a child to body + document.body.appendChild( maskEditorDiv ); + //var elem = document.createElement("img"); 'getDeviceMap.php?NID='+NodeID + //elem.setAttribute("src", "/lib/controller/data/device_draws/75c85fec4be204fc0bc0452f53b5a3df_map.png"); + //elem.setAttribute("height", "80%"); + //elem.setAttribute("width", "130"); + //maskEditorDiv.appendChild( elem ); + //alert( window.screen.width * window.devicePixelRatio + "x" + window.screen.height * window.devicePixelRatio); + if( MEPanel == null ){ + var ww = window.screen.width * window.devicePixelRatio; + var hh = window.screen.height * window.devicePixelRatio; + MEPanel = new Ext.Panel( { + title: 'Mask Editor', + renderTo: maskEditorDiv, + width: ww, + height: hh, + frame: true, + autoScroll: true, + items:[{ + xtype: 'panel', + width: cMapCanvasWidth, + //html: '
', + html: '
', + listeners:{ + afterrender: function(){ + //Doing a custom svg here for background! + var chicha = document.getElementById( 'popomas' ); + var cSensor = getSensorByNodeId( NodeID ); + if( cSensor!= null ){ + ME_max_range = cSensor.max_range; + } else { + ME_max_range = 100; + }; + //var svg = document.getElementById('draw_svg_'+parseInt( NodeID ) ); + //var svgCode = window.btoa(svg.outerHTML); + //chicha.style.backgroundImage = "url(data:image/svg+xml;base64," + svgCode + ")"; + //chicha.style.backgroundImage = "url('style/wicons/011.png')"; + $("#mask_canvas").mousemove( onMouseMove ); + MaskEditorActive = true; + MaskEditorDevice = NodeID; + loadMaskEditorDraw( MaskEditorDevice ); + } + } + }], + tbar:[{ + text:'New Polygone', + id: 'me_b_newp', + enableToggle: true, + toggleGroup: 'me_topbar_grp', + pressed: false, + handler: function( btn ){ + if( btn.pressed ) setMaskEditorMode( 0 ); + } + },{ + text:'Clear Mask', + id: 'me_b_delm', + handler: function(){ + if( MaskProject!= null ){ + doMaskOperation( NodeID, 3, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + setMaskEditorMode( 0 ); + } + },{ + text:'1', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: (cMaskID == 0 ), + handler: function(){ + if( cMaskID != 0 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 0; + loadDeviceMask( NodeID, cMaskID ); + } + },{ + text:'2', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: ( cMaskID == 1 ), + handler: function(){ + if( cMaskID != 1 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 1; + loadDeviceMask( NodeID, cMaskID ); + } + },{ + text:'3', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: ( cMaskID == 2 ), + handler: function(){ + if( cMaskID != 2 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 2; + loadDeviceMask( NodeID, cMaskID ); + } + },{ + text:'4', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: ( cMaskID == 3 ), + handler: function(){ + if( cMaskID != 3 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 3; + loadDeviceMask( NodeID, cMaskID ); + } + },{ + text:'5', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: ( cMaskID == 4 ), + handler: function(){ + if( cMaskID != 4 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 4; + loadDeviceMask( NodeID, cMaskID ); + } + },{ + text:'Acknowladge Mask', + enableToggle: true, + toggleGroup: 'me_maskbar_grp', + pressed: ( cMaskID == 5 ), + handler: function(){ + if( cMaskID != 5 ){ + SaveCurrentMask( NodeID, cMaskID ); + }; + MaskProject = new paper.Project( canvas ); + paper.view.draw(); + cMaskID = 5; + loadDeviceMask( NodeID, cMaskID ); + } + },'->',{ + xtype: 'panel', + frame: 'false', + id: 'me_coords_panel', + border: true, + width: 230, + height: 30, + html: '

' + }], + buttons:[{ + text: 'Cancel', + handler: function(){ + hideMaskEditor(); + } + },{ + text:'Save Mask and Close', + handler: function(){ + var serial = MaskProject.exportJSON(); + Ext.Ajax.request({ + url: '/lib/controller/uploadDeviceMask.php', + params: { + NID: NodeID, + UID: 'Data['id'];?>', + SID: '', + MID: cMaskID, + LID: 0, + MDTA: serial, + MIH: cMapImageHeight, + MIW: cMapImageWidth, + //MSF: deviceMapScaling, + MSHX: deviceMapLeftShift, + MSHY: deviceMapTopShift, + DSTD: 0 + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + hideMaskEditor(); + load2DMasks( NodeID ); + }, + failure: failureAJAXFunction + }); + } + }] + }); + }; + MEPanel.doLayout(); + //if( MaskProject == null ){ + var canvas = document.getElementById('mask_canvas'); + paper.settings.handleSize = 10; + MaskProject = new paper.Project( canvas ); + //canvas.addEventListener( 'mousemove', onMaskMouseMove ); + canvas.addEventListener( 'mousedown', onMaskMouseDown ); + //canvas.addEventListener( 'mouseup', onMaskMouseUp ); + //canvas.addEventListener( 'mousedrag', onMaskMouseMove ); + //}; + cMaskID = 0; + loadDeviceMask( NodeID, cMaskID ); + }; + //maskEditorDiv = $('#container').get(0); + //var maskEditorDiv = document.getElementById( id ); //Ext.getCmp( id ); + if( maskEditorDiv.requestFullscreen ){ + maskEditorDiv.requestFullscreen(); + }else if( maskEditorDiv.mozRequestFullScreen ){ + maskEditorDiv.mozRequestFullScreen(); + }else if( maskEditorDiv.webkitRequestFullscreen ){ + maskEditorDiv.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + }else if( maskEditorDiv.msRequestFullscreen ){ + maskEditorDiv.msRequestFullscreen(); + }; + document.addEventListener( 'fullscreenchange', handleFSMaskEditorClose ); + }; +}; + +function loadMaskEditorDraw( a ){ + Ext.Ajax.request({ + url: '/lib/controller/getDeviceDraw.php', + params: { + UID: , + SID: '', + NID: a + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + if( data.count > 0 ){ + //draws_2d[a] = data.data; + var csvg = document.getElementById( 'draw_svg_me' ); + + if( csvg != undefined ){ + var draw = csvg.getElementById( "draw" ); + if( draw != null ) csvg.removeChild( draw ); + + var p2 = 2.0*Math.PI; + var so = 0;//-10 * p2 / 360.0; + + var bBox = csvg.getBBox(); + var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon"); + var ak = 2.0*Math.PI/draws_2d[a].length; + var cpx = 4+bBox.width / 2.0 -1; + var cpy = 4+bBox.height / 2.0-1; + var mr = ( bBox.width - 4.0 ) / 2.0; + var max = 1024; + //switch( drawZoomLevels[a] ){ + // case 50: max = 512; break; + // case 25: max = 256; break; + // case 12: max = 128; break; + //}; + var rk = mr / max; + var pp = ''; + var jj = ''; + for( i=0;iData['id'];?>', + SID: '', + MID: LayerID, + LID: LrfID + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + + if( data.length > 0 ){ + for( i = 0; i < data.length; i++ ){ + //var + path = new paper.Path(); + path.strokeColor = 'black'; + //var lightness = (Math.random() - 0.5) * 0.4 + 0.4; + //var hue = Math.random() * 360; + //path.fillColor = { hue: hue, saturation: 1, lightness: lightness }; + path.fillColor = data[i].colour; + path.closed = true; + path.opacity = 0.5; + //path.onMouseMove = onPathMouseMove; + path.onMouseDown = onMouseDown; + path.onMouseDrag = onMouseDrag; + //path.onMouseUp = function( event ){ + // path.add(event.point); + //} + if( data[i].points.length > 2 ){ + if( cMapType == 1 ){ + var tX = data[i].points[0][0] * deviceMapScaling + deviceMapLeftShift; + var tY = data[i].points[0][1] * deviceMapScaling + deviceMapTopShift; + path.moveTo( [tX,tY] ); + for(k = 1; k < data[i].points.length; k++ ){ + tX = data[i].points[k][0] * deviceMapScaling + deviceMapLeftShift; + tY = data[i].points[k][1] * deviceMapScaling + deviceMapTopShift; + path.lineTo( [tX,tY] ); + }; + } else { + var tX = ( 2047 + parseInt( data[i].points[0][0]) ) * deviceMapScaling + deviceMapLeftShift; + var tY = ( 2047 + parseInt( data[i].points[0][1]) ) * deviceMapScaling + deviceMapTopShift; + path.moveTo( [tX,tY] ); + for(k = 1; k < data[i].points.length; k++ ){ + tX = ( 2047 + parseInt(data[i].points[k][0]) ) * deviceMapScaling + deviceMapLeftShift; + tY = ( 2047 + parseInt(data[i].points[k][1]) ) * deviceMapScaling + deviceMapTopShift; + path.lineTo( [tX,tY] ); + }; + }; + path.fullySelected = true; + paper.view.draw(); + }; + poligones.push(path); + setMaskEditorMode( 4 ); + }; + } else { + setMaskEditorMode( 0 ); + }; + }, + failure: failureAJAXFunction + }); +}; + +function onMaskMouseDown( evt ){ + switch( MaskEditorMode ){ + case 0:{ + path = new paper.Path(); + path.strokeColor = 'black'; + path.fillColor = '#ff8020'; + path.onMouseDown = onMouseDown; + path.onMouseDrag = onMouseDrag; + //path.onMouseMove = onPathMouseMove; + path.fullySelected = true; + path.closed = true; + path.opacity = 0.5; + path.moveTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); + setMaskEditorMode( 1 ); + break; + }; + case 1:{ + path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); + if( path.segments.length == 3 ){ + setMaskEditorMode( 4 ); + }; + }; + }; + //if( MaskEditorMode == 0 ){ + // + //} else { + // path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); + //}; +}; + +function onMaskMouseUp( evt ){ + if( MaskEditorMode == 4 ){ + //path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); + path.fullySelected = true; + path.onMouseDown = onMouseDown; + path.onMouseDrag = onMouseDrag; + //path.onMouseMove = onPathMouseMove; + paper.view.draw(); + //poligones.push( path ); + setMaskEditorMode( 1 ); + }; +}; + +function onMaskMouseMove( event ){ + if( MaskEditorMode == 4 ){ + //paper.view.draw(); + }; +}; \ No newline at end of file diff --git a/lib/javascript/jsapi_dynamic/mojo_reports.js b/lib/javascript/jsapi_dynamic/mojo_reports.js index 3b5dce1..fbc08ab 100644 --- a/lib/javascript/jsapi_dynamic/mojo_reports.js +++ b/lib/javascript/jsapi_dynamic/mojo_reports.js @@ -69,7 +69,7 @@ function rep_et_Renderer( value, meta, record ){ case 42: ov = "GetLabel('_EVT_MSG_TF_TD_');?>"; break; case 43: ov = "GetLabel('_EVT_MSG_TF_TUPD_');?>"; break; case 44: ov = "GetLabel('_EVT_MSG_TF_SUSPA_');?>"; break; - case 45: ov = "GetLabel('_EVT_MSG_TF_SUSPN_');?>"; break; + case 79: ov = "GetLabel('_EVT_MSG_TF_SUSPN_');?>"; break; case 46: ov = "GetLabel('_EVT_MSG_TF_RD_');?>"; break; case 47: ov = "GetLabel('_EVT_MSG_TF_DD_');?>"; break; case 48: ov = "GetLabel('_EVT_MSG_TF_SUSPD_');?>"; break; @@ -91,12 +91,14 @@ function rep_et_Renderer( value, meta, record ){ case 74: ov = "GetLabel('_EVT_MSG_TF_OM_UP_');?>"; break; case 75: ov = "GetLabel('_EVT_MSG_TF_OM_TG_');?>"; break; case 76: ov = "GetLabel('_EVT_MSG_TF_OM_EXPIRED_');?>"; break; + case 77: ov = "GetLabel('_EVT_MSG_TF_TD_EXPIRED_');?>"; break; + case 78: ov = "GetLabel('_EVT_MSG_TF_SUSP_EXPIRED_');?>"; break; default: ov = "GetLabel('_EVENT_');?> ["+value+"]"; }; return '
'+ov+'
'; }; function r_no_target_filter( value, meta, record ){ - if( record.data.type >9 && record.data.type < 37 ) return value; + if( record.data.type >9 && record.data.type < 52 ) return value; return ''; }; var rep_ColModel_ops = { @@ -691,7 +693,7 @@ function loadEventData( record ){ ReportSelectionMode = 3; // Just One Event cEventTSS = record.ts+record.ms/1000; clearAllRadars(); - if( record.type == 13 || record.type == 14 || record.type == 36 ){ + if( record.type == 13 || record.type == 14 || record.type == 36 || record.type == 39 || record.type == 40 || record.type == 41 || record.type == 42|| record.type == 43|| record.type == 44|| record.type == 45|| record.type == 46|| record.type == 47|| record.type == 48|| record.type == 49 ){ markEventOnRadar( record.node_id, record.az, record.r ); }; if( record.video ){ diff --git a/lib/javascript/jsapi_dynamic/mojo_settings.js b/lib/javascript/jsapi_dynamic/mojo_settings.js index 0b04949..9fadecb 100644 --- a/lib/javascript/jsapi_dynamic/mojo_settings.js +++ b/lib/javascript/jsapi_dynamic/mojo_settings.js @@ -607,6 +607,34 @@ function loadAssignedCameras(){ failure: failureAJAXFunction }); }; + +function loadApplicationSettings( par ){ + Ext.Ajax.request({ + url: '/lib/controller/getApplicationSettings.php', + params: { + UID: , + TYP: par, + SID: '', + }, + success: function( response, opts ){ + var tData = Ext.decode(response.responseText); + if( tData.status == 'ok' ){ + var res = Ext.decode( tData.content ); + var tPanel = Ext.getCmp('aps_tab_'+par ); + tPanel.removeAll( true ); + //debugger; + if( Array.isArray( res ) ){ + for( i= 0; i < res.length; i++ )tPanel.add( res[i] ); + } else { + tPanel.add( res ); + }; + tPanel.doLayout(); + }; + }, + failure: failureAJAXFunction + }); +}; + function loadAttachedSensors(){ Ext.Ajax.request({ url: '/lib/controller/getSensors.php', @@ -809,11 +837,12 @@ function doApplicationOperation( op, param, reload = false ){ SID: '' }, success: function(){ - //if( reload ) loadDetectedCameras(); + if( reload ) loadApplicationSettings( content_lvl3 ); //if( reload ) loadAssignedCameras(); } }); }; + function doSensorOperation( sensorid, op, param, reload = false ){ Ext.Ajax.request({ url: '/lib/controller/doSensorOperation.php', @@ -2418,14 +2447,16 @@ function showSettingsVideo(){ updateUserContent(); updateServerStatus(); }; -function showSettingsApplication(){ +function showSettingsApplication( ap_sid ){ stopStatusUpdater(); content_lvl1 = 1; content_lvl2 = 3; - //Load Location + + //Load Location prepareMapData(); - - + + if( ap_sid == undefined ) ap_sid = 0; + content_lvl3 = ap_sid; var tPanel = Ext.getCmp('main_content'); tPanel.removeAll( true ); tPanel.add({ @@ -2433,308 +2464,27 @@ function showSettingsApplication(){ frame: false, id: 'settings_a_content', border: false, - activeTab: 0, + activeTab: 'aps_tab_'+content_lvl3, items:[{ title: "GetLabel('_WORKING_MODE_');?>", xtype: 'form', + id: 'aps_tab_0', labelAlign: 'right', labelWidth: 250, height: PanelH - 30, - items:[{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'panel', - frame: false, - border: true, - bodyStyle: 'background-color: white;', - ',"; - ?> - height: 130 - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'textfield', - fieldLabel: "GetLabel( '_INSTANCE_ID_' );?>", - width: 300, - value: 'Query( $QS ); - if( count( $TT ) ){ - echo $TT[0]['identity']; - } else { - echo "----No-Identity-Set---"; - }; - ?>' - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'button', - text: "GetLabel( '_GEN_INSTANCE_ID_' );?>", - width: 550, - handler: function(){ - doApplicationOperation( 3, 0 ); - } - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'combo', - fieldLabel: "GetLabel('_DEBUGGING_MODE_');?>", - editable: false, - typeAhead: true, - width: 300, - triggerAction: 'all', - lazyRender:true, - mode: 'local', - store: new Ext.data.ArrayStore({ - fields: ['sid', 'snam'], - data: [[0,"GetLabel('__DISABLED__');?>"], [1,"GetLabel('___ENABLED__');?>"]] - }), - value: , - valueField: 'sid', - displayField: 'snam', - listeners:{ - select: function( t, r, i ){ - doApplicationOperation( 1, i ); - } - } - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'textfield', - fieldLabel: "GetLabel('_REMOTE_SERVER_ADDRESS_');?>", - width: 300, - value: '', - listeners:{ - change: function( a, c, b ){ - doApplicationOperation( 8, c ); - } - } - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'numberfield', - fieldLabel: "GetLabel('_REMOTE_SERVER_PORT_');?>", - width: 300, - value: , - listeners:{ - change: function( a, c, b ){ - doApplicationOperation( 9, c ); - } - } - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'combo', - fieldLabel: "GetLabel('_USE_REMOTE_SERVER_');?>", - editable: false, - typeAhead: true, - width: 300, - triggerAction: 'all', - lazyRender:true, - mode: 'local', - store: new Ext.data.ArrayStore({ - fields: ['sid', 'snam'], - data: [[0,"GetLabel('__DISABLED__');?>"], [1,"GetLabel('___ENABLED__');?>"]] - }), - value: , - valueField: 'sid', - displayField: 'snam', - listeners:{ - select: function( t, r, i ){ - doApplicationOperation( 10, i ); - } - } - },{ - xtype: 'spacer', - height: 10 - },{ - xtype: 'combo', - fieldLabel: "GetLabel('_SKIP_LOCAL_REPORTS_');?>", - editable: false, - typeAhead: true, - width: 300, - triggerAction: 'all', - lazyRender:true, - mode: 'local', - store: new Ext.data.ArrayStore({ - fields: ['sid', 'snam'], - data: [[0,"GetLabel('__DISABLED__');?>"], [1,"GetLabel('___ENABLED__');?>"]] - }), - value: , - valueField: 'sid', - displayField: 'snam', - listeners:{ - select: function( t, r, i ){ - doApplicationOperation( 11, i ); - } - } - }] + items:[] }, { title: "GetLabel('_GEO_LOCATION_');?>", layout: 'column', - items:[{ - columnWidth: 0.83, - frame: false, - border: false, - items: [{ - //layout: 'fit', - //height: PanelH-150, - //flex: 1, - //border: true, - //items:{ - xtype: 'panel', - id: 'sys_location_map', - height: PanelH-170, - html: ' ', - listeners:{ - afterrender: function( t, state ){ - loadLocationEditor('sys_location_map'); - } - } - //} - },{ - layout: 'table', - title: "GetLabel('_SITE_PROP_LBL_');?>", - flex: 1, - defaults: { - bodyStyle:'padding:20px' - }, - layoutConfig: { - // The total column count must be specified here - columns: 8, - textAlign: 'center' - }, - items:[{ - border: false, - id: 'lab_123', - html: "GetLabel('_SYS_ANCHORT_LBL_');?> "+((MAP_IS_LOCAL)?'Pos X':"GetLabel('_LON_SHORT_LBL_');?>")+':' - },{ - xtype: 'numberfield', - width: 100, - decimalPrecision: 8, - id: 'siteLon', - value: SiteLon - },{ - border: false, - id: 'lab_124', - html: ((MAP_IS_LOCAL)?'Pos Y':"GetLabel('_LAT_SHORT_LBL_');?>")+':' - },{ - xtype: 'numberfield', - id: 'siteLat', - decimalPrecision: 8, - width: 100, - value: SiteLat - },{ - border: false, - html: "GetLabel('_ALT_SHORT_LBL_');?>:" - },{ - xtype: 'numberfield', - decimalPrecision: 2, - width: 100, - id: 'siteAlt', - value: SiteAlt - },{ - xtype: 'button', - text: "GetLabel('_UPDATE_LBL_');?>", - handler: updateSiteAnchor - },{ - xtype: 'panel', - frame: false, - border: false, - rowspan: 2, - html: ((MAP_IS_LOCAL)?'':'') - },{ - border: false, - html: "GetLabel('_MAP_TYP_LBL_');?>:" - },/*{ - xtype: 'radio', - name: 'map_type', - boxLabel: 'GetLabel('_MAP_REG_LBL_');?>', - checked: true, - value: 0 - },{ - xtype: 'radio', - name: 'map_type', - boxLabel: 'GetLabel('_MAP_CUST_LBL_');?>', - colspan: 2, - value: 1 - },*/{ - xtype: 'combo', - disabled: false, - typeAhead: true, - triggerAction: 'all', - id: 'siteMap', - lazyRender:true, - colspan: 3, - mode: 'local', - store: mapListStore /*new Ext.data.ArrayStore({ - id: 0, - fields: ['map_id', 'map_text' ], - data: [[1, 'OpenStreetMap'], [2, 'OpenTopoMap'], [3, 'EsriSat'], [4, 'EsriStreet'], [5, 'EsriTopo']] - })*/, - value: MAP_ID, - valueField: 'map_id', - displayField: 'map_name', - listeners:{ - select: function(){ - updateSiteMap(); - LoadNodesList(); - } - } - }/*,{ - xtype: 'button', - disabled: false, - text: 'GetLabel('_EDIT_');?>', - handler: function(){ - editCurrentMap(); - } - }*/,{ - xtype: 'button', - disabled: false, - text: "GetLabel('_DELETE_');?>", - handler: function(){ - deleteCurrentMap(); - } - },{ - - xtype: 'button', - id: 'add-c_map-btn', - disabled: false, - text: "GetLabel('_CREATE_NEW_LBL_');?>", - handler: function(){ - createNewMap(); - } - }] - }] - },{ - //title: 'Properties', - frame: true, - border: false, - xtype: 'panel', - flex: 1, - height: PanelH, - columnWidth: 0.17, - layout: 'fit', - id: 'prop_content', - items:[{ - html: "
GetLabel('_PLS_SEL_LEFT_ITEM_');?>
" - }] - }] + id: 'aps_tab_1', + items:[] }, { title: "GetLabel('_BACKUP_SETTINGS_');?>", xtype: 'form', - id: 'as_dbbackup', + id: 'aps_tab_2', fileUpload: true, labelAlign: 'right', labelWidth: 180, @@ -2794,7 +2544,7 @@ function showSettingsApplication(){ },{ title: "GetLabel('_REPORT_STORAGE_');?>", xtype: 'form', - id: 'as_reposit', + id: 'aps_tab_3', labelAlign: 'right', labelWidth: 180, height: PanelH - 30, @@ -2842,10 +2592,40 @@ function showSettingsApplication(){ xtype: 'spacer', height: 10 }] - }] + },{ + title: "GetLabel('_MULTI_LAYOUT_');?>", + xtype: 'form', + id: 'aps_tab_4', + labelAlign: 'right', + labelWidth: 180, + height: PanelH - 30, + items:[] + }], + listeners:{ + tabchange: function( tp, t ){ + switch( t.getId() ){ + case 'aps_tab_0': content_lvl3 = 0; break; + case 'aps_tab_1': content_lvl3 = 1; break; + case 'aps_tab_2': content_lvl3 = 2; break; + case 'aps_tab_3': content_lvl3 = 3; break; + case 'aps_tab_4': content_lvl3 = 4; break; + case 'aps_tab_5': content_lvl3 = 5; break; + }; + loadApplicationSettings( content_lvl3 ); + updateUserContent(); + }, + afterrender: function(){ + //settingsAreChanged = false; + } + } }); tPanel.doLayout(); - updateUserContent(); + loadApplicationSettings( content_lvl3 ); + //updateUserContent(); +}; + +function showMultyLayoutEditor(){ + alert('KAKA'); }; function showSettingsUpgrade(){ @@ -3223,7 +3003,9 @@ function initSettingsView(){ pressed: ( content_lvl2 == 3 && content_lvl1 == 0 ), allowDepress: false, toggleGroup: 'sys_settings', - handler: showSettingsApplication + handler: function(){ + showSettingsApplication( content_lvl3 ); + } } ] diff --git a/lib/javascript/jsapi_dynamic/mojo_windows.js b/lib/javascript/jsapi_dynamic/mojo_windows.js new file mode 100644 index 0000000..35b81c1 --- /dev/null +++ b/lib/javascript/jsapi_dynamic/mojo_windows.js @@ -0,0 +1,188 @@ +// + +var mWindowID = ; +var mAuxWindows = []; + +function isMasterWindow(){ + var cWindowSessionID = window.localStorage.getItem("cWindowSID"); + if( cWindowSessionID == undefined ){ + window.localStorage.clear(); + window.localStorage.setItem("cWindowSID", '' ); + } else { + if( cWindowSessionID != '' ){ + window.localStorage.clear(); + window.localStorage.setItem("cWindowSID", '' ); + } else { + + return false; + }; + }; + return true; +}; + +function refreshAuxWindows(){ + +}; +function closeAuxWindows(){ + +}; +function isFullScreen() { + return document.fullscreenElement !== null; +} + +let previousX = window.screenX; +let previousY = window.screenY; + +setInterval(() => { + const currentX = window.screenX; + const currentY = window.screenY; + if (currentX !== previousX || currentY !== previousY) { + // Window has moved + console.log("Window moved!"); + console.log("New Position X:", currentX, "Y:", currentY); + previousX = currentX; + previousY = currentY; + } +}, 700); // Check every 700 milliseconds + +/* +if (!('getScreenDetails' in window)) { + // Returning a one-element array with the current screen, + // noting that there might be more. + window.getScreenDetails = async () => [window.screen]; + // Set to `false`, noting that this might be a lie. + window.screen.isExtended = false; +} +*/ +async function getDisplayInfo() { + if (window.screen.isExtended) { + console.log("Multiple displays detected."); + } else { + console.log("Single display detected."); + } + + if ('getScreenDetails' in window) { + try { + const screenDetails = await window.getScreenDetails(); + screenDetails.screens.forEach((screen, index) => { + console.log(`Display ${index + 1}:`); + console.log(` Width: ${screen.width}`); + console.log(` Height: ${screen.height}`); + console.log(` Left: ${screen.left}`); + console.log(` Top: ${screen.top}`); + }); + } catch (error) { + console.error("Error getting screen details:", error); + } + } else { + console.log("window.getScreenDetails() is not supported."); + console.log(`Display 0:`); + console.log(` Width: ${window.screen.width}`); + console.log(` Height: ${window.screen.height}`); + console.log(` Left: ${window.screen.left}`); + console.log(` Top: ${window.screen.top}`); + } +}; + +function doCheckWindowSize(){ + //var zz = window.getScreenDetails(); + + if ('getScreenDetails' in window) { + screenDetails = window.getScreenDetails(); + screenDetails.addEventListener('screenschange', (event) => { + if (screenDetails.screens.length !== currentScreenLength) { + currentScreenLength = screenDetails.screens.length; + //updateScreenInfo(); + } + }); + try { + permission = + ((navigator.permissions.query({ name: 'window-management' })).state === 'granted') + ? 'Granted' + : 'No Permission'; + } catch (err) { + console.error(err); + } + currentScreenLength = screenDetails.screens.length; + //updateScreenInfo(); + } else { + screenDetails = window.screen; + permission = 'Window Management API - NOT SUPPORTED'; + currentScreenLength = 1; + //updateScreenInfo(); + }; + + getDisplayInfo(); + + if( isMasterWindow() ){ + //window.open('/?w=1', 'app_second', 'location=0,menubar=0,status=0,titlebar=0,toolbar=0,left=20,top=20,width=' + screen.availWidth + ',height=' + screen.availHeight); + if (parseInt(navigator.appVersion)>3) { + if (navigator.appName=="Netscape") { + winW2 = window.innerWidth; + winH2 = window.innerHeight; + if ( winH2<700 ) winH2=700; + }; + if (navigator.appName.indexOf("Microsoft")!=-1) { + winW2 = document.body.offsetWidth; + winH2 = document.body.offsetHeight; + if ( winH2<700 ) winH2=700; + }; + }; + if ( winW2 != winW || winH2!=winH ){ + updateUserScreenResolution( winW2, winH2 ); + }; + } else { + //requestBodyFullscreen(); + //alert( "AUX Window:"+mWindowID ); + }; +}; +function requestBodyFullscreen() { + const body = document.body; + if (body.requestFullscreen) { + body.requestFullscreen(); + } else if (body.mozRequestFullScreen) { /* Firefox */ + body.mozRequestFullScreen(); + } else if (body.webkitRequestFullscreen) { /* Chrome, Safari, Opera */ + body.webkitRequestFullscreen(); + } else if (body.msRequestFullscreen) { /* IE/Edge */ + body.msRequestFullscreen(); + } +}; +function exitBodyFullscreen() { + if (document.exitFullscreen) { + document.exitFullscreen(); + } else if (document.mozCancelFullScreen) { /* Firefox */ + document.mozCancelFullScreen(); + } else if (document.webkitExitFullscreen) { /* Chrome, Safari, Opera */ + document.webkitExitFullscreen(); + } else if (document.msExitFullscreen) { /* IE/Edge */ + document.msExitFullscreen(); + } +}; + +function initMultiWindows(){ + return; + document.addEventListener('fullscreenchange', function() { + if (isFullScreen()) { + console.log("Fullscreen mode activated."); + } else { + console.log("Fullscreen mode deactivated."); + } + }); + document.addEventListener("fullscreenerror", (event) => { + console.log("Fullscreen Error."); + }); + if( mWindowID == 0 ){ + + } else { + //Unreg Windows + mAuxWindows = undefined; + + window.addEventListener('beforeunload', function(event) { + console.log("BeforeUnload Woerks!"); + //event.preventDefault(); + //event.returnValue = null; + }); + }; + doCheckWindowSize(); +}; \ No newline at end of file diff --git a/lib/javascript/jsapi_dynamic/rgoose_devices.js b/lib/javascript/jsapi_dynamic/rgoose_devices.js index 469db0c..419a265 100644 --- a/lib/javascript/jsapi_dynamic/rgoose_devices.js +++ b/lib/javascript/jsapi_dynamic/rgoose_devices.js @@ -1768,748 +1768,3 @@ function startAdvancedDeviceDetection( NodeID ){ }; loadAdvancedDeviceDetectionSettings(); }; - -var maskEditorDiv = null; -var MEPanel = null; -function handleFSMaskEditorClose( event ){ - if ( document.fullscreenElement || - document.webkitFullscreenElement || - document.mozFullScreenElement || - document.msFullscreenElement ){ - } else { - MEPanel.destroy(); - maskEditorDiv.remove(); - MaskEditorActive = false; - maskEditorDiv = null; - MEPanel = null; - document.removeEventListener( 'fullscreenchange', handleFSMaskEditorClose ); - }; -}; - -function hideMaskEditor(){ - MaskEditorActive = false; - if( - document.fullscreenElement || - document.webkitFullscreenElement || - document.mozFullScreenElement || - document.msFullscreenElement - ){ - if( document.exitFullscreen ){ - document.exitFullscreen(); - }else if( document.mozCancelFullScreen ){ - document.mozCancelFullScreen(); - }else if( document.webkitExitFullscreen ){ - document.webkitExitFullscreen(); - }else if( document.msExitFullscreen ){ - document.msExitFullscreen(); - }; - // Removal Done by event! - //maskEditorDiv.remove(); - //maskEditorDiv = null; - //document.removeEventListener( 'fullscreenchange', handleFSMaskEditorClose ); - }; -}; -var values = { - paths: 50, - minPoints: 5, - maxPoints: 15, - minRadius: 30, - maxRadius: 90 -}; - -var hitOptions = { - segments: true, - stroke: true, - fill: true, - tolerance: 10 -}; - -var polycolors = new Array(); -var polyindex = 0; -var poligones = new Array(); - -var segment = null; -var path = null; -var MaskProject = null; -var MaskEditorMode = 0; - -function onMouseDown(event) { - segment = path = null; - var hitResult = MaskProject.hitTest( event.point, hitOptions ); - if (!hitResult) return; - - if( event.modifiers.shift ){ - if (hitResult.type == 'segment') { - hitResult.segment.remove(); - }; - return; - }; - if( hitResult ){ - path = hitResult.item; - if( hitResult.type == 'segment' ){ - segment = hitResult.segment; - path.fullySelected = false; - segment.selected = true; - } else if( hitResult.type == 'stroke' ){ - var location = hitResult.location; - segment = path.insert(location.index + 1, event.point); - //path.smooth(); - path.fullySelected = false; - segment.selected = true; - } else if ( hitResult.type == 'fill' ){ - path.fullySelected = true; - }; - } - //movePath = ; - //if( movePath ) MaskProject.activeLayer.addChild(hitResult.item); -} -var c_m_X = 0; -var c_m_Y = 0; -function onMouseMove( e ) { - //e.preventDefault(); - //e.stopPropagation(); - var mx = parseInt( e.offsetX - deviceMapLeftShift ); - var my = parseInt( e.offsetY - deviceMapTopShift ); - if( ( mx != c_m_X ) || ( my!= c_m_Y ) ){ - c_m_X = mx; - c_m_Y = my; - var t = Ext.getCmp('me_coords_panel'); - if( t!= undefined ){ - var k = 2048 / ( cMapImageWidth ); - var j = 2048 / ( cMapImageHeight ); - var jaja = parseInt( mx * k - 1024 ); - var juju = parseInt( my * j - 1024 ); - if( juju != 0 ){ - if( juju < 0 ){ - az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+90).toFixed(1); - } else { - az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+270).toFixed(1); - }; - } else { - if( jaja < 0 ) { - az = 90; - } else { - az = 270; - }; - }; - range = ( ( ME_max_range / 1024 ) * Math.sqrt( Math.pow( jaja, 2 ) + Math.pow( juju, 2 ) )).toFixed(2); - t.update('Range:' + range + ' m. Azimuth:' + az + '°'); - }; - }; -} -function onPathMouseMove( event ) { - //event.preventDefault(); - //event.stopPropagation(); - var mx = event.point.x - deviceMapLeftShift; - var my = event.point.y - deviceMapTopShift; - if( ( mx != c_m_X ) || ( my != c_m_Y ) ){ - c_m_X = mx; - c_m_Y = my; - var t = Ext.getCmp('me_coords_panel'); - if( t!= undefined ){ - t.update(''+c_m_X+'x'+c_m_Y+''); - }; - }; - //MaskProject.activeLayer.selected = false; - //if( event.item ) { - //event.item.selected = true; - // event.item.fullySelected = true; - //}; -} - -function onMouseDrag(event) { - var mx = event.point.x - deviceMapLeftShift; - var my = event.point.y - deviceMapTopShift; - if( ( mx != c_m_X ) || ( my != c_m_Y ) ){ - c_m_X = mx; - c_m_Y = my; - var t = Ext.getCmp('me_coords_panel'); - if( t!= undefined ){ - var k = 2048 / ( cMapImageWidth ); - var j = 2048 / ( cMapImageHeight ); - var jaja = parseInt( c_m_X * k - 1024 ); - var juju = parseInt( c_m_Y * j - 1024 ); - if( juju != 0 ){ - if( juju < 0 ){ - az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+90).toFixed(1); - } else { - az = ( Math.atan( jaja / juju ) * ( 180 / Math.PI )+270).toFixed(1); - }; - } else { - if( jaja < 0 ) { - az = 90; - } else { - az = 270; - }; - }; - range = ( ( ME_max_range / 1024 ) * Math.sqrt( Math.pow( jaja, 2 ) + Math.pow( juju, 2 ) )).toFixed(2); - t.update('Range:' + range + ' m. Azimuth:' + az + '°'); - }; - }; - if( segment ){ - //segment.point += event.delta; - segment.point = event.point; - //path.smooth(); - }; - //else if (path) { - // path.position += event.delta; - //} -} -var absDrawMapSizes = [[4096,4096],[2304,288]]; -var deviceMapScaling = 1.0; -var deviceMapTopShift = 100; -var deviceMapLeftShift = 100; -var cMapImageWidth = 0; -var cMapImageHeight = 0; -var cMapCanvasWidth = 0; -var cMapCanvasHeight = 0; -var cMapType = 0; -var cMaskLRF = 0; -var cMaskID = 0; - -function SaveCurrentMask( NodeID, MaskID, LRFID ){ - var serial = MaskProject.exportJSON(); - Ext.Ajax.request({ - url: '/lib/controller/uploadDeviceMask.php', - params: { - NID: NodeID, - UID: 'Data['id'];?>', - SID: '', - MID: MaskID, - LID: LRFID, - MDTA: serial, - MIH: cMapImageHeight, - MIW: cMapImageWidth, - MSHX: deviceMapLeftShift, - MSHY: deviceMapTopShift, - DSTD: 1 - }, - success: function( response, opts ){ - //var data = Ext.decode(response.responseText); - //hideMaskEditor(); - }, - failure: failureAJAXFunction - }); -} - - -function doMaskOperation( NodeID, Cmd, Mid = 0, LRFID = 0 ){ - Ext.Ajax.request({ - url: '/lib/controller/doMaskOperation.php', - params: { - NID: NodeID, - UID: 'Data['id'];?>', - SID: '', - CMD: Cmd, - MID: Mid, - LID: LRFID - }, - success: function( response, opts ){ - load2DMasks( NodeID ); - }, - failure: failureAJAXFunction - }); -} - -var ME_max_range = 100; -function showMaskEditor( fromDevTool, DevType, NodeID ){ - //alert( "DevType: "+DevType + " Dev Map size: "+ absDrawMapSizes[DevType][0]+"x"+absDrawMapSizes[DevType][1] ); - cMapType = DevType; - if( DevType == 1 ){ - deviceMapScaling = ( window.screen.height * window.devicePixelRatio - 130 - ( deviceMapTopShift * 2 )) / absDrawMapSizes[DevType][1]; - } else { - deviceMapScaling = ( window.screen.width * window.devicePixelRatio - 30 - ( deviceMapLeftShift * 2 )) / absDrawMapSizes[DevType][0]; - }; - cMapImageHeight = deviceMapScaling * absDrawMapSizes[DevType][1]; - cMapImageWidth = deviceMapScaling * absDrawMapSizes[DevType][0]; - cMapCanvasWidth = cMapImageWidth + (deviceMapLeftShift * 2); - cMapCanvasHeight = cMapImageHeight + (deviceMapTopShift * 2); - if( fromDevTool ){ - detectionProfileWindow.hide(); - }; - if( - document.fullscreenElement || - document.webkitFullscreenElement || - document.mozFullScreenElement || - document.msFullscreenElement - ){ - //fs mode allready - hideMaskEditor(); - }else{ - if( maskEditorDiv == null ){ - maskEditorDiv = document.createElement("div"); - maskEditorDiv.style.height="200px"; - maskEditorDiv.style.width="200px"; - maskEditorDiv.style.position="relative"; - //var svg = document.getElementById('draw_svg_'+parseInt( NodeID ) ); - //var svgCode = window.btoa(svg.outerHTML); - //maskEditorDiv.style.background = "url(data:image/svg+xml;base64," + svgCode + ")"; - //maskEditorDiv.style.background = 'solid red;'; - //maskEditorDiv.style.backgroundImage = "url('style/wicons/011.png')"; - //append div as a child to body - document.body.appendChild( maskEditorDiv ); - //var elem = document.createElement("img"); 'getDeviceMap.php?NID='+NodeID - //elem.setAttribute("src", "/lib/controller/data/device_draws/75c85fec4be204fc0bc0452f53b5a3df_map.png"); - //elem.setAttribute("height", "80%"); - //elem.setAttribute("width", "130"); - //maskEditorDiv.appendChild( elem ); - //alert( window.screen.width * window.devicePixelRatio + "x" + window.screen.height * window.devicePixelRatio); - if( MEPanel == null ){ - var ww = window.screen.width * window.devicePixelRatio; - var hh = window.screen.height * window.devicePixelRatio; - MEPanel = new Ext.Panel( { - title: 'Mask Editor', - renderTo: maskEditorDiv, - width: ww, - height: hh, - frame: true, - autoScroll: true, - items:[{ - xtype: 'panel', - width: cMapCanvasWidth, - //html: '
', - html: '
', - listeners:{ - afterrender: function(){ - //Doing a custom svg here for background! - var chicha = document.getElementById( 'popomas' ); - var cSensor = getSensorByNodeId( NodeID ); - if( cSensor!= null ){ - ME_max_range = cSensor.max_range; - } else { - ME_max_range = 100; - }; - //var svg = document.getElementById('draw_svg_'+parseInt( NodeID ) ); - //var svgCode = window.btoa(svg.outerHTML); - //chicha.style.backgroundImage = "url(data:image/svg+xml;base64," + svgCode + ")"; - //chicha.style.backgroundImage = "url('style/wicons/011.png')"; - $("#mask_canvas").mousemove( onMouseMove ); - MaskEditorActive = true; - MaskEditorDevice = NodeID; - loadMaskDraw( NodeID ); - } - } - }], - tbar:[{ - text:'New Polygone', - id: 'me_b_newp', - enableToggle: true, - toggleGroup: 'me_topbar_grp', - pressed: false, - handler: function( btn ){ - if( btn.pressed ) setMaskEditorMode( 0 ); - } - }/*,{ - text:'Delete Polygone', - id: 'me_b_delp', - enableToggle: true, - toggleGroup: 'me_topbar_grp' - },{ - text:'Delete Point', - id: 'me_b_delpo', - enableToggle: true, - toggleGroup: 'me_topbar_grp' - }*/,{ - text:'Clear Mask', - id: 'me_b_delm', - handler: function(){ - if( MaskProject!= null ){ - doMaskOperation( NodeID, 3, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - setMaskEditorMode( 0 ); - } - },{ - text:'1', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: (cMaskID == 0 ), - handler: function(){ - if( cMaskID != 0 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 0; - loadDeviceMask( NodeID, cMaskID ); - } - },{ - text:'2', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: ( cMaskID == 1 ), - handler: function(){ - if( cMaskID != 1 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 1; - loadDeviceMask( NodeID, cMaskID ); - } - },{ - text:'3', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: ( cMaskID == 2 ), - handler: function(){ - if( cMaskID != 2 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 2; - loadDeviceMask( NodeID, cMaskID ); - } - },{ - text:'4', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: ( cMaskID == 3 ), - handler: function(){ - if( cMaskID != 3 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 3; - loadDeviceMask( NodeID, cMaskID ); - } - },{ - text:'5', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: ( cMaskID == 4 ), - handler: function(){ - if( cMaskID != 4 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 4; - loadDeviceMask( NodeID, cMaskID ); - } - },{ - text:'Acknowladge Mask', - enableToggle: true, - toggleGroup: 'me_maskbar_grp', - pressed: ( cMaskID == 5 ), - handler: function(){ - if( cMaskID != 5 ){ - SaveCurrentMask( NodeID, cMaskID ); - }; - MaskProject = new paper.Project( canvas ); - paper.view.draw(); - cMaskID = 5; - loadDeviceMask( NodeID, cMaskID ); - } - },'->',{ - xtype: 'panel', - frame: 'false', - id: 'me_coords_panel', - border: true, - width: 230, - height: 30, - html: '

' - }], - buttons:[{ - text: 'Cancel', - handler: function(){ - hideMaskEditor(); - } - },{ - text:'Save Mask and Close', - handler: function(){ - var serial = MaskProject.exportJSON(); - Ext.Ajax.request({ - url: '/lib/controller/uploadDeviceMask.php', - params: { - NID: NodeID, - UID: 'Data['id'];?>', - SID: '', - MID: cMaskID, - LID: 0, - MDTA: serial, - MIH: cMapImageHeight, - MIW: cMapImageWidth, - //MSF: deviceMapScaling, - MSHX: deviceMapLeftShift, - MSHY: deviceMapTopShift, - DSTD: 0 - }, - success: function( response, opts ){ - var data = Ext.decode(response.responseText); - hideMaskEditor(); - load2DMasks( NodeID ); - }, - failure: failureAJAXFunction - }); - } - }] - }); - }; - MEPanel.doLayout(); - //if( MaskProject == null ){ - var canvas = document.getElementById('mask_canvas'); - paper.settings.handleSize = 10; - MaskProject = new paper.Project( canvas ); - //canvas.addEventListener( 'mousemove', onMaskMouseMove ); - canvas.addEventListener( 'mousedown', onMaskMouseDown ); - //canvas.addEventListener( 'mouseup', onMaskMouseUp ); - //canvas.addEventListener( 'mousedrag', onMaskMouseMove ); - //}; - cMaskID = 0; - loadDeviceMask( NodeID, cMaskID ); - }; - //maskEditorDiv = $('#container').get(0); - //var maskEditorDiv = document.getElementById( id ); //Ext.getCmp( id ); - if( maskEditorDiv.requestFullscreen ){ - maskEditorDiv.requestFullscreen(); - }else if( maskEditorDiv.mozRequestFullScreen ){ - maskEditorDiv.mozRequestFullScreen(); - }else if( maskEditorDiv.webkitRequestFullscreen ){ - maskEditorDiv.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); - }else if( maskEditorDiv.msRequestFullscreen ){ - maskEditorDiv.msRequestFullscreen(); - }; - document.addEventListener( 'fullscreenchange', handleFSMaskEditorClose ); - }; -}; - -function loadMaskDraw( a ){ - Ext.Ajax.request({ - url: '/lib/controller/getDeviceDraw.php', - params: { - UID: , - SID: '', - NID: a - }, - success: function( response, opts ){ - var data = Ext.decode(response.responseText); - if( data.count > 0 ){ - //draws_2d[a] = data.data; - var csvg = document.getElementById( 'draw_svg_me' ); - - if( csvg != undefined ){ - var draw = csvg.getElementById( "draw" ); - if( draw != null ) csvg.removeChild( draw ); - - var p2 = 2.0*Math.PI; - var so = 0;//-10 * p2 / 360.0; - - var bBox = csvg.getBBox(); - var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon"); - var ak = 2.0*Math.PI/draws_2d[a].length; - var cpx = bBox.width / 2.0; - var cpy = bBox.height / 2.0; - var max = 1024; - //switch( drawZoomLevels[a] ){ - // case 50: max = 512; break; - // case 25: max = 256; break; - // case 12: max = 128; break; - //}; - var rk = bBox.width / ( max * 2 ); - var pp = ''; - var jj = ''; - for( i=0;iData['id'];?>', - SID: '', - MID: LayerID, - LID: LrfID - }, - success: function( response, opts ){ - var data = Ext.decode(response.responseText); - - if( data.length > 0 ){ - for( i = 0; i < data.length; i++ ){ - //var - path = new paper.Path(); - path.strokeColor = 'black'; - //var lightness = (Math.random() - 0.5) * 0.4 + 0.4; - //var hue = Math.random() * 360; - //path.fillColor = { hue: hue, saturation: 1, lightness: lightness }; - path.fillColor = data[i].colour; - path.closed = true; - path.opacity = 0.5; - //path.onMouseMove = onPathMouseMove; - path.onMouseDown = onMouseDown; - path.onMouseDrag = onMouseDrag; - //path.onMouseUp = function( event ){ - // path.add(event.point); - //} - if( data[i].points.length > 2 ){ - if( cMapType == 1 ){ - var tX = data[i].points[0][0] * deviceMapScaling + deviceMapLeftShift; - var tY = data[i].points[0][1] * deviceMapScaling + deviceMapTopShift; - path.moveTo( [tX,tY] ); - for(k = 1; k < data[i].points.length; k++ ){ - tX = data[i].points[k][0] * deviceMapScaling + deviceMapLeftShift; - tY = data[i].points[k][1] * deviceMapScaling + deviceMapTopShift; - path.lineTo( [tX,tY] ); - }; - } else { - var tX = ( 2047 + parseInt( data[i].points[0][0]) ) * deviceMapScaling + deviceMapLeftShift; - var tY = ( 2047 + parseInt( data[i].points[0][1]) ) * deviceMapScaling + deviceMapTopShift; - path.moveTo( [tX,tY] ); - for(k = 1; k < data[i].points.length; k++ ){ - tX = ( 2047 + parseInt(data[i].points[k][0]) ) * deviceMapScaling + deviceMapLeftShift; - tY = ( 2047 + parseInt(data[i].points[k][1]) ) * deviceMapScaling + deviceMapTopShift; - path.lineTo( [tX,tY] ); - }; - }; - path.fullySelected = true; - paper.view.draw(); - }; - poligones.push(path); - setMaskEditorMode( 4 ); - }; - } else { - setMaskEditorMode( 0 ); - }; - }, - failure: failureAJAXFunction - }); -}; - -function onMaskMouseDown( evt ){ - switch( MaskEditorMode ){ - case 0:{ - path = new paper.Path(); - path.strokeColor = 'black'; - path.fillColor = '#ff8020'; - path.onMouseDown = onMouseDown; - path.onMouseDrag = onMouseDrag; - //path.onMouseMove = onPathMouseMove; - path.fullySelected = true; - path.closed = true; - path.opacity = 0.5; - path.moveTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); - setMaskEditorMode( 1 ); - break; - }; - case 1:{ - path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); - if( path.segments.length == 3 ){ - setMaskEditorMode( 4 ); - }; - }; - }; - //if( MaskEditorMode == 0 ){ - // - //} else { - // path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); - //}; -}; - -function onMaskMouseUp( evt ){ - if( MaskEditorMode == 4 ){ - //path.lineTo( [ evt.pageX - $(document).scrollLeft() - $('#mask_canvas').offset().left, evt.pageY - $(document).scrollTop() - $('#mask_canvas').offset().top ] ); - path.fullySelected = true; - path.onMouseDown = onMouseDown; - path.onMouseDrag = onMouseDrag; - //path.onMouseMove = onPathMouseMove; - paper.view.draw(); - //poligones.push( path ); - setMaskEditorMode( 1 ); - }; -}; - -function onMaskMouseMove( event ){ - if( MaskEditorMode == 4 ){ - //paper.view.draw(); - }; -}; - - - diff --git a/lib/javascript/jsapi_static/mojo_general.js b/lib/javascript/jsapi_static/mojo_general.js index 6a75a0f..9e429c2 100644 --- a/lib/javascript/jsapi_static/mojo_general.js +++ b/lib/javascript/jsapi_static/mojo_general.js @@ -294,3 +294,8 @@ function unix_ts_renderer( val ){ }; +function uuidv4() { + return "10000000-1000-4000-8000-100000000000".replace(/[018]/g, c => + (c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) + ); +} diff --git a/lib/javascript/jsapi_static/mojo_portal.js b/lib/javascript/jsapi_static/mojo_portal.js new file mode 100644 index 0000000..0a7a8f6 --- /dev/null +++ b/lib/javascript/jsapi_static/mojo_portal.js @@ -0,0 +1,239 @@ +/*! + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.ux.Portal = Ext.extend(Ext.Panel, { + layout : 'column', + autoScroll : true, + cls : 'x-portal', + defaultType : 'portalcolumn', + + initComponent : function(){ + Ext.ux.Portal.superclass.initComponent.call(this); + this.addEvents({ + validatedrop:true, + beforedragover:true, + dragover:true, + beforedrop:true, + drop:true + }); + }, + + initEvents : function(){ + Ext.ux.Portal.superclass.initEvents.call(this); + this.dd = new Ext.ux.Portal.DropZone(this, this.dropConfig); + }, + + beforeDestroy : function() { + if(this.dd){ + this.dd.unreg(); + } + Ext.ux.Portal.superclass.beforeDestroy.call(this); + } +}); + +Ext.reg('portal', Ext.ux.Portal); + +Ext.ux.Portal.DropZone = Ext.extend(Ext.dd.DropTarget, { + + constructor : function(portal, cfg){ + this.portal = portal; + Ext.dd.ScrollManager.register(portal.body); + Ext.ux.Portal.DropZone.superclass.constructor.call(this, portal.bwrap.dom, cfg); + portal.body.ddScrollConfig = this.ddScrollConfig; + }, + + ddScrollConfig : { + vthresh: 50, + hthresh: -1, + animate: true, + increment: 200 + }, + + createEvent : function(dd, e, data, col, c, pos){ + return { + portal: this.portal, + panel: data.panel, + columnIndex: col, + column: c, + position: pos, + data: data, + source: dd, + rawEvent: e, + status: this.dropAllowed + }; + }, + + notifyOver : function(dd, e, data){ + var xy = e.getXY(), portal = this.portal, px = dd.proxy; + + // case column widths + if(!this.grid){ + this.grid = this.getGrid(); + } + + // handle case scroll where scrollbars appear during drag + var cw = portal.body.dom.clientWidth; + if(!this.lastCW){ + this.lastCW = cw; + }else if(this.lastCW != cw){ + this.lastCW = cw; + portal.doLayout(); + this.grid = this.getGrid(); + } + + // determine column + var col = 0, xs = this.grid.columnX, cmatch = false; + for(var len = xs.length; col < len; col++){ + if(xy[0] < (xs[col].x + xs[col].w)){ + cmatch = true; + break; + } + } + // no match, fix last index + if(!cmatch){ + col--; + } + + // find insert position + var p, match = false, pos = 0, + c = portal.items.itemAt(col), + items = c.items.items, overSelf = false; + + for(var len = items.length; pos < len; pos++){ + p = items[pos]; + var h = p.el.getHeight(); + if(h === 0){ + overSelf = true; + } + else if((p.el.getY()+(h/2)) > xy[1]){ + match = true; + break; + } + } + + pos = (match && p ? pos : c.items.getCount()) + (overSelf ? -1 : 0); + var overEvent = this.createEvent(dd, e, data, col, c, pos); + + if(portal.fireEvent('validatedrop', overEvent) !== false && + portal.fireEvent('beforedragover', overEvent) !== false){ + + // make sure proxy width is fluid + px.getProxy().setWidth('auto'); + px.getProxy().colspan = 2; + //px.getProxy().setHeight(400); + if(p){ + px.moveProxy(p.el.dom.parentNode, match ? p.el.dom : null); + }else{ + px.moveProxy(c.el.dom, null); + } + + this.lastPos = {c: c, col: col, p: overSelf || (match && p) ? pos : false}; + this.scrollPos = portal.body.getScroll(); + + portal.fireEvent('dragover', overEvent); + + return overEvent.status; + }else{ + return overEvent.status; + } + + }, + + notifyOut : function(){ + delete this.grid; + }, + + notifyDrop : function(dd, e, data){ + delete this.grid; + if(!this.lastPos){ + return; + } + var c = this.lastPos.c, + col = this.lastPos.col, + pos = this.lastPos.p, + panel = dd.panel, + dropEvent = this.createEvent(dd, e, data, col, c, + pos !== false ? pos : c.items.getCount()); + + if(this.portal.fireEvent('validatedrop', dropEvent) !== false && + this.portal.fireEvent('beforedrop', dropEvent) !== false){ + + dd.proxy.getProxy().remove(); + panel.el.dom.parentNode.removeChild(dd.panel.el.dom); + + if(pos !== false){ + c.insert(pos, panel); + }else{ + c.add(panel); + } + + c.doLayout(); + + this.portal.fireEvent('drop', dropEvent); + + // scroll position is lost on drop, fix it + var st = this.scrollPos.top; + if(st){ + var d = this.portal.body.dom; + setTimeout(function(){ + d.scrollTop = st; + }, 10); + } + + } + delete this.lastPos; + }, + + // internal cache of body and column coords + getGrid : function(){ + var box = this.portal.bwrap.getBox(); + box.columnX = []; + this.portal.items.each(function(c){ + box.columnX.push({x: c.el.getX(), w: c.el.getWidth()}); + }); + return box; + }, + + // unregister the dropzone from ScrollManager + unreg: function() { + Ext.dd.ScrollManager.unregister(this.portal.body); + Ext.ux.Portal.DropZone.superclass.unreg.call(this); + } +}); + +/*! + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.ux.PortalColumn = Ext.extend(Ext.Container, { + layout : 'anchor', + //layout : 'table', + //autoEl : 'div',//already defined by Ext.Component + defaultType : 'portlet', + cls : 'x-portal-column' +}); + +Ext.reg('portalcolumn', Ext.ux.PortalColumn); + + +/*! + * Ext JS Library 3.3.1 + * Copyright(c) 2006-2010 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +Ext.ux.Portlet = Ext.extend(Ext.Panel, { + anchor : '100%', + frame : true, + colspan: 2, + collapsible : true, + draggable : true, + cls : 'x-portlet' +}); + +Ext.reg('portlet', Ext.ux.Portlet); \ No newline at end of file diff --git a/lib/version.var b/lib/version.var index 1c8d632..ccf0179 100644 --- a/lib/version.var +++ b/lib/version.var @@ -1 +1 @@ -20240219 \ No newline at end of file +20250810 \ No newline at end of file