Skip to content

Commit

Permalink
conflictSearch now has a stateless option, which can be set in both…
Browse files Browse the repository at this point in the history
… build and run-time config. In stateless mode the state of the module will not be kept. Default `false`.
  • Loading branch information
mapcentia committed May 4, 2022
1 parent 0ede34d commit 27ba8a9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
9 changes: 6 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ and this project adheres to [CalVer](https://calver.org/).

## [UNRELEASED] - 2022-20-4
### Changed
- In conflictSearch requests to the GC2 SQL API now happens concurrently. This is done by implementing a promise pool. The default size of the pool is 30, but this can be set in the runtime config. Note that this setting can't be changed in a run-time config.
- In conflictSearch requests to the GC2 SQL API now happens concurrently. This is done by implementing a promise pool. The default size of the pool is 30, but this can be set in the build config. Note that this setting can't be changed in a run-time config.
- conflictSearch now has a `stateless` option, which can be set in both build and run-time config. In stateless mode the state of the module will not be kept. Default `false`.
```json
{
"extensionConfig": {
"conflictSearch": {
"poolSize": 40
"poolSize": 40,
"stateless": true
}
}
}
```

### Fixed
- Tile layer opacity state now is kept betweens freshes.
- Tile layer opacity state now is kept betweens browser refreshes.

## [2022.4.0] - 2022-8-4
### Fixed
Expand Down
9 changes: 6 additions & 3 deletions extensions/conflictSearch/browser/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,9 +263,12 @@ module.exports = {
},

getState: () => {
let res = conflictSearch.getResult();
res.reportType = reportType;
return res;
if (config?.extensionConfig?.conflictSearch?.stateless) {
return {};
}
let state = conflictSearch.getResult();
state.reportType = reportType;
return state;
},

applyState: (newState) => {
Expand Down

0 comments on commit 27ba8a9

Please sign in to comment.