dnsdist: add option to showRules actions to truncate rule length output #6402
Conversation
Looks good, a couple nits |
pdns/dnsdist-console.cc
Outdated
@@ -408,15 +408,15 @@ const std::vector<ConsoleKeyword> g_consoleKeywords{ | |||
{ "show", true, "string", "outputs `string`" }, | |||
{ "showACL", true, "", "show our ACL set" }, | |||
{ "showBinds", true, "", "show listening addresses (frontends)" }, | |||
{ "showCacheHitResponseRules", true, "[showUUIDs]", "show all defined cache hit response rules, optionally with their UUIDs" }, | |||
{ "showCacheHitResponseRules", true, "[{showUUIDs=false, truncateRuleWidth=-1}]", "show all defined cache hit response rules, optionally with their UUID sand optionally truncated to a given width" }, |
rgacogne
Mar 27, 2018
Member
s/UUID sand/UUIDs and/
s/UUID sand/UUIDs and/
pdns/dnsdist-lua-rules.cc
Outdated
@@ -915,24 +915,39 @@ void parseRuleParams(boost::optional<luaruleparams_t> params, boost::uuids::uuid | |||
uuid = makeRuleID(uuidStr); | |||
} | |||
|
|||
typedef std::unordered_map<std::string, boost::variant<bool, int, std::string, std::vector<std::pair<int,int> > > > localbind_t; |
rgacogne
Mar 27, 2018
Member
localbind_t
is not a really good name and we already use it in another unit, perhaps ruleparams_t
or something like that?
localbind_t
is not a really good name and we already use it in another unit, perhaps ruleparams_t
or something like that?
chbruyand
Mar 27, 2018
Author
Member
Sure.
Sure.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Short description
This fix #5763 while not changing the default output behaviour.
Checklist
I have: