incus-ui: init

This commit is contained in:
Erwin Boskma 2023-12-23 20:20:04 +01:00
parent 97b5cb8504
commit 98b2d5d5cb
Signed by: erwin
SSH key fingerprint: SHA256:/Wk1WZdLg+vQHs3in9qq7PsIp8SMzwGSk/RLZ5zPuZk
9 changed files with 719 additions and 0 deletions

View file

@ -219,6 +219,10 @@
};
packages = {
incus-ui = pkgs.callPackage ./pkgs/incus-ui { };
};
devShells.default = with pkgs;
mkShell {
inherit (self'.checks.pre-commit-check) shellHook;

View file

@ -22,4 +22,5 @@ _final: prev: {
patches = (prevAttrs.patches or [ ]) ++ [ ./ddccontrol-db/0001-add-del41d9.patch ];
});
incus-ui = prev.pkgs.callPackage ../pkgs/incus-ui { };
}

76
pkgs/incus-ui/default.nix Normal file
View file

@ -0,0 +1,76 @@
{ lib
, stdenv
, fetchFromGitHub
, fetchYarnDeps
, nodejs
, prefetch-yarn-deps
, yarn
}:
stdenv.mkDerivation rec {
pname = "incus-ui";
version = "0.5";
src = fetchFromGitHub {
owner = "canonical";
repo = "lxd-ui";
rev = version;
hash = "sha256-52MRf7bk8Un9wqz00+JjDmuJgPKYhgAhIbMbcAuf8W8=";
};
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-WWnNjwzhN57PzTPmLWWzPoj66VFUnuzW1hTjKlVV8II=";
};
patches = [
./ui-canonical-0001-Branding.patch
./ui-canonical-0002-Update-navigation.patch
./ui-canonical-0003-Update-certificate-generation.patch
./ui-canonical-0004-Remove-external-links.patch
./ui-canonical-0005-Remove-Canonical-image-servers.patch
];
nativeBuildInputs = [
nodejs
prefetch-yarn-deps
yarn
];
configurePhase = ''
runHook preConfigure
export HOME=$(mktemp -d)
yarn config --offline set yarn-offline-mirror "$offlineCache"
fixup-yarn-lock yarn.lock
yarn --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive install
patchShebangs node_modules
cp ${./favicon-32x32.png} public/assets/img/favicon-32x32.png
runHook postConfigure
'';
buildPhase = ''
runHook preBuild
yarn --offline build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r build/ui $out
runHook postInstall
'';
meta = with lib; {
description = "Easy and accessible container and virtual machine management. A browser interface for LXD";
homepage = "https://github.com/canonical/lxd-ui";
license = licenses.gpl3;
maintainers = with maintainers; [ ];
platforms = platforms.linux;
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -0,0 +1,276 @@
From b2c17ef237b6c7540d4947f3d4544dc08dbd33ad Mon Sep 17 00:00:00 2001
From: Erwin Boskma <erwin@datarift.nl>
Date: Sat, 23 Dec 2023 20:02:24 +0100
Subject: [PATCH] Branding
---
index.html | 2 +-
public/assets/img/incus-logo.svg | 129 ++++++++++++++++++++++++++++++
public/assets/img/lxd-logo.svg | 34 --------
src/components/Logo.tsx | 6 +-
src/sass/_pattern_navigation.scss | 8 +-
src/util/title.tsx | 2 +-
6 files changed, 138 insertions(+), 43 deletions(-)
create mode 100644 public/assets/img/incus-logo.svg
delete mode 100644 public/assets/img/lxd-logo.svg
diff --git a/index.html b/index.html
index 6aa1283..85b46bd 100644
--- a/index.html
+++ b/index.html
@@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>LXD UI</title>
+ <title>Incus UI</title>
<link rel="shortcut icon" href="/assets/img/favicon-32x32.png" type="image/x-icon">
<script>const global = globalThis;</script>
diff --git a/public/assets/img/incus-logo.svg b/public/assets/img/incus-logo.svg
new file mode 100644
index 0000000..9caf711
--- /dev/null
+++ b/public/assets/img/incus-logo.svg
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="165.754px" height="152.992px" viewBox="134.113 113.05 165.754 152.992"
+ enable-background="new 134.113 113.05 165.754 152.992" xml:space="preserve">
+<polygon fill="#DD4814" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 299.088,189.546 299.018,218.023 217.256,265.542 217.326,237.066 "/>
+<polygon fill="#DD4814" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 217.326,237.066 217.256,265.542 134.971,218.023 135.041,189.546 "/>
+<polygon fill="#333333" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 299.157,161.07 258.277,184.829 175.991,137.31 216.872,113.55 "/>
+<g enable-background="new ">
+ <polygon fill="#333333" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 299.367,161.175 299.262,189.651 258.382,213.411 258.486,184.934 "/>
+</g>
+<g enable-background="new ">
+ <g>
+ <polygon id="SVGID_1_" fill="#333333" points="258.277,184.829 258.207,213.306 175.922,165.787 175.991,137.31 "/>
+ </g>
+ <g>
+ <defs>
+ <polygon id="SVGID_4_" points="258.277,184.829 258.207,213.306 175.922,165.787 175.991,137.31 "/>
+ </defs>
+ <clipPath id="SVGID_6_">
+ <use xlink:href="#SVGID_4_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_6_)" fill="#333333" stroke="#FFFFFF" stroke-miterlimit="10" points="258.277,184.829
+ 258.207,213.306 175.922,165.787 175.991,137.31 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_2_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="258.277,184.829 258.207,213.306
+ 175.922,165.787 175.991,137.31 "/>
+ </g>
+</g>
+<polygon fill="#888888" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 258.242,199.05 217.361,222.81 135.076,175.326 175.956,151.566 "/>
+<polygon fill="#888888" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 217.361,222.81 217.326,237.066 135.041,189.546 135.076,175.326 "/>
+<polygon fill="#888888" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 258.242,199.05 258.207,213.306 217.326,237.066 217.361,222.81 "/>
+<polygon fill="#2C001E" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
+ 216.802,161.14 216.767,175.326 176.061,198.98 176.096,184.794 "/>
+<polygon fill="#CDCDCD" points="216.802,161.14 176.096,184.794 135.111,161.14 175.991,137.31 "/>
+<polygon fill="#CDCDCD" points="176.096,184.794 176.061,198.98 135.076,175.326 135.111,161.14 "/>
+<polygon fill="#CDCDCD" points="216.802,161.14 216.767,175.326 176.061,198.98 176.096,184.794 "/>
+<g>
+ <g enable-background="new ">
+ <g>
+ <defs>
+ <polygon id="SVGID_8_" points="216.802,175.326 176.061,198.98 135.111,175.326 175.991,151.566 "/>
+ </defs>
+ <clipPath id="SVGID_10_">
+ <use xlink:href="#SVGID_8_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_10_)" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="216.802,175.326
+ 176.096,198.98 135.111,175.326 175.991,151.566 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_3_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="216.802,175.326 176.061,198.98
+ 135.111,175.326 175.991,151.566 "/>
+ </g>
+ </g>
+ <g enable-background="new ">
+ <g>
+ <defs>
+ <polygon id="SVGID_12_" points="216.837,161.14 176.131,184.794 135.146,161.14 176.026,137.31 "/>
+ </defs>
+ <clipPath id="SVGID_13_">
+ <use xlink:href="#SVGID_12_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_13_)" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="216.837,161.14
+ 176.131,184.794 135.146,161.14 176.026,137.31 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_5_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="216.837,161.14 176.131,184.794
+ 135.146,161.14 176.026,137.31 "/>
+ </g>
+ </g>
+ <g enable-background="new ">
+ <g>
+ <defs>
+ <polygon id="SVGID_14_" points="176.131,184.794 176.061,198.98 135.111,175.326 135.146,161.14 "/>
+ </defs>
+ <clipPath id="SVGID_15_">
+ <use xlink:href="#SVGID_14_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_15_)" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="176.131,184.794
+ 176.096,198.98 135.111,175.326 135.146,161.14 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_7_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="176.131,184.794 176.061,198.98
+ 135.111,175.326 135.146,161.14 "/>
+ </g>
+ </g>
+ <g enable-background="new ">
+ <g>
+ <defs>
+ <polygon id="SVGID_16_" points="135.146,161.14 176.026,137.31 175.991,151.566 135.111,175.326 "/>
+ </defs>
+ <clipPath id="SVGID_17_">
+ <use xlink:href="#SVGID_16_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_17_)" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="135.146,161.14
+ 176.026,137.31 175.991,151.566 135.111,175.326 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_9_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="135.146,161.14 176.026,137.31
+ 175.991,151.566 135.111,175.326 "/>
+ </g>
+ </g>
+ <g enable-background="new ">
+ <g>
+ <defs>
+ <polygon id="SVGID_18_" points="176.026,137.31 216.837,161.14 216.802,175.326 175.991,151.566 "/>
+ </defs>
+ <clipPath id="SVGID_19_">
+ <use xlink:href="#SVGID_18_" overflow="visible"/>
+ </clipPath>
+ <polygon clip-path="url(#SVGID_19_)" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="176.026,137.31
+ 216.837,161.14 216.802,175.326 175.817,151.671 "/>
+ </g>
+ <g>
+ <polygon id="SVGID_11_" fill="none" stroke="#FFFFFF" stroke-miterlimit="10" points="176.026,137.31 216.837,161.14
+ 216.802,175.326 175.991,151.566 "/>
+ </g>
+ </g>
+</g>
+</svg>
diff --git a/public/assets/img/lxd-logo.svg b/public/assets/img/lxd-logo.svg
deleted file mode 100644
index 272ef59..0000000
--- a/public/assets/img/lxd-logo.svg
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1900 400">
- <defs>
- <style>
- .cls-1 {
- fill: none;
- }
-
- .cls-2 {
- fill: #e95420;
- }
-
- .cls-3 {
- fill: #fff;
- }
- </style>
- </defs>
- <g>
- <rect class="cls-2" width="252.43" height="400"/>
- <rect class="cls-1" x="30.05" y="168.29" width="192.33" height="192.33"/>
- <g>
- <path class="cls-3" d="m173.07,243.26v-47.87l-46.86-27.1-46.86,27.1v47.87l-41.66,24.05v54.19l46.86,27.1,41.66-24.16,41.66,24.05,46.86-27.1v-54.19l-41.66-23.94Zm-46.86-62.77l36.36,21v41.77l-36.36,21.11-36.47-21v-41.77l36.47-21.11Zm-41.66,155.92l-36.36-21v-42l36.24-20.89,36.58,21.11v41.77l-36.47,21Zm119.68-21l-36.36,21-36.36-21v-41.77l36.58-21.11,36.24,20.89v42h-.11Z"/>
- <polygon class="cls-3" points="171.49 319.69 191.47 307.84 191.47 284.35 171.49 296.1 171.49 319.69"/>
- <polygon class="cls-3" points="167.76 266.97 147.78 278.48 167.88 289.89 187.86 278.14 167.76 266.97"/>
- <polygon class="cls-3" points="144.28 308.18 164.38 319.92 164.38 296.1 144.05 284.69 144.28 308.18"/>
- <polygon class="cls-3" points="84.44 266.97 64.46 278.48 84.55 289.89 104.54 278.14 84.44 266.97"/>
- <polygon class="cls-3" points="60.96 308.18 81.05 319.92 81.05 296.1 60.84 284.69 60.96 308.18"/>
- <polygon class="cls-3" points="88.17 319.69 108.26 307.84 108.26 284.35 88.17 296.1 88.17 319.69"/>
- <polygon class="cls-3" points="146.09 206.11 126.1 195.05 106.12 206.56 126.1 217.85 146.09 206.11"/>
- <polygon class="cls-3" points="122.6 247.89 122.6 224.06 102.51 212.66 102.62 236.26 122.6 247.89"/>
- <polygon class="cls-3" points="129.72 247.77 149.81 235.92 149.81 212.21 129.72 224.06 129.72 247.77"/>
- </g>
- </g>
-</svg>
\ No newline at end of file
diff --git a/src/components/Logo.tsx b/src/components/Logo.tsx
index bcaf07e..92a0a5a 100644
--- a/src/components/Logo.tsx
+++ b/src/components/Logo.tsx
@@ -15,11 +15,11 @@ const Logo: FC = () => {
return (
<NavLink className="p-panel__logo" to={getLogoLink()}>
<img
- src="/ui/assets/img/lxd-logo.svg"
- alt="LXD-UI logo"
+ src="/ui/assets/img/incus-logo.svg"
+ alt="Incus-UI logo"
className="p-panel__logo-image"
/>
- <div className="logo-text p-heading--4">Canonical LXD</div>
+ <div className="logo-text p-heading--4">Incus UI</div>
</NavLink>
);
};
diff --git a/src/sass/_pattern_navigation.scss b/src/sass/_pattern_navigation.scss
index a224ef4..d68f363 100644
--- a/src/sass/_pattern_navigation.scss
+++ b/src/sass/_pattern_navigation.scss
@@ -5,20 +5,20 @@
.p-panel__logo-image {
height: 36px;
- margin-top: -3px;
+ margin-top: 2px;
max-width: inherit;
}
.logo-text {
color: #fff;
- left: 47px;
+ left: 70px;
position: absolute;
top: $spv--x-small;
}
@include mobile {
.logo-text {
- left: 38px;
+ left: 66px;
}
}
@@ -28,7 +28,7 @@
}
.logo-text {
- left: 52px;
+ left: 80px;
}
}
}
diff --git a/src/util/title.tsx b/src/util/title.tsx
index 715fd43..a40b0b7 100644
--- a/src/util/title.tsx
+++ b/src/util/title.tsx
@@ -6,6 +6,6 @@ export const setTitle = () => {
useEffect(() => {
const host = settings?.config["user.ui_title"] ?? location.hostname;
- document.title = `${host} | LXD UI`;
+ document.title = `${host} | Incus UI`;
}, [settings?.config]);
};
--
2.42.0

View file

@ -0,0 +1,74 @@
From 837f1824fb44a3f9d47370ebb098e09f84e7fd9d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:02:27 +0000
Subject: [PATCH 2/5] Update navigation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
---
src/components/Navigation.tsx | 5 ++---
src/components/NoMatch.tsx | 2 +-
src/context/useDocs.tsx | 2 +-
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx
index 0e0c704..93d2db2 100644
--- a/src/components/Navigation.tsx
+++ b/src/components/Navigation.tsx
@@ -287,7 +287,7 @@ const Navigation: FC = () => {
<li className="p-side-navigation__item">
<a
className="p-side-navigation__link"
- href="https://discourse.ubuntu.com/c/lxd/126"
+ href="https://discuss.linuxcontainers.org"
target="_blank"
rel="noreferrer"
title="Discussion"
@@ -302,7 +302,7 @@ const Navigation: FC = () => {
<li className="p-side-navigation__item">
<a
className="p-side-navigation__link"
- href="https://github.com/canonical/lxd-ui/issues/new"
+ href="https://github.com/zabbly/incus/issues/new"
target="_blank"
rel="noreferrer"
title="Report a bug"
@@ -314,7 +314,6 @@ const Navigation: FC = () => {
Report a bug
</a>
</li>
- <Version />
</ul>
</div>
</div>
diff --git a/src/components/NoMatch.tsx b/src/components/NoMatch.tsx
index 8d5270c..bd9e515 100644
--- a/src/components/NoMatch.tsx
+++ b/src/components/NoMatch.tsx
@@ -13,7 +13,7 @@ const NoMatch: FC = () => {
<br />
If you think this is an error in our product, please{" "}
<a
- href="https://github.com/canonical/lxd-ui/issues/new"
+ href="https://github.com/zabbly/incus/issues/new"
target="_blank"
rel="noreferrer"
title="Report a bug"
diff --git a/src/context/useDocs.tsx b/src/context/useDocs.tsx
index 454d98c..90a0de9 100644
--- a/src/context/useDocs.tsx
+++ b/src/context/useDocs.tsx
@@ -1,7 +1,7 @@
import { useSettings } from "context/useSettings";
export const useDocs = (): string => {
- const remoteBase = "https://documentation.ubuntu.com/lxd/en/latest";
+ const remoteBase = "/documentation";
const localBase = "/documentation";
const { data: settings } = useSettings();
--
2.39.2

View file

@ -0,0 +1,195 @@
From fc477ad289e1be83d2e4350e07563c01c8750468 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:03:33 +0000
Subject: [PATCH 3/5] Update certificate generation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
---
src/pages/login/BrowserImport.tsx | 18 +++++++++---------
src/pages/login/CertificateAdd.tsx | 4 ++--
src/pages/login/CertificateGenerate.tsx | 12 ++++++------
src/util/certificate.tsx | 4 ++--
4 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/pages/login/BrowserImport.tsx b/src/pages/login/BrowserImport.tsx
index f3cbcae..5d11d80 100644
--- a/src/pages/login/BrowserImport.tsx
+++ b/src/pages/login/BrowserImport.tsx
@@ -25,7 +25,7 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
<>
<li className="p-list__item">
This opens a certificate management dialog. Click <code>Import...</code>
- then <code>Next</code> and select the <code>lxd-ui.pfx</code> file you
+ then <code>Next</code> and select the <code>incus-ui.pfx</code> file you
just downloaded. Enter your password, or leave the field empty if you
have not set one. Click <code>Next</code>.
</li>
@@ -34,14 +34,14 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
<code>Next</code>, then click <code>Finish</code>.
</li>
<li className="p-list__item">
- Restart the browser and open LXD-UI. Select the LXD-UI certificate.
+ Restart the browser and open Incus-UI. Select the Incus-UI certificate.
</li>
</>
);
const downloadPfx = (
<li className="p-list__item u-clearfix">
- Download <code>lxd-ui.pfx</code>
+ Download <code>incus-ui.pfx</code>
{sendPfx && (
<div className="u-float-right--large">
<Button onClick={sendPfx}>Download pfx</Button>
@@ -82,12 +82,12 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
<code>Import</code>.
</li>
<li className="p-list__item">
- Select the <code>lxd-ui.pfx</code> file you just downloaded.
+ Select the <code>incus-ui.pfx</code> file you just downloaded.
Enter your password, or leave the field empty if you have not
set one.
</li>
<li className="p-list__item">
- Restart the browser and open LXD-UI. Select the LXD-UI
+ Restart the browser and open Incus-UI. Select the Incus-UI
certificate.
</li>
</ul>
@@ -108,11 +108,11 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
</li>
<li className="p-list__item">
Click the <code>Import</code> button and select the{" "}
- <code>lxd-ui.pfx</code> file you just downloaded. Enter your
+ <code>incus-ui.pfx</code> file you just downloaded. Enter your
password, or leave the field empty if you have not set one.
</li>
<li className="p-list__item">
- Restart the browser and open LXD-UI. Select the LXD-UI
+ Restart the browser and open Incus-UI. Select the Incus-UI
certificate.
</li>
</ul>
@@ -179,7 +179,7 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
keychain.
</li>
<li className="p-list__item">
- Drag the <code>lxd-ui.pfx</code> file onto the Keychain Access
+ Drag the <code>incus-ui.pfx</code> file onto the Keychain Access
app.
</li>
<li className="p-list__item">
@@ -187,7 +187,7 @@ const BrowserImport: FC<Props> = ({ sendPfx }) => {
and password for an administrator user on this computer.
</li>
<li className="p-list__item">
- Restart the browser and open LXD-UI. Select the LXD-UI
+ Restart the browser and open Incus-UI. Select the Incus-UI
certificate.
</li>
</ul>
diff --git a/src/pages/login/CertificateAdd.tsx b/src/pages/login/CertificateAdd.tsx
index e539588..bc09982 100644
--- a/src/pages/login/CertificateAdd.tsx
+++ b/src/pages/login/CertificateAdd.tsx
@@ -52,7 +52,7 @@ const CertificateAdd: FC = () => {
<p>Generate a token on the command line</p>
<div className="p-code-snippet">
<pre className="p-code-snippet__block--icon">
- <code>lxc config trust add --name lxd-ui</code>
+ <code>incus config trust add --name incus-ui</code>
</pre>
</div>
</div>
@@ -78,7 +78,7 @@ const CertificateAdd: FC = () => {
</Col>
<Col size={6}>
<div className="p-stepped-list__content">
- <p>Enjoy LXD UI.</p>
+ <p>Enjoy Incus UI.</p>
</div>
</Col>
</Row>
diff --git a/src/pages/login/CertificateGenerate.tsx b/src/pages/login/CertificateGenerate.tsx
index e8ce222..3c23645 100644
--- a/src/pages/login/CertificateGenerate.tsx
+++ b/src/pages/login/CertificateGenerate.tsx
@@ -82,7 +82,7 @@ const CertificateGenerate: FC = () => {
mainClassName="certificate-generate"
header={
<div className="p-panel__header is-sticky">
- <h1 className="p-panel__title">Setup LXD UI</h1>
+ <h1 className="p-panel__title">Setup Incus UI</h1>
</div>
}
>
@@ -137,12 +137,12 @@ const CertificateGenerate: FC = () => {
<Col size={6}>
<div className="p-stepped-list__content">
<p>
- Download <code>lxd-ui.crt</code> and add it to the LXD
+ Download <code>incus-ui.crt</code> and add it to the Incus
trust store
</p>
<div className="p-code-snippet">
<pre className="p-code-snippet__block--icon">
- <code>lxc config trust add Downloads/lxd-ui.crt</code>
+ <code>incus config trust add-certificate Downloads/incus-ui.crt</code>
</pre>
</div>
</div>
@@ -152,7 +152,7 @@ const CertificateGenerate: FC = () => {
<Button
onClick={() =>
downloadText(
- `lxd-ui-${location.hostname}.crt`,
+ `incus-ui-${location.hostname}.crt`,
certs.crt,
)
}
@@ -174,7 +174,7 @@ const CertificateGenerate: FC = () => {
certs
? () =>
downloadBase64(
- `lxd-ui-${location.hostname}.pfx`,
+ `incus-ui-${location.hostname}.pfx`,
certs.pfx,
)
: undefined
@@ -190,7 +190,7 @@ const CertificateGenerate: FC = () => {
</Col>
<Col size={6}>
<div className="p-stepped-list__content">
- <p>Enjoy LXD UI.</p>
+ <p>Enjoy Incus UI.</p>
</div>
</Col>
</Row>
diff --git a/src/util/certificate.tsx b/src/util/certificate.tsx
index b409147..a802f5d 100644
--- a/src/util/certificate.tsx
+++ b/src/util/certificate.tsx
@@ -26,7 +26,7 @@ const details = [
},
{
name: "organizationName",
- value: `LXD UI ${location.hostname} (Browser Generated)`,
+ value: `Incus UI ${location.hostname} (Browser Generated)`,
},
];
@@ -51,7 +51,7 @@ const generateCert = (password: string) => {
const asn1 = forge.pkcs12.toPkcs12Asn1(keys.privateKey, [cert], password, {
algorithm: "3des", // would like to use aes, but macOS keychain only supports 3des
generateLocalKeyId: true,
- friendlyName: "LXD-UI",
+ friendlyName: "Incus-UI",
});
const der = forge.asn1.toDer(asn1).getBytes();
const pfx = forge.util.encode64(der);
--
2.39.2

View file

@ -0,0 +1,38 @@
From 1ada954bbf0220653ad3edec673b83fc32f2c56d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:12:29 +0000
Subject: [PATCH 4/5] Remove external links
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
---
src/pages/storage/UploadCustomImageHint.tsx | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/src/pages/storage/UploadCustomImageHint.tsx b/src/pages/storage/UploadCustomImageHint.tsx
index b66934e..fbb616d 100644
--- a/src/pages/storage/UploadCustomImageHint.tsx
+++ b/src/pages/storage/UploadCustomImageHint.tsx
@@ -9,17 +9,6 @@ const UploadCustomImageHint: FC = () => {
<h5 className="p-notification__title">
Some image formats need to be modified in order to work with LXD.
</h5>
- <p>
- <a
- className="p-notification__action"
- href="https://ubuntu.com/tutorials/how-to-install-a-windows-11-vm-using-lxd#1-overview"
- target="_blank"
- rel="noreferrer"
- >
- Windows ISO images
- <Icon className="external-link-icon" name="external-link" />
- </a>
- </p>
</div>
</div>
</>
--
2.39.2

View file

@ -0,0 +1,55 @@
From b429729297ed2bf93af12b5f429f5c0122e61a02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
Date: Wed, 22 Nov 2023 23:16:13 +0000
Subject: [PATCH 5/5] Remove Canonical image servers
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
---
src/pages/images/ImageSelector.tsx | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/src/pages/images/ImageSelector.tsx b/src/pages/images/ImageSelector.tsx
index 3af5f69..868a7fe 100644
--- a/src/pages/images/ImageSelector.tsx
+++ b/src/pages/images/ImageSelector.tsx
@@ -81,25 +81,13 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
},
);
- const { data: canonicalImages = [], isLoading: isCiLoading } = useQuery({
- queryKey: [queryKeys.images, canonicalServer],
- queryFn: () => loadImages(canonicalJson, canonicalServer),
- });
-
- const { data: minimalImages = [], isLoading: isMinimalLoading } = useQuery({
- queryKey: [queryKeys.images, minimalServer],
- queryFn: () => loadImages(minimalJson, minimalServer),
- });
-
const { data: localImages = [], isLoading: isLocalImageLoading } = useQuery({
queryKey: [queryKeys.images, project],
queryFn: () => fetchImageList(project ?? ""),
});
const isLoading =
- isCiLoading ||
isLciLoading ||
- isMinimalLoading ||
isLocalImageLoading ||
isSettingsLoading;
const archSupported = getArchitectureAliases(
@@ -110,8 +98,6 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
: localImages
.filter((image) => !image.cached)
.map(localLxdToRemoteImage)
- .concat([...minimalImages].reverse().sort(byLtsFirst))
- .concat([...canonicalImages].reverse().sort(byLtsFirst))
.concat(linuxContainerImages)
.filter((image) => archSupported.includes(image.arch));
--
2.39.2