Add Redfish into the web-ui
Currently only GET is supported, but to add PATCH
in the future for redfish, support should be moved from
being hosted directly by bmcweb into the webui.
Tested-by:
Navigated to http://localhost:8080/#/redfish/v1/ with
bmc attached and was able to view all of redfish. Also
tested on platform.
Change-Id: I1dc3936b6b48835a1f69698fcb4fd6fcdb6d91ac
Signed-off-by: James Feist <james.feist@linux.intel.com>
diff --git a/app/redfish/controllers/redfish-controller.html b/app/redfish/controllers/redfish-controller.html
new file mode 100644
index 0000000..eff1f8a
--- /dev/null
+++ b/app/redfish/controllers/redfish-controller.html
@@ -0,0 +1,47 @@
+<loader loading="loading"></loader>
+<div id="redfish">
+ <div class="row column">
+ <div style="max-width: 400px;margin:0">
+ <img src="../../assets/images/DMTF_Redfish_logo_2017.svg">
+ </div>
+ </div>
+ <div class="row column">
+ {
+ <ul style="list-style: none;">
+ <li ng-repeat="(key, value) in redfishData" ng-include="'recurse'"> </li>
+ </ul>
+ }
+ </div>
+</div>
+<script type="text/ng-template" id="recurse">
+"<b>{{key}}</b>":
+<span ng-if="isObject(value) && !isArray(value)">
+{
+ <ul style="list-style: none;">
+ <li ng-repeat="(key, value) in value" ng-include="'recurse'"> </li>
+ </ul>
+},</br>
+</span>
+
+<span ng-if="isArray(value)">
+[
+ <div ng-repeat="val in value" style="margin-left: 2em;">
+ <span ng-if="isObject(val) && !isArray(val)">
+ {
+ <ul style="list-style: none;">
+ <li ng-repeat="(key, value) in val" ng-include="'recurse'"> </li>
+ </ul>
+ },</br>
+ </span>
+ <span ng-if="!isObject(val) && !isArray(val)">
+ {{val}}
+ </span>
+ </div>
+]
+</span>
+
+<span ng-if="!isObject(value) && !isArray(value)">
+<a ng-if="key.indexOf('@odata.id') != -1" ng-href="#{{value}}">"{{value}}"</a>
+<span ng-if="key.indexOf('@odata.id') == -1" ng-href="#{{value}}">{{value | json}}</span>,
+</span>
+</script>