Skip to content

Commit

Permalink
Catalog : add visibility and allowsharing configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
olevitt committed Oct 3, 2023
1 parent d1ba838 commit 909da3b
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 3 deletions.
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
}
}
]
}

0 comments on commit 909da3b

Please sign in to comment.