Skip to content

Commit 2b34fba

Browse files
dvaldiviabexsoft
andauthored
Add Bucket as a page (#1220)
* Add Bucket as a page Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * goimports Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Redirect to bucket browse Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Address comment Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> Co-authored-by: Alex <33497058+bexsoft@users.noreply.github.com>
1 parent 258a940 commit 2b34fba

File tree

12 files changed

+327
-315
lines changed

12 files changed

+327
-315
lines changed

pkg/acl/endpoints.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ var (
3939
dashboard = "/dashboard"
4040
metrics = "/metrics"
4141
profiling = "/profiling"
42+
addBucket = "/add-bucket"
4243
buckets = "/buckets"
4344
bucketsGeneral = "/buckets/*"
4445
bucketsAdmin = "/buckets/:bucketName/admin/*"
@@ -335,6 +336,7 @@ var endpointRules = map[string]ConfigurationActionSet{
335336
dashboard: dashboardActionSet,
336337
metrics: dashboardActionSet,
337338
profiling: profilingActionSet,
339+
addBucket: bucketsActionSet,
338340
buckets: bucketsActionSet,
339341
bucketsGeneral: bucketsActionSet,
340342
bucketsAdmin: bucketsActionSet,

pkg/acl/endpoints_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
7979
"s3:*",
8080
},
8181
},
82-
want: 9,
82+
want: 10,
8383
},
8484
{
8585
name: "all admin and s3 endpoints",
@@ -89,7 +89,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
8989
"s3:*",
9090
},
9191
},
92-
want: 36,
92+
want: 37,
9393
},
9494
{
9595
name: "Console User - default endpoints",

portal-ui/src/screens/Console/Buckets/Buckets.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@
1616

1717
import React from "react";
1818
import history from "../../../history";
19-
import { Route, Router, Switch, withRouter, Redirect } from "react-router-dom";
19+
import { Redirect, Route, Router, Switch, withRouter } from "react-router-dom";
2020
import { connect } from "react-redux";
2121
import { AppState } from "../../../store";
2222
import { setMenuOpen } from "../../../actions";
2323
import NotFoundPage from "../../NotFoundPage";
2424
import ListBuckets from "./ListBuckets/ListBuckets";
2525
import BucketDetails from "./BucketDetails/BucketDetails";
2626
import BrowserHandler from "./BucketDetails/BrowserHandler";
27+
import AddBucket from "./ListBuckets/AddBucket";
2728

2829
const mapState = (state: AppState) => ({
2930
open: state.system.sidebarOpen,
@@ -35,6 +36,7 @@ const Buckets = () => {
3536
return (
3637
<Router history={history}>
3738
<Switch>
39+
<Route path="/add-bucket" component={AddBucket} />
3840
<Route path="/buckets/:bucketName/admin/*" component={BucketDetails} />
3941
<Route path="/buckets/:bucketName/admin" component={BucketDetails} />
4042
<Route

0 commit comments

Comments
 (0)