Skip to content

Commit

Permalink
fix(PodStorageConfigSection): display DSS type and size
Browse files Browse the repository at this point in the history
On the review screen show the volume as Type: DSS, and
render a column for the size. Also fix the edit button.

Closes DCOS-20258
  • Loading branch information
Andrew Hoskins committed Mar 14, 2018
1 parent 8b5941c commit fa4f723
Showing 1 changed file with 14 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PodStorageConfigSection extends React.Component {
prop: "type"
},
{
heading: "Size",
heading: "Size (MiB)",
prop: "size"
},
{
Expand Down Expand Up @@ -66,16 +66,26 @@ class PodStorageConfigSection extends React.Component {
type = VolumeConstants.type.host;
}
if (volume.persistent != null) {
type = VolumeConstants.type.localPersistent;
if (volume.persistent.profileName != null) {
type = VolumeConstants.type.dss;
} else {
type = VolumeConstants.type.localPersistent;
}
}
if (Object.keys(volume).length === 1 && volume.name != null) {
type = VolumeConstants.type.ephemeral;
}

let size;
if (volume.persistent != null && volume.persistent.size != null) {
size = volume.persistent.size;
}

const volumeInfo = {
type,
volume: volume.name,
hostPath: volume.host
hostPath: volume.host,
size
};

// Fetch all mounts for this volume in the containers
Expand Down Expand Up @@ -128,7 +138,7 @@ class PodStorageConfigSection extends React.Component {
columns={this.getColumns()}
data={volumeSummary}
onEditClick={onEditClick}
tabViewID="multivolumes"
tabViewID="volumes"
/>
</MountService.Mount>
</ConfigurationMapSection>
Expand Down

0 comments on commit fa4f723

Please sign in to comment.