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: added connected clusters to the ocm view #43

Merged
merged 7 commits into from
May 19, 2022

Conversation

TomerFi
Copy link
Collaborator

@TomerFi TomerFi commented May 19, 2022

  • docs: typo
  • feat: added view for local connected k8s clusters
  • chore: finalize tree-view for ocm connected clusters
  • chore: update views naming convention

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
@TomerFi TomerFi marked this pull request as draft May 19, 2022 06:35
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
…w runners

Signed-off-by: Tomer Figenblat <tfigenbl@redhat.com>
@TomerFi TomerFi marked this pull request as ready for review May 19, 2022 07:25
@TomerFi TomerFi requested a review from ilan-pinto May 19, 2022 07:25
@@ -16,7 +16,7 @@ async function sleep(ms: number): Promise<void> {
// Test cases for the the ocm-vscode-extension.createLocalEnvironment command
suite('Create local environment command', () => {
const fakeBuildSuccessMsg = 'this is a fake message';
const buildEnvironmentDelayMS = 500;
const buildEnvironmentDelayMS = 1000;
Copy link
Owner

Choose a reason for hiding this comment

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

:)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

refresh(): void {
this.updateK8SConfig();
this.configRefreshedEmitter.fire();
}
Copy link
Owner

Choose a reason for hiding this comment

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

fire?????

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this fires an event informing vscode on the data being refreshed.

https://code.visualstudio.com/api/references/vscode-api#EventEmitter%3CT%3E

Copy link
Owner

@ilan-pinto ilan-pinto left a comment

Choose a reason for hiding this comment

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

dor demo it looks good.


let k8sCoreApi = this.kubeConfig.makeApiClient(k8s.CoreV1Api);
let namespacesApiResponse = await k8sCoreApi.listNamespace();
if (namespacesApiResponse.response.statusCode === 200) {
Copy link
Owner

Choose a reason for hiding this comment

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

what about error handling?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not for the demo, nither does testing.
for now, for error in k8s, an empty list is returned to not f-up the demo.

listResourcesPromises.push(
k8sCustomObjApi.listClusterCustomObject(spec.group, ver.name, spec.names.plural)
.then(crApiResponse => {
if (crApiResponse.response.statusCode === 200) {
Copy link
Owner

Choose a reason for hiding this comment

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

error handling

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

not for the demo, nither does testing.
for now, for error in k8s, an empty list is returned to not f-up the demo.

@TomerFi TomerFi merged commit 336e7b7 into ilan-pinto:main May 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants