Copilot commented on code in PR #3413:
URL: https://github.com/apache/brpc/pull/3413#discussion_r3670580291


##########
src/brpc/builtin/vars_service.cpp:
##########
@@ -406,7 +413,10 @@ void 
VarsService::default_method(::google::protobuf::RpcController* cntl_base,
         os << "<p>Search : <input id='searchbox' type='text'"
             " onkeyup='onQueryChanged()'></p>"
             "<div id=\"layer1\">\n";
-    }    
+    }
+    if (use_html) {
+        os << "<table class=\"gridtable\" 
border=\"1\"><tr><th>Name</th><th>Value</th></tr>\n";
+    }

Review Comment:
   The `/vars` HTML rendering changed from `<p>` lines to a `<table>` with 
`<tr>` rows and expandable detail rows, but existing unit tests for 
`VarsService` only validate the plain-text output. Add coverage for the HTML 
mode (set a non-empty User-Agent to enable HTML) to assert the response 
contains the expected `<table class="gridtable">` structure and row classes, 
and that the plain-text behavior remains unchanged.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to