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

inventree / InvenTree / 8604739077

08 Apr 2024 06:10PM CUT coverage: 91.825%. First build
8604739077

Pull #6978

github

web-flow
Merge 410171001 into 4adce85ef
Pull Request #6978: Bump docker/setup-buildx-action from 3.2.0 to 3.3.0

221 of 649 branches covered (34.05%)

Branch coverage included in aggregate %.

33252 of 35804 relevant lines covered (92.87%)

1.63 hits per line

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

13.64
/src/frontend/src/components/modals/ServerInfoModal.tsx
1
import { Trans } from '@lingui/macro';
2
import {
3
  Badge,
4
  Button,
5
  Divider,
6
  Group,
7
  Stack,
8
  Table,
9
  Title
10
} from '@mantine/core';
11
import { ContextModalProps } from '@mantine/modals';
12

13
import { useServerApiState } from '../../states/ApiState';
14
import { OnlyStaff } from '../items/OnlyStaff';
15

16
export function ServerInfoModal({
3✔
17
  context,
18
  id
19
}: ContextModalProps<{ modalBody: string }>) {
×
20
  const [server] = useServerApiState((state) => [state.server]);
3✔
21

22
  return (
×
23
    <Stack>
24
      <Divider />
25
      <Title order={5}>
26
        <Trans>Server</Trans>
27
      </Title>
28
      <Table>
29
        <tbody>
30
          <tr>
31
            <td>
32
              <Trans>Instance Name</Trans>
33
            </td>
34
            <td>{server.instance}</td>
35
          </tr>
36
          <tr>
37
            <td>
38
              <Trans>Database</Trans>
39
            </td>
40
            <td>
41
              <OnlyStaff>{server.database}</OnlyStaff>
42
            </td>
43
          </tr>
44
          {server.debug_mode && (
×
45
            <tr>
46
              <td>
47
                <Trans>Debug Mode</Trans>
48
              </td>
49
              <td>
50
                <Trans>Server is running in debug mode</Trans>
51
              </td>
52
            </tr>
53
          )}
54
          {server.docker_mode && (
×
55
            <tr>
56
              <td>
57
                <Trans>Docker Mode</Trans>
58
              </td>
59
              <td>
60
                <Trans>Server is deployed using docker</Trans>
61
              </td>
62
            </tr>
63
          )}
64
          <tr>
65
            <td>
66
              <Trans>Plugin Support</Trans>
67
            </td>
68
            <td>
69
              <Badge color={server.plugins_enabled ? 'green' : 'red'}>
×
70
                {server.plugins_enabled ? (
×
71
                  <Trans>Plugin support enabled</Trans>
72
                ) : (
73
                  <Trans>Plugin support disabled</Trans>
74
                )}
75
              </Badge>
76
            </td>
77
          </tr>
78
          <tr>
79
            <td>
80
              <Trans>Server status</Trans>
81
            </td>
82
            <td>
83
              <OnlyStaff>
84
                <Badge color={server.system_health ? 'green' : 'yellow'}>
×
85
                  {server.system_health ? (
×
86
                    <Trans>Healthy</Trans>
87
                  ) : (
88
                    <Trans>Issues detected</Trans>
89
                  )}
90
                </Badge>
91
              </OnlyStaff>
92
            </td>
93
          </tr>
94
          {server.worker_running != true && (
×
95
            <tr>
96
              <td>
97
                <Trans>Background Worker</Trans>
98
              </td>
99
              <td>
100
                <Badge color="red">
101
                  <Trans>Background worker not running</Trans>
102
                </Badge>
103
              </td>
104
            </tr>
105
          )}
106
          {server.email_configured != true && (
×
107
            <tr>
108
              <td>
109
                <Trans>Email Settings</Trans>
110
              </td>
111
              <td>
112
                <Badge color="red">
113
                  <Trans>Email settings not configured</Trans>
114
                </Badge>
115
              </td>
116
            </tr>
117
          )}
118
        </tbody>
119
      </Table>
120
      <Title order={5}>
121
        <Trans>Version</Trans>
122
      </Title>
123
      <Table>
124
        <tbody>
125
          <tr>
126
            <td>
127
              <Trans>Server Version</Trans>
128
            </td>
129
            <td>{server.version}</td>
130
          </tr>
131
          <tr>
132
            <td>
133
              <Trans>API Version</Trans>
134
            </td>
135
            <td>{server.apiVersion}</td>
136
          </tr>
137
        </tbody>
138
      </Table>
139
      <Divider />
140
      <Group position="right">
141
        <Button
142
          color="red"
143
          onClick={() => {
144
            context.closeModal(id);
×
145
          }}
146
        >
147
          <Trans>Dismiss</Trans>
148
        </Button>
149
      </Group>
150
    </Stack>
151
  );
152
}
3✔
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