summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason M. Bills <jason.m.bills@linux.intel.com>2019-03-29 23:09:34 +0300
committerEd Tanous <ed.tanous@intel.com>2019-04-05 23:52:40 +0300
commitc6c91d49187bf4cc186a52f8765a356fd8d164ec (patch)
tree7875d1a56d732f4f1b67c8179d66781460debf0a
parent474bfad586d7fdaffb9899c839ce6c4ab153eb7c (diff)
downloadbmcweb-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>
-rw-r--r--crow/include/crow/utility.h4
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)
"(&quot;Members@odata\\.((nextLink))&quot;[ \\n]*:[ "
"\\n]*)(&quot;((?!&quot;).*)&quot;)"};
s = std::regex_replace(s, nextLink, "$1<a href=\"$5\">$4</a>");
+
+ const static std::regex uri{"(&quot;((Uri))&quot;[ \\n]*:[ "
+ "\\n]*)(&quot;((?!&quot;).*)&quot;)"};
+ s = std::regex_replace(s, uri, "$1<a href=\"$5\">$4</a>");
}
/**