-
Notifications
You must be signed in to change notification settings - Fork 279
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connected Object details page to navigation (#394)
Connected Object details page to navigation schema. Also connected file details view with backend Co-authored-by: Kaan Kabalak <kaan@minio.io>
- Loading branch information
1 parent
be569ae
commit 1f832fa
Showing
29 changed files
with
1,211 additions
and
58 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// This file is part of MinIO Console Server | ||
// Copyright (c) 2020 MinIO, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import React from "react"; | ||
import { SvgIcon } from "@material-ui/core"; | ||
class CopyIcon extends React.Component { | ||
render() { | ||
return ( | ||
<SvgIcon> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"> | ||
<title>ic_h_copy-new_sl</title> | ||
<g id="Layer_2" data-name="Layer 2"> | ||
<g id="Layer_1-2" data-name="Layer 1"> | ||
<path | ||
className="cls-1" | ||
d="M0,0V16H16V0ZM11.886,9.048H9.048v2.838h-2.1V9.048H4.114v-2.1H6.952V4.114h2.1V6.952h2.838Z" | ||
/> | ||
</g> | ||
</g> | ||
</svg> | ||
</SvgIcon> | ||
); | ||
} | ||
} | ||
|
||
export default CopyIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// This file is part of MinIO Console Server | ||
// Copyright (c) 2020 MinIO, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import React from "react"; | ||
import SvgIcon from "@material-ui/core/SvgIcon"; | ||
|
||
class DownloadIcon extends React.Component { | ||
render() { | ||
return ( | ||
<SvgIcon> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 12.996"> | ||
<path d="M11.05 9.096v1.95h-9.1v-1.95H0v3.9h13v-3.9z"></path> | ||
<path d="M6.5 9.75L9 6.672H7.475V0h-1.95v6.672H4z"></path> | ||
</svg> | ||
</SvgIcon> | ||
); | ||
} | ||
} | ||
|
||
export default DownloadIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// This file is part of MinIO Console Server | ||
// Copyright (c) 2020 MinIO, Inc. | ||
// | ||
// This program is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Affero General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// This program is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU Affero General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Affero General Public License | ||
// along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
import React from "react"; | ||
import SvgIcon from "@material-ui/core/SvgIcon"; | ||
|
||
class ShareIcon extends React.Component { | ||
render() { | ||
return ( | ||
<SvgIcon> | ||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 13"> | ||
<path | ||
d="M11.05 8.617v2.429h-9.1v-9.1h2.429v-1.95H0v13h13V8.617z" | ||
className="a" | ||
></path> | ||
<path | ||
d="M3.854 9.256h1.95a4.945 4.945 0 013.6-4.74v1.3l.6-.487 2.474-2.012L9.4.817v1.7a6.9 6.9 0 00-5.546 6.739z" | ||
className="a" | ||
></path> | ||
</svg> | ||
</SvgIcon> | ||
); | ||
} | ||
} | ||
|
||
export default ShareIcon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
portal-ui/src/screens/Console/Buckets/ListBuckets/Objects/ListObjects/ObjectRouting.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import ListObjects from "./ListObjects"; | ||
import ObjectDetails from "../ObjectDetails/ObjectDetails"; | ||
import get from "lodash/get"; | ||
import { addRoute, setAllRoutes } from "../../../../ObjectBrowser/actions"; | ||
import { connect } from "react-redux"; | ||
import { withRouter } from "react-router-dom"; | ||
import { ObjectBrowserState, Route } from "../../../../ObjectBrowser/reducers"; | ||
|
||
interface ObjectBrowserReducer { | ||
objectBrowser: ObjectBrowserState; | ||
} | ||
|
||
interface ObjectRoutingProps { | ||
routesList: Route[]; | ||
match: any; | ||
} | ||
|
||
const ObjectRouting = ({ routesList, match }: ObjectRoutingProps) => { | ||
const currentItem = routesList[routesList.length - 1]; | ||
|
||
useEffect(() => { | ||
const url = get(match, "url", "/object-browser"); | ||
|
||
if (url !== routesList[routesList.length - 1].route) { | ||
setAllRoutes(url); | ||
} | ||
}, [match, routesList, setAllRoutes]); | ||
|
||
return currentItem.type === "path" ? ( | ||
<ListObjects /> | ||
) : ( | ||
<ObjectDetails routesList={routesList} /> | ||
); | ||
}; | ||
|
||
const mapStateToProps = ({ objectBrowser }: ObjectBrowserReducer) => ({ | ||
routesList: get(objectBrowser, "routesList", []), | ||
}); | ||
|
||
const mapDispatchToProps = (dispatch: any) => { | ||
return { | ||
dispatchSetAllRoutes: (route: string) => dispatch(setAllRoutes(route)), | ||
}; | ||
}; | ||
|
||
const connector = connect(mapStateToProps, mapDispatchToProps); | ||
|
||
export default withRouter(connector(ObjectRouting)); |
Oops, something went wrong.