-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update dashboard to use Cozystack API (#539)
<img width="1675" alt="Screenshot 2024-12-23 at 13 40 30" src="https://github.com/user-attachments/assets/cc123697-4efd-4a4f-909c-793cec8d91bd" /> <img width="1673" alt="Screenshot 2024-12-23 at 13 40 45" src="https://github.com/user-attachments/assets/3be63e8d-9ee6-487d-90d0-3583dc968dfc" /> Signed-off-by: Andrei Kvapil <[email protected]> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new `pluginConfig` section in the Kubeapps dashboard configuration for managing a broader range of applications. - **Bug Fixes** - Enhanced URL generation logic to ensure proper encoding of package identifiers. - **Chores** - Updated image digests in the configuration for both the dashboard and kubeappsapis sections. - Removed unnecessary patch application steps from the build process. - Upgraded the Go version used for building the application. - Updated the application version for the tenant package from `1.6.3` to `1.6.4`. - Added a new version `1.6.4 HEAD` for the tenant package. - Adjusted RBAC configuration to streamline permissions and enhance group-based access management. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Signed-off-by: Andrei Kvapil <[email protected]> Co-authored-by: klinch0 <[email protected]>
- Loading branch information
Showing
17 changed files
with
453 additions
and
3,595 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ description: Separated tenant namespace | |
icon: /logos/tenant.svg | ||
|
||
type: application | ||
version: 1.6.3 | ||
version: 1.6.4 |
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
13 changes: 13 additions & 0 deletions
13
packages/system/dashboard/images/dashboard/documentation.diff
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,13 @@ | ||
diff --git a/dashboard/src/components/AppList/AppListGrid.tsx b/dashboard/src/components/AppList/AppListGrid.tsx | ||
index d3261e459..597512e62 100644 | ||
--- a/dashboard/src/components/AppList/AppListGrid.tsx | ||
+++ b/dashboard/src/components/AppList/AppListGrid.tsx | ||
@@ -42,7 +42,7 @@ function AppListGrid(props: IAppListProps) { | ||
Start browsing your <Link to={url.app.catalog(cluster, namespace)}>favourite apps</Link>{" "} | ||
or check the{" "} | ||
<a | ||
- href={`https://github.com/vmware-tanzu/kubeapps/blob/${appVersion}/site/content/docs/latest/tutorials/getting-started.md`} | ||
+ href={`https://cozystack.io/docs/`} | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> |
34 changes: 34 additions & 0 deletions
34
packages/system/dashboard/images/dashboard/release-url.diff
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,34 @@ | ||
diff --git a/dashboard/src/shared/url.ts b/dashboard/src/shared/url.ts | ||
index 7918652b0..64c3435af 100644 | ||
--- a/dashboard/src/shared/url.ts | ||
+++ b/dashboard/src/shared/url.ts | ||
@@ -36,7 +36,7 @@ export const app = { | ||
return `${app.apps.list( | ||
pkgCluster, | ||
pkgNamespace, | ||
- )}/${pkgPluginName}/${pkgPluginVersion}/${pkgId}`; | ||
+ )}/${pkgPluginName}/${pkgPluginVersion}/${encodeURIComponent(pkgId)}`; | ||
}, | ||
upgrade: (ref: InstalledPackageReference) => `${app.apps.get(ref)}/upgrade`, | ||
upgradeTo: (ref: InstalledPackageReference, version?: string) => | ||
diff --git a/dashboard/src/components/DeploymentForm/DeploymentForm.tsx b/dashboard/src/components/DeploymentForm/DeploymentForm.tsx | ||
index 7ccb77b5d..589f72b65 100644 | ||
--- a/dashboard/src/components/DeploymentForm/DeploymentForm.tsx | ||
+++ b/dashboard/src/components/DeploymentForm/DeploymentForm.tsx | ||
@@ -144,13 +144,15 @@ export default function DeploymentForm() { | ||
); | ||
setDeploying(false); | ||
if (deployed) { | ||
+ const chartParts = packageId?.split("/") || []; | ||
+ const kind = chartParts[chartParts.length - 1]; | ||
push( | ||
// Redirect to the installed package, note that the cluster/ns are the ones passed | ||
// in the URL, not the ones from the package. | ||
url.app.apps.get({ | ||
context: { cluster: targetCluster, namespace: targetNamespace }, | ||
plugin: pluginObj, | ||
- identifier: releaseName, | ||
+ identifier: `${kind}%2F${releaseName}`, | ||
} as AvailablePackageReference), | ||
); | ||
} |
66 changes: 66 additions & 0 deletions
66
packages/system/dashboard/images/dashboard/remove-manage-repositories.diff
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,66 @@ | ||
diff --git a/dashboard/src/components/Catalog/Catalog.tsx b/dashboard/src/components/Catalog/Catalog.tsx | ||
index 5f2d2a1c5..093cb598d 100644 | ||
--- a/dashboard/src/components/Catalog/Catalog.tsx | ||
+++ b/dashboard/src/components/Catalog/Catalog.tsx | ||
@@ -15,7 +15,6 @@ import qs from "qs"; | ||
import React, { useEffect } from "react"; | ||
import { useDispatch, useSelector } from "react-redux"; | ||
import * as ReactRouter from "react-router-dom"; | ||
-import { Link } from "react-router-dom"; | ||
import { IClusterServiceVersion, IStoreState } from "shared/types"; | ||
import { app } from "shared/url"; | ||
import { escapeRegExp, getPluginPackageName } from "shared/utils"; | ||
@@ -85,7 +84,6 @@ export default function Catalog() { | ||
operators, | ||
repos: { reposSummaries: repos }, | ||
config: { | ||
- appVersion, | ||
kubeappsCluster, | ||
helmGlobalNamespace, | ||
carvelGlobalNamespace, | ||
@@ -420,24 +418,6 @@ export default function Catalog() { | ||
<div className="empty-catalog"> | ||
<CdsIcon shape="bundle" /> | ||
<p>The current catalog is empty.</p> | ||
- <p> | ||
- Manage your Package Repositories in Kubeapps by visiting the Package repositories | ||
- configuration page. | ||
- </p> | ||
- <Link to={app.config.pkgrepositories(cluster || "", namespace || "")}> | ||
- <CdsButton>Manage Package Repositories</CdsButton> | ||
- </Link> | ||
- <p> | ||
- For help managing other packaging formats, such as Flux or Carvel, please refer to the{" "} | ||
- <a | ||
- target="_blank" | ||
- rel="noopener noreferrer" | ||
- href={`https://github.com/vmware-tanzu/kubeapps/tree/${appVersion}/site/content/docs/latest`} | ||
- > | ||
- Kubeapps documentation | ||
- </a> | ||
- . | ||
- </p> | ||
</div> | ||
) : ( | ||
<Row> | ||
diff --git a/dashboard/src/components/Header/Menu.tsx b/dashboard/src/components/Header/Menu.tsx | ||
index c8ec1da8c..e59f90190 100644 | ||
--- a/dashboard/src/components/Header/Menu.tsx | ||
+++ b/dashboard/src/components/Header/Menu.tsx | ||
@@ -78,16 +78,6 @@ function Menu({ clusters, appVersion, logout }: IContextSelectorProps) { | ||
<div className="dropdown-menu dropdown-configuration-menu" role="menu" hidden={!open}> | ||
<div> | ||
<label className="dropdown-menu-padding dropdown-menu-label">Administration</label> | ||
- <Link | ||
- to={app.config.pkgrepositories(clusters.currentCluster, namespaceSelected)} | ||
- className="dropdown-menu-link" | ||
- onClick={toggleOpen} | ||
- > | ||
- <div className="dropdown-menu-item" role="menuitem"> | ||
- <CdsIcon solid={true} size="md" shape="library" />{" "} | ||
- <span>Package Repositories</span> | ||
- </div> | ||
- </Link> | ||
<div className="dropdown-divider" role="separator" /> | ||
{featureFlags?.operators && ( | ||
<Link |
Oops, something went wrong.