Skip to content

Commit 1ae4444

Browse files
authored
Merge pull request #368 from Ravinou/develop
Release v2.4.2
2 parents bac544e + 14883f2 commit 1ae4444

11 files changed

Lines changed: 1889 additions & 1562 deletions

File tree

.husky/append-icon.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ function findTypeIcon() {
3030
declare -A icons
3131
icons[build]='🤖'
3232
icons[chore]='🧹'
33+
icons["chore(deps)"]='🧹'
3334
icons[config]='🔧'
3435
icons[deploy]='🚀'
3536
icons[doc]='📚'

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#!/bin/bash
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
# run commit lint
52
npx commitlint --edit "$1"
63

Components/UI/StorageBar/StorageBar.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import classes from './StorageBar.module.css';
33

44
export default function StorageBar(props) {
55
//Var
6-
//storageUsed is in octet, storageSize is in GB. Round to 1 decimal for %.
7-
const storageUsedPercent = (((props.storageUsed / 1000000) * 100) / props.storageSize).toFixed(1);
6+
//storageUsed is in kB, storageSize is in GB. Round to 1 decimal for %.
7+
const storageUsedPercent = (((props.storageUsed / 1024 ** 2) * 100) / props.storageSize).toFixed(
8+
1
9+
);
810

911
return (
1012
<div className={classes.barContainer}>
@@ -19,8 +21,8 @@ export default function StorageBar(props) {
1921
<div className={classes.progressionStyle} />
2022
</div>
2123
<div className={classes.tooltip}>
22-
{storageUsedPercent}% ({(props.storageUsed / 1000000).toFixed(1)} GB / {props.storageSize}{' '}
23-
GB)
24+
{storageUsedPercent}% ({(props.storageUsed / 1024 ** 2).toFixed(1)} GB /{' '}
25+
{props.storageSize} GB)
2426
</div>
2527
</div>
2628
</div>

Containers/Monitoring/StorageUsedChartBar/StorageUsedChartBar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ export default function StorageUsedChartBar() {
7171
datasets: [
7272
{
7373
label: 'Storage used (%)',
74-
//storageUsed is in octet, storageSize is in GB. Round to 1 decimal for %.
74+
//storageUsed is in kB, storageSize is in GB. Round to 1 decimal for %.
7575
data: data.map((repo) =>
76-
(((repo.storageUsed / 1000000) * 100) / repo.storageSize).toFixed(1)
76+
(((repo.storageUsed / 1024 ** 2) * 100) / repo.storageSize).toFixed(1)
7777
),
7878
backgroundColor: '#704dff',
7979
},

Containers/RepoList/RepoList.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//Lib
22
import classes from './RepoList.module.css';
3-
import { useState, useEffect } from 'react';
3+
import React, { useState, useEffect } from 'react';
44
import { IconPlus } from '@tabler/icons-react';
55
import { useRouter } from 'next/router';
66
import Link from 'next/link';
@@ -109,7 +109,7 @@ export default function RepoList() {
109109
//Dynamic list of repositories (with a map of Repo components)
110110
const renderRepoList = data.repoList.map((repo, index) => {
111111
return (
112-
<>
112+
<React.Fragment key={repo.id}>
113113
<Repo
114114
key={repo.id}
115115
id={repo.id}
@@ -127,7 +127,7 @@ export default function RepoList() {
127127
repoManageEditHandler={() => repoManageEditHandler(repo.id)}
128128
wizardEnv={wizardEnv}
129129
></Repo>
130-
</>
130+
</React.Fragment>
131131
);
132132
});
133133

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG UID=1001
22
ARG GID=1001
33

4-
FROM node:20-bookworm-slim as base
4+
FROM node:22-bookworm-slim as base
55

66
# build stage
77
FROM base AS deps
@@ -10,7 +10,7 @@ WORKDIR /app
1010

1111
COPY package.json package-lock.json ./
1212

13-
RUN npm ci --only=production
13+
RUN npm ci --omit=dev
1414

1515
FROM base AS builder
1616

@@ -31,6 +31,7 @@ ARG UID
3131
ARG GID
3232

3333
ENV NODE_ENV production
34+
ENV HOSTNAME=
3435

3536
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list
3637
RUN apt-get update && apt-get install -y \

helpers/shells/getStorageUsed.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
# Exit when any command fails
1515
set -e
1616

17+
# Ignore "lost+found" directories
18+
GLOBIGNORE="LOST+FOUND:lost+found"
19+
1720
# Load .env if exists
1821
if [[ -f .env ]]; then
1922
source .env

next.config.js

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
11
/** @type {import('next').NextConfig} */
22

33
module.exports = {
4-
// nextConfig
5-
images: {
6-
unoptimized: true,
7-
},
8-
reactStrictMode: false,
9-
swcMinify: true,
10-
//basePath: '/borgwarehouse-demo',
11-
async redirects() {
12-
return [
13-
{
14-
source: '/setup-wizard',
15-
destination: '/setup-wizard/1',
16-
permanent: true,
17-
},
18-
{
19-
source: '/manage-repo',
20-
destination: '/',
21-
permanent: true,
22-
},
23-
];
24-
},
4+
// nextConfig
5+
images: {
6+
unoptimized: true,
7+
},
8+
reactStrictMode: false,
9+
async redirects() {
10+
return [
11+
{
12+
source: '/setup-wizard',
13+
destination: '/setup-wizard/1',
14+
permanent: true,
15+
},
16+
{
17+
source: '/manage-repo',
18+
destination: '/',
19+
permanent: true,
20+
},
21+
];
22+
},
2523
};

0 commit comments

Comments
 (0)