Skip to content

Commit

Permalink
733: Move "Reallocate" button into disk page in DR (#737)
Browse files Browse the repository at this point in the history
* 733: Move "Reallocate" button into disk page in DR

* Print physical offset as a raw number
  • Loading branch information
komarevtsev-d committed Mar 15, 2024
1 parent ee3cacd commit 2ddd97a
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void BuildVolumeReallocateButton(
<input
class='btn btn-primary'
type='button'
value='Reallocate'
value='Reallocate volume'
title="Initiate update volume config"
data-toggle='modal'
data-target='#fire-reallocate%s'
Expand Down Expand Up @@ -228,7 +228,7 @@ void TDiskRegistryActor::RenderDevicesWithDetails(
TABLEH() { out << "Block size"; }
TABLEH() { out << "Block count"; }
TABLEH() { out << "Size"; }
TABLEH() { out << "PhysicalOffset"; }
TABLEH() { out << "Physical offset"; }
TABLEH() { out << "Transport id"; }
TABLEH() { out << "Rdma endpoint"; }
TABLEH() { out << "DiskId"; }
Expand Down Expand Up @@ -261,7 +261,9 @@ void TDiskRegistryActor::RenderDevicesWithDetails(
out << FormatByteSize(bytes);
}
TABLED() {
out << FormatByteSize(device.GetPhysicalOffset());
out << device.GetPhysicalOffset() << " ("
<< FormatByteSize(device.GetPhysicalOffset())
<< ")";
}
TABLED() { out << device.GetTransportId(); }
TABLED() {
Expand Down Expand Up @@ -593,6 +595,11 @@ void TDiskRegistryActor::RenderDiskHtmlInfo(
DIV() { out << "Acquire in progress"; }
}

DIV()
{
BuildVolumeReallocateButton(out, TabletID(), id);
}

const bool isNonrepl = info.Replicas.empty();

auto makeHeaderCells = [&] (const ui32 replicaNo) {
Expand Down Expand Up @@ -821,7 +828,6 @@ void TDiskRegistryActor::RenderDiskList(IOutputStream& out) const
TABLEH() { out << "Disk"; }
TABLEH() { out << "State"; }
TABLEH() { out << "State Timestamp"; }
TABLEH() { out << "Action"; }
}
}

Expand All @@ -833,9 +839,6 @@ void TDiskRegistryActor::RenderDiskList(IOutputStream& out) const
TABLED() { DumpDiskLink(out, TabletID(), id); }
TABLED() { DumpDiskState(out, diskInfo.State); }
TABLED() { out << diskInfo.StateTs; }
TABLED() {
BuildVolumeReallocateButton(out, TabletID(), id);
}
}
}
}
Expand Down

0 comments on commit 2ddd97a

Please sign in to comment.