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

mendersoftware / mender-server / 10489

17 Nov 2025 09:07AM UTC coverage: 78.221% (+3.8%) from 74.444%
10489

push

gitlab-ci

web-flow
Merge pull request #1084 from joelguittet/jguittet/main/docker-compose-healthy

Introduce docker compose healthcheck

3865 of 5388 branches covered (71.73%)

Branch coverage included in aggregate %.

6845 of 8304 relevant lines covered (82.43%)

68.08 hits per line

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

68.09
/frontend/src/js/components/auditlogs/EventDetailsDrawerContentMap.tsx
1
// Copyright 2020 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 DeviceConfiguration from './eventdetails/DeviceConfiguration';
15
import EventDetailsFallbackComponent from './eventdetails/FallbackComponent';
16
import FileTransfer from './eventdetails/FileTransfer';
17
import PortForward from './eventdetails/PortForward';
18
import TerminalSession from './eventdetails/TerminalSession';
19
import { UserChange } from './eventdetails/UserChange';
20

21
const changeTypes = {
5✔
22
  user: 'user',
23
  device: 'device',
24
  tenant: 'tenant'
25
};
26

27
const configChangeDescriptor = {
5✔
28
  set_configuration: 'definition',
29
  deploy_configuration: 'deployment'
30
};
31

32
const EventDetailsDrawerContentMap = (item, FallbackComponent = EventDetailsFallbackComponent) => {
5✔
33
  const { type } = item.object || {};
18✔
34
  let content = { title: 'Entry details', content: FallbackComponent };
18✔
35
  if (type === changeTypes.user) {
18✔
36
    content = { title: `${item.action}d user`, content: UserChange };
1✔
37
  } else if (type === changeTypes.device && item.action.includes('terminal')) {
17✔
38
    content = { title: 'Remote session log', content: TerminalSession };
1✔
39
  } else if (type === changeTypes.device && item.action.includes('file')) {
16!
40
    content = { title: 'File transfer', content: FileTransfer };
×
41
  } else if (type === changeTypes.device && item.action.includes('portforward')) {
16!
42
    content = { title: 'Port forward', content: PortForward };
×
43
  } else if (type === changeTypes.device && item.action.includes('configuration')) {
16!
44
    content = { title: `Device configuration ${configChangeDescriptor[item.action] || ''}`, content: DeviceConfiguration };
×
45
  } else if (type === changeTypes.device) {
16!
46
    content = { title: 'Device change', content: FallbackComponent };
×
47
  } else if (type === changeTypes.tenant) {
16!
48
    content = { title: `${item.action}d tenant`, content: UserChange };
×
49
  }
50
  return content;
18✔
51
};
52

53
export default EventDetailsDrawerContentMap;
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