New link (#893)
This commit is contained in:
@@ -52,6 +52,9 @@ type PvcsListResponse struct {
|
|||||||
// storage class
|
// storage class
|
||||||
StorageClass string `json:"storageClass,omitempty"`
|
StorageClass string `json:"storageClass,omitempty"`
|
||||||
|
|
||||||
|
// tenant
|
||||||
|
Tenant string `json:"tenant,omitempty"`
|
||||||
|
|
||||||
// volume
|
// volume
|
||||||
Volume string `json:"volume,omitempty"`
|
Volume string `json:"volume,omitempty"`
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3851,6 +3851,9 @@ func init() {
|
|||||||
"storageClass": {
|
"storageClass": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"tenant": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"volume": {
|
"volume": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
@@ -9281,6 +9284,9 @@ func init() {
|
|||||||
"storageClass": {
|
"storageClass": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
|
"tenant": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
"volume": {
|
"volume": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -72,8 +72,8 @@ func getPVCsResponse(session *models.Principal) (*models.ListPVCsResponse, *mode
|
|||||||
Status: string(pvc.Status.Phase),
|
Status: string(pvc.Status.Phase),
|
||||||
StorageClass: *pvc.Spec.StorageClassName,
|
StorageClass: *pvc.Spec.StorageClassName,
|
||||||
Volume: pvc.Spec.VolumeName,
|
Volume: pvc.Spec.VolumeName,
|
||||||
|
Tenant: pvc.Labels["v1.min.io/tenant"],
|
||||||
}
|
}
|
||||||
|
|
||||||
ListPVCs = append(ListPVCs, &pvcResponse)
|
ListPVCs = append(ListPVCs, &pvcResponse)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import get from "lodash/get";
|
|||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
import { createStyles, Theme, withStyles } from "@material-ui/core/styles";
|
||||||
import { Grid, InputAdornment, TextField } from "@material-ui/core";
|
import { Grid, InputAdornment, TextField } from "@material-ui/core";
|
||||||
|
import history from "../../../history";
|
||||||
import SearchIcon from "@material-ui/icons/Search";
|
import SearchIcon from "@material-ui/icons/Search";
|
||||||
import {
|
import {
|
||||||
actionsTray,
|
actionsTray,
|
||||||
@@ -83,7 +84,16 @@ const StorageVolumes = ({
|
|||||||
elementItem.name.includes(filter)
|
elementItem.name.includes(filter)
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
const tableActions = [
|
||||||
|
{
|
||||||
|
type: "view",
|
||||||
|
onClick: (record: any) => {
|
||||||
|
history.push(`/namespaces/${record.namespace}/tenants/${record.tenant}`);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Grid item xs={12} className={classes.actionsTray}>
|
<Grid item xs={12} className={classes.actionsTray}>
|
||||||
<TextField
|
<TextField
|
||||||
@@ -109,7 +119,7 @@ const StorageVolumes = ({
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid item xs={12}>
|
<Grid item xs={12}>
|
||||||
<TableWrapper
|
<TableWrapper
|
||||||
itemActions={[]}
|
itemActions={tableActions}
|
||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
label: "Name",
|
label: "Name",
|
||||||
@@ -126,8 +136,9 @@ const StorageVolumes = ({
|
|||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Volume",
|
label: "Tenant",
|
||||||
elementKey: "volume",
|
renderFullObject: true,
|
||||||
|
renderFunction: (record: any) => `${record.namespace}/${record.tenant}`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Capacity",
|
label: "Capacity",
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ export interface IStoragePVCs {
|
|||||||
storageClass: string;
|
storageClass: string;
|
||||||
node: string;
|
node: string;
|
||||||
age: string;
|
age: string;
|
||||||
|
tenant: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPVCsResponse {
|
export interface IPVCsResponse {
|
||||||
|
|||||||
@@ -3501,6 +3501,8 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
volume:
|
volume:
|
||||||
type: string
|
type: string
|
||||||
|
tenant:
|
||||||
|
type: string
|
||||||
capacity:
|
capacity:
|
||||||
type: string
|
type: string
|
||||||
storageClass:
|
storageClass:
|
||||||
|
|||||||
Reference in New Issue
Block a user