Skip to content

Commit

Permalink
upgrade odh dashboard to PF5
Browse files Browse the repository at this point in the history
changes to card component, revert openshift-dynamic-sdk bump

fix dependency conflicts, remove comments, lint

upgrade hardcocded class references to v5 classnames

run codemods after rebase

run linting commands

fix lint errors in CI workflow

comment out references to PluginLoader

format sdkInitialize

update pluginstore initialization

update classnames and change Title to EmptyStateHeader

remove cache files

update to latest release versions

format

remove unused title import

add EmptyStateActions import

PR feedback from Andrew

PR feedback from Andrew and Juntao

apply patch

format

remove eslint no console

remove unused imports

fix missing link in Jupyter card
  • Loading branch information
jenny-s51 committed Oct 17, 2023
1 parent 5265f6e commit 5620a68
Show file tree
Hide file tree
Showing 190 changed files with 15,892 additions and 15,024 deletions.
29 changes: 0 additions & 29 deletions backend/src/routes/api/k8s/pass-through.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,35 +20,6 @@ export const passThrough = <T extends K8sResourceCommon>(
fastify: KubeFastifyInstance,
request: OauthFastifyRequest,
data: PassThroughData,
): Promise<T | K8sStatus> => {
const { method, url } = data;

// TODO: Remove when bug is fixed - https://issues.redhat.com/browse/HAC-1825
let safeURL = url;
if (method.toLowerCase() === 'post' && !url.endsWith('selfsubjectaccessreviews')) {
// Core SDK builds the wrong path for k8s -- can't post to a resource name; remove the name from the url
// eg: POST /.../configmaps/my-config-map => POST /.../configmaps
// Note: SelfSubjectAccessReviews do not include a resource name
const urlParts = url.split('/');
const queryParams = urlParts[urlParts.length - 1].split('?');
urlParts.pop();
queryParams.shift();
safeURL = urlParts.join('/');
queryParams.unshift(safeURL);
safeURL = queryParams.join('?');
}

const updatedData = {
...data,
url: safeURL,
};
return safeURLPassThrough(fastify, request, updatedData);
};

export const safeURLPassThrough = <T extends K8sResourceCommon>(
fastify: KubeFastifyInstance,
request: OauthFastifyRequest,
data: PassThroughData,
): Promise<T | K8sStatus> => {
return proxyCall(fastify, request, data)
.then((rawData) => {
Expand Down
4 changes: 2 additions & 2 deletions backend/src/routes/api/namespaces/namespaceUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PatchUtils, V1SelfSubjectAccessReview } from '@kubernetes/client-node';
import { NamespaceApplicationCase } from './const';
import { K8sStatus, KubeFastifyInstance, OauthFastifyRequest } from '../../../types';
import { createCustomError } from '../../../utils/requestUtils';
import { isK8sStatus, safeURLPassThrough } from '../k8s/pass-through';
import { isK8sStatus, passThrough } from '../k8s/pass-through';

const checkNamespacePermission = (
fastify: KubeFastifyInstance,
Expand All @@ -25,7 +25,7 @@ const checkNamespacePermission = (
},
},
};
return safeURLPassThrough<V1SelfSubjectAccessReview>(fastify, request, {
return passThrough<V1SelfSubjectAccessReview>(fastify, request, {
url: `${cluster.server}/apis/authorization.k8s.io/v1/selfsubjectaccessreviews`,
method: 'POST',
requestData: JSON.stringify(selfSubjectAccessReviewObject),
Expand Down
10 changes: 4 additions & 6 deletions backend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ export type KubeDecorator = KubeStatus & {
customObjectsApi: k8s.CustomObjectsApi;
rbac: k8s.RbacAuthorizationV1Api;
currentToken: string;

};

export type KubeFastifyInstance = FastifyInstance & {
Expand Down Expand Up @@ -759,10 +758,10 @@ export type GPUInfo = {

export type AcceleratorInfo = {
configured: boolean;
available: {[key: string]: number};
total: {[key: string]: number};
allocated: {[key: string]: number};
}
available: { [key: string]: number };
total: { [key: string]: number };
allocated: { [key: string]: number };
};

export type EnvironmentVariable = EitherNotBoth<
{ value: string | number },
Expand Down Expand Up @@ -882,7 +881,6 @@ export type SupportedModelFormats = {
autoSelect?: boolean;
};


export enum ContainerResourceAttributes {
CPU = 'cpu',
MEMORY = 'memory',
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@ export const EditModel = {
await canvas.findByText('Test Inference Service', undefined, { timeout: 5000 });

// user flow for editing a project
await userEvent.click(canvas.getByLabelText('Actions', { selector: 'button' }));
await userEvent.click(canvas.getByText('Edit', { selector: 'button' }));
await userEvent.click(canvas.getByLabelText('Kebab toggle', { selector: 'button' }));
await userEvent.click(await canvas.findByText('Edit project'));
},
};
```
Expand Down
Loading

0 comments on commit 5620a68

Please sign in to comment.