Skip to content
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
52a7824
added walthrough in package.json
msivasubramaniaan May 19, 2022
9eecf00
Merge branch 'main' into 2414-create-get-started-for-openshift-in-vsc…
msivasubramaniaan May 24, 2022
26849f3
added steps on the walkthrough
msivasubramaniaan May 31, 2022
3092b6c
Merge branch 'main' into 2414-create-get-started-for-openshift-in-vsc…
msivasubramaniaan Jun 1, 2022
36d3e1f
changed title and description of the steps
msivasubramaniaan Jun 1, 2022
7c58658
Merge branch 'main' into 2414-create-get-started-for-openshift-in-vsc…
msivasubramaniaan Jun 1, 2022
f3b4824
added additional login option and post corresponding message
msivasubramaniaan Jun 1, 2022
ff0171c
Update login description in package.json
msivasubramaniaan Jun 2, 2022
10fdbcd
Update debug description in package.json
msivasubramaniaan Jun 2, 2022
937c83d
Update login title in package.json
msivasubramaniaan Jun 2, 2022
fe2c009
added show registry step and updated the gifs
msivasubramaniaan Jun 2, 2022
b05ccb8
Merge branch '2414-create-get-started-for-openshift-in-vscode-open-wa…
msivasubramaniaan Jun 2, 2022
376099d
used the exisiting message passing
msivasubramaniaan Jun 2, 2022
bc7ce64
Update open browser desc package.json
msivasubramaniaan Jun 2, 2022
d3357d1
Update create component desc package.json
msivasubramaniaan Jun 2, 2022
9ac4978
Update push component desc package.json
msivasubramaniaan Jun 2, 2022
f3968cd
updated desc and gifs
msivasubramaniaan Jun 2, 2022
8dd7f57
updated desc of show registries
msivasubramaniaan Jun 2, 2022
1de2189
added openInView into onCommand for makes the step get completes
msivasubramaniaan Jun 2, 2022
94ff9d5
Update the main desc package.json
msivasubramaniaan Jun 2, 2022
fba0856
Update the login desc package.json
msivasubramaniaan Jun 2, 2022
47c7ed6
Update the show registry desc package.json
msivasubramaniaan Jun 2, 2022
009b39f
updated the vscode-openshift-tools.gif
msivasubramaniaan Jun 2, 2022
41c7c99
updated the vscode-openshift-tools.gif
msivasubramaniaan Jun 2, 2022
13fce0f
Merge branch '2414-create-get-started-for-openshift-in-vscode-open-wa…
msivasubramaniaan Jun 2, 2022
83b868e
reverted the gif
msivasubramaniaan Jun 2, 2022
84c91d9
Merge branch 'main' into 2414-create-get-started-for-openshift-in-vsc…
msivasubramaniaan Jun 8, 2022
355d406
change login title and desc
msivasubramaniaan Jun 10, 2022
5e88ae8
Add activation event and Provision OpenShift cluster button
dgolovin Jun 15, 2022
da906a2
Revert "Add activation event and Provision OpenShift cluster button"
dgolovin Jun 15, 2022
be5d77c
Rename 'Connect using ...' to 'Provision ...'
dgolovin Jun 16, 2022
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
Binary file added images/walkthrough/createComponent.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walkthrough/debug.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walkthrough/loginCluster.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walkthrough/openInBrowser.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walkthrough/pushComponent.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/walkthrough/showRegistries.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 78 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,9 @@
"onCommand:clusters.openshift.deploy.rcShowLog",
"onCommand:clusters.openshift.deploy.rcShowLog.palette",
"onCommand:clusters.openshift.deployment.openConsole",
"onCommand:clusters.openshift.imagestream.openConsole"
"onCommand:clusters.openshift.imagestream.openConsole",
"onCommand:openshift.componentTypesView.registry.openInView",
"onWalkthrough:openshiftWalkthrough"
],
"contributes": {
"commands": [
Expand Down Expand Up @@ -896,11 +898,6 @@
}
],
"keybindings": [
{
"command": "openshift.explorer.login",
"key": "alt+shift+l",
"mac": "ctrl+shift+l"
},
{
"command": "openshift.explorer.refresh",
"key": "alt+shift+r",
Expand Down Expand Up @@ -1561,6 +1558,81 @@
}
]
},
"walkthroughs": [
{
"id": "openshiftWalkthrough",
"title": "Getting Started with OpenShift",
"description": "Start your application development on OpenShift or Kubernetes",
"steps": [
{
"id": "login",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

This step does not look right to me. Login is just a way to get access to cluster resources and it does not matter how cluster is provisioned or where it is located.

What I see is attempt to mix cluster login, provisioning and location in one step.

I suggest to bubble up one more step. 'Get access to OpenShift cluster' or 'Provision or use existing OpenShift cluster'
Where we can have button to open 'Add Cluster Editor'. Then reduce Login step to just a description and login button.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
Changed the login title and description. Please refer the screenshot

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this covers the use case of differentiating the Login and provision workflow. The description also works for me. LGTM.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it is still two questions answered in one step.

'Connect using OpenShift Local' sounds awkward to me, I would say 'Connect using ssh' or 'Connect to OpenShift using SSH'. Both sounds good to me. Lets try 'Connect to OpenShift Using OpenShift Local' does that sound good? It is not for me.

IMHO first someone who is interested would ask where/how one can get OpenShift instance? Then ask how to work with it or see what is in it through the UI elements provided by extension they've just installed and that would require to log into the cluster.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here OpenShift local refers to renamed CodeReadyContainers. So connect using OpenShift local should open the CRC view we currently have.

"title": "Login/Provision OpenShift cluster",
"description": "Users can Login to an existing OpenShift cluster using the login button.\nTo provision a new OpenShift cluster, **Add OpenShift Cluster** button opens a guided experience workflow to connect to a local or sandbox cluster.\n[Login to the existing OpenShift cluster](command:openshift.explorer.login)\n[Provision OpenShift cluster](command:openshift.explorer.addCluster)",
"media": {
"image": "images/walkthrough/loginCluster.gif",
"altText": "login to cluster"
},
"completionEvents": [
"onCommand:openshift.explorer.login",
"onCommand:openshift.explorer.addCluster",
"onCommand:openshift.explorer.login.credentialsLogin",
"onCommand:openshift.explorer.login.tokenLogin"
]
},
{
"id": "showRegistries",
"title": "View the default and custom devfile registries.",
"description": "You can connect to publicly available devfile registries to get started with devfiles for different languages and frameworks.\n[Open registry view](command:openshift.componentTypesView.registry.openInView)",
"media": {
"image": "images/walkthrough/showRegistries.gif",
"altText": "show registry"
},
"completionEvents": [
"onCommand:openshift.componentTypesView.registry.openInView"
]
},
{
"id": "createComponent",
"title": "Create a Component using Registry Viewer",
"description": "Create a component in the current working directory with the file `devfile.yaml` from the devfile registry and the starter project selected. Devfile is a manifest file that contains information about various resources (URL, Storage, Services, etc.) that correspond to your component. \n[Create Component](command:openshift.componentType.newComponent)",
"media": {
"image": "images/walkthrough/createComponent.gif",
"altText": "create component"
},
"completionEvents": [
"onCommand:openshift.componentType.newComponent"
]
},
{
"id": "pushComponent",
"title": "Push a Component to the connected cluster",
"description": "The component created above is available locally. To deploy the component on the connect OpenShift/Kubernetes cluster, we need to `Push` the Component",
"media": {
"image": "images/walkthrough/pushComponent.gif",
"altText": "push component"
}
},
{
"id": "debug",
"title": "Debug the Component locally",
"description": "Debug and test remote applications deployed from your IDE to OpenShift/Kubernetes. No more having to exit your IDE to push your application.",
"media": {
"image": "images/walkthrough/debug.gif",
"altText": "debug"
}
},
{
"id": "openInBrowser",
"title": "Open the Component in Browser",
"description": "Users can access the deployed component in web browser",
"media": {
"image": "images/walkthrough/openInBrowser.gif",
"altText": "open in browser"
}
}
]
}
],
"configuration": [
{
"type": "object",
Expand Down
9 changes: 6 additions & 3 deletions src/openshift/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License. See LICENSE file in the project root for license information.
*-----------------------------------------------------------------------------------------------*/

import { window, commands, env, QuickPickItem, ExtensionContext, Terminal, Uri, workspace } from 'vscode';
import { window, commands, env, QuickPickItem, ExtensionContext, Terminal, Uri, workspace, WebviewPanel } from 'vscode';
import { Command } from '../odo/command';
import OpenShiftItem, { clusterRequired } from './openshiftItem';
import { CliExitData, CliChannel } from '../cli';
Expand Down Expand Up @@ -108,8 +108,11 @@ export class Cluster extends OpenShiftItem {
}

@vsCommand('openshift.explorer.addCluster')
static add(): void {
ClusterViewLoader.loadView('Add OpenShift Cluster');
static async add(value: string): Promise<void> {
const webViewPanel: WebviewPanel = await ClusterViewLoader.loadView('Add OpenShift Cluster');
if(value?.length > 0){
await webViewPanel.webview.postMessage({action: 'cluster', param: value});
}
}

@vsCommand('openshift.explorer.stopCluster')
Expand Down
6 changes: 6 additions & 0 deletions src/webview/cluster/app/cluster.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,12 @@ export default function Header() {
const classes = useStyles();
const [showWizard, setShowWizard] = React.useState('');

window.onmessage = (event: any) => {
if (['crc', 'sandbox'].includes(event.data.param)) {
setShowWizard(event.data.param);
}
}

const handleView = (index: number) => {
switch (index) {
case 0:
Expand Down
6 changes: 3 additions & 3 deletions src/webview/cluster/app/sandboxView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function addSandboxView(props): JSX.Element {
const handleRequestVerificationCode = () => {
const rawPhoneNumber = phoneNumber.slice(countryCode.length);
const fullCountryCode = '+' + countryCode;

setInProgress(true);
postMessage('sandboxRequestVerificationCode', { rawPhoneNumber, fullCountryCode });
}
Expand Down Expand Up @@ -360,7 +360,7 @@ export default function addSandboxView(props): JSX.Element {
const handleLoginButton = () => {
postMessage('sandboxLoginUsingDataInClipboard', {url: currentState.consoleDashboard});
};

return (
<>
{( currentState.action === 'sandboxPageProvisioned' ) && (
Expand Down Expand Up @@ -411,4 +411,4 @@ export default function addSandboxView(props): JSX.Element {
<Provisioned />
</>
)
}
}