Skip to content
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
2 changes: 1 addition & 1 deletion pkg/acl/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
var (
configuration = "/settings"
users = "/users"
usersDetail = "/users/:userName"
usersDetail = "/users/:userName+"
groups = "/groups"
iamPolicies = "/policies"
policiesDetail = "/policies/:policyName"
Expand Down
6 changes: 3 additions & 3 deletions portal-ui/build/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"files": {
"main.css": "/static/css/main.8cfac526.chunk.css",
"main.js": "/static/js/main.c2e8f74d.chunk.js",
"main.js.map": "/static/js/main.c2e8f74d.chunk.js.map",
"main.js": "/static/js/main.2cc5eec9.chunk.js",
"main.js.map": "/static/js/main.2cc5eec9.chunk.js.map",
"runtime-main.js": "/static/js/runtime-main.43a31377.js",
"runtime-main.js.map": "/static/js/runtime-main.43a31377.js.map",
"static/css/2.c5a51b70.chunk.css": "/static/css/2.c5a51b70.chunk.css",
Expand All @@ -20,6 +20,6 @@
"static/css/2.c5a51b70.chunk.css",
"static/js/2.c512ce9d.chunk.js",
"static/css/main.8cfac526.chunk.css",
"static/js/main.c2e8f74d.chunk.js"
"static/js/main.2cc5eec9.chunk.js"
]
}
2 changes: 1 addition & 1 deletion portal-ui/build/index.html
Original file line number Diff line number Diff line change
@@ -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.c5a51b70.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.c512ce9d.chunk.js"></script><script src="/static/js/main.c2e8f74d.chunk.js"></script></body></html>
<!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.c5a51b70.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.c512ce9d.chunk.js"></script><script src="/static/js/main.2cc5eec9.chunk.js"></script></body></html>
2 changes: 2 additions & 0 deletions portal-ui/build/static/js/main.2cc5eec9.chunk.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions portal-ui/build/static/js/main.2cc5eec9.chunk.js.map

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions portal-ui/build/static/js/main.c2e8f74d.chunk.js

This file was deleted.

1 change: 0 additions & 1 deletion portal-ui/build/static/js/main.c2e8f74d.chunk.js.map

This file was deleted.

2 changes: 1 addition & 1 deletion portal-ui/src/screens/Console/Console.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const Console = ({
},
{
component: Users,
path: "/users/:userName",
path: "/users/:userName+",
},
{
component: Users,
Expand Down
4 changes: 2 additions & 2 deletions portal-ui/src/screens/Console/Groups/AddGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const AddGroup = ({
const saveRecord = () => {
if (selectedGroup !== null) {
api
.invoke("PUT", `/api/v1/groups/${groupName}`, {
.invoke("PUT", `/api/v1/group?name=${encodeURI(groupName)}`, {
group: groupName,
members: selectedUsers,
status: groupEnabled ? "enabled" : "disabled",
Expand Down Expand Up @@ -135,7 +135,7 @@ const AddGroup = ({
if (selectedGroup && loadingGroup) {
const fetchGroupInfo = () => {
api
.invoke("GET", `/api/v1/groups/${selectedGroup}`)
.invoke("GET", `/api/v1/group?name=${encodeURI(selectedGroup)}`)
.then((res: MainGroupProps) => {
setGroupEnabled(res.status === "enabled");
setGroupName(res.name);
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/screens/Console/Groups/DeleteGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const DeleteGroup = ({
}

api
.invoke("DELETE", `/api/v1/groups/${selectedGroup}`)
.invoke("DELETE", `/api/v1/group?name=${encodeURI(selectedGroup)}`)
.then(() => {
setDeleteLoading(false);
closeDeleteModalAndRefresh(true);
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/screens/Console/Policies/SetPolicy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const SetPolicy = ({
const fetchGroupInformation = () => {
if (selectedGroup) {
api
.invoke("GET", `/api/v1/groups/${selectedGroup}`)
.invoke("GET", `/api/v1/group?name=${encodeURI(selectedGroup)}`)
.then((res: any) => {
const groupPolicy: String = get(res, "policy", "");
setActualPolicy(groupPolicy.split(","));
Expand Down
9 changes: 6 additions & 3 deletions portal-ui/src/screens/Console/Storage/StoragePVCs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ const StorageVolumes = ({
{
type: "view",
onClick: (record: any) => {
history.push(`/namespaces/${record.namespace}/tenants/${record.tenant}`);
history.push(
`/namespaces/${record.namespace}/tenants/${record.tenant}`
);
},
},
];

return (
return (
<Fragment>
<Grid item xs={12} className={classes.actionsTray}>
<TextField
Expand Down Expand Up @@ -138,7 +140,8 @@ const StorageVolumes = ({
{
label: "Tenant",
renderFullObject: true,
renderFunction: (record: any) => `${record.namespace}/${record.tenant}`,
renderFunction: (record: any) =>
`${record.namespace}/${record.tenant}`,
},
{
label: "Capacity",
Expand Down
14 changes: 9 additions & 5 deletions portal-ui/src/screens/Console/Users/AddUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const AddUser = ({
}

api
.invoke("GET", `/api/v1/users/${selectedUser.accessKey}`)
.invoke("GET", `/api/v1/user?name=${encodeURI(selectedUser.accessKey)}`)
.then((res) => {
setAddLoading(false);
setAccessKey(res.accessKey);
Expand Down Expand Up @@ -110,10 +110,14 @@ const AddUser = ({
setAddLoading(true);
if (selectedUser !== null) {
api
.invoke("PUT", `/api/v1/users/${selectedUser.accessKey}`, {
status: enabled ? "enabled" : "disabled",
groups: selectedGroups,
})
.invoke(
"PUT",
`/api/v1/user?name=${encodeURI(selectedUser.accessKey)}`,
{
status: enabled ? "enabled" : "disabled",
groups: selectedGroups,
}
)
.then((res) => {
setAddLoading(false);
closeModalAndRefresh();
Expand Down
4 changes: 2 additions & 2 deletions portal-ui/src/screens/Console/Users/ChangeUserGroups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const ChangeUserGroups = ({
}

api
.invoke("GET", `/api/v1/users/${selectedUser}`)
.invoke("GET", `/api/v1/user?name=${encodeURI(selectedUser)}`)
.then((res) => {
setAddLoading(false);
setAccessKey(res.accessKey);
Expand Down Expand Up @@ -98,7 +98,7 @@ const ChangeUserGroups = ({
setAddLoading(true);
if (selectedUser !== null) {
api
.invoke("PUT", `/api/v1/users/${selectedUser}`, {
.invoke("PUT", `/api/v1/user?name=${encodeURI(selectedUser)}`, {
status: enabled ? "enabled" : "disabled",
groups: selectedGroups,
})
Expand Down
10 changes: 7 additions & 3 deletions portal-ui/src/screens/Console/Users/DeleteUser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,13 @@ const DeleteUser = ({
}
setDeleteLoading(true);
api
.invoke("DELETE", `/api/v1/users/${selectedUser.accessKey}`, {
id: selectedUser.id,
})
.invoke(
"DELETE",
`/api/v1/user?name=${encodeURI(selectedUser.accessKey)}`,
{
id: selectedUser.id,
}
)
.then((res: UsersList) => {
setDeleteLoading(false);
closeDeleteModalAndRefresh(true);
Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/screens/Console/Users/DeleteUserString.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const DeleteUserString = ({
}
setDeleteLoading(true);
api
.invoke("DELETE", `/api/v1/users/${userName}`, {
.invoke("DELETE", `/api/v1/user?name=${encodeURI(userName)}`, {
id: userName,
})
.then((res: UsersList) => {
Expand Down
7 changes: 4 additions & 3 deletions portal-ui/src/screens/Console/Users/ListUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import AddToGroup from "./BulkAddToGroup";
import TableWrapper from "../Common/TableWrapper/TableWrapper";
import SetPolicy from "../Policies/SetPolicy";
import PageHeader from "../Common/PageHeader/PageHeader";
import history from "../../../history";

const styles = (theme: Theme) =>
createStyles({
Expand Down Expand Up @@ -77,10 +76,11 @@ const styles = (theme: Theme) =>

interface IUsersProps {
classes: any;
history: any;
setErrorSnackMessage: typeof setErrorSnackMessage;
}

const ListUsers = ({ classes, setErrorSnackMessage }: IUsersProps) => {
const ListUsers = ({ classes, setErrorSnackMessage, history }: IUsersProps) => {
const [records, setRecords] = useState<User[]>([]);
const [loading, setLoading] = useState<boolean>(false);
const [addScreenOpen, setAddScreenOpen] = useState<boolean>(false);
Expand Down Expand Up @@ -155,7 +155,8 @@ const ListUsers = ({ classes, setErrorSnackMessage }: IUsersProps) => {
};

const viewAction = (selectionElement: any): void => {
history.push(`/users/${selectionElement.accessKey}`);

history.push(`/users/${encodeURI(selectionElement.accessKey)}`);
};

const deleteAction = (selectionElement: any): void => {
Expand Down
4 changes: 2 additions & 2 deletions portal-ui/src/screens/Console/Users/UserDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => {
}
setLoading(true);
api
.invoke("GET", `/api/v1/users/${userName}`)
.invoke("GET", `/api/v1/user?name=${encodeURI(userName)}`)
.then((res) => {
setAddLoading(false);
const memberOf = res.memberOf || [];
Expand Down Expand Up @@ -202,7 +202,7 @@ const UserDetails = ({ classes, match }: IUserDetailsProps) => {
}
setAddLoading(true);
api
.invoke("PUT", `/api/v1/users/${userName}`, {
.invoke("PUT", `/api/v1/user?name=${encodeURI(userName)}`, {
status: isEnabled ? "enabled" : "disabled",
groups: selectedGroups,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const UserServiceAccountsPanel = ({
useEffect(() => {
if (loading) {
api
.invoke("GET", `/api/v1/users/${user}/service-accounts`)
.invoke("GET", `/api/v1/user/service-accounts?name=${user}`)
.then((res: string[]) => {
const serviceAccounts = res.sort(stringSort);

Expand Down
2 changes: 1 addition & 1 deletion portal-ui/src/screens/Console/Users/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const Users = () => {
return (
<Router history={history}>
<Switch>
<Route path="/users/:userName" component={UserDetails} />
<Route path="/users/:userName+" component={UserDetails} />
<Route path="/" component={ListUsers} />
<Route component={NotFoundPage} />
</Switch>
Expand Down
Loading