Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/channels/src/interface/navigation-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ export const NavigationApi = Symbol.for('NavigationApi');

export interface NavigationApi {
navigateToProviderNewConnection(id: string): Promise<void>;
navigateToExtensionsCatalog(searchTerm?: string): Promise<void>;
}
4 changes: 4 additions & 0 deletions packages/extension/src/manager/navigation-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,8 @@
}
return podmanDesktopApi.navigation.navigateToCreateProviderConnection(id);
}

async navigateToExtensionsCatalog(searchTerm?: string): Promise<void> {
return podmanDesktopApi.navigation.navigateToExtensionsCatalog({ searchTerm });

Check failure on line 37 in packages/extension/src/manager/navigation-api.ts

View workflow job for this annotation

GitHub Actions / Build / ubuntu-24.04

Property 'navigateToExtensionsCatalog' does not exist on type 'typeof navigation'.
}
}
37 changes: 37 additions & 0 deletions packages/webview/src/component/dashboard/NewProviderCard.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<script lang="ts">
import { faPuzzlePiece } from '@fortawesome/free-solid-svg-icons';
import { Button } from '@podman-desktop/ui-svelte';
import Fa from 'svelte-fa';
import NewProvider from '/@/component/icons/NewProvider.svelte';
import { getContext } from 'svelte';
import { Remote } from '/@/remote/remote';
import { API_NAVIGATION } from '@kubernetes-dashboard/channels';

const remote = getContext<Remote>(Remote);
const navigationApi = remote.getProxy(API_NAVIGATION);
</script>

<div class="rounded-xl p-5 text-left border border-dotted border-(--pd-content-divider)">
<div class="flex justify-left text-(--pd-details-empty-icon) py-2 mb-2">
<NewProvider />
</div>
<h1 class="text-lg font-semibold mb-4">New provider</h1>

<p class="text-sm text-(--pd-content-text) mb-6">
Install a new Kubernetes provider via extension. Navigate to extensions by pressing the button, install the ones you
prefer and they will show up here.
</p>

<div class="flex justify-center">
<Button
type="secondary"
on:click={async (): Promise<void> => {
await navigationApi.navigateToExtensionsCatalog('category:kubernetes keyword:provider not:installed');
}}
class="flex items-center"
aria-label="See available extensions">
<Fa icon={faPuzzlePiece} size="1.2x" class="mr-1" />
See available extensions
</Button>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { getContext, onDestroy, onMount } from 'svelte';
import { States } from '/@/state/states';
import type { Unsubscriber } from 'svelte/store';
import KubernetesProviderCard from '/@/component/dashboard/KubernetesProviderCard.svelte';
import NewProviderCard from '/@/component/dashboard/NewProviderCard.svelte';

const states = getContext<States>(States);
const kubernetesProviders = states.stateKubernetesProvidersInfoUI;
Expand Down Expand Up @@ -33,6 +34,7 @@ onDestroy(() => {
{#each kubernetesProviders.data?.providers as provider (provider.id)}
<KubernetesProviderCard provider={provider} />
{/each}
<NewProviderCard />
</div>
</div>
</div>
182 changes: 182 additions & 0 deletions packages/webview/src/component/icons/NewProvider.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" fill="none" viewBox="0 0 118 118">
<rect
width="100"
height="100"
x="9"
y="9"
fill="#6085FF"
rx="50"
style="fill:#6085ff;fill-opacity:1"></rect>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.876"
d="M27.11 9.863s-.6-4.409 2.214-6.181 5.3-.479 5.3-.479M76.804 6.918s-.376-4.437-3.508-5.553-5.281.685-5.281.685"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#fff"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width="1.876"
d="M95.235 23.538c-2.945 1.182-4.587 5.61-5.469 9.333 2.805 6.556 4.803 13.582 6.36 19.97 2.391-2.74 7.381-9.09 9.145-16.284 2.345-9.605-4.699-15.157-10.036-13.019Z"
style="fill:#fff;fill-opacity:1;stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#CBCBCA"
d="M107.544 73.017c1.716-.917 3.933-.515 4.941 1.19q.044.078.072.159c.909 1.734.129 3.84-1.559 4.849-.182.112-.464.292-.679.41l-.006.003c-.589.318-1.185.538-1.714.733-1.466-.01-2.4-.305-2.416-.31l-4.915 3.398-.234-1.905c-.012-.02-1.245-2.018 2.067-3.837 1.723-.946 2.808-2.663 3.456-4.099q.076-.053.156-.104l.329-.196q.15-.084.261-.15l.011-.007.051-.032.015-.009zm-.275.166v.001l.015-.01.002-.002z"
style="fill:#cbcbca;fill-opacity:1"></path>
<path
fill="#231F20"
d="m107.544 73.017-.442-.827-.02.01zm4.941 1.19.808-.476zm.072.159-.881.32q.021.06.051.115zm-1.559 4.849-.481-.805-.013.007zm-.679.41.42.839.032-.017zm-.006.003-.419-.84-.026.014zm-1.714.733-.007.938a1 1 0 0 0 .331-.058zm-2.416-.31.287-.894a.94.94 0 0 0-.82.122zm-4.915 3.398-.931.115a.94.94 0 0 0 1.465.657zm-.234-1.905.931-.115a.94.94 0 0 0-.135-.38zm2.067-3.837-.451-.822zm3.456-4.099-.525-.777a.93.93 0 0 0-.33.391zm.156-.104-.479-.807-.027.016zm.329-.196-.46-.817-.019.01zm.261-.15.478.808.059-.038zm.011-.007-.53-.773h-.001zm.051-.032-.488-.801zm.015-.009-.462-.816-.013.007zm-.111.073-.553-.757a.94.94 0 0 0-.385.757zm0 .001h-.938a.938.938 0 0 0 1.498.753zm.015-.01.555.756a1 1 0 0 0 .108-.093zm.002-.002.663.663a.938.938 0 0 0-1.195-1.436zm.258-.155.442.828c1.358-.726 2.986-.355 3.692.84l.807-.477.808-.477c-1.31-2.217-4.117-2.65-6.191-1.54zm4.941 1.19-.807.478-.009-.015.007.016.881-.32.882-.32a2 2 0 0 0-.146-.315zm.072.159-.83.435c.638 1.22.126 2.81-1.21 3.609l.481.805.481.805c2.039-1.22 3.087-3.84 1.909-6.09zm-1.559 4.849-.494-.798c-.201.125-.45.283-.637.386l.452.822.452.822c.243-.134.558-.334.721-.435zm-.679.41-.419-.84-.006.004.419.839.42.839.006-.003zm-.006.003-.445-.826c-.523.283-1.059.482-1.594.679l.325.88.324.88c.523-.193 1.18-.433 1.836-.788zm-1.714.733.006-.938c-1.346-.01-2.184-.281-2.135-.266l-.287.894-.286.893c.08.025 1.11.344 2.695.355zm-2.416-.31-.533-.772-4.915 3.398.533.772.534.772 4.915-3.399zm-4.915 3.398.931-.114-.234-1.906-.931.115-.931.114.234 1.906zm-.234-1.905.796-.496c.045.072-.139-.202-.08-.615.051-.356.324-1.092 1.803-1.904l-.452-.822-.451-.822c-1.833 1.006-2.6 2.18-2.757 3.282-.15 1.046.288 1.78.345 1.872zm2.067-3.837.452.822c1.985-1.09 3.178-3.027 3.858-4.535l-.854-.386-.855-.386c-.615 1.363-1.592 2.86-3.052 3.663zm3.456-4.099.524.777c.064-.042.097-.066.137-.091l-.505-.79-.506-.79c-.066.042-.136.09-.175.117zm.156-.104.478.806.33-.195-.479-.807-.479-.806-.329.195zm.329-.196.46.818q.151-.086.279-.16l-.478-.807-.479-.807c-.065.039-.141.082-.242.14zm.261-.15.537.77-.015.01-.003.002.007-.005.017-.011-.532-.773-.531-.773.011-.007q.002-.002.001 0l-.009.005-.021.014zm.011-.007.531.774-.007.004q-.002 0 0 0l.015-.01-.488-.8-.488-.801c-.021.013-.058.035-.093.06zm.051-.032.488.801.002-.001-.475-.809-.475-.809-.028.017zm.015-.009.461.817.165-.093-.462-.817-.462-.816-.164.093zm-.111.073h-.938v.001h1.876zm0 .001.56.753-.002.002.002-.002.01-.007-.555-.756-.555-.756-.008.005-.004.003-.007.006zm.015-.01.663.663.002-.002-.663-.663-.663-.664-.002.002zm.002-.002-.532-.773-.038.027.553.757.554.758-.005.003z"
style="fill:#231f20;fill-opacity:1"></path>
<mask id="path-7-inside-1_59_368" fill="#fff">
<path
d="M43.746 7.152c7.464-2.058 15.959-1.437 24.88 1.482 3.208 1.05 6.066 2.665 8.62 4.702l-3.528 6.841-45.793 7.508-4.009-3.829q.63-1.152 1.306-2.26c4.671-7.643 11.04-12.38 18.524-14.444"
></path
></mask>
<path
fill="#fff"
d="M43.746 7.152c7.464-2.058 15.959-1.437 24.88 1.482 3.208 1.05 6.066 2.665 8.62 4.702l-3.528 6.841-45.793 7.508-4.009-3.829q.63-1.152 1.306-2.26c4.671-7.643 11.04-12.38 18.524-14.444"
style="fill:#fff;fill-opacity:1"></path>
<path
fill="#231F20"
d="m43.746 7.152-.499-1.809zm24.88 1.482-.584 1.783zm8.62 4.702 1.666.86a1.876 1.876 0 0 0-.497-2.326zm-3.528 6.841.303 1.852a1.88 1.88 0 0 0 1.364-.992zm-45.793 7.508-1.296 1.357c.426.406 1.018.59 1.6.494zm-4.009-3.829-1.646-.9a1.876 1.876 0 0 0 .35 2.256zm1.306-2.26-1.327-1.326a2 2 0 0 0-.274.349zm0 0 1.327 1.326a2 2 0 0 0 .274-.349zM43.747 7.151l.499 1.808c7.016-1.934 15.123-1.382 23.798 1.457l.583-1.783.584-1.783c-9.168-3-18.05-3.69-25.963-1.508zm24.88 1.482-.583 1.783c2.975.974 5.637 2.475 8.032 4.386l1.17-1.467 1.17-1.466c-2.71-2.163-5.765-3.893-9.206-5.019zm8.62 4.702-1.668-.86-3.528 6.842 1.668.86 1.667.859 3.527-6.84zm-3.528 6.841-.304-1.85-45.793 7.507.304 1.851.303 1.851 45.793-7.507zm-45.793 7.508 1.296-1.356-4.01-3.83-1.295 1.357-1.296 1.356 4.01 3.83zm-4.009-3.829 1.646.9q.609-1.114 1.26-2.182l-1.6-.978-1.601-.977a56 56 0 0 0-1.351 2.338zm1.306-2.26 1.326 1.327.001-.001zl-1.327-1.326zm0 0 1.601.977C31.261 15.314 37.25 10.89 44.245 8.96l-.499-1.808-.499-1.808c-7.97 2.198-14.722 7.249-19.625 15.273z"
mask="url(#path-7-inside-1_59_368)"
style="fill:#231f20;fill-opacity:1"></path>
<mask id="mask0_59_368" width="100" height="100" x="9" y="9" maskUnits="userSpaceOnUse" style="mask-type:alpha">
<circle
cx="59"
cy="59"
r="50"
fill="#D9D9D9"
style="fill:#d9d9d9;fill-opacity:1"></circle>
</mask>
<g mask="url(#mask0_59_368)">
<path
fill="#fff"
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.876"
d="M98.574 63.664c2.007 9.098 3.658 20.438 4.915 30.737v.01L87 114.5H32.5l-17.47-12.633c-1.295-13.488-3.874-55.442 10.993-79.783C35.13 7.18 50.738 3.766 68.334 9.525c20.447 6.688 26.544 37.378 30.24 54.14"
style="fill:#fff;fill-opacity:1;stroke:#231f20;stroke-opacity:1"
></path>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.876"
d="M27.11 9.863s-.6-4.409 2.214-6.181 5.3-.479 5.3-.479"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#CCCBCB"
d="M28.19 43.245a3.245 3.245 0 1 0 0-6.491 3.245 3.245 0 0 0 0 6.49M82.797 40.656a3.245 3.245 0 1 0 0-6.49 3.245 3.245 0 0 0 0 6.49"
style="fill:#cccbcb;fill-opacity:1"></path>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width=".947"
d="M36.669 43.826s2.579-2.673 7.287-3.827c2.655-.656 6.285-.769 6.285-.769M37.728 48.282s4.005-3.912 6.472-5.093 6.04-1.895 6.04-1.895M40.57 53.13s1.586-3.957 5.394-7.053c2.12-1.725 5.459-3.207 5.459-3.207M79.815 42.86s-4.643-3.114-7.288-3.827c-2.645-.712-6.285-.769-6.285-.769M78.69 47.1s-4.006-3.912-6.473-5.093-6.04-1.895-6.04-1.895M76.27 52.68s-1.586-3.958-5.394-7.053c-2.12-1.726-5.459-3.208-5.459-3.208"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#fff"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width=".947"
d="M58.298 47.1c5.936 0 10.749-4.229 10.749-9.446s-4.813-9.445-10.75-9.445c-5.936 0-10.748 4.23-10.748 9.446S52.36 47.1 58.298 47.1Z"
style="fill:#fff;fill-opacity:1;stroke:#231f20;stroke-opacity:1"
></path>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.266"
d="m58.25 37.692.104 2.589s.703 1.191 3.18 1.088c2.476-.103 2.1-2.936 2.1-2.936"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.266"
d="m58.25 37.692.104 2.589s-.6 1.238-3.076 1.341-2.336-2.758-2.336-2.758"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#231F20"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width="1.107"
d="M61.403 34.634c.056 1.473-1.37 2.983-3.208 3.058s-3.386-1.322-3.452-2.786 1.388-2.457 3.227-2.532 3.367.788 3.423 2.26z"
style="fill:#231f20;fill-opacity:1;stroke:#231f20;stroke-opacity:1">
</path>
<path
fill="#231F20"
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width=".9"
d="M55.278 41.622s1.125 2.073 3.414 1.98c2.288-.095 2.842-2.233 2.842-2.233z"
style="fill:#231f20;fill-opacity:1;stroke:#231f20;stroke-opacity:1">
</path>
<path
stroke="#231F20"
stroke-miterlimit="10"
stroke-width=".938"
d="M41.687 35.638a5.037 5.037 0 1 0 0-10.074 5.037 5.037 0 0 0 0 10.074Z"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#231F20"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width="1.895"
d="M41.555 32.233a1.726 1.726 0 1 0 0-3.452 1.726 1.726 0 0 0 0 3.452Z"
style="fill:#231f20;fill-opacity:1;stroke:#231f20;stroke-opacity:1">
</path>
<path
stroke="#231F20"
stroke-miterlimit="10"
stroke-width=".938"
d="M72.977 32.87a4.671 4.671 0 1 0 0-9.341 4.671 4.671 0 0 0 0 9.342Z"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#231F20"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width="1.735"
d="M72.855 29.72a1.604 1.604 0 1 0 0-3.208 1.604 1.604 0 0 0 0 3.207Z"
style="fill:#231f20;fill-opacity:1;stroke:#231f20;stroke-opacity:1">
</path>
<path
fill="#CBCBCA"
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.876"
d="M111.677 74.685c-.731-1.238-2.448-1.585-3.817-.769-.019.01-.038.028-.057.038-.187.112-.422.234-.581.337-.779.497-1.285 1.032-1.951 1.567-1.454 1.116-2.664 2.044-3.921 2.654-.516.178-1.125.085-1.594-.037l-.985.506a34 34 0 0 0-3.02-3.686 33.57 33.57 0 0 0-17.053-9.708c.02-.347.076-.966.094-1.154-.29-.366-.656-.703-.656-1.407.084-1.407.478-2.87.947-4.643.235-.825.535-1.49.694-2.4.038-.207.075-.507.103-.732a3.1 3.1 0 0 0-.337-1.914c-.385-.703-1.05-1.21-1.848-1.322-1.426-.197-2.758.928-2.983 2.513v.047c-.028.216-.075.488-.103.685-.094.92.01 1.642.01 2.504-.038 1.83-.066 3.349-.366 4.728-.16.563-.779 1.003-1.032 1.22l-.216 1.096c-8.076-.422-16.283 2.036-22.961 7.401l-.826-.779c-.469-.056-1.172-.112-1.547-.384-1.05-.938-1.951-2.157-3.04-3.63-.496-.703-.834-1.36-1.444-2.054-.131-.15-.337-.357-.497-.516l-.018-.019-.029-.028c-1.107-1.135-2.823-1.266-3.855-.281-1.031.985-1.003 2.71.075 3.864l.029.028c.009.01.028.019.037.038.15.16.338.366.469.506.657.647 1.294 1.023 1.96 1.557 1.407 1.173 2.59 2.139 3.47 3.236.338.479.3 1.21.31 1.557l.75.882c-5.646 6.378-8.497 14.435-8.497 22.511l-1.22.169c-.29.375-.712.835-1.153.947-1.389.235-3.02.188-4.85.132-.853-.047-1.585-.188-2.504-.141-.225.01-.544.047-.778.065-1.576.151-2.749 1.417-2.627 2.842.122 1.436 1.51 2.486 3.096 2.345.225-.018.525-.037.731-.056.92-.112 1.604-.375 2.439-.572 1.848-.291 3.602-.891 5.065-.647.403.065.722.366 1.041.684l1.22-.037a33 33 0 0 0 1.181 4.727c2.505.385 5.056.666 7.635.844a26.8 26.8 0 0 1-1.923-5.777l13.676-.394a2.31 2.31 0 0 1 2.035 1.069c.197.3.32.656.347 1.041.047.507-.075.985-.319 1.388l.029.047-1.557 2.655c11.34-.741 22.023-3.555 31.543-8.02l-5.571-2.486v-.037a2.293 2.293 0 0 1-.357-4.033l11.359-7.635a26.9 26.9 0 0 1 2.223 10.102 81 81 0 0 0 6.434-4.334 33.6 33.6 0 0 0-2.917-9.623c.291-.197.816-.544.976-.648.103-.46.14-.947.684-1.397 1.154-.816 2.542-1.416 4.221-2.157.797-.329 1.501-.516 2.317-.957.188-.103.441-.263.638-.385 1.379-.816 1.894-2.476 1.163-3.723zM59.001 95.114a2.25 2.25 0 0 1-1.285.61l-.018.056-13.507 1.932a26.98 26.98 0 0 1 6.153-16.236l8.826 10.42v.038c.085.113.178.244.253.366.516.9.366 2.064-.412 2.814zm6.069-8.789h-.047l-9.952-9.351a26.87 26.87 0 0 1 16.574-5.375l-2.664 13.479-.056.019a2.294 2.294 0 0 1-2.58 1.857 2.3 2.3 0 0 1-1.284-.629zm9.417 15.833-3.977 1.266-3.48-2.316-.356-4.174 3.02-2.88 4.136.591 2.14 3.611zm5.956-13.675-.056-.038a2.307 2.307 0 0 1-3.067-.853 2.23 2.23 0 0 1-.31-1.389h-.019l1.135-13.713a26.8 26.8 0 0 1 12.653 7.55 28 28 0 0 1 1.83 2.149l-12.166 6.303z"
style="fill:#cbcbca;fill-opacity:1;stroke:#231f20;stroke-opacity:1">
</path>
<path
fill="#fff"
stroke="#231F20"
stroke-miterlimit="10"
stroke-width="1.876"
d="M95.235 23.538c-2.945 1.182-4.587 5.61-5.469 9.333 2.805 6.556 4.803 13.582 6.36 19.97 2.391-2.74 7.381-9.09 9.145-16.284 2.345-9.605-4.699-15.157-10.036-13.019Z"
style="fill:#fff;fill-opacity:1;stroke:#231f20;stroke-opacity:1"
></path>
<path
fill="#fff"
d="M16.718 75.332S27.101 94.42 38.901 93.707s14.22-7.072 12.278-11.021c-3.79-7.72-24.472-15.204-24.472-15.204"
style="fill:#fff;fill-opacity:1"></path>
<path
stroke="#231F20"
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="1.876"
d="M16.718 75.332S27.101 94.42 38.901 93.707s14.22-7.072 12.278-11.021c-3.79-7.72-24.472-15.204-24.472-15.204"
style="stroke:#231f20;stroke-opacity:1"></path>
<path
fill="#231F20"
d="m24.608 24.685.46.363C16.376 33.735 11 45.74 11 59c0 26.51 21.49 48 48 48 16.573 0 31.185-8.4 39.81-21.174.1-.06.194-.193.279-.425a48 48 0 0 0 1.498-2.419c1.225-1.294 2.724-2.214 2.74-2.224l-1.274 3.626.044-.026C93.401 99.104 77.357 109 59 109 31.386 109 9 86.614 9 59c0-14.076 5.819-26.792 15.18-35.879.152.559.295 1.084.428 1.564m80.511 14.974A49.8 49.8 0 0 1 109 59c0 5.564-.91 10.916-2.588 15.915-1.063.843-2.09 1.666-3.051 2.44A47.8 47.8 0 0 0 107 59c0-6.57-1.322-12.833-3.712-18.536zM74.011 11.294a50 50 0 0 1 20.328 12.334l-.897 1.944a48 48 0 0 0-19.431-12.174z"
style="fill:#231f20;fill-opacity:1"></path>
</g>
</svg>
Loading