Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: accessing editor devfile from dashboard url #2747

Merged
merged 2 commits into from
Jun 26, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ schemaVersion: 2.2.2
# Meta information of the editor
metadata:
# (MANDATORY) The editor name
name: EditorName
# Must consist of lower case alphanumeric characters, '-' or '.'
name: editor-name
displayName: Display Name
description: Run Editor Foo on top of Eclipse Che
# (OPTIONAL) Array of tags of the current editor. The Tech-Preview tag means the option is considered experimental and is not recommended for production environments. While it can include new features and improvements, it may still contain bugs or undergo significant changes before reaching a stable version.
Expand Down Expand Up @@ -174,6 +175,18 @@ commands:

. Refresh the {prod-short} Dashboard page to see new available editor.

== Retrieving the editor definition

The editor definition is also served by the {prod-short} dashboard API from the following URL:

`pass:c,a,q[{prod-url}]/dashboard/api/editors/devfile?che-editor=__<editor id>__`

For the example from xref:configuring-editors-definitions.adoc[], the editor definition can be retrieved by accessing the following URL:

`pass:c,a,q[{prod-url}]/dashboard/api/editors/devfile?che-editor=publisher/editor-name/version`

TIP: When retrieving the editor definition from within the {orch-name} cluster, the {prod-short} dashboard API can be accessed via the dashboard service: `pass:c,a,q[http://{prod-id-short}-dashboard.{prod-namespace}.svc.cluster.local:8080]/dashboard/api/editors/devfile?che-editor=__<editor id>__`

.Additional resources

* link:https://devfile.io/docs/2.2.2/what-is-a-devfile[Devfile documentation]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ spec:
started: true#<3>
contributions:#<4>
- name: ide
uri: pass:c,a,q[{prod-url}]/plugin-registry/v3/plugins/che-incubator/che-code/latest/devfile.yaml
uri: pass:c,a,q[http://{prod-id-short}-dashboard.{prod-namespace}.svc.cluster.local:8080]/dashboard/api/editors/devfile?che-editor=che-incubator/che-code/latest
template:
projects:#<5>
- name: my-project-name
Expand All @@ -87,7 +87,7 @@ spec:
<1> Name of the `DevWorkspace` custom resource. This will be the name of the new workspace.
<2> User namespace, which is the target {orch-namespace} for the new workspace.
<3> Determines whether the workspace must be started when the `DevWorkspace` custom resource is created.
<4> URL reference to the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE devfile from the plugin registry.
<4> URL reference to the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE devfile.
<5> Details about the Git repository to clone into the workspace when it starts.
<6> List of components such as workspace containers and volume components.
====
Expand Down
Loading