• 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/common-ui/forms/AddonSelect.tsx
1
// Copyright 2024 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 { Controller } from 'react-hook-form';
2✔
15

2✔
16
import { Checkbox, FormControl, FormHelperText, InputLabel, MenuItem, Select } from '@mui/material';
2✔
17

2✔
18
import { ADDONS } from '@northern.tech/store/constants';
2✔
19

2✔
20
export const AddonSelect = ({ name }: { name: string }) => (
7✔
21
  <Controller
49✔
22
    name={name}
2✔
23
    render={({ field: { value, onChange } }) => (
2✔
24
      <FormControl id="addons-form" style={{ width: 550 }}>
49✔
25
        <InputLabel id="addons-selection-label">Select Add-ons (optional)</InputLabel>
2✔
26
        <Select
2✔
27
          multiple
2✔
28
          label="Select Add-ons (optional)"
2✔
29
          labelId="addons-selection-label"
2✔
30
          value={value}
2✔
UNCOV
31
          onChange={({ target: { value: addons } }) => onChange(addons)}
2✔
32
          renderValue={selected => selected.map(addonId => `Mender ${ADDONS[addonId].title}`).join(', ')}
49✔
33
        >
2✔
34
          {Object.values(ADDONS).map(addon => (
2✔
35
            <MenuItem id={addon.id} key={addon.id} value={addon.id}>
143✔
36
              <Checkbox id={`${addon.id}-checkbox`} checked={value.includes(addon.id)} />
2✔
37
              Mender {addon.title}
2✔
38
            </MenuItem>
2✔
39
          ))}
2✔
40
        </Select>
2✔
41
        <FormHelperText className="info">Select any Add-ons you are interested in including in your subscription</FormHelperText>
2✔
42
      </FormControl>
2✔
43
    )}
2✔
44
  />
2✔
45
);
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