This commit is contained in:
adfost
2021-07-23 10:34:13 -07:00
committed by GitHub
parent 73fe08cd81
commit 419fa59923
6 changed files with 28 additions and 5 deletions

View File

@@ -52,6 +52,9 @@ type PvcsListResponse struct {
// storage class
StorageClass string `json:"storageClass,omitempty"`
// tenant
Tenant string `json:"tenant,omitempty"`
// volume
Volume string `json:"volume,omitempty"`
}

View File

@@ -3851,6 +3851,9 @@ func init() {
"storageClass": {
"type": "string"
},
"tenant": {
"type": "string"
},
"volume": {
"type": "string"
}
@@ -9281,6 +9284,9 @@ func init() {
"storageClass": {
"type": "string"
},
"tenant": {
"type": "string"
},
"volume": {
"type": "string"
}

View File

@@ -72,8 +72,8 @@ func getPVCsResponse(session *models.Principal) (*models.ListPVCsResponse, *mode
Status: string(pvc.Status.Phase),
StorageClass: *pvc.Spec.StorageClassName,
Volume: pvc.Spec.VolumeName,
Tenant: pvc.Labels["v1.min.io/tenant"],
}
ListPVCs = append(ListPVCs, &pvcResponse)
}

View File

@@ -19,6 +19,7 @@ import get from "lodash/get";
import { connect } from "react-redux";
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
import { Grid, InputAdornment, TextField } from "@material-ui/core";
import history from "../../../history";
import SearchIcon from "@material-ui/icons/Search";
import {
actionsTray,
@@ -83,7 +84,16 @@ const StorageVolumes = ({
elementItem.name.includes(filter)
);
return (
const tableActions = [
{
type: "view",
onClick: (record: any) => {
history.push(`/namespaces/${record.namespace}/tenants/${record.tenant}`);
},
},
];
return (
<Fragment>
<Grid item xs={12} className={classes.actionsTray}>
<TextField
@@ -109,7 +119,7 @@ const StorageVolumes = ({
</Grid>
<Grid item xs={12}>
<TableWrapper
itemActions={[]}
itemActions={tableActions}
columns={[
{
label: "Name",
@@ -126,8 +136,9 @@ const StorageVolumes = ({
width: 120,
},
{
label: "Volume",
elementKey: "volume",
label: "Tenant",
renderFullObject: true,
renderFunction: (record: any) => `${record.namespace}/${record.tenant}`,
},
{
label: "Capacity",

View File

@@ -23,6 +23,7 @@ export interface IStoragePVCs {
storageClass: string;
node: string;
age: string;
tenant: string;
}
export interface IPVCsResponse {

View File

@@ -3501,6 +3501,8 @@ definitions:
type: string
volume:
type: string
tenant:
type: string
capacity:
type: string
storageClass: