@eeacms/volto-cca-policy 0.2.66 → 0.2.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
### [0.2.67](https://github.com/eea/volto-cca-policy/compare/0.2.66...0.2.67) - 24 September 2024
|
|
8
|
+
|
|
9
|
+
#### :house: Internal changes
|
|
10
|
+
|
|
11
|
+
- style: Automated code fix [eea-jenkins - [`a43e832`](https://github.com/eea/volto-cca-policy/commit/a43e8329fa87902c295d862c03119b0ed85075d9)]
|
|
12
|
+
|
|
13
|
+
#### :hammer_and_wrench: Others
|
|
14
|
+
|
|
15
|
+
- Refs #277611 - view combine odl and new style for c3s indicator [Tripon Eugen - [`e693f6f`](https://github.com/eea/volto-cca-policy/commit/e693f6f782aab535f21b76f70e64b40a185e1665)]
|
|
16
|
+
- c3s display iframe URL depending on ecde_identifier [Tripon Eugen - [`067d162`](https://github.com/eea/volto-cca-policy/commit/067d1620c69acdd967f22c88fbbbaaed6694424c)]
|
|
17
|
+
- c3s new variable and iframe [Tripon Eugen - [`6a825b3`](https://github.com/eea/volto-cca-policy/commit/6a825b31888c49432272fed7d9be68422ca942b3)]
|
|
7
18
|
### [0.2.66](https://github.com/eea/volto-cca-policy/compare/0.2.65...0.2.66) - 23 September 2024
|
|
8
19
|
|
|
9
20
|
#### :house: Internal changes
|
package/package.json
CHANGED
|
@@ -24,7 +24,58 @@ if (!__SERVER__) {
|
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
const
|
|
27
|
+
const createIframeOld = (div_id, details_url, details_params, spinner_url) => {
|
|
28
|
+
return `
|
|
29
|
+
<iframe width="100%" height="800px" srcdoc="<html><head>
|
|
30
|
+
<title>CDS integration test</title>
|
|
31
|
+
<meta charset='utf-8' />
|
|
32
|
+
<meta http-equiv='Content-Type' content='text/html; charset=utf-8' />
|
|
33
|
+
<script>
|
|
34
|
+
window.cds_toolbox = { cds_public_path: 'https://cds.climate.copernicus.eu/toolbox/' };
|
|
35
|
+
</script>
|
|
36
|
+
<script type='text/javascript' src='https://cds.climate.copernicus.eu/toolbox/toolbox-latest.js'></script>
|
|
37
|
+
</head>
|
|
38
|
+
<body>
|
|
39
|
+
<div class='t-ct'>
|
|
40
|
+
<div id='${div_id}'>
|
|
41
|
+
<div class='pre-app-loading'>
|
|
42
|
+
<img src='${spinner_url}' alt='Loading'>
|
|
43
|
+
<div>
|
|
44
|
+
...loading configuration...
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
<script type='text/javascript'>
|
|
50
|
+
document.addEventListener('DOMContentLoaded',
|
|
51
|
+
function () {
|
|
52
|
+
window.cds_toolbox.runApp(
|
|
53
|
+
'${div_id}',
|
|
54
|
+
'${details_url}',
|
|
55
|
+
${details_params}
|
|
56
|
+
);
|
|
57
|
+
}, false);
|
|
58
|
+
</script>
|
|
59
|
+
</body></html>"
|
|
60
|
+
/>`;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
const createIframe = (
|
|
64
|
+
div_id,
|
|
65
|
+
details_url,
|
|
66
|
+
details_params,
|
|
67
|
+
ecde_identifier,
|
|
68
|
+
spinner_url,
|
|
69
|
+
) => {
|
|
70
|
+
// return '<iframe src="http://ecde-dev.copernicus-climate.eu/apps/ecde/?disabled=true&theme=eea&indicator=18_consecutive_dry_days" style="width: 100%; border: 0; height: min(800px, 80vh);"/>';
|
|
71
|
+
if (typeof ecde_identifier !== 'undefined' && ecde_identifier) {
|
|
72
|
+
return (
|
|
73
|
+
// '<iframe src="http://ecde-dev.copernicus-climate.eu/apps/ecde/?disabled=true&theme=eea&indicator=' +
|
|
74
|
+
'<iframe src="https://apps.copernicus-climate.eu/ecde/?disabled=true&theme=eea&indicator=' +
|
|
75
|
+
ecde_identifier +
|
|
76
|
+
'" style="width: 100%; border: 0; height: min(800px, 80vh);"/>'
|
|
77
|
+
);
|
|
78
|
+
}
|
|
28
79
|
return `
|
|
29
80
|
<iframe width="100%" height="800px" srcdoc="<html><head>
|
|
30
81
|
<title>CDS integration test</title>
|
|
@@ -62,8 +113,14 @@ const createIframe = (div_id, details_url, details_params, spinner_url) => {
|
|
|
62
113
|
|
|
63
114
|
const Overview = (props) => {
|
|
64
115
|
const { content } = props;
|
|
65
|
-
const {
|
|
116
|
+
const {
|
|
117
|
+
overview_app_toolbox_url,
|
|
118
|
+
overview_app_toolbox_url_v2,
|
|
119
|
+
overview_app_parameters,
|
|
120
|
+
overview_app_ecde_identifier,
|
|
121
|
+
} = content;
|
|
66
122
|
const c3s_overview_url = overview_app_toolbox_url;
|
|
123
|
+
const c3s_ecde_identifier = overview_app_ecde_identifier;
|
|
67
124
|
const c3s_overview_params = JSON.stringify(overview_app_parameters).replace(
|
|
68
125
|
/"/g,
|
|
69
126
|
"'",
|
|
@@ -74,11 +131,28 @@ const Overview = (props) => {
|
|
|
74
131
|
setSpinnerUrl(spinner);
|
|
75
132
|
}, []);
|
|
76
133
|
|
|
134
|
+
if (overview_app_ecde_identifier) {
|
|
135
|
+
return (
|
|
136
|
+
<div
|
|
137
|
+
className="iframe-container div-chart-container"
|
|
138
|
+
dangerouslySetInnerHTML={{
|
|
139
|
+
__html: createIframe(
|
|
140
|
+
'toolbox-app-overview',
|
|
141
|
+
overview_app_toolbox_url_v2,
|
|
142
|
+
c3s_overview_params,
|
|
143
|
+
c3s_ecde_identifier,
|
|
144
|
+
spinnerUrl,
|
|
145
|
+
),
|
|
146
|
+
}}
|
|
147
|
+
/>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
|
|
77
151
|
return (
|
|
78
152
|
<div
|
|
79
153
|
className="iframe-container div-chart-container"
|
|
80
154
|
dangerouslySetInnerHTML={{
|
|
81
|
-
__html:
|
|
155
|
+
__html: createIframeOld(
|
|
82
156
|
'toolbox-app-overview',
|
|
83
157
|
c3s_overview_url,
|
|
84
158
|
c3s_overview_params,
|