Skip to content

Commit 4cbaec6

Browse files
authored
feat: accessing editor devfile from dashboard url (#2747)
* feat: accessing editor devfile from dashboard url For eclipse-che/che-dashboard#1134 Signed-off-by: dkwon17 <dakwon@redhat.com> * Update editor links Signed-off-by: dkwon17 <dakwon@redhat.com> --------- Signed-off-by: dkwon17 <dakwon@redhat.com>
1 parent f98847f commit 4cbaec6

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

modules/administration-guide/pages/configuring-editors-definitions.adoc

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ schemaVersion: 2.2.2
3232
# Meta information of the editor
3333
metadata:
3434
# (MANDATORY) The editor name
35-
name: EditorName
35+
# Must consist of lower case alphanumeric characters, '-' or '.'
36+
name: editor-name
3637
displayName: Display Name
3738
description: Run Editor Foo on top of Eclipse Che
3839
# (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.
@@ -174,6 +175,18 @@ commands:
174175

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

178+
== Retrieving the editor definition
179+
180+
The editor definition is also served by the {prod-short} dashboard API from the following URL:
181+
182+
`pass:c,a,q[{prod-url}]/dashboard/api/editors/devfile?che-editor=__<editor id>__`
183+
184+
For the example from xref:configuring-editors-definitions.adoc[], the editor definition can be retrieved by accessing the following URL:
185+
186+
`pass:c,a,q[{prod-url}]/dashboard/api/editors/devfile?che-editor=publisher/editor-name/version`
187+
188+
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>__`
189+
177190
.Additional resources
178191

179192
* link:https://devfile.io/docs/2.2.2/what-is-a-devfile[Devfile documentation]

modules/end-user-guide/partials/proc_creating-workspaces.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ spec:
7272
started: true#<3>
7373
contributions:#<4>
7474
- name: ide
75-
uri: pass:c,a,q[{prod-url}]/plugin-registry/v3/plugins/che-incubator/che-code/latest/devfile.yaml
75+
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
7676
template:
7777
projects:#<5>
7878
- name: my-project-name
@@ -87,7 +87,7 @@ spec:
8787
<1> Name of the `DevWorkspace` custom resource. This will be the name of the new workspace.
8888
<2> User namespace, which is the target {orch-namespace} for the new workspace.
8989
<3> Determines whether the workspace must be started when the `DevWorkspace` custom resource is created.
90-
<4> URL reference to the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE devfile from the plugin registry.
90+
<4> URL reference to the link:https://github.com/microsoft/vscode[Microsoft Visual Studio Code - Open Source] IDE devfile.
9191
<5> Details about the Git repository to clone into the workspace when it starts.
9292
<6> List of components such as workspace containers and volume components.
9393
====

0 commit comments

Comments
 (0)