incus-ui: 0.5 -> 0.6
This commit is contained in:
parent
513fc5f771
commit
fd23604902
7 changed files with 157 additions and 65 deletions
|
@ -12,18 +12,19 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "incus-ui";
|
||||
version = "0.5";
|
||||
version = "0.6";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "canonical";
|
||||
repo = "lxd-ui";
|
||||
rev = version;
|
||||
hash = "sha256-52MRf7bk8Un9wqz00+JjDmuJgPKYhgAhIbMbcAuf8W8=";
|
||||
# hash = "sha256-52MRf7bk8Un9wqz00+JjDmuJgPKYhgAhIbMbcAuf8W8=";
|
||||
hash = "sha256-3Ts6lKyzpMDVATCKD1fFIGTskWzWpQUT9S8cPFnlEOs=";
|
||||
};
|
||||
|
||||
offlineCache = fetchYarnDeps {
|
||||
yarnLock = "${src}/yarn.lock";
|
||||
hash = "sha256-WWnNjwzhN57PzTPmLWWzPoj66VFUnuzW1hTjKlVV8II=";
|
||||
hash = "sha256-0pyxwMGGqogEe1w3sail8NUDHtxLQZU9Wg8E6rQNy4o=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
@ -32,6 +33,7 @@ stdenv.mkDerivation rec {
|
|||
./ui-canonical-0003-Update-certificate-generation.patch
|
||||
./ui-canonical-0004-Remove-external-links.patch
|
||||
./ui-canonical-0005-Remove-Canonical-image-servers.patch
|
||||
./ui-canonical-0006-Remove-version-check.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -1,16 +1,22 @@
|
|||
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
|
||||
From 530478927deddecbcc49efd01cad10ed49f0ca26 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
|
||||
Date: Wed, 22 Nov 2023 22:59:56 +0000
|
||||
Subject: [PATCH 1/6] Branding
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
|
||||
---
|
||||
index.html | 2 +-
|
||||
public/assets/img/incus-logo.svg | 129 ++++++++++++++++++++++++++++++
|
||||
public/assets/img/incus-logo.svg | 129 ++++++++++++++++++++++++++++
|
||||
public/assets/img/lxd-logo.svg | 34 --------
|
||||
src/components/Logo.tsx | 6 +-
|
||||
src/pages/login/Login.tsx | 1 -
|
||||
src/sass/_pattern_navigation.scss | 8 +-
|
||||
src/sass/styles.scss | 4 -
|
||||
src/util/title.tsx | 2 +-
|
||||
6 files changed, 138 insertions(+), 43 deletions(-)
|
||||
9 files changed, 138 insertions(+), 48 deletions(-)
|
||||
create mode 100644 public/assets/img/incus-logo.svg
|
||||
delete mode 100644 public/assets/img/lxd-logo.svg
|
||||
|
||||
|
@ -222,8 +228,20 @@ index bcaf07e..92a0a5a 100644
|
|||
</NavLink>
|
||||
);
|
||||
};
|
||||
diff --git a/src/pages/login/Login.tsx b/src/pages/login/Login.tsx
|
||||
index 608f7a0..130198e 100644
|
||||
--- a/src/pages/login/Login.tsx
|
||||
+++ b/src/pages/login/Login.tsx
|
||||
@@ -24,7 +24,6 @@ const Login: FC = () => {
|
||||
<CustomLayout>
|
||||
<Row className="empty-state">
|
||||
<Col size={6} className="col-start-large-4">
|
||||
- <Icon name="containers" className="empty-state-icon lxd-icon" />
|
||||
<h1 className="p-heading--4 u-sv-2">Login</h1>
|
||||
{hasOidc && (
|
||||
<>
|
||||
diff --git a/src/sass/_pattern_navigation.scss b/src/sass/_pattern_navigation.scss
|
||||
index a224ef4..d68f363 100644
|
||||
index 92236ef..1373ab0 100644
|
||||
--- a/src/sass/_pattern_navigation.scss
|
||||
+++ b/src/sass/_pattern_navigation.scss
|
||||
@@ -5,20 +5,20 @@
|
||||
|
@ -259,18 +277,33 @@ index a224ef4..d68f363 100644
|
|||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/sass/styles.scss b/src/sass/styles.scss
|
||||
index 43f63ae..7aa17ac 100644
|
||||
--- a/src/sass/styles.scss
|
||||
+++ b/src/sass/styles.scss
|
||||
@@ -146,10 +146,6 @@ body {
|
||||
@include vf-icon-external-link($color-link);
|
||||
}
|
||||
|
||||
-.lxd-icon {
|
||||
- background-image: url("data:image/svg+xml,%0A%3Csvg width='38' height='38' viewBox='0 0 38 38' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M28.5311 15.7998V5.71128L18.6554 0L8.77977 5.71128V15.7998L0 20.8683V32.2887L9.87566 38L18.6554 32.9083L27.4352 37.9768L37.3108 32.2655V20.8451L28.5311 15.7998ZM18.6554 2.57113L26.3182 6.99684V15.7998L18.6554 20.2487L10.9694 15.823V7.02002L18.6554 2.57113ZM9.87566 35.431L2.21286 31.0053V22.1538L9.85037 17.7513L17.5595 22.2002V31.0032L9.87355 35.4289L9.87566 35.431ZM35.098 31.0053L27.4352 35.431L19.7724 31.0053V22.2023L27.4816 17.7534L35.1191 22.156V31.0074H35.0959L35.098 31.0053Z' fill='%23D9D9D9'/%3E%3Cpath d='M28.1978 31.9072L32.4085 29.4099V24.4594L28.1978 26.9357V31.9072Z' fill='%23D9D9D9'/%3E%3Cpath d='M27.4119 20.7966L23.2012 23.2223L27.4372 25.627L31.648 23.1507L27.4119 20.7966Z' fill='%23D9D9D9'/%3E%3Cpath d='M22.4635 29.4816L26.6995 31.9558V26.9357L22.415 24.5311L22.4635 29.4816Z' fill='%23D9D9D9'/%3E%3Cpath d='M9.85235 20.7966L5.6416 23.2223L9.87553 25.627L14.0884 23.1507L9.85235 20.7966Z' fill='%23D9D9D9'/%3E%3Cpath d='M4.90371 29.4816L9.13764 31.9558V26.9357L4.87842 24.5311L4.90371 29.4816Z' fill='%23D9D9D9'/%3E%3Cpath d='M10.6387 31.9072L14.8726 29.4099V24.4594L10.6387 26.9357V31.9072Z' fill='%23D9D9D9'/%3E%3Cpath d='M22.8455 7.97052L18.6326 5.63965L14.4219 8.06536L18.6326 10.4447L22.8455 7.97052Z' fill='%23D9D9D9'/%3E%3Cpath d='M17.8946 16.7755V11.7534L13.6606 9.35083L13.6838 14.3245L17.8946 16.7755Z' fill='%23D9D9D9'/%3E%3Cpath d='M19.3955 16.7503L23.6294 14.2529V9.2561L19.3955 11.7535V16.7503Z' fill='%23D9D9D9'/%3E%3C/svg%3E%0A");
|
||||
-}
|
||||
-
|
||||
.actions-list {
|
||||
display: inline-block;
|
||||
min-width: 8.5rem;
|
||||
diff --git a/src/util/title.tsx b/src/util/title.tsx
|
||||
index 715fd43..a40b0b7 100644
|
||||
index 8a80a11..6b69387 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;
|
||||
const host = settings?.config?.["user.ui_title"] ?? location.hostname;
|
||||
- document.title = `${host} | LXD UI`;
|
||||
+ document.title = `${host} | Incus UI`;
|
||||
}, [settings?.config]);
|
||||
};
|
||||
--
|
||||
2.42.0
|
||||
2.34.1
|
||||
|
||||
|
|
|
@ -1,23 +1,23 @@
|
|||
From 837f1824fb44a3f9d47370ebb098e09f84e7fd9d Mon Sep 17 00:00:00 2001
|
||||
From 9f44a025b61024f47c8eabcf9a0f25af0d2585da 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
|
||||
Subject: [PATCH 2/6] 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/Navigation.tsx | 4 ++--
|
||||
src/components/NoMatch.tsx | 2 +-
|
||||
src/context/useDocs.tsx | 2 +-
|
||||
3 files changed, 4 insertions(+), 5 deletions(-)
|
||||
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/components/Navigation.tsx b/src/components/Navigation.tsx
|
||||
index 0e0c704..93d2db2 100644
|
||||
index d2321da..f79deeb 100644
|
||||
--- a/src/components/Navigation.tsx
|
||||
+++ b/src/components/Navigation.tsx
|
||||
@@ -287,7 +287,7 @@ const Navigation: FC = () => {
|
||||
@@ -286,7 +286,7 @@ const Navigation: FC = () => {
|
||||
<li className="p-side-navigation__item">
|
||||
<a
|
||||
className="p-side-navigation__link"
|
||||
|
@ -26,7 +26,7 @@ index 0e0c704..93d2db2 100644
|
|||
target="_blank"
|
||||
rel="noreferrer"
|
||||
title="Discussion"
|
||||
@@ -302,7 +302,7 @@ const Navigation: FC = () => {
|
||||
@@ -301,7 +301,7 @@ const Navigation: FC = () => {
|
||||
<li className="p-side-navigation__item">
|
||||
<a
|
||||
className="p-side-navigation__link"
|
||||
|
@ -35,14 +35,6 @@ index 0e0c704..93d2db2 100644
|
|||
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
|
||||
|
@ -70,5 +62,5 @@ index 454d98c..90a0de9 100644
|
|||
|
||||
const { data: settings } = useSettings();
|
||||
--
|
||||
2.39.2
|
||||
2.34.1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From fc477ad289e1be83d2e4350e07563c01c8750468 Mon Sep 17 00:00:00 2001
|
||||
From fc42d29bfc591a2f3a31cb7355ac5a6fb2f64614 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
|
||||
Subject: [PATCH 3/6] Update certificate generation
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -92,7 +92,7 @@ index f3cbcae..5d11d80 100644
|
|||
</li>
|
||||
</ul>
|
||||
diff --git a/src/pages/login/CertificateAdd.tsx b/src/pages/login/CertificateAdd.tsx
|
||||
index e539588..bc09982 100644
|
||||
index e539588..05ed677 100644
|
||||
--- a/src/pages/login/CertificateAdd.tsx
|
||||
+++ b/src/pages/login/CertificateAdd.tsx
|
||||
@@ -52,7 +52,7 @@ const CertificateAdd: FC = () => {
|
||||
|
@ -100,7 +100,7 @@ index e539588..bc09982 100644
|
|||
<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>
|
||||
+ <code>incus config trust add incus-ui</code>
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -191,5 +191,5 @@ index b409147..a802f5d 100644
|
|||
const der = forge.asn1.toDer(asn1).getBytes();
|
||||
const pfx = forge.util.encode64(der);
|
||||
--
|
||||
2.39.2
|
||||
2.34.1
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 1ada954bbf0220653ad3edec673b83fc32f2c56d Mon Sep 17 00:00:00 2001
|
||||
From 7d9a5b8d9bbf2408dc8334e34db9f487a691c0b3 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
|
||||
Subject: [PATCH 4/6] Remove external links
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
@ -12,13 +12,13 @@ Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
|
|||
1 file changed, 11 deletions(-)
|
||||
|
||||
diff --git a/src/pages/storage/UploadCustomImageHint.tsx b/src/pages/storage/UploadCustomImageHint.tsx
|
||||
index b66934e..fbb616d 100644
|
||||
index 128c658..22c9a1f 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">
|
||||
<h3 className="p-notification__title">
|
||||
Some image formats need to be modified in order to work with LXD.
|
||||
</h5>
|
||||
</h3>
|
||||
- <p>
|
||||
- <a
|
||||
- className="p-notification__action"
|
||||
|
@ -34,5 +34,5 @@ index b66934e..fbb616d 100644
|
|||
</div>
|
||||
</>
|
||||
--
|
||||
2.39.2
|
||||
2.34.1
|
||||
|
||||
|
|
|
@ -1,23 +1,40 @@
|
|||
From b429729297ed2bf93af12b5f429f5c0122e61a02 Mon Sep 17 00:00:00 2001
|
||||
From 98fcec984025deeb3a93cdd1618e3d47abb0d0cd 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
|
||||
Subject: [PATCH 5/6] 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(-)
|
||||
src/pages/images/ImageSelector.tsx | 34 +++++++++---------------------
|
||||
1 file changed, 10 insertions(+), 24 deletions(-)
|
||||
|
||||
diff --git a/src/pages/images/ImageSelector.tsx b/src/pages/images/ImageSelector.tsx
|
||||
index 3af5f69..868a7fe 100644
|
||||
index f026ec3..91333be 100644
|
||||
--- a/src/pages/images/ImageSelector.tsx
|
||||
+++ b/src/pages/images/ImageSelector.tsx
|
||||
@@ -81,25 +81,13 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
|
||||
},
|
||||
);
|
||||
@@ -33,13 +33,9 @@ interface Props {
|
||||
onClose: () => void;
|
||||
}
|
||||
|
||||
-const canonicalJson =
|
||||
- "https://cloud-images.ubuntu.com/releases/streams/v1/com.ubuntu.cloud:released:download.json";
|
||||
-const canonicalServer = "https://cloud-images.ubuntu.com/releases";
|
||||
-
|
||||
-const minimalJson =
|
||||
- "https://cloud-images.ubuntu.com/minimal/releases/streams/v1/com.ubuntu.cloud:released:download.json";
|
||||
-const minimalServer = "https://cloud-images.ubuntu.com/minimal/releases/";
|
||||
+const linuxContainersJson =
|
||||
+ "https://images.linuxcontainers.org/streams/v1/images.json";
|
||||
+const linuxContainersServer = "https://images.linuxcontainers.org";
|
||||
|
||||
const ANY = "any";
|
||||
const CONTAINER = "container";
|
||||
@@ -72,14 +68,9 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
|
||||
|
||||
const { data: settings, isLoading: isSettingsLoading } = useSettings();
|
||||
|
||||
- const { data: canonicalImages = [], isLoading: isCiLoading } = useQuery({
|
||||
- queryKey: [queryKeys.images, canonicalServer],
|
||||
|
@ -27,29 +44,46 @@ index 3af5f69..868a7fe 100644
|
|||
- const { data: minimalImages = [], isLoading: isMinimalLoading } = useQuery({
|
||||
- queryKey: [queryKeys.images, minimalServer],
|
||||
- queryFn: () => loadImages(minimalJson, minimalServer),
|
||||
- });
|
||||
-
|
||||
+ const { data: linuxContainerImages = [], isLoading: isLciLoading } = useQuery({
|
||||
+ queryKey: [queryKeys.images, linuxContainersServer],
|
||||
+ queryFn: () => loadImages(linuxContainersJson, linuxContainersServer),
|
||||
});
|
||||
|
||||
const { data: localImages = [], isLoading: isLocalImageLoading } = useQuery({
|
||||
queryKey: [queryKeys.images, project],
|
||||
@@ -87,8 +78,7 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
|
||||
queryFn: () => fetchImageList(project ?? ""),
|
||||
});
|
||||
|
||||
const isLoading =
|
||||
- isCiLoading ||
|
||||
isLciLoading ||
|
||||
- isMinimalLoading ||
|
||||
isLocalImageLoading ||
|
||||
isSettingsLoading;
|
||||
- const isLoading =
|
||||
- isCiLoading || isMinimalLoading || isLocalImageLoading || isSettingsLoading;
|
||||
+ const isLoading = isLciLoading || isLocalImageLoading || isSettingsLoading;
|
||||
const archSupported = getArchitectureAliases(
|
||||
@@ -110,8 +98,6 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
|
||||
settings?.environment?.architectures ?? [],
|
||||
);
|
||||
@@ -97,8 +87,7 @@ 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)
|
||||
+ .concat(linuxContainerImages)
|
||||
.filter((image) => archSupported.includes(image.arch));
|
||||
|
||||
--
|
||||
2.39.2
|
||||
const archAll = [...new Set(images.map((item) => item.arch))]
|
||||
@@ -199,11 +188,8 @@ const ImageSelector: FC<Props> = ({ onSelect, onClose }) => {
|
||||
if (item.created_at) {
|
||||
return "Local";
|
||||
}
|
||||
- if (item.server === canonicalServer) {
|
||||
- return "Ubuntu";
|
||||
- }
|
||||
- if (item.server === minimalServer) {
|
||||
- return "Ubuntu Minimal";
|
||||
+ if (item.server === linuxContainersServer) {
|
||||
+ return "Linux Containers";
|
||||
}
|
||||
};
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
|
|
31
pkgs/incus-ui/ui-canonical-0006-Remove-version-check.patch
Normal file
31
pkgs/incus-ui/ui-canonical-0006-Remove-version-check.patch
Normal file
|
@ -0,0 +1,31 @@
|
|||
From 02a3fdbde4c5bb60ca12f99f2141f0754f665b1e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?St=C3=A9phane=20Graber?= <stgraber@stgraber.org>
|
||||
Date: Fri, 16 Feb 2024 17:32:51 +0000
|
||||
Subject: [PATCH 6/6] Remove version check
|
||||
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/Version.tsx | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/components/Version.tsx b/src/components/Version.tsx
|
||||
index acb4c59..9c1d968 100644
|
||||
--- a/src/components/Version.tsx
|
||||
+++ b/src/components/Version.tsx
|
||||
@@ -14,9 +14,7 @@ const Version: FC = () => {
|
||||
const serverMajor = serverVersion.includes(".")
|
||||
? serverVersion.split(".")[0]
|
||||
: undefined;
|
||||
- const isOutdated = serverMajor
|
||||
- ? parseInt(serverMajor) < RECENT_MAJOR_SERVER_VERSION
|
||||
- : false;
|
||||
+ const isOutdated = false;
|
||||
|
||||
return (
|
||||
<>
|
||||
--
|
||||
2.34.1
|
||||
|
Loading…
Reference in a new issue