-
Notifications
You must be signed in to change notification settings - Fork 178
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into f/mserving-metrics
- Loading branch information
Showing
57 changed files
with
839 additions
and
439 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// https://cloud.google.com/artifact-registry/docs/docker/names | ||
// The full name for a container image is one of the following formats: | ||
// LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE | ||
// LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE:TAG | ||
// LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE@IMAGE-DIGEST | ||
|
||
import { REPOSITORY_URL_REGEX } from '~/utilities/const'; | ||
|
||
test('Invalid URL', () => { | ||
const url = 'docker.io'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe(''); | ||
}); | ||
|
||
test('Docker container URL without tag', () => { | ||
const url = 'docker.io/library/mysql'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe('docker.io'); | ||
expect(match?.[4]).toBe(undefined); | ||
}); | ||
|
||
test('Docker container URL with tag', () => { | ||
const url = 'docker.io/library/mysql:test-tag'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe('docker.io'); | ||
expect(match?.[4]).toBe('test-tag'); | ||
}); | ||
|
||
test('OpenShift internal registry URL without tag', () => { | ||
const url = 'image-registry.openshift-image-registry.svc:5000/opendatahub/s2i-minimal-notebook'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe('image-registry.openshift-image-registry.svc:5000'); | ||
expect(match?.[4]).toBe(undefined); | ||
}); | ||
|
||
test('OpenShift internal registry URL with tag', () => { | ||
const url = | ||
'image-registry.openshift-image-registry.svc:5000/opendatahub/s2i-minimal-notebook:v0.3.0-py36'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe('image-registry.openshift-image-registry.svc:5000'); | ||
expect(match?.[4]).toBe('v0.3.0-py36'); | ||
}); | ||
|
||
test('Quay URL with port and tag', () => { | ||
const url = 'quay.io:443/opendatahub/odh-dashboard:main-55e19fa'; | ||
const match = url.match(REPOSITORY_URL_REGEX); | ||
expect(match?.[1]).toBe('quay.io:443'); | ||
expect(match?.[4]).toBe('main-55e19fa'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
frontend/src/concepts/dashboard/codeEditor/DashboardCodeEditor.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// remove this file when https://github.com/patternfly/patternfly/issues/5605 is solved | ||
.odh-dashboard__code-editor { | ||
height: 100%; | ||
|
||
.pf-c-code-editor__main, | ||
.pf-c-file-upload, | ||
.pf-c-code-editor__code { | ||
height: 100%; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
frontend/src/concepts/dashboard/codeEditor/DashboardCodeEditor.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import * as React from 'react'; | ||
import { CodeEditor, CodeEditorProps } from '@patternfly/react-code-editor'; | ||
|
||
import './DashboardCodeEditor.scss'; | ||
|
||
type DashboardCodeEditorProps = Omit<CodeEditorProps, 'ref'>; | ||
|
||
const DashboardCodeEditor: React.FC<Partial<DashboardCodeEditorProps>> = ({ | ||
// 38px is the code editor toolbar height+border | ||
// calculate the div height to avoid container scrolling | ||
height = 'calc(100% - 38px)', | ||
...props | ||
}) => ( | ||
<div style={{ height }}> | ||
<CodeEditor height="100%" className="odh-dashboard__code-editor" {...props} /> | ||
</div> | ||
); | ||
|
||
export default DashboardCodeEditor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.