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

mendersoftware / gui / 988636826

01 Sep 2023 04:04AM UTC coverage: 82.384% (-17.6%) from 99.964%
988636826

Pull #3969

gitlab-ci

web-flow
chore: Bump autoprefixer from 10.4.14 to 10.4.15

Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.14 to 10.4.15.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.14...10.4.15)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #3969: chore: Bump autoprefixer from 10.4.14 to 10.4.15

4346 of 6321 branches covered (0.0%)

8259 of 10025 relevant lines covered (82.38%)

192.73 hits per line

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

83.33
/src/js/components/settings/reportinglimits.js
1
// Copyright 2023 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14
import React, { useEffect, useState } from 'react';
15
import { useDispatch, useSelector } from 'react-redux';
16

17
import { ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon } from '@mui/icons-material';
18
// material ui
19
import {
20
  Accordion,
21
  AccordionDetails,
22
  AccordionSummary,
23
  IconButton,
24
  InputLabel,
25
  LinearProgress,
26
  List,
27
  ListItem,
28
  ListItemText,
29
  ListSubheader,
30
  accordionClasses,
31
  listSubheaderClasses
32
} from '@mui/material';
33
import { makeStyles } from 'tss-react/mui';
34

35
import { getReportingLimits } from '../../actions/deviceActions';
36
import { toggle } from '../../helpers';
37
import { HELPTOOLTIPS, MenderHelpTooltip } from '../helptips/helptooltips';
38

39
const useStyles = makeStyles()(theme => ({
6✔
40
  accordion: {
41
    ul: {
42
      paddingInlineStart: 0
43
    },
44
    [`&.${accordionClasses.disabled}, &.${accordionClasses.expanded}`]: {
45
      backgroundColor: theme.palette.background.paper
46
    }
47
  },
48
  attributesList: {
49
    overflow: 'auto',
50
    maxHeight: 250,
51
    background: 'white',
52
    width: '100%',
53
    position: 'relative',
54
    [`.${listSubheaderClasses.root}`]: {
55
      top: -10
56
    },
57
    'li > ul': {
58
      overflow: 'initial'
59
    }
60
  },
61
  limitBar: { backgroundColor: theme.palette.grey[500], margin: '15px 0' },
62
  summary: { padding: 0, marginBottom: theme.spacing() }
63
}));
64

65
export const ReportingLimits = () => {
6✔
66
  const [open, setOpen] = useState(false);
2✔
67
  const { classes } = useStyles();
2✔
68
  const dispatch = useDispatch();
2✔
69
  const { attributes = {}, count = 0, limit = 100 } = useSelector(state => state.devices.filteringAttributesConfig);
3!
70

71
  useEffect(() => {
2✔
72
    dispatch(getReportingLimits());
1✔
73
  }, [dispatch]);
74

75
  const toggleOpen = () => setOpen(toggle);
2✔
76

77
  return (
2✔
78
    <>
79
      <InputLabel className="margin-top" shrink id="filterable-attributes-usage-and-limit">
80
        Filterable attributes usage & limit ({count}/{limit}) <MenderHelpTooltip id={HELPTOOLTIPS.attributeLimit.id} placement="top" />
81
      </InputLabel>
82
      <Accordion className={classes.accordion} square expanded={open} onChange={toggleOpen} disabled={!count}>
83
        <AccordionSummary className={classes.summary}>
84
          <LinearProgress className={classes.limitBar} variant="determinate" value={(count * 100) / limit} style={{ width: '100%' }} />
85
          <IconButton className="margin-left-small expandButton" size="large">
86
            {open ? <ArrowDropUpIcon /> : <ArrowDropDownIcon />}
2!
87
          </IconButton>
88
        </AccordionSummary>
89
        <AccordionDetails>
90
          <List className={classes.attributesList}>
91
            {Object.entries(attributes).map(([scope, values = []]) => (
×
92
              <li key={scope}>
×
93
                <ul>
94
                  <ListSubheader>{scope}</ListSubheader>
95
                  {values.map(item => (
96
                    <ListItem key={`item-${scope}-${item}`}>
×
97
                      <ListItemText primary={item} />
98
                    </ListItem>
99
                  ))}
100
                </ul>
101
              </li>
102
            ))}
103
          </List>
104
        </AccordionDetails>
105
      </Accordion>
106
    </>
107
  );
108
};
109

110
export default ReportingLimits;
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