Сообщение на главной странице
This commit is contained in:
@ -10,20 +10,20 @@ spring:
|
|||||||
application:
|
application:
|
||||||
name: org.ccalm.main
|
name: org.ccalm.main
|
||||||
datasource:
|
datasource:
|
||||||
#url: jdbc:postgresql://91.201.214.156:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000
|
url: jdbc:postgresql://91.201.214.156:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000
|
||||||
url: jdbc:postgresql://91.201.214.156:5432/CCALM?ApplicationName=org_ccalm_main
|
|
||||||
username: postgres
|
username: postgres
|
||||||
password: 309A86FF65A78FB428F4E38DFE35F730
|
password: 309A86FF65A78FB428F4E38DFE35F730
|
||||||
driver-class-name: org.postgresql.Driver
|
driver-class-name: org.postgresql.Driver
|
||||||
hikari:
|
hikari:
|
||||||
maximum-pool-size: 10
|
maximum-pool-size: 10
|
||||||
minimum-idle: 5
|
minimum-idle: 5
|
||||||
max-lifetime: 600000
|
max-lifetime: 1740000
|
||||||
idle-timeout: 300000
|
idle-timeout: 300000
|
||||||
connection-timeout: 30000
|
connection-timeout: 30000
|
||||||
connection-test-query: SELECT 1
|
connection-test-query: SELECT 1
|
||||||
validation-timeout: 5000
|
validation-timeout: 5000
|
||||||
validation-interval: 60000
|
leak-detection-threshold: 30000
|
||||||
|
keepalive-time: 60000
|
||||||
redis:
|
redis:
|
||||||
host: 127.0.0.1
|
host: 127.0.0.1
|
||||||
port: 6379
|
port: 6379
|
||||||
|
|||||||
3
pom.xml
3
pom.xml
@ -57,8 +57,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<version>42.7.4</version>
|
<version>42.7.5</version>
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.json</groupId>
|
<groupId>org.json</groupId>
|
||||||
|
|||||||
@ -43,7 +43,8 @@ public class SendWarning {
|
|||||||
HttpHeaders headers = new HttpHeaders();
|
HttpHeaders headers = new HttpHeaders();
|
||||||
headers.setContentType(MediaType.APPLICATION_JSON);
|
headers.setContentType(MediaType.APPLICATION_JSON);
|
||||||
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(request, headers);
|
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(request, headers);
|
||||||
String url = "https://geoserver2.ccalm.org/geodatalist/getAirTemperature";
|
//String url = "https://geoserver2.ccalm.org/geodatalist/getAirTemperature";
|
||||||
|
String url = "https://geoserver.ccalm.org/geodatalist/getAirTemperature";
|
||||||
try {
|
try {
|
||||||
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, entity, Map.class);
|
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, entity, Map.class);
|
||||||
if (response.getStatusCode() == HttpStatus.OK && response.getBody() != null) {
|
if (response.getStatusCode() == HttpStatus.OK && response.getBody() != null) {
|
||||||
|
|||||||
@ -5,6 +5,9 @@
|
|||||||
<title>Automated system of data collection</title>
|
<title>Automated system of data collection</title>
|
||||||
<meta name="yandex-verification" content="2cb5374be0668fe9" />
|
<meta name="yandex-verification" content="2cb5374be0668fe9" />
|
||||||
|
|
||||||
|
<script src="../resources/metadata/dbms/tools.js?v=9"></script>
|
||||||
|
<script src="../resources/metadata/dbms/window.js?v=10"></script>
|
||||||
|
|
||||||
<meta name="description" content="According to the implementation of the Road Map program to improve national and regional locust control in the Caucasus and Central Asia (CCA) developed a system of monitoring and analysis designed to control locusts in the CCA using a geographic information system and remote sensing technology">
|
<meta name="description" content="According to the implementation of the Road Map program to improve national and regional locust control in the Caucasus and Central Asia (CCA) developed a system of monitoring and analysis designed to control locusts in the CCA using a geographic information system and remote sensing technology">
|
||||||
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
@ -46,6 +49,15 @@
|
|||||||
window.location.href = "ccalm.org";
|
window.location.href = "ccalm.org";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
const message = url.searchParams.get('msg');
|
||||||
|
if (message) {
|
||||||
|
alert2(trt('Alert'),trt(message));
|
||||||
|
url.searchParams.delete('msg');
|
||||||
|
window.history.replaceState({}, document.title, url);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@ -323,7 +323,7 @@
|
|||||||
if (data.error_code == 0) {
|
if (data.error_code == 0) {
|
||||||
window.location.href = "/engine";
|
window.location.href = "/engine";
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt(data.error_message));
|
errorDialog(data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
||||||
@ -340,7 +340,7 @@
|
|||||||
if (data.error_code == 0) {
|
if (data.error_code == 0) {
|
||||||
window.location.href = "/engine";
|
window.location.href = "/engine";
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt(data.error_message));
|
errorDialog(data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
||||||
@ -357,7 +357,7 @@
|
|||||||
if (data.error_code == 0) {
|
if (data.error_code == 0) {
|
||||||
window.location.href = "/engine";
|
window.location.href = "/engine";
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt(data.error_message));
|
errorDialog(data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
||||||
@ -374,7 +374,7 @@
|
|||||||
if (data.error_code == 0) {
|
if (data.error_code == 0) {
|
||||||
window.location.href = "/engine";
|
window.location.href = "/engine";
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt(data.error_message));
|
errorDialog(data)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
|
||||||
|
|||||||
@ -9,7 +9,10 @@
|
|||||||
<script type="text/javascript" src="./resources/metadata/jquery.js"></script>
|
<script type="text/javascript" src="./resources/metadata/jquery.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript" src="./translation?v=7"></script>
|
<script type="text/javascript" src="./translation?v=7"></script>
|
||||||
|
|
||||||
<script src="./resources/metadata/dbms/tools.js?v=9"></script>
|
<script src="./resources/metadata/dbms/tools.js?v=9"></script>
|
||||||
|
<script src="./resources/metadata/dbms/window.js?v=10"></script>
|
||||||
|
|
||||||
<link rel="stylesheet" href="./resources/engine/css/buttons.css?v=7">
|
<link rel="stylesheet" href="./resources/engine/css/buttons.css?v=7">
|
||||||
<link rel="stylesheet" href="./resources/engine/normalize.css?v=7">
|
<link rel="stylesheet" href="./resources/engine/normalize.css?v=7">
|
||||||
<link rel="stylesheet" href="./resources/metadata/dbms/dbms.css?v=7"/>
|
<link rel="stylesheet" href="./resources/metadata/dbms/dbms.css?v=7"/>
|
||||||
@ -94,71 +97,81 @@
|
|||||||
if(date_start=='') date_start=(Date.now()/1000)-2592000;
|
if(date_start=='') date_start=(Date.now()/1000)-2592000;
|
||||||
if(date_end=='') date_end=Date.now()/1000;
|
if(date_end=='') date_end=Date.now()/1000;
|
||||||
|
|
||||||
function setCookie (name, value, expires, path, domain, secure)
|
function setCookie (name, value, expires, path, domain, secure)
|
||||||
{
|
{
|
||||||
var exdate=new Date();
|
var exdate=new Date();
|
||||||
exdate.setDate(exdate.getDate() + expires);
|
exdate.setDate(exdate.getDate() + expires);
|
||||||
expires=exdate.toUTCString()
|
expires=exdate.toUTCString()
|
||||||
|
|
||||||
document.cookie = name + "=" + escape(value) +
|
document.cookie = name + "=" + escape(value) +
|
||||||
((expires) ? "; expires=" + expires : "") +
|
((expires) ? "; expires=" + expires : "") +
|
||||||
((path) ? "; path=" + path : "") +
|
((path) ? "; path=" + path : "") +
|
||||||
((domain) ? "; domain=" + domain : "") +
|
((domain) ? "; domain=" + domain : "") +
|
||||||
((secure) ? "; secure" : "");
|
((secure) ? "; secure" : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.location.host.indexOf('locust.kz')>=0){
|
if(window.location.host.indexOf('locust.kz')>=0){
|
||||||
window.location.href = "https://ccalm.org";
|
window.location.href = "https://ccalm.org";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(window.location.host.indexOf('ccalm.org')>=0 && location.protocol == 'http:'){
|
if(window.location.host.indexOf('ccalm.org')>=0 && location.protocol == 'http:'){
|
||||||
location.href = location.href.replace(/^http:/, 'https:')
|
location.href = location.href.replace(/^http:/, 'https:')
|
||||||
}
|
}
|
||||||
|
|
||||||
var g_lng = [[${m_locale}]];
|
var g_lng = [[${m_locale}]];
|
||||||
var g_map=null;
|
var g_map=null;
|
||||||
var m_winPP=null;
|
var m_winPP=null;
|
||||||
|
|
||||||
function Configure(){
|
function Configure(){
|
||||||
let win=new TWin(false,'./resources');
|
let win=new TWin(false,'./resources');
|
||||||
win.BuildGUI(pageX-100,pageY-100);
|
win.BuildGUI(pageX-100,pageY-100);
|
||||||
|
|
||||||
win.setSize(300,20);
|
win.setSize(300,20);
|
||||||
win.setCaption(trt('Configure'));
|
win.setCaption(trt('Configure'));
|
||||||
//win.showProgressBar();
|
//win.showProgressBar();
|
||||||
win.shadow = true;
|
win.shadow = true;
|
||||||
|
|
||||||
let html='<table width="100%" border="0"><tbody><tr><td style="padding: 1px; white-space: nowrap;" width="1%">From date </td><td style="padding: 1px;"><table style="width: 100%; table-layout: fixed; border-spacing: 0px; border-collapse: collapse;" border="0"><tbody><tr><td style="width: 100%;"><input style="width: 100%;" name="date_start" value="" id="filter_first_date_start" type="text"></td><td style="width: 25px;"><img id="filter_first_date_start_trigger" src="../resources/engine/images/datepicker.jpg" style="margin-left: 1px; cursor: pointer;"></td></tr></tbody></table></td><td style="padding: 1px; white-space: nowrap;" width="1%">To date</td><td style="padding: 1px;"><table style="width: 100%; table-layout: fixed; border-spacing: 0px; border-collapse: collapse;" border="0"><tbody><tr><td style="width: 100%;"><input style="width: 100%;" name="date_end" value="" id="filter_first_date_end" type="text"></td><td style="width: 25px;"><img id="filter_first_date_end_trigger" src="../resources/engine/images/datepicker.jpg" style="cursor: pointer; margin-left: 1px;"></td></tr></tbody></table></td></tr></tbody></table>';
|
let html='<table width="100%" border="0"><tbody><tr><td style="padding: 1px; white-space: nowrap;" width="1%">From date </td><td style="padding: 1px;"><table style="width: 100%; table-layout: fixed; border-spacing: 0px; border-collapse: collapse;" border="0"><tbody><tr><td style="width: 100%;"><input style="width: 100%;" name="date_start" value="" id="filter_first_date_start" type="text"></td><td style="width: 25px;"><img id="filter_first_date_start_trigger" src="../resources/engine/images/datepicker.jpg" style="margin-left: 1px; cursor: pointer;"></td></tr></tbody></table></td><td style="padding: 1px; white-space: nowrap;" width="1%">To date</td><td style="padding: 1px;"><table style="width: 100%; table-layout: fixed; border-spacing: 0px; border-collapse: collapse;" border="0"><tbody><tr><td style="width: 100%;"><input style="width: 100%;" name="date_end" value="" id="filter_first_date_end" type="text"></td><td style="width: 25px;"><img id="filter_first_date_end_trigger" src="../resources/engine/images/datepicker.jpg" style="cursor: pointer; margin-left: 1px;"></td></tr></tbody></table></td></tr></tbody></table>';
|
||||||
html+='<input class="button-secondary" id="btnApply" type="button" value="'+trt('Apply')+'" style="margin: 0px 1px 0px 0px;float:right;">';
|
html+='<input class="button-secondary" id="btnApply" type="button" value="'+trt('Apply')+'" style="margin: 0px 1px 0px 0px;float:right;">';
|
||||||
|
|
||||||
win.setContent(html);
|
win.setContent(html);
|
||||||
win.setCenter();
|
win.setCenter();
|
||||||
win.hide(false);
|
win.hide(false);
|
||||||
|
|
||||||
$("#btnApply").click(function() {
|
$("#btnApply").click(function() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let date_start="";
|
let date_start="";
|
||||||
let input = document.getElementById('filter_first_date_start');
|
let input = document.getElementById('filter_first_date_start');
|
||||||
if(input!=null)
|
if(input!=null)
|
||||||
{
|
{
|
||||||
let date = new Date(input.value.replace(/-/g, "/"));
|
let date = new Date(input.value.replace(/-/g, "/"));
|
||||||
date_start=date.getTime()/1000;// - date.getTimezoneOffset()*60;
|
date_start=date.getTime()/1000;// - date.getTimezoneOffset()*60;
|
||||||
if(isNaN(date_start)) date_start='';
|
if(isNaN(date_start)) date_start='';
|
||||||
}
|
}
|
||||||
let date_end="";
|
let date_end="";
|
||||||
input = document.getElementById('filter_first_date_end');
|
input = document.getElementById('filter_first_date_end');
|
||||||
if(input!=null)
|
if(input!=null)
|
||||||
{
|
{
|
||||||
let date = new Date(input.value.replace(/-/g, "/"));
|
let date = new Date(input.value.replace(/-/g, "/"));
|
||||||
date_end=date.getTime()/1000;// - date.getTimezoneOffset()*60;
|
date_end=date.getTime()/1000;// - date.getTimezoneOffset()*60;
|
||||||
if(isNaN(date_end)) date_end='';
|
if(isNaN(date_end)) date_end='';
|
||||||
}
|
}
|
||||||
let path="./?date_start="+date_start+"&date_end="+date_end;
|
let path="./?date_start="+date_start+"&date_end="+date_end;
|
||||||
window.open(path, "_self");
|
window.open(path, "_self");
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const url = new URL(window.location.href);
|
||||||
|
const message = url.searchParams.get('msg');
|
||||||
|
if (message) {
|
||||||
|
alert2(trt('Alert'),trt(message));
|
||||||
|
url.searchParams.delete('msg');
|
||||||
|
window.history.replaceState({}, document.title, url);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user