Giter Site home page Giter Site logo

Comments (13)

aryabharat avatar aryabharat commented on September 26, 2024 1

@rlamana I have started the code for that.

const getStatus = async () => { if(!currentContext || !environment) return; const status = await okteto.status(environment.file, currentContext.name); **if(status.toLowerCase() ==='ready') okteto.toastSuccess('deployed')** setStatus(status); }

and one new function in client api:
const toastSuccess = (message:string) => { window.ddClient.desktopUI.toast.success(message); returnl }

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

Is anyone picking this issue?
If no one is assigned, I can try this.

from docker-desktop-extension.

pchico83 avatar pchico83 commented on September 26, 2024

@aryabharat great! I assigned this issue to you :-)

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

Hi @pchico83,
Just wanted to show the process before starting dev.

will add a function in /docker-desktop-extension/client/src/api/okteto.ts file to get status

const status = async (oktetoOnly = true): Promise<OktetoContextList> => { try { const result = await window.ddClient.extension?.host?.cli.exec( 'okteto', ['status'], ); if (result) { return result.parseJsonObject(); } return 'Failed' } catch (_) { console.error('Error executing "okteto status" command'); return 'Failed' } };

and update /docker-desktop-extension/client/src/views/Environment.tsx
for status icon.

from docker-desktop-extension.

rlamana avatar rlamana commented on September 26, 2024

@aryabharat That looks correct 👌 However, the call will return an object with the form: {"status": "activating"}. It would be nice if the function could return the status directly, and based on a defined type, instead of just a string.

from docker-desktop-extension.

rlamana avatar rlamana commented on September 26, 2024

@aryabharat Don't hesitate to send a PR with those changes and we can discuss further there 👍

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

@rlamana I have completed the dev,
Just facing some issues while starting the dev end.
x Couldn't activate your development container Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: unable to init seccomp: error loading seccomp filter into kernel: error loading seccomp filter: errno 524: unknown

logs from file .okteto/aryabharat/cli/okteto.log

time="2022-10-04T13:31:06+05:30" level=info msg="pod event: SuccessfulAttachVolume:AttachVolume.Attach succeeded for volume \"pvc-0db0957b-ab37-48c7-9059-9861f0651755\" " action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="pod event: FailedCreatePodSandBox:Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: unable to init seccomp: error loading seccomp filter into kernel: error loading seccomp filter: errno 524: unknown" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="starting shutdown sequence" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="sent cancellation signal" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="stopping syncthing" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="stopping forwarders" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="completed shutdown sequence" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="activate failed with: couldn't activate your development container\n Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: unable to init seccomp: error loading seccomp filter into kernel: error loading seccomp filter: errno 524: unknown" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0 time="2022-10-04T13:31:06+05:30" level=info msg="exit signal received due to error: couldn't activate your development container\n Failed to create pod sandbox: rpc error: code = Unknown desc = failed to create containerd task: failed to create shim: OCI runtime create failed: runc create failed: unable to start container process: unable to init seccomp: error loading seccomp filter into kernel: error loading seccomp filter: errno 524: unknown" action=ace68877-d365-42cf-8654-0edcca04bfc3 version=2.7.0

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

@rlamana
#78

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

@rlamana waiting for #76 to get merged.

from docker-desktop-extension.

rlamana avatar rlamana commented on September 26, 2024

@aryabharat 👌 it is almost ready. If you want to make some progress, you can start by adding the toast in the UI (https://docs.docker.com/desktop/extensions-sdk/dev/api/reference/interfaces/Toast/) while waiting for #76

from docker-desktop-extension.

rlamana avatar rlamana commented on September 26, 2024

Sounds good 👌

and one new function in client api: const toastSuccess = (message:string) => { window.ddClient.desktopUI.toast.success(message); returnl }

I would, however, leave all UI-dependant code to the components, in this case the one in charge of opening the toast should probably be the Environment component.

from docker-desktop-extension.

aryabharat avatar aryabharat commented on September 26, 2024

"Closing the previous open PR as it was determined we need to pursue a different approach. @rlamana, could you please provide insights on our next steps for this issue?"

from docker-desktop-extension.

rlamana avatar rlamana commented on September 26, 2024

@aryabharat yes, we are going to close this one for now, as we don't have any plans for it yet. We will get back to you as soon as we decide how this feature fits into our latest changes. Thank you.

from docker-desktop-extension.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.