omadawn / njord

Java iRule Editor
2 stars 1 forks source link

Display iRules documentation in the code. #143

Open omadawn opened 12 years ago

omadawn commented 12 years ago

A few options for this. Initially I was thinking of making commands clickable links like iRuler.

However now I'm thinking it'll be better and possibly easier to actually just pull down the summary from the web site and create tooltip texts for all the commands/functions with 'click to learn more' links in them. IE "See " links.

omadawn commented 12 years ago

It's discussed in this thread http://fifesoft.com/forum/viewtopic.php?f=10&t=330&p=727&hilit=tooltip#p727

Where he mentions having to add your own parser. Here are some samples he gives. The taskTag parser (TODO: and others) This I want anyway. http://svn.fifesoft.com/viewvc-1.0.5/bin/cgi/viewvc.cgi/RSyntaxTextArea/trunk/src/org/fife/ui/rsyntaxtextarea/parser/TaskTagParser.java?revision=157&root=RSyntaxTextArea&view=markup

The spell checking parser http://svn.fifesoft.com/svn/RSyntaxTextArea/SpellChecker/trunk/src/org/fife/ui/rsyntaxtextarea/spell/SpellingParser.java

omadawn commented 12 years ago

Master page for iRules https://devcentral.f5.com/wiki/iRules.Commands.ashx Holycrap iRules commands by version https://devcentral.f5.com/wiki/iRules.BIGIP_Commands_by_Version.ashx

omadawn commented 12 years ago

This is what I see start the beginning of the table that has all the commands in it. Commands added/deprecated by version

But for now that's still going to be a bit tricky to parse. So for now there's actually a format I can use for links. https://devcentral.f5.com/wiki/iRules.__.ashx which I should be able to reach by replacing :: with __ then prepending https://devcentral.f5.com/wiki/iRules. and appending .ashx IE this is the link for ACCESS::acl https://devcentral.f5.com/wiki/iRules.ACCESS__acl.ashx
omadawn commented 12 years ago

Then each page has a section like this:

Edit

Description

Queries or modifies HTTP headers. This command replaces the BIG-IP 4.X variable http_header.

Note: HTTP::header commands affect only headers passing THROUGH the load balancer, not locally-generated responses.

Note: The header name is not case sensitive, so for example, 'HTTP::header value HEADER_NAME' will match a header with the name HeAdEr_NaMe.

Edit

Syntax


HTTP::header [value] <name>
HTTP::header values <name>
HTTP::header names
HTTP::header count [*name*]
HTTP::header at <index>
HTTP::header exists <name>
HTTP::header insert ["lws"] [<name> <value>]+
HTTP::header lws
HTTP::header is_keepalive
HTTP::header is_redirect
HTTP::header replace <name> [<string>]
HTTP::header remove <name>
HTTP::header insert_modssl_fields <addr port | addr addr addr | port port port>
HTTP::header sanitize [header name]+

HTTP::header [value] <name>

  • Returns the value of the HTTP header named <name>.
  • Returns a null string if the HTTP header named <name> does not exist.
  • Note that the command will operate on the value of the last header if there are multiple headers with the same name.
  • You may omit the value argument if the header name does not collide with any of the HTTP::header subcommands.

HTTP::header values <name>

  • Returns value(s) of the HTTP header named <name>. Note that the command will return the values all of the headers if there are multiple headers with the same name. If there is a single value for the HTTP header, that value will be returned.
  • (This subcommand was added in v9.4.0)

Note: There is an issue where HTTP::header values can remove colons in the header values it returns. The actual header values are unchanged. This issue is tracked as CR98328 and has been fixed in 10.0.

HTTP::header names

where the class="headeranchor" id="Description_14" section has the short description. the
 starts the 'code' section which has all the various ways to use the iRule.
then there's a bunch of html which describes the actual rules.