Skip to content

Commit

Permalink
Tproxy: Rename 'id' to 'instance_id' to avoid potential confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
Leechael committed Dec 10, 2024
1 parent dcdc9ab commit 1e4673b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tproxy/rpc/proto/tproxy_rpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ message ListResponse {
// HostInfo is the information of a host.
message HostInfo {
// The Instance id
string id = 1;
string instance_id = 1;
// The IP address of the host.
string ip = 2;
// The app id of the host.
Expand Down
4 changes: 2 additions & 2 deletions tproxy/src/main_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ impl TproxyRpc for RpcHandler {
.instances
.values()
.map(|instance| PbHostInfo {
id: instance.id.clone(),
instance_id: instance.id.clone(),
ip: instance.ip.to_string(),
app_id: instance.app_id.clone(),
base_domain: base_domain.clone(),
Expand All @@ -375,7 +375,7 @@ impl TproxyRpc for RpcHandler {

if let Some(instance) = state.state.instances.get(&request.id) {
let host_info = PbHostInfo {
id: instance.id.clone(),
instance_id: instance.id.clone(),
ip: instance.ip.to_string(),
app_id: instance.app_id.clone(),
base_domain: base_domain.clone(),
Expand Down
2 changes: 1 addition & 1 deletion tproxy/templates/cvmlist.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h2>CVM List</h2>
</tr>
{% for host in hosts %}
<tr>
<td>{{ host.id }}</td>
<td>{{ host.instance_id }}</td>
<td>{{ host.app_id }}</td>
<td>{{ host.ip }}</td>
<td class="timestamp">{{ host.latest_handshake }}</td>
Expand Down

0 comments on commit 1e4673b

Please sign in to comment.