-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description: This PR includes: * fix the EMUI support for pasted github links to support repositories with a default branch not named 'main' * Remove the navigation blocker on the enclave logs * Name ports `service:port` when shown in the enclave list ![image](https://github.com/kurtosis-tech/kurtosis/assets/4419574/62c7db37-91d0-4117-84cd-f124c560affb) ## Is this change user facing? YES ## References (if applicable): - https://sageroomworkspace.slack.com/archives/C05DZ4UABDZ/p1708702184444319 thread on issue parsing github url - https://sageroomworkspace.slack.com/archives/C05DZ4UABDZ/p1708618735521189?thread_ts=1708616085.847449&cid=C05DZ4UABDZ request for port name change
- Loading branch information
Showing
11 changed files
with
49 additions
and
121 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
40 changes: 0 additions & 40 deletions
40
...anager/web/packages/app/src/emui/enclaves/components/modals/LogNavigationWarningModal.tsx
This file was deleted.
Oops, something went wrong.
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
24 changes: 10 additions & 14 deletions
24
...ave-manager/web/packages/app/src/emui/enclaves/components/widgets/CreateEnclaveButton.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
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
7 changes: 6 additions & 1 deletion
7
enclave-manager/web/packages/components/src/utils/packageUtils.ts
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 |
---|---|---|
@@ -1,18 +1,23 @@ | ||
export function parsePackageUrl(packageUrl: string) { | ||
const components = packageUrl | ||
.replace(/https?:\/\//, "") | ||
.replace(/(?<=github\.com\/([^/])+\/([^/])+)\/tree\/main/, "") | ||
.replace(/(?<=github\.com\/[^/]+\/[^/]+)\/tree\/([^/]+)/, "") | ||
.split("/"); | ||
if (components.length < 3) { | ||
throw Error(`Illegal url, invalid number of components: ${packageUrl}`); | ||
} | ||
if (components[1].length < 1 || components[2].length < 1) { | ||
throw Error(`Illegal url, empty components: ${packageUrl}`); | ||
} | ||
|
||
const branchMatches = packageUrl.match(/(?<=github\.com\/[^/]+\/[^/]+)\/tree\/([^/]+)/); | ||
const defaultBranch = branchMatches ? branchMatches[1] : undefined; | ||
|
||
return { | ||
baseUrl: "github.com", | ||
owner: components[1], | ||
name: components[2], | ||
rootPath: components.filter((v, i) => i > 2 && v.length > 0).join("/") + "/", | ||
defaultBranch, | ||
}; | ||
} |