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

Added Git Servies tab to the User Preferences #687

Merged
merged 6 commits into from
Jan 17, 2023
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
6 changes: 3 additions & 3 deletions .deps/dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
| [`@testing-library/jest-dom@5.16.2`](https://github.com/testing-library/jest-dom) | MIT | clearlydefined |
| [`@testing-library/react@10.4.9`](https://github.com/testing-library/react-testing-library) | MIT | clearlydefined |
| [`@testing-library/user-event@12.8.3`](https://github.com/testing-library/user-event) | MIT | clearlydefined |
| [`@tootallnate/once@1.1.2`](git://github.com/TooTallNate/once.git) | MIT | iot.diafanis |
| [`@tootallnate/once@1.1.2`](git://github.com/TooTallNate/once.git) | MIT | clearlydefined |
| [`@types/args@5.0.0`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/aria-query@4.2.2`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/axios@0.14.0`](https://github.com/mzabriskie/axios) | MIT | clearlydefined |
Expand All @@ -180,7 +180,7 @@
| [`@types/eslint-scope@3.7.3`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/eslint@8.4.2`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #2429 |
| [`@types/estree@0.0.51`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/express-serve-static-core@4.17.28`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/express-serve-static-core@4.17.28`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #6020 |
| [`@types/express@4.17.13`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #5760 |
| [`@types/fs-extra@9.0.13`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/graceful-fs@4.1.5`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
Expand Down Expand Up @@ -231,7 +231,7 @@
| [`@types/webpack-sources@3.2.0`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/webpack@4.41.32`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/yargs-parser@21.0.0`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/yargs@15.0.14`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | clearlydefined |
| [`@types/yargs@15.0.14`](https://github.com/DefinitelyTyped/DefinitelyTyped.git) | MIT | #6241 |
| [`@typescript-eslint/eslint-plugin@4.33.0`](https://github.com/typescript-eslint/typescript-eslint.git) | MIT | clearlydefined |
| [`@typescript-eslint/experimental-utils@4.33.0`](https://github.com/typescript-eslint/typescript-eslint.git) | MIT | clearlydefined |
| [`@typescript-eslint/parser@4.33.0`](https://github.com/typescript-eslint/typescript-eslint.git) | BSD-2-Clause | clearlydefined |
Expand Down
8 changes: 4 additions & 4 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
| `@eclipse-che/api@7.44.0` | EPL-2.0 | ecd.che |
| [`@eclipse-che/che-code-devworkspace-handler@1.74.0-dev-e701cae`](git+https://github.com/che-incubator/che-code.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/che-theia-devworkspace-handler@0.0.1-1667484092`](git+https://github.com/eclipse-che/che-theia.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/common@7.59.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-backend@7.59.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-frontend@7.59.0-next`](git://github.com/eclipse/che-dashboard.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/common@7.60.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-backend@7.60.0-next`](https://github.com/eclipse-che/che-dashboard) | EPL-2.0 | ecd.che |
| [`@eclipse-che/dashboard-frontend@7.60.0-next`](git://github.com/eclipse/che-dashboard.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/devfile-converter@0.0.1-d624e3e`](git+https://github.com/che-incubator/devfile-converter.git) | EPL-2.0 | ecd.che |
| [`@eclipse-che/workspace-client@0.0.1-1671793076`](https://github.com/eclipse/che-workspace-client) | EPL-2.0 | ecd.che |
| [`@eclipse-che/workspace-client@0.0.1-1672830275`](https://github.com/eclipse/che-workspace-client) | EPL-2.0 | ecd.che |
| [`@fastify/ajv-compiler@1.1.0`](git+https://github.com/fastify/ajv-compiler.git) | MIT | clearlydefined |
| [`@fastify/cors@7.0.0`](git+https://github.com/fastify/fastify-cors.git) | MIT | clearlydefined |
| [`@fastify/error@3.0.0`](git+https://github.com/fastify/fastify-error.git) | MIT | clearlydefined |
Expand Down
2 changes: 2 additions & 0 deletions packages/common/src/dto/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

import { V220DevfileComponents } from '@devfile/api';

export type GitOauthProvider = 'github' | 'gitlab' | 'bitbucket';

export interface IPatch {
op: string;
path: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
*/

import { delay } from '../../../services/helpers';
import { helpers } from '@eclipse-che/common';

export async function retryableExec<T>(callback: () => Promise<T>, maxAttempt = 5): Promise<T> {
let error: unknown;
Expand All @@ -19,6 +20,9 @@ export async function retryableExec<T>(callback: () => Promise<T>, maxAttempt =
return await callback();
} catch (e) {
error = e;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be a useless variable assignment. Don't you mind getting rid of it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We need this variable out of the loop because we can have several errors until rejecting the last one.

if (helpers.errors.isKubeClientError(error) && error.statusCode === 404) {
return Promise.reject(error);
}
console.error(e);
}
await delay(1000);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { FastifyInstance } from 'fastify';
export function addAuthorizationHooks(server: FastifyInstance) {
server.addHook('onResponse', (request, reply, done) => {
if (
(request.url.startsWith('/api/') || request.url.startsWith('/dashboard/api/')) &&
Copy link
Member

Choose a reason for hiding this comment

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

@olexii4 could you please clarify why do we need this change, as I recall api was added explicitly to prevent some redirection issue

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code is only for a local run.
It removes the local environment variable CLUSTER_ACCESS_TOKEN when a response from '{CHE-Server}/api/' or '/dashboard/api/' has status code '401'.

I added the following changes

(request.url.startsWith('/api/') || request.url.startsWith('/dashboard/api/')) &&

->

request.url.startsWith('/dashboard/api/') &&

because I already have a code that can return status code '401' from CHE-Server API:

 {CHE-Server}/api/oauth/token?oauth_provider=...

request.url.startsWith('/dashboard/api/') &&
request.method === 'GET' &&
reply.statusCode === 401
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard-frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@eclipse-che/che-code-devworkspace-handler": "1.74.0-dev-e701cae",
"@eclipse-che/che-theia-devworkspace-handler": "0.0.1-1667484092",
"@eclipse-che/devfile-converter": "0.0.1-d624e3e",
"@eclipse-che/workspace-client": "0.0.1-1671793076",
"@eclipse-che/workspace-client": "0.0.1-1672830275",
"@patternfly/react-core": "4.120.0",
"@patternfly/react-icons": "^4.3.5",
"@patternfly/react-table": "^4.5.7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,7 @@
{
"displayName": "Java with Spring Boot and MongoDB",
"description": "Java stack with OpenJDK 8, MongoDB and Spring Boot Guestbook demo application",
"tags": [
"Community",
"Java",
"OpenJDK",
"Maven",
"Spring Boot",
"MongoDB"
],
"tags": ["Community", "Java", "OpenJDK", "Maven", "Spring Boot", "MongoDB"],
"icon": "/images/java.svg",
"links": {
"v2": "https://github.com/che-samples/java-guestbook/tree/devfilev2"
Expand All @@ -36,14 +29,7 @@
{
"displayName": "Java Lombok",
"description": "Java Stack with Lombok 1.18.18, OpenJDK 11 and Maven 3.6.0",
"tags": [
"Community",
"Java",
"OpenJDK",
"Maven",
"Debian",
"Lombok"
],
"tags": ["Community", "Java", "OpenJDK", "Maven", "Debian", "Lombok"],
"icon": "/images/lombok.svg",
"links": {
"v2": "https://github.com/che-samples/lombok-project-sample/tree/devfilev2"
Expand All @@ -52,13 +38,7 @@
{
"displayName": "Scala",
"description": "Scala Stack with OpenJDK 11 and sbt 1.x",
"tags": [
"Community",
"Scala",
"OpenJDK",
"sbt",
"Debian"
],
"tags": ["Community", "Scala", "OpenJDK", "sbt", "Debian"],
"icon": "/images/scala.svg",
"links": {
"v2": "https://github.com/che-samples/scala-sbt/tree/devfilev2"
Expand All @@ -67,13 +47,7 @@
{
"displayName": "ASP.NET Core Web Application",
"description": "Stack for developing ASP.NET Core Web Application",
"tags": [
"Community",
"Debian",
"Dotnet",
"C#",
"ASP.NET"
],
"tags": ["Community", "Debian", "Dotnet", "C#", "ASP.NET"],
"icon": "/images/dotnetcore.svg",
"links": {
"v2": "https://github.com/che-samples/aspnetcore-realworld-example-app/tree/devfilev2"
Expand All @@ -82,13 +56,7 @@
{
"displayName": "Node.js React Web Application",
"description": "Stack for developing Node.js React Web Application",
"tags": [
"Community",
"Node.js",
"React",
"Redux",
"RealWorld"
],
"tags": ["Community", "Node.js", "React", "Redux", "RealWorld"],
"icon": "/images/nodejs.svg",
"links": {
"v2": "https://github.com/che-samples/nodejs-react-redux/tree/devfilev2"
Expand All @@ -97,12 +65,7 @@
{
"displayName": "Node.js Angular Web Application",
"description": "Stack for developing Node.js Angular Web Application",
"tags": [
"Community",
"Node.js",
"Angular",
"Alpine"
],
"tags": ["Community", "Node.js", "Angular", "Alpine"],
"icon": "/images/angular.svg",
"links": {
"v2": "https://github.com/che-samples/nodejs-angular/tree/devfilev2"
Expand All @@ -111,15 +74,7 @@
{
"displayName": "PHP Symfony",
"description": "PHP Stack with Symfony Demo Application https://symfony.com/",
"tags": [
"Community",
"PHP",
"Apache",
"MySQL",
"Symfony",
"Debian",
"Centos"
],
"tags": ["Community", "PHP", "Apache", "MySQL", "Symfony", "Debian", "Centos"],
"icon": "/images/php.svg",
"links": {
"v2": "https://github.com/che-samples/php-symfony/tree/devfilev2"
Expand All @@ -128,14 +83,7 @@
{
"displayName": "Quarkus REST API",
"description": "Quarkus stack with a default REST endpoint application sample",
"tags": [
"Community",
"Java",
"Quarkus",
"OpenJDK",
"Maven",
"Debian"
],
"tags": ["Community", "Java", "Quarkus", "OpenJDK", "Maven", "Debian"],
"icon": "/images/quarkus.svg",
"links": {
"v2": "https://github.com/che-samples/quarkus-quickstarts/tree/devfilev2"
Expand All @@ -144,12 +92,7 @@
{
"displayName": "Apache Camel K",
"description": "Stack with tooling ready to develop Integration projects with Apache Camel K",
"tags": [
"Community",
"Apache Camel K",
"Red Hat Fuse",
"Integration"
],
"tags": ["Community", "Apache Camel K", "Red Hat Fuse", "Integration"],
"icon": "/images/camelk.svg",
"links": {
"v2": "https://github.com/che-samples/apache-camel-k/tree/devfilev2"
Expand All @@ -158,12 +101,7 @@
{
"displayName": "Node.js Express Web Application",
"description": "Stack with Node.js 10",
"tags": [
"Community",
"Node.js",
"Express",
"ubi8"
],
"tags": ["Community", "Node.js", "Express", "ubi8"],
"icon": "/images/nodejs.svg",
"links": {
"v2": "https://github.com/che-samples/web-nodejs-sample/tree/devfilev2"
Expand All @@ -172,13 +110,7 @@
{
"displayName": "Node.js Web Application based on Yarn",
"description": "Stack for developing Node.js Web Application based on Yarn",
"tags": [
"Community",
"Node.js",
"Alpine",
"Yarn",
"React"
],
"tags": ["Community", "Node.js", "Alpine", "Yarn", "React"],
"icon": "/images/nodejs.svg",
"links": {
"v2": "https://github.com/che-samples/react-web-app/tree/devfilev2"
Expand All @@ -187,11 +119,7 @@
{
"displayName": "Bash",
"description": "Stack with environment ready to develop bash scripts.",
"tags": [
"Community",
"Bash",
"Shell"
],
"tags": ["Community", "Bash", "Shell"],
"icon": "/images/che.svg",
"links": {
"v2": "https://github.com/che-samples/bash/tree/devfilev2"
Expand All @@ -200,12 +128,7 @@
{
"displayName": "Python Django",
"description": "Python Stack with Python 3.8 and Django application",
"tags": [
"Community",
"Centos",
"Python",
"pip"
],
"tags": ["Community", "Centos", "Python", "pip"],
"icon": "/images/python.svg",
"links": {
"v2": "https://github.com/che-samples/django-realworld-example-app/tree/devfile2"
Expand All @@ -214,13 +137,7 @@
{
"displayName": "C/C++",
"description": "Stack with C/C++ and Clang 8",
"tags": [
"Community",
"C/C++",
"Clang",
"g++",
"GDB"
],
"tags": ["Community", "C/C++", "Clang", "g++", "GDB"],
"icon": "/images/cpp.svg",
"links": {
"v2": "https://github.com/che-samples/cpp-hello-world/tree/devfilev2"
Expand All @@ -229,15 +146,7 @@
{
"displayName": "Node.js MongoDB Web Application",
"description": "Stack with NodeJS 10 and MongoDB 3.4",
"tags": [
"Community",
"Node.js",
"Express",
"MongoDB",
"RealWorld",
"ubi8",
"Centos"
],
"tags": ["Community", "Node.js", "Express", "MongoDB", "RealWorld", "ubi8", "Centos"],
"icon": "/images/nodejs.svg",
"links": {
"v2": "https://github.com/che-samples/nodejs-mongodb-sample/tree/devfilev2"
Expand All @@ -246,10 +155,7 @@
{
"displayName": "Rust",
"description": "Rust Stack with Rust 1.57",
"tags": [
"Community",
"Rust"
],
"tags": ["Community", "Rust"],
"icon": "/images/rust.svg",
"links": {
"v2": "https://github.com/che-samples/helloworld-rust/tree/devfilev2"
Expand All @@ -258,13 +164,7 @@
{
"displayName": "Java Spring Boot",
"description": "Java stack with OpenJDK 11 and Spring Boot Petclinic demo application",
"tags": [
"Community",
"Java",
"OpenJDK",
"Maven",
"Spring Boot"
],
"tags": ["Community", "Java", "OpenJDK", "Maven", "Spring Boot"],
"icon": "/images/springboot.svg",
"links": {
"v2": "https://github.com/che-samples/java-spring-petclinic/tree/devfilev2"
Expand Down
Loading