init from gitlab
This commit is contained in:
27
ui/src/components/common/Alert.svelte
Normal file
27
ui/src/components/common/Alert.svelte
Normal file
@@ -0,0 +1,27 @@
|
||||
<script>
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import Icon from "./Icon.svelte";
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
export let message;
|
||||
export let type = "error";
|
||||
export let canDismiss = false;
|
||||
|
||||
const clicked = () => {
|
||||
if (canDismiss) message = "";
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class="mt-2" class:hidden={!message || message === ""}>
|
||||
<div
|
||||
class="alert alert-error shadow-lg"
|
||||
class:cursor-pointer={canDismiss}
|
||||
on:click={clicked}
|
||||
>
|
||||
<div>
|
||||
<Icon {type} />
|
||||
<span class="text-error-content">{message}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
14
ui/src/components/common/Card.svelte
Normal file
14
ui/src/components/common/Card.svelte
Normal file
@@ -0,0 +1,14 @@
|
||||
<script>
|
||||
export let title = "";
|
||||
export let actionsRight = false;
|
||||
</script>
|
||||
|
||||
<div class="card shadow-lg bg-base-200">
|
||||
<div class="card-body p-4">
|
||||
<h2 class="card-title">{title}</h2>
|
||||
<slot />
|
||||
<div class="card-actions" class:justify-end={actionsRight}>
|
||||
<slot name="actions" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
ui/src/components/common/Cards.svelte
Normal file
3
ui/src/components/common/Cards.svelte
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="flex flex-col gap-5">
|
||||
<slot />
|
||||
</div>
|
||||
7
ui/src/components/common/CenterCard.svelte
Normal file
7
ui/src/components/common/CenterCard.svelte
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="flex flex-row max-h-full justify-center">
|
||||
<div class="card flex-shrink-0 w-full max-w-xl max-h-full">
|
||||
<div class="card-body overflow-scroll">
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
10
ui/src/components/common/Code.svelte
Normal file
10
ui/src/components/common/Code.svelte
Normal file
@@ -0,0 +1,10 @@
|
||||
<script>
|
||||
export let lines = [];
|
||||
export let prefix = "";
|
||||
</script>
|
||||
|
||||
<div class="mockup-code text-left w-fit">
|
||||
{#each lines as line}
|
||||
<pre data-prefix={prefix}><code>{line}</code></pre>
|
||||
{/each}
|
||||
</div>
|
||||
53
ui/src/components/common/ConfirmationModal.svelte
Normal file
53
ui/src/components/common/ConfirmationModal.svelte
Normal file
@@ -0,0 +1,53 @@
|
||||
<script>
|
||||
import Modal from "./Modal.svelte";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
|
||||
export let name;
|
||||
export let title = "Confirm";
|
||||
export let action = "foo the bar";
|
||||
export let open = false;
|
||||
export let doingAction = false;
|
||||
export let extraOption = "";
|
||||
|
||||
let extraOptionChecked = false;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
const close = () => (open = false);
|
||||
const accept = () => {
|
||||
dispatch("accepted", {
|
||||
extraOptionChecked,
|
||||
});
|
||||
close();
|
||||
};
|
||||
</script>
|
||||
|
||||
<Modal {name} {title} bind:open preventClose={doingAction}>
|
||||
<div class="mb-4">
|
||||
<span class="text-md">Are you sure you want to {action}?</span>
|
||||
|
||||
{#if extraOption}
|
||||
<div
|
||||
class="form-control w-52 border-2 border-base-200 rounded-lg mt-2 p-2"
|
||||
>
|
||||
<label class="label cursor-pointer">
|
||||
<span class="label-text">{extraOption}</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
bind:checked={extraOptionChecked}
|
||||
class="checkbox"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<button class="btn btn-primary" class:loading={doingAction} on:click={accept}
|
||||
>Yes</button
|
||||
>
|
||||
<button
|
||||
class="btn btn-secondary btn-ghost"
|
||||
class:loading={doingAction}
|
||||
on:click={close}>No</button
|
||||
>
|
||||
</Modal>
|
||||
27
ui/src/components/common/ContentPage.svelte
Normal file
27
ui/src/components/common/ContentPage.svelte
Normal file
@@ -0,0 +1,27 @@
|
||||
<div class="card card-body py-3 px-3 h-full max-h-full text-base-content">
|
||||
<div class="hidden sm:flex rounded-lg flex-row w-full max-h-full">
|
||||
<slot name="sidebar" />
|
||||
|
||||
<div class="pl-3 h-full w-full flex flex-col overflow-x-scroll">
|
||||
<div class="w-full">
|
||||
<slot name="header" />
|
||||
</div>
|
||||
|
||||
<div class="overflow-scroll w-full h-full rounded-lg">
|
||||
<slot name="content" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- mobile nav -->
|
||||
<div class="inline-block sm:hidden">
|
||||
<slot name="header" />
|
||||
<slot name="sidebar" />
|
||||
|
||||
<div class="overflow-scroll h-full">
|
||||
<div class="rounded-lg w-full h-full overflow-scroll pb-6">
|
||||
<slot name="content" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
37
ui/src/components/common/Error.svelte
Normal file
37
ui/src/components/common/Error.svelte
Normal file
@@ -0,0 +1,37 @@
|
||||
<script>
|
||||
import Icon from "$components/common/Icon.svelte";
|
||||
|
||||
export let action;
|
||||
export let error;
|
||||
export let errorMessage = null;
|
||||
|
||||
let displayMessage = errorMessage;
|
||||
$: if (error && !errorMessage) {
|
||||
try {
|
||||
let parsed = JSON.parse(error.message);
|
||||
if (parsed.message) {
|
||||
let code = parsed.error.split(",")[0].substring(5, 8);
|
||||
displayMessage = `HTTP ${code}: ${parsed.message}`;
|
||||
} else {
|
||||
displayMessage = `${parsed.type} error`;
|
||||
}
|
||||
} catch {
|
||||
displayMessage = error;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="card bg-error shadow-xl my-2">
|
||||
<div class="card-body text-error-content">
|
||||
<div class="grid grid-cols-3 items-center mb-4">
|
||||
<div class="col-span-2 text-neutral-content">
|
||||
<span class="text-xl leading-8">Error {action}</span>
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
<Icon type="warning" />
|
||||
</div>
|
||||
</div>
|
||||
<p>{displayMessage}</p>
|
||||
</div>
|
||||
</div>
|
||||
114
ui/src/components/common/Icon.svelte
Normal file
114
ui/src/components/common/Icon.svelte
Normal file
@@ -0,0 +1,114 @@
|
||||
<script>
|
||||
import CirclePlus from "tabler-icons-svelte/icons/CirclePlus.svelte";
|
||||
import CircleMinus from "tabler-icons-svelte/icons/CircleMinus.svelte";
|
||||
import Copy from "tabler-icons-svelte/icons/Copy.svelte";
|
||||
import Trash from "tabler-icons-svelte/icons/Trash.svelte";
|
||||
import Cloud from "tabler-icons-svelte/icons/Cloud.svelte";
|
||||
import RotateClockwise2 from "tabler-icons-svelte/icons/RotateClockwise2.svelte";
|
||||
import Stack from "tabler-icons-svelte/icons/Stack.svelte";
|
||||
import Folder from "tabler-icons-svelte/icons/Folder.svelte";
|
||||
import Link from "tabler-icons-svelte/icons/Link.svelte";
|
||||
import Unlink from "tabler-icons-svelte/icons/Unlink.svelte";
|
||||
import DeviceFloppy from "tabler-icons-svelte/icons/DeviceFloppy.svelte";
|
||||
import Pencil from "tabler-icons-svelte/icons/Pencil.svelte";
|
||||
import Tool from "tabler-icons-svelte/icons/Tool.svelte";
|
||||
import Box from "tabler-icons-svelte/icons/Box.svelte";
|
||||
import ChartCircles from "tabler-icons-svelte/icons/ChartCircles.svelte";
|
||||
import LayersSubtract from "tabler-icons-svelte/icons/LayersSubtract.svelte";
|
||||
import InfoCircle from "tabler-icons-svelte/icons/InfoCircle.svelte";
|
||||
import FileText from "tabler-icons-svelte/icons/FileText.svelte";
|
||||
import AlertCircle from "tabler-icons-svelte/icons/AlertCircle.svelte";
|
||||
import BrandGit from "tabler-icons-svelte/icons/BrandGit.svelte";
|
||||
import Database from "tabler-icons-svelte/icons/Database.svelte";
|
||||
import Settings from "tabler-icons-svelte/icons/Settings.svelte";
|
||||
import PlayerPlay from "tabler-icons-svelte/icons/PlayerPlay.svelte";
|
||||
import PlayerStop from "tabler-icons-svelte/icons/PlayerStop.svelte";
|
||||
import Upload from "tabler-icons-svelte/icons/Upload.svelte";
|
||||
import Terminal2 from "tabler-icons-svelte/icons/Terminal2.svelte";
|
||||
import ArrowLeft from "tabler-icons-svelte/icons/ArrowLeft.svelte";
|
||||
import ArrowRight from "tabler-icons-svelte/icons/ArrowRight.svelte";
|
||||
import Key from "tabler-icons-svelte/icons/Key.svelte";
|
||||
import ExternalLink from "tabler-icons-svelte/icons/ExternalLink.svelte";
|
||||
|
||||
// using https://devicon.dev
|
||||
import Postgres from "./devicons/Postgres.svelte";
|
||||
import Redis from "./devicons/Redis.svelte";
|
||||
import SQLite from "./devicons/SQLite.svelte";
|
||||
import MySQL from "./devicons/MySQL.svelte";
|
||||
import MongoDB from "./devicons/MongoDB.svelte";
|
||||
import Github from "./devicons/Github.svelte";
|
||||
import Docker from "./devicons/Docker.svelte";
|
||||
import Go from "./devicons/Go.svelte";
|
||||
import Javascript from "./devicons/Javascript.svelte";
|
||||
import Python from "./devicons/Python.svelte";
|
||||
import Ruby from "./devicons/Ruby.svelte";
|
||||
|
||||
export let type;
|
||||
export let size = "md";
|
||||
|
||||
const icons = {
|
||||
add: CirclePlus,
|
||||
remove: CircleMinus,
|
||||
delete: Trash,
|
||||
"external-link": ExternalLink,
|
||||
docker: Docker,
|
||||
go: Go,
|
||||
javascript: Javascript,
|
||||
python: Python,
|
||||
ruby: Ruby,
|
||||
cloud: Cloud,
|
||||
copy: Copy,
|
||||
restart: RotateClockwise2,
|
||||
build: Stack,
|
||||
rebuild: Stack,
|
||||
folder: Folder,
|
||||
link: Link,
|
||||
unlink: Unlink,
|
||||
save: DeviceFloppy,
|
||||
plus: CirclePlus,
|
||||
edit: Pencil,
|
||||
cube: Box,
|
||||
left: ArrowLeft,
|
||||
right: ArrowRight,
|
||||
key: Key,
|
||||
circles: ChartCircles,
|
||||
layers: LayersSubtract,
|
||||
info: InfoCircle,
|
||||
"file-text": FileText,
|
||||
warning: AlertCircle,
|
||||
error: AlertCircle,
|
||||
git: BrandGit,
|
||||
terminal: Terminal2,
|
||||
database: Database,
|
||||
spanner: Tool,
|
||||
settings: Settings,
|
||||
start: PlayerPlay,
|
||||
stop: PlayerStop,
|
||||
upload: Upload,
|
||||
postgres: Postgres,
|
||||
redis: Redis,
|
||||
sqlite: SQLite,
|
||||
mysql: MySQL,
|
||||
mongodb: MongoDB,
|
||||
mongo: MongoDB,
|
||||
github: Github,
|
||||
};
|
||||
const sizeClasses = {
|
||||
xs: "w-3 h-3",
|
||||
sm: "w-5 h-5",
|
||||
md: "w-6 h-6",
|
||||
lg: "w-8 h-8",
|
||||
xl: "w-10 h-10",
|
||||
};
|
||||
const sizes = {
|
||||
xs: "14",
|
||||
sm: "20",
|
||||
md: "24",
|
||||
lg: "32",
|
||||
xl: "38",
|
||||
};
|
||||
</script>
|
||||
|
||||
<div class={sizeClasses[size]}>
|
||||
<svelte:component this={icons[type]} size={sizes[size]} />
|
||||
</div>
|
||||
145
ui/src/components/common/KVEditor.svelte
Normal file
145
ui/src/components/common/KVEditor.svelte
Normal file
@@ -0,0 +1,145 @@
|
||||
<script>
|
||||
import { createEventDispatcher, onMount } from "svelte";
|
||||
import { setAppConfig } from "$lib/api";
|
||||
import Icon from "$common/Icon.svelte";
|
||||
import ConfirmationModal from "$common/ConfirmationModal.svelte";
|
||||
import Alert from "$common/Alert.svelte";
|
||||
|
||||
export let vars;
|
||||
export let saving = false;
|
||||
export let stateDirty = false;
|
||||
export let showSaveButton = false;
|
||||
export let neutralButtons = false;
|
||||
|
||||
let varsList = [];
|
||||
onMount(() => {
|
||||
for (let key of Object.keys(vars)) {
|
||||
varsList.push([key, vars[key]]);
|
||||
}
|
||||
varsList = varsList;
|
||||
});
|
||||
|
||||
let confirmationModalOpen = false;
|
||||
let deletingKey = "";
|
||||
let deletingIndex = -1;
|
||||
const confirmRemoveKey = (index) => {
|
||||
return () => {
|
||||
deletingIndex = index;
|
||||
deletingKey = varsList[index][0];
|
||||
if (varsList[index][0] === "" && varsList[index][1] === "") {
|
||||
removeKey();
|
||||
return;
|
||||
}
|
||||
|
||||
confirmationModalOpen = true;
|
||||
};
|
||||
};
|
||||
|
||||
const removeKey = () => {
|
||||
varsList.splice(deletingIndex, 1);
|
||||
varsList = varsList;
|
||||
checkStateDirty();
|
||||
|
||||
deletingIndex = -1;
|
||||
deletingKey = "";
|
||||
};
|
||||
|
||||
const addNewEnvVar = () => {
|
||||
varsList.push(["", ""]);
|
||||
varsList = varsList;
|
||||
};
|
||||
|
||||
const checkStateDirty = () => {
|
||||
stateDirty = false;
|
||||
if (varsList.length !== Object.keys(vars).length) {
|
||||
stateDirty = true;
|
||||
return;
|
||||
}
|
||||
for (let [key, val] of varsList) {
|
||||
if (!(key in vars) || vars[key] !== val) {
|
||||
stateDirty = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const pairChange = (position) => {
|
||||
return (e) => {
|
||||
const index = e.target.dataset["index"];
|
||||
varsList[index][position] = e.target.value;
|
||||
checkStateDirty();
|
||||
dispatch("changed", varsList);
|
||||
};
|
||||
};
|
||||
|
||||
const keyChanged = pairChange(0);
|
||||
const valChanged = pairChange(1);
|
||||
</script>
|
||||
|
||||
<div class="w-full grid grid-cols-2 gap-2 mb-2">
|
||||
{#each varsList as pair, i}
|
||||
<div>
|
||||
<label class="input-group input-group-md">
|
||||
<span>Key</span>
|
||||
<input
|
||||
type="text"
|
||||
on:change={keyChanged}
|
||||
data-index={i}
|
||||
value={pair[0]}
|
||||
class="input input-md input-bordered w-full"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<div class="flex flex-row">
|
||||
<div class="flex-grow">
|
||||
<label class="input-group input-group-md">
|
||||
<span>Value</span>
|
||||
<input
|
||||
type="text"
|
||||
on:change={valChanged}
|
||||
data-index={i}
|
||||
value={pair[1]}
|
||||
class="input input-md input-bordered w-full"
|
||||
/>
|
||||
</label>
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-ghost btn-circle text-error ml-2"
|
||||
on:click={confirmRemoveKey(i)}
|
||||
>
|
||||
<Icon type="remove" />
|
||||
</button>
|
||||
</div>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="">
|
||||
<button
|
||||
class="btn gap-2"
|
||||
class:btn-neutral={neutralButtons}
|
||||
class:text-neutral={!neutralButtons}
|
||||
on:click={addNewEnvVar}
|
||||
>
|
||||
Add
|
||||
<Icon type="add" />
|
||||
</button>
|
||||
{#if stateDirty && showSaveButton}
|
||||
<button
|
||||
class="btn btn-primary mt-2 gap-2"
|
||||
class:loading={saving}
|
||||
on:click={() => dispatch("save", varsList)}
|
||||
>
|
||||
Save
|
||||
<Icon type="save" />
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<ConfirmationModal
|
||||
name="delete-env-var"
|
||||
action="delete '{deletingKey}'"
|
||||
bind:open={confirmationModalOpen}
|
||||
on:accepted={removeKey}
|
||||
/>
|
||||
105
ui/src/components/common/Loader.svelte
Normal file
105
ui/src/components/common/Loader.svelte
Normal file
@@ -0,0 +1,105 @@
|
||||
<div class="three-body">
|
||||
<div class="three-body__dot after:bg-accent" />
|
||||
<div class="three-body__dot after:bg-accent" />
|
||||
<div class="three-body__dot after:bg-accent" />
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
.three-body {
|
||||
--uib-size: 35px;
|
||||
--uib-speed: 1.1s;
|
||||
|
||||
position: relative;
|
||||
height: var(--uib-size);
|
||||
width: var(--uib-size);
|
||||
animation: spin calc(var(--uib-speed) * 2.5) infinite linear;
|
||||
}
|
||||
|
||||
.three-body__dot {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.three-body__dot:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
height: 0%;
|
||||
width: 100%;
|
||||
padding-bottom: 100%;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(1) {
|
||||
bottom: 5%;
|
||||
left: 0;
|
||||
transform: rotate(60deg);
|
||||
transform-origin: 50% 85%;
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(1)::after {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
animation: wobble1 var(--uib-speed) infinite ease-in-out;
|
||||
animation-delay: calc(var(--uib-speed) * -0.3);
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(2) {
|
||||
bottom: 5%;
|
||||
right: 0;
|
||||
transform: rotate(-60deg);
|
||||
transform-origin: 50% 85%;
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(2)::after {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
animation: wobble1 var(--uib-speed) infinite calc(var(--uib-speed) * -0.15)
|
||||
ease-in-out;
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(3) {
|
||||
bottom: -5%;
|
||||
left: 0;
|
||||
transform: translateX(116.666%);
|
||||
}
|
||||
|
||||
.three-body__dot:nth-child(3)::after {
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: wobble2 var(--uib-speed) infinite ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wobble1 {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0%) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
transform: translateY(-66%) scale(0.65);
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes wobble2 {
|
||||
0%,
|
||||
100% {
|
||||
transform: translateY(0%) scale(1);
|
||||
opacity: 1;
|
||||
}
|
||||
50% {
|
||||
transform: translateY(66%) scale(0.65);
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
20
ui/src/components/common/Logs.svelte
Normal file
20
ui/src/components/common/Logs.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script>
|
||||
export let logs;
|
||||
</script>
|
||||
|
||||
<div class="overflow-x-scroll h-full bg-neutral px-4 rounded-lg">
|
||||
<div class="py-4 h-full text-neutral-content">
|
||||
{#each logs as line, i}
|
||||
<pre data-prefix={i}><code>{line.trim()}</code></pre>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="postcss">
|
||||
pre[data-prefix]:before {
|
||||
content: attr(data-prefix);
|
||||
width: 2rem;
|
||||
margin-right: 2ch;
|
||||
opacity: 0.5;
|
||||
}
|
||||
</style>
|
||||
45
ui/src/components/common/Modal.svelte
Normal file
45
ui/src/components/common/Modal.svelte
Normal file
@@ -0,0 +1,45 @@
|
||||
<script>
|
||||
export let name;
|
||||
export let title;
|
||||
export let open = false;
|
||||
export let preventClose = false;
|
||||
|
||||
let modalId = name + "-modal";
|
||||
|
||||
const closeModal = () => {
|
||||
if (preventClose) return;
|
||||
open = false;
|
||||
};
|
||||
|
||||
const checkCloseModal = (e) => {
|
||||
if (e.target.id === modalId) {
|
||||
closeModal();
|
||||
e.stopPropagation();
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="modal modal-middle"
|
||||
class:modal-open={open}
|
||||
id={modalId}
|
||||
on:click={checkCloseModal}
|
||||
>
|
||||
<div class="modal-box p-6 w-auto max-w-full">
|
||||
<div class="mb-4">
|
||||
<div class="h-full text-base-content">
|
||||
<span class="text-xl leading-7">{title}</span>
|
||||
</div>
|
||||
<button
|
||||
class="btn btn-sm btn-circle absolute right-6 top-5"
|
||||
class:btn-loading={preventClose}
|
||||
for={modalId}
|
||||
on:click={closeModal}
|
||||
>
|
||||
✕
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<slot />
|
||||
</div>
|
||||
</div>
|
||||
15
ui/src/components/common/QueryDataWrapper.svelte
Normal file
15
ui/src/components/common/QueryDataWrapper.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
import Error from "./Error.svelte";
|
||||
import Loader from "./Loader.svelte";
|
||||
|
||||
export let query;
|
||||
export let action = "";
|
||||
</script>
|
||||
|
||||
{#if $query.isLoading}
|
||||
<Loader />
|
||||
{:else if $query.isError}
|
||||
<Error error={$query.error} {action} />
|
||||
{:else}
|
||||
<slot />
|
||||
{/if}
|
||||
57
ui/src/components/common/Sidebar.svelte
Normal file
57
ui/src/components/common/Sidebar.svelte
Normal file
@@ -0,0 +1,57 @@
|
||||
<script>
|
||||
import { page } from "$app/stores";
|
||||
|
||||
export let prefix = "";
|
||||
export let pages = [];
|
||||
|
||||
const prefixLen = prefix.length + 1;
|
||||
const getCurrentPage = () => $page.url.pathname.slice(prefixLen);
|
||||
let currentPath = "";
|
||||
let currentPage = getCurrentPage();
|
||||
let pageLabel = "";
|
||||
let openMobileMenu;
|
||||
$: if ($page.url.pathname !== currentPath) {
|
||||
currentPath = $page.url.pathname;
|
||||
currentPage = getCurrentPage();
|
||||
for (let i = 0; i < pages.length; i++) {
|
||||
let info = pages[i];
|
||||
if (info.path === currentPage) pageLabel = info.name;
|
||||
}
|
||||
openMobileMenu = false;
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="menu rounded-box hidden sm:inline-block min-w-fit max-h-full bg-base-200 overflow-y-scroll shadow-lg h-fit"
|
||||
>
|
||||
{#each pages as info, i}
|
||||
<li class="">
|
||||
<a href="{prefix}/{info.path}" class:active={info.path === currentPage}>
|
||||
<span>{info.name}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<div class="inline-block sm:hidden w-full">
|
||||
<div class="collapse collapse-arrow border border-base-300 w-full">
|
||||
<input type="checkbox" class="peer" bind:checked={openMobileMenu} />
|
||||
<div class="collapse-title text-xl font-medium peer-checked:bg-base-300">
|
||||
{pageLabel}
|
||||
</div>
|
||||
<div class="collapse-content peer-checked:bg-base-300">
|
||||
<div class="menu w-full">
|
||||
{#each pages as info, i}
|
||||
<li>
|
||||
<a
|
||||
href="{prefix}/{info.path}"
|
||||
class:active={info.path === currentPage}
|
||||
>
|
||||
<span>{info.name}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
92
ui/src/components/common/Steps.svelte
Normal file
92
ui/src/components/common/Steps.svelte
Normal file
@@ -0,0 +1,92 @@
|
||||
<script>
|
||||
import { fly } from "svelte/transition";
|
||||
import { createEventDispatcher } from "svelte";
|
||||
import Card from "$common/Card.svelte";
|
||||
|
||||
export let steps = [];
|
||||
export let props = {};
|
||||
export let data = {};
|
||||
export let loading;
|
||||
export let confirmButtonText = "Confirm";
|
||||
|
||||
let finishedStep = {};
|
||||
let currentStep = 0;
|
||||
|
||||
const canSetStep = (step) => {
|
||||
if (loading) return false;
|
||||
if (step <= 1) return finishedStep[0];
|
||||
return finishedStep[step - 1] && canSetStep(step - 1);
|
||||
};
|
||||
|
||||
const updateStepStatus = (step, { complete }) =>
|
||||
(finishedStep[step] = complete);
|
||||
|
||||
const maybeSetStep = (step) => {
|
||||
if (!canSetStep(step)) return;
|
||||
currentStep = step;
|
||||
};
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
const confirmClicked = () => dispatch("complete");
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row gap-4 max-h-full w-full">
|
||||
<div class="flex bg-base-200 shadow-xl rounded-lg py-4 px-2 h-fit">
|
||||
<ul class="steps steps-vertical">
|
||||
{#each steps as step, i}
|
||||
<li
|
||||
class="step px-4"
|
||||
class:cursor-pointer={!loading && finishedStep[i]}
|
||||
class:step-primary={finishedStep[i]}
|
||||
on:click={() => maybeSetStep(i)}
|
||||
data-content={i === currentStep ? "●" : null}
|
||||
>
|
||||
<span>{step.label}</span>
|
||||
</li>
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="flex flex-col bg-base-200 p-4 rounded-lg shadow-xl flex-grow max-h-full"
|
||||
>
|
||||
<div class="overflow-scroll" in:fly={{ y: 100, duration: 250 }}>
|
||||
<svelte:component
|
||||
this={steps[currentStep].component}
|
||||
{props}
|
||||
on:statusChange={(e) => updateStepStatus(currentStep, e.detail)}
|
||||
bind:data
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="h-fit">
|
||||
<slot name="errors" />
|
||||
|
||||
<div class="flex gap-2 mt-2 h-fit">
|
||||
<button
|
||||
class="btn"
|
||||
class:btn-disabled={loading || currentStep === 0}
|
||||
on:click={() => maybeSetStep(currentStep - 1)}
|
||||
>
|
||||
Previous
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
class:hidden={currentStep + 1 === steps.length}
|
||||
class:btn-disabled={!finishedStep[currentStep]}
|
||||
on:click={() => maybeSetStep(currentStep + 1)}
|
||||
>
|
||||
Next
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary"
|
||||
class:hidden={currentStep + 1 !== steps.length}
|
||||
class:loading
|
||||
on:click={() => confirmClicked()}
|
||||
>
|
||||
{confirmButtonText}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
3
ui/src/components/common/Todo.svelte
Normal file
3
ui/src/components/common/Todo.svelte
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class="bg-warning p-4">
|
||||
<span class="text-lg text-warning-content">TODO</span>
|
||||
</div>
|
||||
15
ui/src/components/common/devicons/Docker.svelte
Normal file
15
ui/src/components/common/devicons/Docker.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
d="M124.8 52.1c-4.3-2.5-10-2.8-14.8-1.4-.6-5.2-4-9.7-8-12.9l-1.6-1.3-1.4 1.6c-2.7 3.1-3.5 8.3-3.1 12.3.3 2.9 1.2 5.9 3 8.3-1.4.8-2.9 1.9-4.3 2.4-2.8 1-5.9 2-8.9 2H79V49H66V24H51v12H26v13H13v14H1.8l-.2 1.5c-.5 6.4.3 12.6 3 18.5l1.1 2.2.1.2c7.9 13.4 21.7 19 36.8 19 29.2 0 53.3-13.1 64.3-40.6 7.4.4 15-1.8 18.6-8.9l.9-1.8-1.6-1zM28 39h10v11H28V39zm13.1 44.2c0 1.7-1.4 3.1-3.1 3.1-1.7 0-3.1-1.4-3.1-3.1 0-1.7 1.4-3.1 3.1-3.1 1.7.1 3.1 1.4 3.1 3.1zM28 52h10v11H28V52zm-13 0h11v11H15V52zm27.7 50.2c-15.8-.1-24.3-5.4-31.3-12.4 2.1.1 4.1.2 5.9.2 1.6 0 3.2 0 4.7-.1 3.9-.2 7.3-.7 10.1-1.5 2.3 5.3 6.5 10.2 14 13.8h-3.4zM51 63H40V52h11v11zm0-13H40V39h11v11zm13 13H53V52h11v11zm0-13H53V39h11v11zm0-13H53V26h11v11zm13 26H66V52h11v11zM38.8 81.2c-.2-.1-.5-.2-.8-.2-1.2 0-2.2 1-2.2 2.2 0 1.2 1 2.2 2.2 2.2s2.2-1 2.2-2.2c0-.3-.1-.6-.2-.8-.2.3-.4.5-.8.5-.5 0-.9-.4-.9-.9.1-.4.3-.7.5-.8z"
|
||||
fill="#019BC6"
|
||||
/>
|
||||
</svg>
|
||||
18
ui/src/components/common/devicons/Github.svelte
Normal file
18
ui/src/components/common/devicons/Github.svelte
Normal file
@@ -0,0 +1,18 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
d="M64 5.103c-33.347 0-60.388 27.035-60.388 60.388 0 26.682 17.303 49.317 41.297 57.303 3.017.56 4.125-1.31 4.125-2.905 0-1.44-.056-6.197-.082-11.243-16.8 3.653-20.345-7.125-20.345-7.125-2.747-6.98-6.705-8.836-6.705-8.836-5.48-3.748.413-3.67.413-3.67 6.063.425 9.257 6.223 9.257 6.223 5.386 9.23 14.127 6.562 17.573 5.02.542-3.903 2.107-6.568 3.834-8.076-13.413-1.525-27.514-6.704-27.514-29.843 0-6.593 2.36-11.98 6.223-16.21-.628-1.52-2.695-7.662.584-15.98 0 0 5.07-1.623 16.61 6.19C53.7 35 58.867 34.327 64 34.304c5.13.023 10.3.694 15.127 2.033 11.526-7.813 16.59-6.19 16.59-6.19 3.287 8.317 1.22 14.46.593 15.98 3.872 4.23 6.215 9.617 6.215 16.21 0 23.194-14.127 28.3-27.574 29.796 2.167 1.874 4.097 5.55 4.097 11.183 0 8.08-.07 14.583-.07 16.572 0 1.607 1.088 3.49 4.148 2.897 23.98-7.994 41.263-30.622 41.263-57.294C124.388 32.14 97.35 5.104 64 5.104z"
|
||||
/><path
|
||||
d="M26.484 91.806c-.133.3-.605.39-1.035.185-.44-.196-.685-.605-.543-.906.13-.31.603-.395 1.04-.188.44.197.69.61.537.91zm2.446 2.729c-.287.267-.85.143-1.232-.28-.396-.42-.47-.983-.177-1.254.298-.266.844-.14 1.24.28.394.426.472.984.17 1.255zM31.312 98.012c-.37.258-.976.017-1.35-.52-.37-.538-.37-1.183.01-1.44.373-.258.97-.025 1.35.507.368.545.368 1.19-.01 1.452zm3.261 3.361c-.33.365-1.036.267-1.552-.23-.527-.487-.674-1.18-.343-1.544.336-.366 1.045-.264 1.564.23.527.486.686 1.18.333 1.543zm4.5 1.951c-.147.473-.825.688-1.51.486-.683-.207-1.13-.76-.99-1.238.14-.477.823-.7 1.512-.485.683.206 1.13.756.988 1.237zm4.943.361c.017.498-.563.91-1.28.92-.723.017-1.308-.387-1.315-.877 0-.503.568-.91 1.29-.924.717-.013 1.306.387 1.306.88zm4.598-.782c.086.485-.413.984-1.126 1.117-.7.13-1.35-.172-1.44-.653-.086-.498.422-.997 1.122-1.126.714-.123 1.354.17 1.444.663zm0 0"
|
||||
/>
|
||||
</svg>
|
||||
19
ui/src/components/common/devicons/Go.svelte
Normal file
19
ui/src/components/common/devicons/Go.svelte
Normal file
@@ -0,0 +1,19 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<g fill="#00acd7" fill-rule="evenodd"
|
||||
><path
|
||||
d="M11.156 54.829c-.243 0-.303-.122-.182-.303l1.273-1.637c.12-.182.424-.303.666-.303H34.55c.243 0 .303.182.182.364l-1.03 1.576c-.121.181-.424.363-.606.363zM2.004 60.404c-.242 0-.303-.12-.182-.303l1.273-1.636c.121-.182.424-.303.667-.303h27.636c.242 0 .364.182.303.364l-.485 1.454c-.06.243-.303.364-.545.364zM16.67 65.98c-.242 0-.302-.182-.181-.364l.848-1.515c.122-.182.364-.363.607-.363h12.12c.243 0 .364.181.364.424l-.12 1.454c0 .243-.243.425-.425.425zM79.58 53.738c-3.819.97-6.425 1.697-10.182 2.666-.91.243-.97.303-1.758-.606-.909-1.03-1.576-1.697-2.848-2.303-3.819-1.878-7.516-1.333-10.97.91-4.121 2.666-6.242 6.605-6.182 11.514.06 4.849 3.394 8.849 8.182 9.516 4.121.545 7.576-.91 10.303-4 .545-.667 1.03-1.394 1.636-2.243H56.064c-1.272 0-1.575-.788-1.151-1.818.788-1.879 2.242-5.03 3.09-6.606.183-.364.607-.97 1.516-.97h22.06c-.12 1.637-.12 3.273-.363 4.91-.667 4.363-2.303 8.363-4.97 11.878-4.364 5.758-10.06 9.333-17.273 10.303-5.939.788-11.454-.364-16.302-4-4.485-3.394-7.03-7.879-7.697-13.454-.788-6.606 1.151-12.546 5.151-17.758 4.303-5.636 10-9.212 16.97-10.485 5.697-1.03 11.151-.363 16.06 2.97 3.212 2.121 5.515 5.03 7.03 8.545.364.546.122.849-.606 1.03z"
|
||||
/><path
|
||||
d="M99.64 87.253c-5.515-.122-10.546-1.697-14.788-5.334-3.576-3.09-5.818-7.03-6.545-11.697-1.091-6.848.787-12.909 4.909-18.302 4.424-5.819 9.757-8.849 16.97-10.122 6.181-1.09 12-.484 17.272 3.091 4.788 3.273 7.757 7.697 8.545 13.515 1.03 8.182-1.333 14.849-6.97 20.546-4 4.06-8.909 6.606-14.545 7.757-1.636.303-3.273.364-4.848.546zm14.424-24.485c-.06-.788-.06-1.394-.182-2-1.09-6-6.606-9.394-12.363-8.06-5.637 1.272-9.273 4.848-10.606 10.545-1.091 4.727 1.212 9.515 5.575 11.454 3.334 1.455 6.667 1.273 9.879-.363 4.788-2.485 7.394-6.364 7.697-11.576z"
|
||||
fill-rule="nonzero"
|
||||
/></g
|
||||
>
|
||||
</svg>
|
||||
15
ui/src/components/common/devicons/Javascript.svelte
Normal file
15
ui/src/components/common/devicons/Javascript.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path fill="#F0DB4F" d="M1.408 1.408h125.184v125.185H1.408z" /><path
|
||||
fill="#323330"
|
||||
d="M116.347 96.736c-.917-5.711-4.641-10.508-15.672-14.981-3.832-1.761-8.104-3.022-9.377-5.926-.452-1.69-.512-2.642-.226-3.665.821-3.32 4.784-4.355 7.925-3.403 2.023.678 3.938 2.237 5.093 4.724 5.402-3.498 5.391-3.475 9.163-5.879-1.381-2.141-2.118-3.129-3.022-4.045-3.249-3.629-7.676-5.498-14.756-5.355l-3.688.477c-3.534.893-6.902 2.748-8.877 5.235-5.926 6.724-4.236 18.492 2.975 23.335 7.104 5.332 17.54 6.545 18.873 11.531 1.297 6.104-4.486 8.08-10.234 7.378-4.236-.881-6.592-3.034-9.139-6.949-4.688 2.713-4.688 2.713-9.508 5.485 1.143 2.499 2.344 3.63 4.26 5.795 9.068 9.198 31.76 8.746 35.83-5.176.165-.478 1.261-3.666.38-8.581zM69.462 58.943H57.753l-.048 30.272c0 6.438.333 12.34-.714 14.149-1.713 3.558-6.152 3.117-8.175 2.427-2.059-1.012-3.106-2.451-4.319-4.485-.333-.584-.583-1.036-.667-1.071l-9.52 5.83c1.583 3.249 3.915 6.069 6.902 7.901 4.462 2.678 10.459 3.499 16.731 2.059 4.082-1.189 7.604-3.652 9.448-7.401 2.666-4.915 2.094-10.864 2.07-17.444.06-10.735.001-21.468.001-32.237z"
|
||||
/>
|
||||
</svg>
|
||||
92
ui/src/components/common/devicons/MongoDB.svelte
Normal file
92
ui/src/components/common/devicons/MongoDB.svelte
Normal file
@@ -0,0 +1,92 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#439934"
|
||||
d="M88.038 42.812c1.605 4.643 2.761 9.383 3.141 14.296.472 6.095.256 12.147-1.029 18.142-.035.165-.109.32-.164.48-.403.001-.814-.049-1.208.012-3.329.523-6.655 1.065-9.981 1.604-3.438.557-6.881 1.092-10.313 1.687-1.216.21-2.721-.041-3.212 1.641-.014.046-.154.054-.235.08l.166-10.051-.169-24.252 1.602-.275c2.62-.429 5.24-.864 7.862-1.281 3.129-.497 6.261-.98 9.392-1.465 1.381-.215 2.764-.412 4.148-.618z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#45A538"
|
||||
d="M61.729 110.054c-1.69-1.453-3.439-2.842-5.059-4.37-8.717-8.222-15.093-17.899-18.233-29.566-.865-3.211-1.442-6.474-1.627-9.792-.13-2.322-.318-4.665-.154-6.975.437-6.144 1.325-12.229 3.127-18.147l.099-.138c.175.233.427.439.516.702 1.759 5.18 3.505 10.364 5.242 15.551 5.458 16.3 10.909 32.604 16.376 48.9.107.318.384.579.583.866l-.87 2.969z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#46A037"
|
||||
d="M88.038 42.812c-1.384.206-2.768.403-4.149.616-3.131.485-6.263.968-9.392 1.465-2.622.417-5.242.852-7.862 1.281l-1.602.275-.012-1.045c-.053-.859-.144-1.717-.154-2.576-.069-5.478-.112-10.956-.18-16.434-.042-3.429-.105-6.857-.175-10.285-.043-2.13-.089-4.261-.185-6.388-.052-1.143-.236-2.28-.311-3.423-.042-.657.016-1.319.029-1.979.817 1.583 1.616 3.178 2.456 4.749 1.327 2.484 3.441 4.314 5.344 6.311 7.523 7.892 12.864 17.068 16.193 27.433z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#409433"
|
||||
d="M65.036 80.753c.081-.026.222-.034.235-.08.491-1.682 1.996-1.431 3.212-1.641 3.432-.594 6.875-1.13 10.313-1.687 3.326-.539 6.652-1.081 9.981-1.604.394-.062.805-.011 1.208-.012-.622 2.22-1.112 4.488-1.901 6.647-.896 2.449-1.98 4.839-3.131 7.182a49.142 49.142 0 01-6.353 9.763c-1.919 2.308-4.058 4.441-6.202 6.548-1.185 1.165-2.582 2.114-3.882 3.161l-.337-.23-1.214-1.038-1.256-2.753a41.402 41.402 0 01-1.394-9.838l.023-.561.171-2.426c.057-.828.133-1.655.168-2.485.129-2.982.241-5.964.359-8.946z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#4FAA41"
|
||||
d="M65.036 80.753c-.118 2.982-.23 5.964-.357 8.947-.035.83-.111 1.657-.168 2.485l-.765.289c-1.699-5.002-3.399-9.951-5.062-14.913-2.75-8.209-5.467-16.431-8.213-24.642a4498.887 4498.887 0 00-6.7-19.867c-.105-.31-.407-.552-.617-.826l4.896-9.002c.168.292.39.565.496.879a6167.476 6167.476 0 016.768 20.118c2.916 8.73 5.814 17.467 8.728 26.198.116.349.308.671.491 1.062l.67-.78-.167 10.052z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#4AA73C"
|
||||
d="M43.155 32.227c.21.274.511.516.617.826a4498.887 4498.887 0 016.7 19.867c2.746 8.211 5.463 16.433 8.213 24.642 1.662 4.961 3.362 9.911 5.062 14.913l.765-.289-.171 2.426-.155.559c-.266 2.656-.49 5.318-.814 7.968-.163 1.328-.509 2.632-.772 3.947-.198-.287-.476-.548-.583-.866-5.467-16.297-10.918-32.6-16.376-48.9a3888.972 3888.972 0 00-5.242-15.551c-.089-.263-.34-.469-.516-.702l3.272-8.84z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#57AE47"
|
||||
d="M65.202 70.702l-.67.78c-.183-.391-.375-.714-.491-1.062-2.913-8.731-5.812-17.468-8.728-26.198a6167.476 6167.476 0 00-6.768-20.118c-.105-.314-.327-.588-.496-.879l6.055-7.965c.191.255.463.482.562.769 1.681 4.921 3.347 9.848 5.003 14.778 1.547 4.604 3.071 9.215 4.636 13.813.105.308.47.526.714.786l.012 1.045c.058 8.082.115 16.167.171 24.251z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#60B24F"
|
||||
d="M65.021 45.404c-.244-.26-.609-.478-.714-.786-1.565-4.598-3.089-9.209-4.636-13.813-1.656-4.93-3.322-9.856-5.003-14.778-.099-.287-.371-.514-.562-.769 1.969-1.928 3.877-3.925 5.925-5.764 1.821-1.634 3.285-3.386 3.352-5.968.003-.107.059-.214.145-.514l.519 1.306c-.013.661-.072 1.322-.029 1.979.075 1.143.259 2.28.311 3.423.096 2.127.142 4.258.185 6.388.069 3.428.132 6.856.175 10.285.067 5.478.111 10.956.18 16.434.008.861.098 1.718.152 2.577z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#A9AA88"
|
||||
d="M62.598 107.085c.263-1.315.609-2.62.772-3.947.325-2.649.548-5.312.814-7.968l.066-.01.066.011a41.402 41.402 0 001.394 9.838c-.176.232-.425.439-.518.701-.727 2.05-1.412 4.116-2.143 6.166-.1.28-.378.498-.574.744l-.747-2.566.87-2.969z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#B6B598"
|
||||
d="M62.476 112.621c.196-.246.475-.464.574-.744.731-2.05 1.417-4.115 2.143-6.166.093-.262.341-.469.518-.701l1.255 2.754c-.248.352-.59.669-.728 1.061l-2.404 7.059c-.099.283-.437.483-.663.722l-.695-3.985z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#C2C1A7"
|
||||
d="M63.171 116.605c.227-.238.564-.439.663-.722l2.404-7.059c.137-.391.48-.709.728-1.061l1.215 1.037c-.587.58-.913 1.25-.717 2.097l-.369 1.208c-.168.207-.411.387-.494.624-.839 2.403-1.64 4.819-2.485 7.222-.107.305-.404.544-.614.812-.109-1.387-.22-2.771-.331-4.158z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#CECDB7"
|
||||
d="M63.503 120.763c.209-.269.506-.508.614-.812.845-2.402 1.646-4.818 2.485-7.222.083-.236.325-.417.494-.624l-.509 5.545c-.136.157-.333.294-.398.477-.575 1.614-1.117 3.24-1.694 4.854-.119.333-.347.627-.525.938-.158-.207-.441-.407-.454-.623-.051-.841-.016-1.688-.013-2.533z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#DBDAC7"
|
||||
d="M63.969 123.919c.178-.312.406-.606.525-.938.578-1.613 1.119-3.239 1.694-4.854.065-.183.263-.319.398-.477l.012 3.64-1.218 3.124-1.411-.495z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#EBE9DC"
|
||||
d="M65.38 124.415l1.218-3.124.251 3.696-1.469-.572z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#CECDB7"
|
||||
d="M67.464 110.898c-.196-.847.129-1.518.717-2.097l.337.23-1.054 1.867z"
|
||||
/><path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#4FAA41"
|
||||
d="M64.316 95.172l-.066-.011-.066.01.155-.559-.023.56z"
|
||||
/>
|
||||
</svg>
|
||||
15
ui/src/components/common/devicons/MySQL.svelte
Normal file
15
ui/src/components/common/devicons/MySQL.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill="currentColor"
|
||||
d="M116.948 97.807c-6.863-.187-12.104.452-16.585 2.341-1.273.537-3.305.552-3.513 2.147.7.733.809 1.829 1.365 2.731 1.07 1.73 2.876 4.052 4.488 5.268 1.762 1.33 3.577 2.751 5.465 3.902 3.358 2.047 7.107 3.217 10.34 5.268 1.906 1.21 3.799 2.733 5.658 4.097.92.675 1.537 1.724 2.732 2.147v-.194c-.628-.8-.79-1.898-1.366-2.733l-2.537-2.537c-2.48-3.292-5.629-6.184-8.976-8.585-2.669-1.916-8.642-4.504-9.755-7.609l-.195-.195c1.892-.214 4.107-.898 5.854-1.367 2.934-.786 5.556-.583 8.585-1.365l4.097-1.171v-.78c-1.531-1.571-2.623-3.651-4.292-5.073-4.37-3.72-9.138-7.437-14.048-10.537-2.724-1.718-6.089-2.835-8.976-4.292-.971-.491-2.677-.746-3.318-1.562-1.517-1.932-2.342-4.382-3.511-6.633-2.449-4.717-4.854-9.868-7.024-14.831-1.48-3.384-2.447-6.72-4.293-9.756-8.86-14.567-18.396-23.358-33.169-32-3.144-1.838-6.929-2.563-10.929-3.513-2.145-.129-4.292-.26-6.438-.391-1.311-.546-2.673-2.149-3.902-2.927C17.811 4.565 5.257-2.16 1.633 6.682c-2.289 5.581 3.421 11.025 5.462 13.854 1.434 1.982 3.269 4.207 4.293 6.438.674 1.467.79 2.938 1.367 4.489 1.417 3.822 2.652 7.98 4.487 11.511.927 1.788 1.949 3.67 3.122 5.268.718.981 1.951 1.413 2.145 2.927-1.204 1.686-1.273 4.304-1.95 6.44-3.05 9.615-1.899 21.567 2.537 28.683 1.36 2.186 4.567 6.871 8.975 5.073 3.856-1.57 2.995-6.438 4.098-10.732.249-.973.096-1.689.585-2.341v.195l3.513 7.024c2.6 4.187 7.212 8.562 11.122 11.514 2.027 1.531 3.623 4.177 6.244 5.073v-.196h-.195c-.508-.791-1.303-1.119-1.951-1.755-1.527-1.497-3.225-3.358-4.487-5.073-3.556-4.827-6.698-10.11-9.561-15.609-1.368-2.627-2.557-5.523-3.709-8.196-.444-1.03-.438-2.589-1.364-3.122-1.263 1.958-3.122 3.542-4.098 5.854-1.561 3.696-1.762 8.204-2.341 12.878-.342.122-.19.038-.391.194-2.718-.655-3.672-3.452-4.683-5.853-2.554-6.07-3.029-15.842-.781-22.829.582-1.809 3.21-7.501 2.146-9.172-.508-1.666-2.184-2.63-3.121-3.903-1.161-1.574-2.319-3.646-3.124-5.464-2.09-4.731-3.066-10.044-5.267-14.828-1.053-2.287-2.832-4.602-4.293-6.634-1.617-2.253-3.429-3.912-4.683-6.635-.446-.968-1.051-2.518-.391-3.513.21-.671.508-.951 1.171-1.17 1.132-.873 4.284.29 5.462.779 3.129 1.3 5.741 2.538 8.392 4.294 1.271.844 2.559 2.475 4.097 2.927h1.756c2.747.631 5.824.195 8.391.975 4.536 1.378 8.601 3.523 12.292 5.854 11.246 7.102 20.442 17.21 26.732 29.269 1.012 1.942 1.45 3.794 2.341 5.854 1.798 4.153 4.063 8.426 5.852 12.488 1.786 4.052 3.526 8.141 6.05 11.513 1.327 1.772 6.451 2.723 8.781 3.708 1.632.689 4.307 1.409 5.854 2.34 2.953 1.782 5.815 3.903 8.586 5.855 1.383.975 5.64 3.116 5.852 4.879zM29.729 23.466c-1.431-.027-2.443.156-3.513.389v.195h.195c.683 1.402 1.888 2.306 2.731 3.513.65 1.367 1.301 2.732 1.952 4.097l.194-.193c1.209-.853 1.762-2.214 1.755-4.294-.484-.509-.555-1.147-.975-1.755-.556-.811-1.635-1.272-2.339-1.952z"
|
||||
/>
|
||||
</svg>
|
||||
22
ui/src/components/common/devicons/Postgres.svelte
Normal file
22
ui/src/components/common/devicons/Postgres.svelte
Normal file
File diff suppressed because one or more lines are too long
15
ui/src/components/common/devicons/Python.svelte
Normal file
15
ui/src/components/common/devicons/Python.svelte
Normal file
@@ -0,0 +1,15 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill="#FFD845"
|
||||
d="M49.33 62h29.159C86.606 62 93 55.132 93 46.981V19.183c0-7.912-6.632-13.856-14.555-15.176-5.014-.835-10.195-1.215-15.187-1.191-4.99.023-9.612.448-13.805 1.191C37.098 6.188 35 10.758 35 19.183V30h29v4H23.776c-8.484 0-15.914 5.108-18.237 14.811-2.681 11.12-2.8 17.919 0 29.53C7.614 86.983 12.569 93 21.054 93H31V79.952C31 70.315 39.428 62 49.33 62zm-1.838-39.11c-3.026 0-5.478-2.479-5.478-5.545 0-3.079 2.451-5.581 5.478-5.581 3.015 0 5.479 2.502 5.479 5.581-.001 3.066-2.465 5.545-5.479 5.545zm74.789 25.921C120.183 40.363 116.178 34 107.682 34H97v12.981C97 57.031 88.206 65 78.489 65H49.33C41.342 65 35 72.326 35 80.326v27.8c0 7.91 6.745 12.564 14.462 14.834 9.242 2.717 17.994 3.208 29.051 0C85.862 120.831 93 116.549 93 108.126V97H64v-4h43.682c8.484 0 11.647-5.776 14.599-14.66 3.047-9.145 2.916-17.799 0-29.529zm-41.955 55.606c3.027 0 5.479 2.479 5.479 5.547 0 3.076-2.451 5.579-5.479 5.579-3.015 0-5.478-2.502-5.478-5.579 0-3.068 2.463-5.547 5.478-5.547z"
|
||||
/>
|
||||
</svg>
|
||||
36
ui/src/components/common/devicons/Redis.svelte
Normal file
36
ui/src/components/common/devicons/Redis.svelte
Normal file
@@ -0,0 +1,36 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill="#A41E11"
|
||||
d="M121.8 93.1c-6.7 3.5-41.4 17.7-48.8 21.6-7.4 3.9-11.5 3.8-17.3 1S13 98.1 6.3 94.9c-3.3-1.6-5-2.9-5-4.2V78s48-10.5 55.8-13.2c7.8-2.8 10.4-2.9 17-.5s46.1 9.5 52.6 11.9v12.5c0 1.3-1.5 2.7-4.9 4.4z"
|
||||
/><path
|
||||
fill="#D82C20"
|
||||
d="M121.8 80.5C115.1 84 80.4 98.2 73 102.1c-7.4 3.9-11.5 3.8-17.3 1-5.8-2.8-42.7-17.7-49.4-20.9C-.3 79-.5 76.8 6 74.3c6.5-2.6 43.2-17 51-19.7 7.8-2.8 10.4-2.9 17-.5s41.1 16.1 47.6 18.5c6.7 2.4 6.9 4.4.2 7.9z"
|
||||
/><path
|
||||
fill="#A41E11"
|
||||
d="M121.8 72.5C115.1 76 80.4 90.2 73 94.1c-7.4 3.8-11.5 3.8-17.3 1C49.9 92.3 13 77.4 6.3 74.2c-3.3-1.6-5-2.9-5-4.2V57.3s48-10.5 55.8-13.2c7.8-2.8 10.4-2.9 17-.5s46.1 9.5 52.6 11.9V68c0 1.3-1.5 2.7-4.9 4.5z"
|
||||
/><path
|
||||
fill="#D82C20"
|
||||
d="M121.8 59.8c-6.7 3.5-41.4 17.7-48.8 21.6-7.4 3.8-11.5 3.8-17.3 1C49.9 79.6 13 64.7 6.3 61.5s-6.8-5.4-.3-7.9c6.5-2.6 43.2-17 51-19.7 7.8-2.8 10.4-2.9 17-.5s41.1 16.1 47.6 18.5c6.7 2.4 6.9 4.4.2 7.9z"
|
||||
/><path
|
||||
fill="#A41E11"
|
||||
d="M121.8 51c-6.7 3.5-41.4 17.7-48.8 21.6-7.4 3.8-11.5 3.8-17.3 1C49.9 70.9 13 56 6.3 52.8c-3.3-1.6-5.1-2.9-5.1-4.2V35.9s48-10.5 55.8-13.2c7.8-2.8 10.4-2.9 17-.5s46.1 9.5 52.6 11.9v12.5c.1 1.3-1.4 2.6-4.8 4.4z"
|
||||
/><path
|
||||
fill="#D82C20"
|
||||
d="M121.8 38.3C115.1 41.8 80.4 56 73 59.9c-7.4 3.8-11.5 3.8-17.3 1S13 43.3 6.3 40.1s-6.8-5.4-.3-7.9c6.5-2.6 43.2-17 51-19.7 7.8-2.8 10.4-2.9 17-.5s41.1 16.1 47.6 18.5c6.7 2.4 6.9 4.4.2 7.8z"
|
||||
/><path
|
||||
fill="#fff"
|
||||
d="M80.4 26.1l-10.8 1.2-2.5 5.8-3.9-6.5-12.5-1.1 9.3-3.4-2.8-5.2 8.8 3.4 8.2-2.7L72 23zM66.5 54.5l-20.3-8.4 29.1-4.4z"
|
||||
/><ellipse fill="#fff" cx="38.4" cy="35.4" rx="15.5" ry="6" /><path
|
||||
fill="#7A0C00"
|
||||
d="M93.3 27.7l17.2 6.8-17.2 6.8z"
|
||||
/><path fill="#AD2115" d="M74.3 35.3l19-7.6v13.6l-1.9.8z" />
|
||||
</svg>
|
||||
17
ui/src/components/common/devicons/Ruby.svelte
Normal file
17
ui/src/components/common/devicons/Ruby.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<path
|
||||
fill-rule="evenodd"
|
||||
clip-rule="evenodd"
|
||||
fill="#D91404"
|
||||
d="M35.971 111.33l81.958 11.188c-9.374-15.606-18.507-30.813-27.713-46.144L35.971 111.33zm89.71-86.383c-2.421 3.636-4.847 7.269-7.265 10.907a67619.72 67619.72 0 00-24.903 37.485c-.462.696-1.061 1.248-.41 2.321 8.016 13.237 15.969 26.513 23.942 39.777 1.258 2.095 2.53 4.182 4.157 6.192l4.834-96.58-.355-.102zM16.252 66.22c.375.355 1.311.562 1.747.347 7.689-3.779 15.427-7.474 22.948-11.564 2.453-1.333 4.339-3.723 6.452-5.661 6.997-6.417 13.983-12.847 20.966-19.278.427-.395.933-.777 1.188-1.275 2.508-4.902 4.973-9.829 7.525-14.898-3.043-1.144-5.928-2.263-8.849-3.281-.396-.138-1.02.136-1.449.375-6.761 3.777-13.649 7.353-20.195 11.472-3.275 2.061-5.943 5.098-8.843 7.743-4.674 4.266-9.342 8.542-13.948 12.882a24.011 24.011 0 00-3.288 3.854c-3.15 4.587-6.206 9.24-9.402 14.025 1.786 1.847 3.41 3.613 5.148 5.259zm28.102-6.271l-11.556 48.823 54.3-34.987-42.744-13.836zm76.631-34.846l-46.15 7.71 15.662 38.096c10.221-15.359 20.24-30.41 30.488-45.806zM44.996 56.644l41.892 13.6c-5.25-12.79-10.32-25.133-15.495-37.737L44.996 56.644zM16.831 75.643L2.169 110.691l27.925-.825-13.263-34.223zm13.593 26.096l.346-.076c3.353-13.941 6.754-27.786 10.177-42.272L18.544 71.035c3.819 9.926 7.891 20.397 11.88 30.704zm84.927-78.897c-4.459-1.181-8.918-2.366-13.379-3.539-6.412-1.686-12.829-3.351-19.237-5.052-.801-.213-1.38-.352-1.851.613-2.265 4.64-4.6 9.245-6.901 13.868-.071.143-.056.328-.111.687l41.47-6.285.009-.292zM89.482 12.288l36.343 10.054-6.005-17.11-30.285 6.715-.053.341zM33.505 114.007c-4.501-.519-9.122-.042-13.687.037-3.75.063-7.5.206-11.25.323-.386.012-.771.09-1.156.506 31.003 2.866 62.005 5.732 93.007 8.6l.063-.414-29.815-4.07c-12.384-1.691-24.747-3.551-37.162-4.982zM2.782 99.994c3.995-9.27 7.973-18.546 11.984-27.809.401-.929.37-1.56-.415-2.308-1.678-1.597-3.237-3.318-5.071-5.226-2.479 12.24-4.897 24.177-7.317 36.113l.271.127c.185-.297.411-.578.548-.897zm78.74-90.153c6.737-1.738 13.572-3.097 20.367-4.613.44-.099.87-.244 1.303-.368l-.067-.332-29.194 3.928c2.741 1.197 4.853 2.091 7.591 1.385z"
|
||||
/>
|
||||
</svg>
|
||||
35
ui/src/components/common/devicons/SQLite.svelte
Normal file
35
ui/src/components/common/devicons/SQLite.svelte
Normal file
@@ -0,0 +1,35 @@
|
||||
<script>
|
||||
export let size = 24;
|
||||
</script>
|
||||
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width={size}
|
||||
height={size}
|
||||
viewBox="0 0 128 128"
|
||||
>
|
||||
<defs
|
||||
><linearGradient
|
||||
id="sqlite-original-a"
|
||||
x1="-15.615"
|
||||
x2="-6.741"
|
||||
y1="-9.108"
|
||||
y2="-9.108"
|
||||
gradientTransform="rotate(90 -90.486 64.634) scale(9.2712)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
><stop stop-color="#95d7f4" offset="0" /><stop
|
||||
stop-color="#0f7fcc"
|
||||
offset=".92"
|
||||
/><stop stop-color="#0f7fcc" offset="1" /></linearGradient
|
||||
></defs
|
||||
><path
|
||||
d="M69.5 99.176c-.059-.73-.094-1.2-.094-1.2S67.2 83.087 64.57 78.642c-.414-.707.043-3.594 1.207-7.88.68 1.169 3.54 6.192 4.118 7.81.648 1.824.78 2.347.78 2.347s-1.57-8.082-4.144-12.797a162.286 162.286 0 012.004-6.265c.973 1.71 3.313 5.859 3.828 7.3.102.293.192.543.27.774.023-.137.05-.274.074-.414-.59-2.504-1.75-6.86-3.336-10.082 3.52-18.328 15.531-42.824 27.84-53.754H16.9c-5.387 0-9.789 4.406-9.789 9.789v88.57c0 5.383 4.406 9.789 9.79 9.789h52.897a118.657 118.657 0 01-.297-14.652"
|
||||
fill="#0b7fcc"
|
||||
/><path
|
||||
d="M65.777 70.762c.68 1.168 3.54 6.188 4.117 7.809.649 1.824.781 2.347.781 2.347s-1.57-8.082-4.144-12.797a164.535 164.535 0 012.004-6.27c.887 1.567 2.922 5.169 3.652 6.872l.082-.961c-.648-2.496-1.633-5.766-2.898-8.328 3.242-16.871 13.68-38.97 24.926-50.898H16.899a6.94 6.94 0 00-6.934 6.933v82.11c17.527-6.731 38.664-12.88 56.855-12.614-.672-2.605-1.441-4.96-2.25-6.324-.414-.707.043-3.597 1.207-7.879"
|
||||
fill="url(#sqlite-original-a)"
|
||||
/><path
|
||||
d="M115.95 2.781c-5.5-4.906-12.164-2.933-18.734 2.899a44.347 44.347 0 00-2.914 2.859c-11.25 11.926-21.684 34.023-24.926 50.895 1.262 2.563 2.25 5.832 2.894 8.328.168.64.32 1.242.442 1.754.285 1.207.437 1.996.437 1.996s-.101-.383-.515-1.582c-.078-.23-.168-.484-.27-.773-.043-.125-.105-.274-.172-.434-.734-1.703-2.765-5.305-3.656-6.867-.762 2.25-1.437 4.36-2.004 6.265 2.578 4.715 4.149 12.797 4.149 12.797s-.137-.523-.782-2.347c-.578-1.621-3.441-6.64-4.117-7.809-1.164 4.281-1.625 7.172-1.207 7.88.809 1.362 1.574 3.722 2.25 6.323 1.524 5.867 2.586 13.012 2.586 13.012s.031.469.094 1.2a118.653 118.653 0 00.297 14.651c.504 6.11 1.453 11.363 2.664 14.172l.828-.449c-1.781-5.535-2.504-12.793-2.188-21.156.48-12.793 3.422-28.215 8.856-44.289 9.191-24.27 21.938-43.738 33.602-53.035-10.633 9.602-25.023 40.684-29.332 52.195-4.82 12.891-8.238 24.984-10.301 36.574 3.55-10.863 15.047-15.53 15.047-15.53s5.637-6.958 12.227-16.888c-3.95.903-10.43 2.442-12.598 3.352-3.2 1.344-4.067 1.8-4.067 1.8s10.371-6.312 19.27-9.171c12.234-19.27 25.562-46.648 12.141-58.621"
|
||||
fill="#003956"
|
||||
/>
|
||||
</svg>
|
||||
Reference in New Issue
Block a user