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

Catalog : add visibility and allowsharing configuration #269

Merged
merged 1 commit into from
Oct 9, 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
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ public class CatalogWrapper {
@Schema(description = "Verify certificates of HTTPS-enabled servers using this CA bundle")
private String caFile;

@Schema(description = "Allow sharing this service within a project")
private boolean allowSharing = true;

@Schema(description = "Should this catalog be visible in user context ? Project context ?")
private CatalogVisibility visible = new CatalogVisibility();

/**
* @return the type
*/
Expand Down Expand Up @@ -172,4 +178,42 @@ public String getCaFile() {
public void setCaFile(String caFile) {
this.caFile = caFile;
}

public boolean isAllowSharing() {
return allowSharing;
}

public void setAllowSharing(boolean allowSharing) {
this.allowSharing = allowSharing;
}

public CatalogVisibility getVisible() {
return visible;
}

public void setVisible(CatalogVisibility visible) {
this.visible = visible;
}

public static class CatalogVisibility {

private boolean user = true;
private boolean project = true;

public boolean isUser() {
return user;
}

public void setUser(boolean user) {
this.user = user;
}

public boolean isProject() {
return project;
}

public void setProject(boolean project) {
this.project = project;
}
}
}
21 changes: 18 additions & 3 deletions onyxia-api/src/main/resources/catalogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
"highlightedCharts": ["jupyter-python", "rstudio", "vscode-python"],
"type": "helm",
"skipTlsVerify": false,
"caFile": null
"caFile": null,
"allowSharing": false,
"visible": {
"user": true,
"project": true
}
},
{
"id": "databases",
Expand All @@ -22,7 +27,12 @@
"highlightedCharts": ["postgresql", "elastic"],
"type": "helm",
"skipTlsVerify": false,
"caFile": null
"caFile": null,
"allowSharing": true,
"visible": {
"user": true,
"project": true
}
},
{
"id": "automation",
Expand All @@ -34,7 +44,12 @@
"highlightedCharts": ["argo-cd", "argo-workflows", "mlflow"],
"type": "helm",
"skipTlsVerify": false,
"caFile": null
"caFile": null,
"allowSharing": true,
"visible": {
"user": true,
"project": true
}
}
]
}
Loading