-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement simple UI for the Image Service
Fixes #18 The intention is to provide educational frontend so that people can get comfortable using the Image Service by building the appropriate links. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
- Loading branch information
Showing
22 changed files
with
2,060 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT. | ||
# | ||
# Generated on 2023-08-10T17:01:31Z by kres c620938. | ||
# Generated on 2023-09-14T14:25:42Z by kres latest. | ||
|
||
_out | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<div class="mb-6 text-sm"> | ||
System Extensions: | ||
</div> | ||
|
||
{{ range .Extensions }} | ||
<div class="flex items-center mb-4"> | ||
<input | ||
id="{{ .TaggedReference.RepositoryStr }}" | ||
name="ext-{{ .TaggedReference.RepositoryStr }}" | ||
type="checkbox" | ||
value="" | ||
hx-preserve | ||
class="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 dark:focus:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600" | ||
> | ||
<label | ||
for="{{ .TaggedReference.RepositoryStr }}" | ||
class="ml-2 text-sm font-medium text-gray-900 dark:text-gray-300" | ||
> | ||
{{ .TaggedReference.RepositoryStr }} <span class="text-xs">({{ .TaggedReference.TagStr }})</span> | ||
</label> | ||
</div> | ||
{{ end }} | ||
|
||
<div class="mb-6"> | ||
<label | ||
for="extra-args" | ||
class="block mb-2 text-sm font-medium text-gray-900 dark:text-white" | ||
> | ||
Extra kernel command line arguments: | ||
</label> | ||
<input | ||
id="extra-args" | ||
name="extra-args" | ||
class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" | ||
hx-preserve | ||
> | ||
</div> | ||
|
||
<div class="mb-6"> | ||
<button | ||
type="button" | ||
class="text-white bg-blue-700 hover:bg-blue-800 focus:ring-4 focus:ring-blue-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 dark:bg-blue-600 dark:hover:bg-blue-700 focus:outline-none dark:focus:ring-blue-800" | ||
hx-post="/ui/flavors" | ||
hx-target="#flavor" | ||
> | ||
Submit | ||
</button> | ||
</div> | ||
|
||
<div id="flavor"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<div class="mb-6"> | ||
Your image flavor ID is: <span class="font-mono bg-slate-200 dark:bg-slate-700 p-1">{{ .Flavor }}</span> | ||
</div> | ||
|
||
<div class="mb-6 font-mono bg-slate-200 dark:bg-slate-700 p-1 whitespace-pre">{{ .Marshaled }}</div> | ||
|
||
<div class="mb-6 prose dark:prose-invert max-w-none"> | ||
<h2>Metal ISO</h2> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} ISO</dt> | ||
<dd><a href="{{ $arch | printf "metal-%s.iso" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "metal-%s.iso" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h2>Installer Image</h2> | ||
<p> | ||
For the initial Talos install or upgrade use the following installer image:<br> | ||
<span class="font-mono bg-slate-200 dark:bg-slate-700 p-1">{{ .InstallerImage }}</span> | ||
</p> | ||
<h2>PXE Boot (Metal)</h2> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} iPXE script</dt> | ||
<dd>{{ $arch | printf "metal-%s" | $.PXEBaseURL.JoinPath }}</dd> | ||
{{ end }} | ||
</dl> | ||
<h2>Disk Images</h2> | ||
<h3>Metal</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} metal disk image</dt> | ||
<dd><a href="{{ $arch | printf "metal-%s.raw.xz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "metal-%s.raw.xz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>AWS</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} AWS disk image</dt> | ||
<dd><a href="{{ $arch | printf "aws-%s.raw.xz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "aws-%s.raw.xz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>GCP</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} GCP disk image</dt> | ||
<dd><a href="{{ $arch | printf "gcp-%s.raw.tar.gz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "gcp-%s.raw.tar.gz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>Azure</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} Azure disk image</dt> | ||
<dd><a href="{{ $arch | printf "azure-%s.vhd.xz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "azure-%s.vhd.xz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>Digital Ocean</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} Digital Ocean disk image</dt> | ||
<dd><a href="{{ $arch | printf "digital-ocean-%s.raw.gz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "digital-ocean-%s.raw.gz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>Hetzner Cloud</h3> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} Hetzner Cloud disk image</dt> | ||
<dd><a href="{{ $arch | printf "hcloud-%s.raw.xz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "hcloud-%s.raw.xz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
<h3>Other</h3> | ||
<p>Use the above URLs as a template replacing the last component with a matching path for your platform. See <a href="https://github.com/siderolabs/talos/releases/latest">Talos Linux release assets</a> for examples.</p> | ||
<h2>SecureBoot</h2> | ||
<p>Not fully supported yet, hang tight...</p> | ||
<h2>Various Assets</h2> | ||
<dl> | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} kernel</dt> | ||
<dd><a href="{{ $arch | printf "kernel-%s" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "kernel-%s" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
{{ range $arch := .Architectures }} | ||
<dt>{{ $arch }} initramfs</dt> | ||
<dd><a href="{{ $arch | printf "initramfs-%s.xz" | $.ImageBaseURL.JoinPath }}">{{ $arch | printf "initramfs-%s.xz" | $.ImageBaseURL.JoinPath }}</a></dd> | ||
{{ end }} | ||
</dl> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>Image Service</title> | ||
<link rel="shortcut icon" href=/favicons/favicon.ico> | ||
<link rel=apple-touch-icon href=/favicons/apple-touch-icon-180x180.png sizes=180x180> | ||
<link rel=icon type=image/png href=/favicons/favicon-16x16.png sizes=16x16> | ||
<link rel=icon type=image/png href=/favicons/favicon-32x32.png sizes=32x32> | ||
<link rel=icon type=image/png href=/favicons/android-chrome-192x192.png sizes=192x192> | ||
<link href="/css/output.css" rel="stylesheet" /> | ||
<script src="/js/htmx.min.js"></script> | ||
</head> | ||
<body class="dark:bg-gray-900 antialiased"> | ||
<main> | ||
<div class="md:container md:mx-auto"> | ||
<div class="prose dark:prose-invert mt-4"> | ||
<h1>Talos Linux Image Service</h1> | ||
<p> | ||
Talos Linux Image Service by <a href="https://siderolabs.com/">Sidero Labs, Inc.</a> provides a way to download various boot assets for <a href="https://talos.dev/">Talos Linux</a>. | ||
</p> | ||
<p> | ||
To learn more about the API of the Image Service and available image formats, please visit <a href="https://github.com/siderolabs/image-service">the GitHub repository</a>. | ||
</p> | ||
</div> | ||
<div id="processing" class="htmx-indicator"> | ||
<svg aria-hidden="true" class="w-8 h-8 mr-2 text-gray-200 animate-spin dark:text-gray-600 fill-blue-600" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"> | ||
<path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/> | ||
<path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/> | ||
</svg> | ||
<span class="sr-only">Loading...</span> | ||
</div> | ||
<form class="text-gray-900 dark:text-white" hx-trigger="load" hx-get="/ui/versions" hx-indicator="#processing"> | ||
</form> | ||
</div> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<h1 class="mb-4 mt-2 text-2xl font-bold">Create an image flavor</h1> | ||
<div class="mb-6"> | ||
<label for="talos-version" class="block mb-2 text-sm font-medium">Choose Talos Version:</label> | ||
<select | ||
id="talos-version" | ||
name="version" | ||
class="w-64 bg-gray-50 border border-gray-300 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:focus:ring-blue-500 dark:focus:border-blue-500" | ||
hx-target="#flavor-config" | ||
hx-get="/ui/flavor-config" | ||
hx-params="version" | ||
> | ||
<option value="">Select a version</option> | ||
{{ range .Versions }} | ||
<option value="{{ . }}">{{ . }}</option> | ||
{{ end }} | ||
</select> | ||
<fieldset class="mt-6" id="flavor-config"></fieldset> | ||
</div> |
Oops, something went wrong.