Skip to content

Commit

Permalink
geosolutions-it#8551 fix dashboard embedded crash error (geosolutions…
Browse files Browse the repository at this point in the history
…-it#8553)

* geosolutions-it#8551 fix dashboard embedded crash error

* fix crash on observables for dashboard

(cherry picked from commit 91cc6bf)
  • Loading branch information
MV88 authored and alexander-fedorenko committed Sep 7, 2022
1 parent 8235f0c commit cf504c9
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 23 deletions.
23 changes: 13 additions & 10 deletions project/standard/templates/dashboard-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/bowser@2.7.0/es5.js" onload="checkBrowser()"></script>
<script type="text/javascript">
var browserInfo = bowser.getParser(window.navigator.userAgent);
var isValidBrowser = browserInfo.satisfies({
"edge": ">1",
"chrome": ">1",
"safari": ">1",
"firefox": ">1"
});
if (!isValidBrowser) {
window.location.href = "unsupportedBrowser.html"
document.querySelector("container").style.display = "none";
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
var isValidBrowser = browserInfo.satisfies({
"edge": ">1",
"chrome": ">1",
"safari": ">1",
"firefox": ">1"
});
if (!isValidBrowser) {
window.location.href = "unsupportedBrowser.html"
document.querySelector("container").style.display = "none";
}
}
</script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import { describeFeatureType } from '../../../../observables/wfs';
import { getSearchUrl } from '../../../../utils/LayersUtils';

/**
* Retrieves feature types for the layer provideded in props. When the layer changes url,
* @param {Obserbable} props$ props stream
* Retrieves feature types for the layer provided in props. When the layer changes url,
* @param {Observable} props$ props stream
*/
export default props$ =>
props$
Expand Down
23 changes: 13 additions & 10 deletions web/client/dashboard-embedded-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -96,17 +96,20 @@
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans&display=swap" rel="stylesheet">
<!--script src="https://maps.google.com/maps/api/js?v=3"></script-->
<script async type="text/javascript" src="https://unpkg.com/bowser@2.7.0/es5.js" onload="checkBrowser()"></script>
<script type="text/javascript">
var browserInfo = bowser.getParser(window.navigator.userAgent);
var isValidBrowser = browserInfo.satisfies({
"edge": ">1",
"chrome": ">1",
"safari": ">1",
"firefox": ">1"
});
if (!isValidBrowser) {
window.location.href = "unsupportedBrowser.html"
document.querySelector("container").style.display = "none";
function checkBrowser() {
var browserInfo = bowser.getParser(window.navigator.userAgent);
var isValidBrowser = browserInfo.satisfies({
"edge": ">1",
"chrome": ">1",
"safari": ">1",
"firefox": ">1"
});
if (!isValidBrowser) {
window.location.href = "unsupportedBrowser.html"
document.querySelector("container").style.display = "none";
}
}
</script>
</head>
Expand Down
5 changes: 4 additions & 1 deletion web/client/product/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
*/

import { connect } from 'react-redux';
import { setObservableConfig } from 'recompose';
import rxjsConfig from 'recompose/rxjsObservableConfig';

import main from '../components/app/main';
import StandardApp from '../components/app/StandardApp';
Expand All @@ -30,7 +32,6 @@ import security from '../reducers/security';
import mousePosition from "../reducers/mousePosition";
import annotations from "../reducers/annotations";


import { versionSelector } from '../selectors/version';
import { loadAfterThemeSelector } from '../selectors/config';

Expand All @@ -40,6 +41,8 @@ import {
standardRootReducerFunc
} from '../stores/defaultOptions';

setObservableConfig(rxjsConfig);

export default (config = {}, pluginsDef, overrideConfig = cfg => cfg) => {

const {
Expand Down

0 comments on commit cf504c9

Please sign in to comment.