@eeacms/volto-globalsearch 1.0.14 → 1.0.16

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,23 @@ 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
+ ### [1.0.16](https://github.com/eea/volto-globalsearch/compare/1.0.15...1.0.16) - 8 June 2023
8
+
9
+ #### :house: Internal changes
10
+
11
+ - chore: [JENKINS] Deprecate circularity website [valentinab25 - [`ae6efed`](https://github.com/eea/volto-globalsearch/commit/ae6efed386f8fd053972a388a3f8714ff36cf575)]
12
+
13
+ #### :hammer_and_wrench: Others
14
+
15
+ - added missing logo [Zoltan Szabo - [`94684b9`](https://github.com/eea/volto-globalsearch/commit/94684b979698c47de353ecc2a9014a8f70d7ecc1)]
16
+ - updated frontend with configuration for 'Climate Advisory Board' [Zoltan Szabo - [`28cf22c`](https://github.com/eea/volto-globalsearch/commit/28cf22c93237226c3957223b497a33ab3cb73623)]
17
+ - Add Sonarqube tag using cca-frontend addons list [EEA Jenkins - [`b655d51`](https://github.com/eea/volto-globalsearch/commit/b655d51fa3631ae42c89eb85bdcc850f70d9c72c)]
18
+ ### [1.0.15](https://github.com/eea/volto-globalsearch/compare/1.0.14...1.0.15) - 14 March 2023
19
+
20
+ #### :hammer_and_wrench: Others
21
+
22
+ - use registry.resolve for healthcheck [Zoltan Szabo - [`77ac70f`](https://github.com/eea/volto-globalsearch/commit/77ac70f2b82c8db9a22f9a6d3ccae901d9b10002)]
23
+ - Add healthcheck [Tiberiu Ichim - [`1860323`](https://github.com/eea/volto-globalsearch/commit/1860323629fa54fbd52ecf9d16ac5ccd0a3a8f7d)]
7
24
  ### [1.0.14](https://github.com/eea/volto-globalsearch/compare/1.0.13...1.0.14) - 10 March 2023
8
25
 
9
26
  #### :hammer_and_wrench: Others
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eeacms/volto-globalsearch",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "@eeacms/volto-globalsearch: Volto add-on",
5
5
  "main": "src/index.js",
6
6
  "author": "European Environment Agency: IDM2 A-Team",
@@ -137,6 +137,9 @@ export default {
137
137
  sdi: {
138
138
  url: require('../static/eea-logo.svg'),
139
139
  },
140
+ cab: {
141
+ url: require('../static/cab-logo.png'),
142
+ },
140
143
  },
141
144
  Countries: {
142
145
  fallback: {
@@ -22,7 +22,8 @@ const globalSearchBaseConfig = {
22
22
  runtime_mappings: build_runtime_mappings(clusters),
23
23
  useSearchPhrases: false,
24
24
  searchAsYouType: false,
25
- landingPageURL: '/en/advanced-search',
25
+ landingPageURL: null,
26
+ healthcheck: 'getGlobalSearchHealthcheck',
26
27
  getActiveFilters: 'getGlobalSearchActiveFilters',
27
28
 
28
29
  ...vocabs,
@@ -3,6 +3,7 @@ import cloneDeep from 'lodash.clonedeep';
3
3
  import globalSearchBaseConfig from './global-search-base-config.js';
4
4
 
5
5
  let globalSearchConfig = cloneDeep(globalSearchBaseConfig);
6
+ globalSearchConfig.landingPageURL = '/en/advanced-search';
6
7
 
7
8
  globalSearchConfig.facets = globalSearchConfig.facets.filter(
8
9
  (facet) => facet['field'] !== 'subject.keyword',
@@ -0,0 +1,23 @@
1
+ import runRequest from '@eeacms/search/lib/runRequest';
2
+ import buildRequest from '@eeacms/search/lib/search/query';
3
+
4
+ export default function healthcheck(appConfig) {
5
+ // is index ok?
6
+ // return index update date
7
+ // run default query, see number of results
8
+ // nlpservice provides answer based on extracted term
9
+ // number of documents with error in data raw, type of error
10
+
11
+ return new Promise((resolve, reject) => {
12
+ const body = buildRequest({ filters: [] }, appConfig);
13
+ runRequest(body, appConfig).then((resp) => {
14
+ let total;
15
+ try {
16
+ total = resp.body.hits.total.value;
17
+ resolve({ documentCount: total });
18
+ } catch {
19
+ reject({ total: -1 });
20
+ }
21
+ });
22
+ });
23
+ }
@@ -4,6 +4,8 @@ import {
4
4
  isFilterValueDefaultValue,
5
5
  } from '@eeacms/search';
6
6
  import { getGlobalsearchThumbUrl, getGlobalsearchIconUrl } from './../utils';
7
+ import healthcheck from './healthcheck';
8
+
7
9
  import { typesForClustersOptionsFilter } from './clusters';
8
10
 
9
11
  import { UniversalCard } from '@eeacms/volto-listing-block';
@@ -108,6 +110,8 @@ export default function install(config) {
108
110
  },
109
111
  };
110
112
 
113
+ config.resolve.getGlobalSearchHealthcheck = healthcheck;
114
+
111
115
  config.resolve.getGlobalsearchIconUrl = getGlobalsearchIconUrl(
112
116
  contentTypeNormalize,
113
117
  );
@@ -54,6 +54,7 @@ const vocab = {
54
54
  'etc-uls': 'ETC on Urban, Land and Soil Systems',
55
55
  'etc-wmge': 'ETC on Waste and Materials in Green Economy',
56
56
  sdi: 'Datahub',
57
+ cab: 'Climate Advisory Board',
57
58
  },
58
59
  };
59
60
 
Binary file