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

mendersoftware / mender-server / 10423

11 Nov 2025 04:53PM UTC coverage: 74.435% (-0.1%) from 74.562%
10423

push

gitlab-ci

web-flow
Merge pull request #1071 from mendersoftware/dependabot/npm_and_yarn/frontend/main/development-dependencies-92732187be

3868 of 5393 branches covered (71.72%)

Branch coverage included in aggregate %.

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

176 existing lines in 95 files now uncovered.

64605 of 86597 relevant lines covered (74.6%)

7.74 hits per line

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

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

2✔
16
import { ArrowDropDown as ArrowDropDownIcon, ArrowDropUp as ArrowDropUpIcon } from '@mui/icons-material';
2✔
17
// material ui
2✔
18
import { Button, Menu, MenuItem } from '@mui/material';
2✔
19

2✔
20
const ListOptions = ({ options, title = 'Table options' }) => {
13✔
21
  const [anchorEl, setAnchorEl] = useState(null);
44✔
22

2✔
23
  return (
44✔
24
    <>
2✔
25
      <Button style={{ textTransform: 'none' }} onClick={e => setAnchorEl(e.currentTarget)} endIcon={anchorEl ? <ArrowDropUpIcon /> : <ArrowDropDownIcon />}>
3✔
26
        {title}
2✔
27
      </Button>
2✔
28
      <Menu
2✔
29
        anchorEl={anchorEl}
2✔
30
        anchorOrigin={{ horizontal: 'right', vertical: 'top' }}
2✔
UNCOV
31
        onClose={() => setAnchorEl(null)}
2✔
32
        open={Boolean(anchorEl)}
2✔
33
        transformOrigin={{ horizontal: 'right', vertical: 'bottom' }}
2✔
34
      >
2✔
35
        {options.map(({ key, title, onClick }) => (
2✔
36
          <MenuItem key={key} onClick={onClick} value={key}>
46✔
37
            {title}
2✔
38
          </MenuItem>
2✔
39
        ))}
2✔
40
      </Menu>
2✔
41
    </>
2✔
42
  );
2✔
43
};
2✔
44

2✔
45
export default ListOptions;
2✔
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