Skip to content

Commit

Permalink
feat: accessing editor devfile from dashboard url
Browse files Browse the repository at this point in the history
For eclipse-che/che-dashboard#1134

Signed-off-by: dkwon17 <dakwon@redhat.com>
  • Loading branch information
dkwon17 committed Jun 21, 2024
1 parent f98847f commit c632b49
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ schemaVersion: 2.2.2
# Meta information of the editor
metadata:
# (MANDATORY) The editor name
name: EditorName
name: editorname
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 +174,19 @@ 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/editorname/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:
`\http://che-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
4 changes: 2 additions & 2 deletions modules/end-user-guide/partials/proc_creating-workspaces.adoc
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: http://che-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

0 comments on commit c632b49

Please sign in to comment.