diff options
author | Jason M. Bills <jason.m.bills@linux.intel.com> | 2019-03-29 23:09:34 +0300 |
---|---|---|
committer | Ed Tanous <ed.tanous@intel.com> | 2019-04-05 23:52:40 +0300 |
commit | c6c91d49187bf4cc186a52f8765a356fd8d164ec (patch) | |
tree | 7875d1a56d732f4f1b67c8179d66781460debf0a /crow | |
parent | 474bfad586d7fdaffb9899c839ce6c4ab153eb7c (diff) | |
download | bmcweb-c6c91d49187bf4cc186a52f8765a356fd8d164ec.tar.xz |
Add link for "Uri" objects
Message Registry File resources contain a "Uri" pointing to the
location of the Message Registry. This change makes the "Uri"
object a link that can be clicked to jump to the Message Registry.
Tested:
Verified that the "Uri" field is a link and takes you to the
Message Registry.
Change-Id: I33a443cffa7ed2f4c92f4a572d7186ef45be17f3
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
Diffstat (limited to 'crow')
-rw-r--r-- | crow/include/crow/utility.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crow/include/crow/utility.h b/crow/include/crow/utility.h index 63d2dece5f..b402b79ecb 100644 --- a/crow/include/crow/utility.h +++ b/crow/include/crow/utility.h @@ -709,6 +709,10 @@ inline void convertToLinks(std::string& s) "("Members@odata\\.((nextLink))"[ \\n]*:[ " "\\n]*)("((?!").*)")"}; s = std::regex_replace(s, nextLink, "$1<a href=\"$5\">$4</a>"); + + const static std::regex uri{"("((Uri))"[ \\n]*:[ " + "\\n]*)("((?!").*)")"}; + s = std::regex_replace(s, uri, "$1<a href=\"$5\">$4</a>"); } /** |