Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ function App() {
// Embedded Mode (No Sidebar)
if (auth.isAuthenticated && hideNavigationElements) {
return (
<main className="vh-100 flex-grow-1 d-flex overflow-hidden">
<main className="vh-100 flex-grow-1 d-flex overflow-hidden bg-light">
<section className="flex-grow-1 overflow-auto">{RouterElement}</section>
</main>
);
Expand All @@ -185,7 +185,7 @@ function App() {
return (
<div
data-testid="app"
className="d-flex vh-100 flex-column overflow-hidden"
className="d-flex vh-100 flex-column overflow-hidden bg-light"
>
{showNavigation && <Topbar onToggle={toggleIsMobileMenuOpen} />}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/ContainerDetails.scss
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}

.containerSectionCard {
border-radius: 12px;
border-radius: 0.5rem;
background: #ffffff;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
padding: 10px;
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/components/ContainersOverview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
.containerListCard {
background: #ffffff;
border: 1px solid #dee2e6;
border-radius: 12px;
border-radius: 0.5rem;
padding: 10px;
overflow-y: auto;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
Expand All @@ -40,8 +40,6 @@
margin-bottom: 6px;
border: none !important;
background: transparent !important;
color: #212529 !important;
box-shadow: none !important;
transition: all 0.15s ease;

&:hover {
Expand All @@ -50,9 +48,9 @@

&.active {
background: #ffffff !important;
border-left: 3px solid #0d6efd !important;
border-left: 3px solid var(--bs-primary) !important;
border-radius: 0%;
color: #0d6efd !important;
color: var(--bs-primary) !important;
font-weight: 500;
}

Expand Down
5 changes: 3 additions & 2 deletions frontend/src/components/ContainersOverview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import type {
import Button from "@/components/Button";
import ContainerDetails from "@/components/ContainerDetails";
import "@/components/ContainersOverview.scss";
import { Card } from "react-bootstrap";

const CONTAINERS_TABLE_FRAGMENT = graphql`
fragment ContainersOverview_ContainerEdgeFragment on ContainerConnection {
Expand Down Expand Up @@ -70,14 +71,14 @@ const ContainersOverview = ({

if (containers.length === 0) {
return (
<div className={className}>
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<p>
<FormattedMessage
id="components.ContainersOverview.noContainers"
defaultMessage="No containers available."
/>
</p>
</div>
</Card>
);
}

Expand Down
8 changes: 6 additions & 2 deletions frontend/src/components/DeviceTabs/ApplicationsTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import React, { useCallback, useEffect, useState, useMemo } from "react";
import { graphql, useRefetchableFragment } from "react-relay/hooks";
import { FormattedMessage, useIntl } from "react-intl";
import { Card } from "react-bootstrap";

import type { ApplicationsTab_deployedApplications$key } from "@/api/__generated__/ApplicationsTab_deployedApplications.graphql";
import type { ApplicationsTab_deployedApplications_RefetchQuery } from "@/api/__generated__/ApplicationsTab_deployedApplications_RefetchQuery.graphql";
Expand Down Expand Up @@ -83,6 +84,7 @@ const DeviceApplicationsTab = ({ deviceRef }: DeviceApplicationsTabProps) => {

return (
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-applications-tab"
title={intl.formatMessage({
id: "components.DeviceTabs.ApplicationsTab.title",
Expand All @@ -98,7 +100,7 @@ const DeviceApplicationsTab = ({ deviceRef }: DeviceApplicationsTabProps) => {
>
{errorFeedback}
</Alert>
<div className="mt-3">
<Card className="h-100 border-0 p-3 shadow-sm mb-3">
<h5>
<FormattedMessage
id="components.DeviceTabs.ApplicationsTab.InstallNewApp"
Expand All @@ -112,14 +114,16 @@ const DeviceApplicationsTab = ({ deviceRef }: DeviceApplicationsTabProps) => {
setErrorFeedback={setErrorFeedback}
onDeployComplete={handleRefetch}
/>
</Card>
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<h5 className="mt-4">
<FormattedMessage
id="components.DeviceTabs.ApplicationsTab.DeployedApplications"
defaultMessage="Deployed Applications"
/>
</h5>
<DeployedApplicationsTable deviceRef={device} />
</div>
</Card>
</Tab>
);
};
Expand Down
8 changes: 5 additions & 3 deletions frontend/src/components/DeviceTabs/BaseImageTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
//
// SPDX-License-Identifier: Apache-2.0

import { graphql, useFragment } from "react-relay/hooks";
import { Card } from "react-bootstrap";
import { FormattedMessage, useIntl } from "react-intl";
import { graphql, useFragment } from "react-relay/hooks";

import type { BaseImageTab_baseImage$key } from "@/api/__generated__/BaseImageTab_baseImage.graphql";

Expand Down Expand Up @@ -57,13 +58,14 @@ const DeviceBaseImageTab = ({ deviceRef }: DeviceBaseImageTabProps) => {
}
return (
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-base-image-tab"
title={intl.formatMessage({
id: "components.DeviceTabs.BaseImageTab.title",
defaultMessage: "Base Image",
})}
>
<div className="mt-3">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<Stack gap={3}>
{baseImage.name !== null && (
<FormRow
Expand Down Expand Up @@ -122,7 +124,7 @@ const DeviceBaseImageTab = ({ deviceRef }: DeviceBaseImageTabProps) => {
</FormRow>
)}
</Stack>
</div>
</Card>
</Tab>
);
};
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/DeviceTabs/BatteryTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import { graphql, useFragment } from "react-relay/hooks";
import { useIntl } from "react-intl";
import { Card } from "react-bootstrap";

import type { BatteryTab_batteryStatus$key } from "@/api/__generated__/BatteryTab_batteryStatus.graphql";

Expand All @@ -44,15 +45,16 @@ const DeviceBatteryTab = ({ deviceRef }: DeviceBatteryTabProps) => {

return (
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-battery-tab"
title={intl.formatMessage({
id: "components.DeviceTabs.BatteryTab.title",
defaultMessage: "Battery",
})}
>
<div className="mt-3">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<BatteryTable deviceRef={device} />
</div>
</Card>
</Tab>
);
};
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/components/DeviceTabs/CellularConnectionTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import { graphql, useFragment } from "react-relay/hooks";
import { useIntl } from "react-intl";
import { Card } from "react-bootstrap";

import type { CellularConnectionTab_cellularConnection$key } from "@/api/__generated__/CellularConnectionTab_cellularConnection.graphql";

Expand Down Expand Up @@ -47,15 +48,16 @@ const DeviceCellularConnectionTab = ({

return (
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-cellular-connection-tab"
title={intl.formatMessage({
id: "components.DeviceTabs.CellularConnectionTab.title",
defaultMessage: "Cellular Connection",
})}
>
<div className="mt-3">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<CellularConnectionTabs deviceRef={device} />
</div>
</Card>
</Tab>
);
};
Expand Down
11 changes: 8 additions & 3 deletions frontend/src/components/DeviceTabs/FileManagementTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { useCallback, useMemo, useState } from "react";
import { FormattedMessage, useIntl } from "react-intl";
import { graphql, useFragment } from "react-relay/hooks";
import Select from "react-select";
import { Card } from "react-bootstrap";

import type { FileManagementTab_fileManagement$key } from "@/api/__generated__/FileManagementTab_fileManagement.graphql";

Expand Down Expand Up @@ -214,9 +215,13 @@ const FileManagementTab = ({ deviceRef }: FileManagementTabProps) => {
};

return (
<Tab eventKey="device-file-management-tab" title="File Management">
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-file-management-tab"
title="File Management"
>
{modeOptions.length > 1 && (
<div className="mt-3">
<Card className="h-100 border-0 p-3 shadow-sm mb-3">
<Form.Group controlId="file-management-mode" className="mb-0">
<h5>
<FormattedMessage
Expand All @@ -240,7 +245,7 @@ const FileManagementTab = ({ deviceRef }: FileManagementTabProps) => {
}}
/>
</Form.Group>
</div>
</Card>
)}

{renderTabContent()}
Expand Down
12 changes: 6 additions & 6 deletions frontend/src/components/DeviceTabs/FilesDeleteTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import split from "lodash/split";
import React, { useCallback, useMemo, useState } from "react";
import { Card } from "react-bootstrap";
import { FormattedMessage, useIntl } from "react-intl";
import {
ConnectionHandler,
Expand Down Expand Up @@ -372,7 +373,7 @@ const FilesDeleteTab = ({

const content = (
<>
<div className="mt-3">
<Card className="h-100 border-0 p-3 shadow-sm mb-3">
<Alert
show={!!errorFeedback}
variant="danger"
Expand All @@ -392,11 +393,9 @@ const FilesDeleteTab = ({
onDeleteSuccess={onDeleteSuccess}
/>
</Stack>
</div>
</Card>

<hr />

<div className="mt-4">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<h5>
<FormattedMessage
id="components.DeviceTabs.FilesDeleteTab.requestHistory"
Expand All @@ -405,7 +404,7 @@ const FilesDeleteTab = ({
</h5>

<FileDeleteRequestsTable requests={fileDeleteRequests} />
</div>
</Card>
</>
);

Expand All @@ -415,6 +414,7 @@ const FilesDeleteTab = ({

return (
<Tab
className="pt-3 d-flex flex-column flex-grow-1"
eventKey="device-files-delete-tab"
title={intl.formatMessage({
id: "components.DeviceTabs.FilesDeleteTab.title",
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/DeviceTabs/FilesDeviceToServerTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import split from "lodash/split";
import React, { useCallback, useMemo, useState } from "react";
import { Card } from "react-bootstrap";
import { FormattedMessage, useIntl } from "react-intl";
import {
ConnectionHandler,
Expand Down Expand Up @@ -447,7 +448,7 @@ const FilesDeviceToServerTab = ({

const content = (
<>
<div className="mt-3">
<Card className="h-100 border-0 p-3 shadow-sm mb-3">
<Alert
show={!!errorFeedback}
variant="danger"
Expand All @@ -468,11 +469,11 @@ const FilesDeviceToServerTab = ({
isOnline={isOnline}
/>
</Stack>
</div>
</Card>

<hr />

<div className="mt-4">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<h5>
<FormattedMessage
id="components.DeviceTabs.FilesDeviceToServerTab.requestHistory"
Expand All @@ -481,7 +482,7 @@ const FilesDeviceToServerTab = ({
</h5>

<FilesDeviceToServerTable requests={fileUploadRequests} />
</div>
</Card>
</>
);

Expand Down
12 changes: 5 additions & 7 deletions frontend/src/components/DeviceTabs/FilesServerToDeviceTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import React, {
useMemo,
useState,
} from "react";
import { ToggleButton, ToggleButtonGroup } from "react-bootstrap";
import { Card, ToggleButton, ToggleButtonGroup } from "react-bootstrap";
import { FormattedMessage, useIntl } from "react-intl";
import type { PreloadedQuery } from "react-relay/hooks";
import {
Expand Down Expand Up @@ -705,7 +705,7 @@ const FilesServerToDeviceTab = ({

const content = (
<>
<div className="mt-3">
<Card className="h-100 border-0 p-3 shadow-sm mb-3">
<Alert
show={!!errorFeedback}
variant="danger"
Expand Down Expand Up @@ -785,11 +785,9 @@ const FilesServerToDeviceTab = ({
)}
</Stack>
</Suspense>
</div>
</Card>

<hr />

<div className="mt-4">
<Card className="gap-2 border-0 shadow-sm flex-grow-1 p-4">
<h5>
<FormattedMessage
id="components.DeviceTabs.FilesServerToDeviceTab.requestHistory"
Expand All @@ -798,7 +796,7 @@ const FilesServerToDeviceTab = ({
</h5>

<FilesServerToDeviceTable requests={fileDownloadRequests} />
</div>
</Card>
</>
);

Expand Down
Loading
Loading