Сообщение на главной странице

This commit is contained in:
2025-03-13 19:49:52 +05:00
parent ff82f35c3a
commit f9f0da3d2e
6 changed files with 99 additions and 74 deletions

View File

@ -10,20 +10,20 @@ spring:
application:
name: org.ccalm.main
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
url: jdbc:postgresql://91.201.214.156:5432/CCALM?ApplicationName=org_ccalm_main&ssl=true&sslmode=require&connectTimeout=10000&socketTimeout=10000
username: postgres
password: 309A86FF65A78FB428F4E38DFE35F730
driver-class-name: org.postgresql.Driver
hikari:
maximum-pool-size: 10
minimum-idle: 5
max-lifetime: 600000
max-lifetime: 1740000
idle-timeout: 300000
connection-timeout: 30000
connection-test-query: SELECT 1
validation-timeout: 5000
validation-interval: 60000
leak-detection-threshold: 30000
keepalive-time: 60000
redis:
host: 127.0.0.1
port: 6379

View File

@ -57,8 +57,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.4</version>
<scope>runtime</scope>
<version>42.7.5</version>
</dependency>
<dependency>
<groupId>org.json</groupId>

View File

@ -43,7 +43,8 @@ public class SendWarning {
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON);
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 {
ResponseEntity<Map> response = restTemplate.exchange(url, HttpMethod.POST, entity, Map.class);
if (response.getStatusCode() == HttpStatus.OK && response.getBody() != null) {

View File

@ -5,6 +5,9 @@
<title>Automated system of data collection</title>
<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">
<style type="text/css">
@ -46,6 +49,15 @@
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>
</head>

View File

@ -323,7 +323,7 @@
if (data.error_code == 0) {
window.location.href = "/engine";
} else {
alert2(trt('Alert'), trt(data.error_message));
errorDialog(data)
}
} else {
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
@ -340,7 +340,7 @@
if (data.error_code == 0) {
window.location.href = "/engine";
} else {
alert2(trt('Alert'), trt(data.error_message));
errorDialog(data)
}
} else {
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
@ -357,7 +357,7 @@
if (data.error_code == 0) {
window.location.href = "/engine";
} else {
alert2(trt('Alert'), trt(data.error_message));
errorDialog(data)
}
} else {
alert2(trt('Alert'), trt('Error: Unable to authorize.'));
@ -374,7 +374,7 @@
if (data.error_code == 0) {
window.location.href = "/engine";
} else {
alert2(trt('Alert'), trt(data.error_message));
errorDialog(data)
}
} else {
alert2(trt('Alert'), trt('Error: Unable to authorize.'));

View File

@ -9,7 +9,10 @@
<script type="text/javascript" src="./resources/metadata/jquery.js"></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/window.js?v=10"></script>
<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/metadata/dbms/dbms.css?v=7"/>
@ -160,6 +163,16 @@
});
}
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>
</head>
<body>