• 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

50.0
/web/client/plugins/ResourcesCatalog/components/ResourceStatus.jsx
1
/*
2
 * Copyright 2024, 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 React from 'react';
10
import { Glyphicon } from 'react-bootstrap';
11

12
import Message from '../../../components/I18N/Message';
13
import PropTypes from 'prop-types';
14
import tooltip from '../../../components/misc/enhancers/tooltip';
15
import FlexBox from '../../../components/layout/FlexBox';
16
import Text from '../../../components/layout/Text';
17

18
const Icon = ({ glyph, ...props }) => {
1✔
UNCOV
19
    return (<div {...props}><Glyphicon glyph={glyph} /></div> );
×
20
};
21

22
const IconWithTooltip = tooltip(Icon);
1✔
23

24
const ResourceStatus = ({ statusItems = [] }) => {
1!
25

26
    if (!statusItems?.length) {
1!
27
        return null;
1✔
28
    }
UNCOV
29
    return (
×
30
        <FlexBox gap="sm" centerChildrenVertically classNames={["ms-resource-status", '_relative']}>
31
            {statusItems.map((item, idx) => {
32
                if (item.type === 'text') {
×
UNCOV
33
                    return (
×
34
                        <Text key={idx} classNames={['_padding-lr-xs']} fontSize="sm" className={item.variant ? `ms-${item.variant}-colors` : ''} >
×
35
                            <Message msgId={item.labelId} />
36
                        </Text>
37
                    );
38
                }
39
                if (item.type === 'icon') {
×
UNCOV
40
                    return (
×
41
                        <Text key={idx} fontSize="sm" className={item.variant ? `ms-${item.variant}-text` : ''} >
×
42
                            <IconWithTooltip
43
                                glyph={item.glyph}
44
                                tooltip={item.tooltip}
45
                                tooltipParams={item.tooltipParams}
46
                                tooltipId={item.tooltipId}
47
                            />
48
                        </Text>
49
                    );
50
                }
51
                return null;
×
52
            })}
53
        </FlexBox>
54
    );
55
};
56

57
ResourceStatus.propTypes = {
1✔
58
    statusItems: PropTypes.array
59
};
60

61
ResourceStatus.defaultProps = {
1✔
62
    statusItems: []
63
};
64

65

66
export default ResourceStatus;
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