Skip to content

Commit 419fa59

Browse files
authored
New link (#893)
1 parent 73fe08c commit 419fa59

File tree

6 files changed

+28
-5
lines changed

6 files changed

+28
-5
lines changed

models/pvcs_list_response.go

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

operatorapi/embedded_spec.go

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

operatorapi/operator_volumes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ func getPVCsResponse(session *models.Principal) (*models.ListPVCsResponse, *mode
7272
Status: string(pvc.Status.Phase),
7373
StorageClass: *pvc.Spec.StorageClassName,
7474
Volume: pvc.Spec.VolumeName,
75+
Tenant: pvc.Labels["v1.min.io/tenant"],
7576
}
76-
7777
ListPVCs = append(ListPVCs, &pvcResponse)
7878
}
7979

portal-ui/src/screens/Console/Storage/StoragePVCs.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import get from "lodash/get";
1919
import { connect } from "react-redux";
2020
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
2121
import { Grid, InputAdornment, TextField } from "@material-ui/core";
22+
import history from "../../../history";
2223
import SearchIcon from "@material-ui/icons/Search";
2324
import {
2425
actionsTray,
@@ -83,7 +84,16 @@ const StorageVolumes = ({
8384
elementItem.name.includes(filter)
8485
);
8586

86-
return (
87+
const tableActions = [
88+
{
89+
type: "view",
90+
onClick: (record: any) => {
91+
history.push(`/namespaces/${record.namespace}/tenants/${record.tenant}`);
92+
},
93+
},
94+
];
95+
96+
return (
8797
<Fragment>
8898
<Grid item xs={12} className={classes.actionsTray}>
8999
<TextField
@@ -109,7 +119,7 @@ const StorageVolumes = ({
109119
</Grid>
110120
<Grid item xs={12}>
111121
<TableWrapper
112-
itemActions={[]}
122+
itemActions={tableActions}
113123
columns={[
114124
{
115125
label: "Name",
@@ -126,8 +136,9 @@ const StorageVolumes = ({
126136
width: 120,
127137
},
128138
{
129-
label: "Volume",
130-
elementKey: "volume",
139+
label: "Tenant",
140+
renderFullObject: true,
141+
renderFunction: (record: any) => `${record.namespace}/${record.tenant}`,
131142
},
132143
{
133144
label: "Capacity",

portal-ui/src/screens/Console/Storage/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface IStoragePVCs {
2323
storageClass: string;
2424
node: string;
2525
age: string;
26+
tenant: string;
2627
}
2728

2829
export interface IPVCsResponse {

swagger-operator.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3501,6 +3501,8 @@ definitions:
35013501
type: string
35023502
volume:
35033503
type: string
3504+
tenant:
3505+
type: string
35043506
capacity:
35053507
type: string
35063508
storageClass:

0 commit comments

Comments
 (0)