Skip to content

Commit 0c78359

Browse files
authored
Tabs to Lists for Configurations, Policy (#913)
* Tabs to Lists for Configurations, Policy Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Fix Tests Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com> * Logs Signed-off-by: Daniel Valdivia <18384552+dvaldivia@users.noreply.github.com>
1 parent ac7cefd commit 0c78359

23 files changed

+360
-357
lines changed

pkg/acl/endpoints.go

Lines changed: 61 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -22,50 +22,43 @@ import (
2222

2323
// endpoints definition
2424
var (
25-
configuration = "/settings"
26-
users = "/users"
27-
usersDetail = "/users/:userName+"
28-
groups = "/groups"
29-
iamPolicies = "/policies"
30-
policiesDetail = "/policies/:policyName"
31-
dashboard = "/dashboard"
32-
metrics = "/metrics"
33-
profiling = "/profiling"
34-
buckets = "/buckets"
35-
bucketsDetail = "/buckets/:bucketName"
36-
bucketsDetailSummary = "/buckets/:bucketName/summary"
37-
bucketsDetailEvents = "/buckets/:bucketName/events"
38-
bucketsDetailReplication = "/buckets/:bucketName/replication"
39-
bucketsDetailLifecycle = "/buckets/:bucketName/lifecycle"
40-
bucketsDetailAccess = "/buckets/:bucketName/access"
41-
bucketsDetailAccessPolicies = "/buckets/:bucketName/access/policies"
42-
bucketsDetailAccessUsers = "/buckets/:bucketName/access/users"
43-
serviceAccounts = "/account"
44-
changePassword = "/account/change-password"
45-
tenants = "/tenants"
46-
tenantsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName"
47-
tenantHop = "/namespaces/:tenantNamespace/tenants/:tenantName/hop"
48-
podsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName/pods/:podName"
49-
tenantsDetailSummary = "/namespaces/:tenantNamespace/tenants/:tenantName/summary"
50-
tenantsDetailMetrics = "/namespaces/:tenantNamespace/tenants/:tenantName/metrics"
51-
tenantsDetailPods = "/namespaces/:tenantNamespace/tenants/:tenantName/pods"
52-
tenantsDetailPools = "/namespaces/:tenantNamespace/tenants/:tenantName/pools"
53-
tenantsDetailLicense = "/namespaces/:tenantNamespace/tenants/:tenantName/license"
54-
tenantsDetailSecurity = "/namespaces/:tenantNamespace/tenants/:tenantName/security"
55-
storage = "/storage"
56-
storageVolumes = "/storage/volumes"
57-
storageDrives = "/storage/drives"
58-
remoteBuckets = "/remote-buckets"
59-
replication = "/replication"
60-
objectBrowser = "/object-browser/:bucket/*"
61-
objectBrowserBucket = "/object-browser/:bucket"
62-
mainObjectBrowser = "/object-browser"
63-
license = "/license"
64-
watch = "/watch"
65-
heal = "/heal"
66-
trace = "/trace"
67-
logs = "/logs"
68-
healthInfo = "/health-info"
25+
configuration = "/settings"
26+
users = "/users"
27+
usersDetail = "/users/:userName+"
28+
groups = "/groups"
29+
iamPolicies = "/policies"
30+
policiesDetail = "/policies/:policyName"
31+
dashboard = "/dashboard"
32+
metrics = "/metrics"
33+
profiling = "/profiling"
34+
buckets = "/buckets"
35+
bucketsDetail = "/buckets/*"
36+
serviceAccounts = "/account"
37+
changePassword = "/account/change-password"
38+
tenants = "/tenants"
39+
tenantsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName"
40+
tenantHop = "/namespaces/:tenantNamespace/tenants/:tenantName/hop"
41+
podsDetail = "/namespaces/:tenantNamespace/tenants/:tenantName/pods/:podName"
42+
tenantsDetailSummary = "/namespaces/:tenantNamespace/tenants/:tenantName/summary"
43+
tenantsDetailMetrics = "/namespaces/:tenantNamespace/tenants/:tenantName/metrics"
44+
tenantsDetailPods = "/namespaces/:tenantNamespace/tenants/:tenantName/pods"
45+
tenantsDetailPools = "/namespaces/:tenantNamespace/tenants/:tenantName/pools"
46+
tenantsDetailLicense = "/namespaces/:tenantNamespace/tenants/:tenantName/license"
47+
tenantsDetailSecurity = "/namespaces/:tenantNamespace/tenants/:tenantName/security"
48+
storage = "/storage"
49+
storageVolumes = "/storage/volumes"
50+
storageDrives = "/storage/drives"
51+
remoteBuckets = "/remote-buckets"
52+
replication = "/replication"
53+
objectBrowser = "/object-browser/:bucket/*"
54+
objectBrowserBucket = "/object-browser/:bucket"
55+
mainObjectBrowser = "/object-browser"
56+
license = "/license"
57+
watch = "/watch"
58+
heal = "/heal"
59+
trace = "/trace"
60+
logs = "/logs"
61+
healthInfo = "/health-info"
6962
)
7063

7164
type ConfigurationActionSet struct {
@@ -288,37 +281,30 @@ var displayRules = map[string]func() bool{
288281

289282
// endpointRules contains the mapping between endpoints and ActionSets, additional rules can be added here
290283
var endpointRules = map[string]ConfigurationActionSet{
291-
configuration: configurationActionSet,
292-
users: usersActionSet,
293-
usersDetail: usersActionSet,
294-
groups: groupsActionSet,
295-
iamPolicies: iamPoliciesActionSet,
296-
policiesDetail: iamPoliciesActionSet,
297-
dashboard: dashboardActionSet,
298-
metrics: dashboardActionSet,
299-
profiling: profilingActionSet,
300-
buckets: bucketsActionSet,
301-
bucketsDetail: bucketsActionSet,
302-
bucketsDetailSummary: bucketsActionSet,
303-
bucketsDetailEvents: bucketsActionSet,
304-
bucketsDetailReplication: bucketsActionSet,
305-
bucketsDetailLifecycle: bucketsActionSet,
306-
bucketsDetailAccess: bucketsActionSet,
307-
bucketsDetailAccessPolicies: bucketsActionSet,
308-
bucketsDetailAccessUsers: bucketsActionSet,
309-
serviceAccounts: serviceAccountsActionSet,
310-
changePassword: changePasswordActionSet,
311-
remoteBuckets: remoteBucketsActionSet,
312-
replication: replicationActionSet,
313-
objectBrowser: objectBrowserActionSet,
314-
mainObjectBrowser: objectBrowserActionSet,
315-
objectBrowserBucket: objectBrowserActionSet,
316-
license: licenseActionSet,
317-
watch: watchActionSet,
318-
heal: healActionSet,
319-
trace: traceActionSet,
320-
logs: logsActionSet,
321-
healthInfo: healthInfoActionSet,
284+
configuration: configurationActionSet,
285+
users: usersActionSet,
286+
usersDetail: usersActionSet,
287+
groups: groupsActionSet,
288+
iamPolicies: iamPoliciesActionSet,
289+
policiesDetail: iamPoliciesActionSet,
290+
dashboard: dashboardActionSet,
291+
metrics: dashboardActionSet,
292+
profiling: profilingActionSet,
293+
buckets: bucketsActionSet,
294+
bucketsDetail: bucketsActionSet,
295+
serviceAccounts: serviceAccountsActionSet,
296+
changePassword: changePasswordActionSet,
297+
remoteBuckets: remoteBucketsActionSet,
298+
replication: replicationActionSet,
299+
objectBrowser: objectBrowserActionSet,
300+
mainObjectBrowser: objectBrowserActionSet,
301+
objectBrowserBucket: objectBrowserActionSet,
302+
license: licenseActionSet,
303+
watch: watchActionSet,
304+
heal: healActionSet,
305+
trace: traceActionSet,
306+
logs: logsActionSet,
307+
healthInfo: healthInfoActionSet,
322308
}
323309

324310
// operatorRules contains the mapping between endpoints and ActionSets for operator only mode

pkg/acl/endpoints_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
8181
"s3:*",
8282
},
8383
},
84-
want: 15,
84+
want: 8,
8585
},
8686
{
8787
name: "all admin and s3 endpoints",
@@ -91,7 +91,7 @@ func TestGetAuthorizedEndpoints(t *testing.T) {
9191
"s3:*",
9292
},
9393
},
94-
want: 31,
94+
want: 24,
9595
},
9696
{
9797
name: "Console User - default endpoints",

portal-ui/build/asset-manifest.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
{
22
"files": {
33
"main.css": "/static/css/main.8cfac526.chunk.css",
4-
"main.js": "/static/js/main.2d317177.chunk.js",
5-
"main.js.map": "/static/js/main.2d317177.chunk.js.map",
4+
"main.js": "/static/js/main.94e52666.chunk.js",
5+
"main.js.map": "/static/js/main.94e52666.chunk.js.map",
66
"runtime-main.js": "/static/js/runtime-main.43a31377.js",
77
"runtime-main.js.map": "/static/js/runtime-main.43a31377.js.map",
88
"static/css/2.60e04a19.chunk.css": "/static/css/2.60e04a19.chunk.css",
9-
"static/js/2.e135a1be.chunk.js": "/static/js/2.e135a1be.chunk.js",
10-
"static/js/2.e135a1be.chunk.js.map": "/static/js/2.e135a1be.chunk.js.map",
9+
"static/js/2.c24beecf.chunk.js": "/static/js/2.c24beecf.chunk.js",
10+
"static/js/2.c24beecf.chunk.js.map": "/static/js/2.c24beecf.chunk.js.map",
1111
"index.html": "/index.html",
1212
"static/css/2.60e04a19.chunk.css.map": "/static/css/2.60e04a19.chunk.css.map",
1313
"static/css/main.8cfac526.chunk.css.map": "/static/css/main.8cfac526.chunk.css.map",
14-
"static/js/2.e135a1be.chunk.js.LICENSE.txt": "/static/js/2.e135a1be.chunk.js.LICENSE.txt",
14+
"static/js/2.c24beecf.chunk.js.LICENSE.txt": "/static/js/2.c24beecf.chunk.js.LICENSE.txt",
1515
"static/media/minio_console_logo.0837460e.svg": "/static/media/minio_console_logo.0837460e.svg",
1616
"static/media/minio_operator_logo.1312b7c9.svg": "/static/media/minio_operator_logo.1312b7c9.svg"
1717
},
1818
"entrypoints": [
1919
"static/js/runtime-main.43a31377.js",
2020
"static/css/2.60e04a19.chunk.css",
21-
"static/js/2.e135a1be.chunk.js",
21+
"static/js/2.c24beecf.chunk.js",
2222
"static/css/main.8cfac526.chunk.css",
23-
"static/js/main.2d317177.chunk.js"
23+
"static/js/main.94e52666.chunk.js"
2424
]
2525
}

portal-ui/build/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MinIO Console"/><link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700;900&display=swap" rel="stylesheet"/><link href="/styles/root-styles.css" rel="stylesheet"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="manifest" href="/manifest.json"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#3a4e54"/><title>MinIO Console</title><link href="/static/css/2.60e04a19.chunk.css" rel="stylesheet"><link href="/static/css/main.8cfac526.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="loader-block"><svg class="loader-svg-container" viewBox="22 22 44 44"><circle class="loader-style MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate" cx="44" cy="44" r="20.2" fill="none" stroke-width="3.6"></circle></svg></div></div><script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/static/js/2.e135a1be.chunk.js"></script><script src="/static/js/main.2d317177.chunk.js"></script></body></html>
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="MinIO Console"/><link href="https://fonts.googleapis.com/css2?family=Lato:wght@400;500;700;900&display=swap" rel="stylesheet"/><link href="/styles/root-styles.css" rel="stylesheet"/><link rel="apple-touch-icon" sizes="180x180" href="/apple-icon-180x180.png"/><link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png"/><link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"/><link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png"/><link rel="manifest" href="/manifest.json"/><link rel="mask-icon" href="/safari-pinned-tab.svg" color="#3a4e54"/><title>MinIO Console</title><link href="/static/css/2.60e04a19.chunk.css" rel="stylesheet"><link href="/static/css/main.8cfac526.chunk.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"><div id="loader-block"><svg class="loader-svg-container" viewBox="22 22 44 44"><circle class="loader-style MuiCircularProgress-circle MuiCircularProgress-circleIndeterminate" cx="44" cy="44" r="20.2" fill="none" stroke-width="3.6"></circle></svg></div></div><script>!function(e){function r(r){for(var n,l,i=r[0],a=r[1],p=r[2],c=0,s=[];c<i.length;c++)l=i[c],Object.prototype.hasOwnProperty.call(o,l)&&o[l]&&s.push(o[l][0]),o[l]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n]);for(f&&f(r);s.length;)s.shift()();return u.push.apply(u,p||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++){var a=t[i];0!==o[a]&&(n=!1)}n&&(u.splice(r--,1),e=l(l.s=t[0]))}return e}var n={},o={1:0},u=[];function l(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,l),t.l=!0,t.exports}l.m=e,l.c=n,l.d=function(e,r,t){l.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},l.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},l.t=function(e,r){if(1&r&&(e=l(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(l.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)l.d(t,n,function(r){return e[r]}.bind(null,n));return t},l.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return l.d(r,"a",r),r},l.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},l.p="/";var i=this["webpackJsonpportal-ui"]=this["webpackJsonpportal-ui"]||[],a=i.push.bind(i);i.push=r,i=i.slice();for(var p=0;p<i.length;p++)r(i[p]);var f=a;t()}([])</script><script src="/static/js/2.c24beecf.chunk.js"></script><script src="/static/js/main.94e52666.chunk.js"></script></body></html>

portal-ui/build/static/js/2.e135a1be.chunk.js renamed to portal-ui/build/static/js/2.c24beecf.chunk.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/build/static/js/2.e135a1be.chunk.js.map renamed to portal-ui/build/static/js/2.c24beecf.chunk.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

portal-ui/build/static/js/main.2d317177.chunk.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

portal-ui/build/static/js/main.2d317177.chunk.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

portal-ui/build/static/js/main.94e52666.chunk.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)