New link (#893)
This commit is contained in:
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -23,6 +23,7 @@ export interface IStoragePVCs {
|
||||
storageClass: string;
|
||||
node: string;
|
||||
age: string;
|
||||
tenant: string;
|
||||
}
|
||||
|
||||
export interface IPVCsResponse {
|
||||
|
||||
@@ -3501,6 +3501,8 @@ definitions:
|
||||
type: string
|
||||
volume:
|
||||
type: string
|
||||
tenant:
|
||||
type: string
|
||||
capacity:
|
||||
type: string
|
||||
storageClass:
|
||||
|
||||
Reference in New Issue
Block a user