• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

geosolutions-it / MapStore2 / 19710972030

26 Nov 2025 03:38PM UTC coverage: 76.665% (-0.3%) from 76.929%
19710972030

Pull #11119

github

web-flow
Fix maven publish (#11739)
Pull Request #11119: Layer Selection Plugin on ArcGIS, WFS & WMS layers

32272 of 50209 branches covered (64.28%)

3 of 3 new or added lines in 2 files covered. (100.0%)

3018 existing lines in 249 files now uncovered.

40157 of 52380 relevant lines covered (76.66%)

37.9 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

80.0
/web/client/components/app/StandardAppComponent.jsx
1
/*
2
 * Copyright 2018, GeoSolutions Sas.
3
 * All rights reserved.
4
 *
5
 * This source code is licensed under the BSD-style license found in the
6
 * LICENSE file in the root directory of this source tree.
7
*/
8

9
import PropTypes from 'prop-types';
10
import React from 'react';
11
import { connect } from 'react-redux';
12

13
import Debug from '../development/Debug';
14
import Localized from '../I18N/Localized';
15
import PluginsContainer from '../plugins/PluginsContainer';
16
import ThemeComp from '../theme/Theme';
17

18
const Theme = connect((state) => ({
4✔
19
    theme: state.theme && state.theme.selectedTheme && state.theme.selectedTheme.id
4!
20
}), {}, (stateProps, dispatchProps, ownProps) => {
21
    return Object.assign({}, stateProps, dispatchProps, ownProps);
2✔
22
})(ThemeComp);
23

24
class StandardAppComponent extends React.Component {
25
    static propTypes = {
1✔
26
        plugins: PropTypes.object,
27
        locale: PropTypes.object,
28
        pages: PropTypes.array,
29
        className: PropTypes.string,
30
        themeCfg: PropTypes.object,
31
        version: PropTypes.string,
32
        loadAfterTheme: PropTypes.bool
33
    };
34

35
    static defaultProps = {
1✔
36
        plugins: {},
37
        locale: {messages: {}, current: 'en-US'},
38
        pages: [],
39
        className: "fill",
40
        themeCfg: {
41
            path: 'dist/themes'
42
        },
43
        loadAfterTheme: false
44
    };
45
    state = {
2✔
46
        themeLoaded: false
47
    }
48

49
    renderAfterTheme() {
UNCOV
50
        return (
×
51
            <div className={this.props.className}>
52
                <Theme {...this.props.themeCfg} version={this.props.version} onLoad={this.themeLoaded}>
53
                    {this.state.themeLoaded ? (<Localized messages={this.props.locale.messages} locale={this.props.locale.current} loadingError={this.props.locale.localeError}>
×
54
                        <PluginsContainer {...this.props}/>
55
                    </Localized>) :
56
                        (<span><div className="_ms2_init_spinner _ms2_init_center"><div></div></div>
57
                            <div className="_ms2_init_text _ms2_init_center">Loading MapStore</div></span>)}
58
                </Theme>
59
                <Debug/>
60
            </div>
61
        );
62
    }
63
    renderWithTheme() {
64
        return (
2✔
65
            <div className={this.props.className}>
66
                <Theme {...this.props.themeCfg} version={this.props.version}/>
67
                <Localized messages={this.props.locale.messages} locale={this.props.locale.current} loadingError={this.props.locale.localeError}>
68
                    <PluginsContainer {...this.props} />
69
                </Localized>
70
                <Debug/>
71
            </div>);
72
    }
73
    render() {
74
        return this.props.loadAfterTheme ? this.renderAfterTheme() : this.renderWithTheme();
2!
75
    }
76
    themeLoaded = () => {
2✔
UNCOV
77
        this.setState({
×
78
            themeLoaded: true
79
        });
80
    }
81
}
82

83
export default StandardAppComponent;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc