summaryrefslogtreecommitdiffstats
path: root/app/redfish/controllers/redfish-controller.html
diff options
context:
space:
mode:
authorJames Feist <james.feist@linux.intel.com>2018-09-07 14:25:48 -0700
committerJames Feist <james.feist@linux.intel.com>2018-09-24 10:17:42 -0700
commite8634e6bfc99879a14234c485577c6e899dd6da1 (patch)
tree163022e28c7ea035ce1ff6fe3907eaa7c9ecc016 /app/redfish/controllers/redfish-controller.html
parent23ec5bda1fbb4911b58821ac96fcb102da349207 (diff)
downloadphosphor-webui-e8634e6bfc99879a14234c485577c6e899dd6da1.tar.gz
phosphor-webui-e8634e6bfc99879a14234c485577c6e899dd6da1.zip
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>
Diffstat (limited to 'app/redfish/controllers/redfish-controller.html')
-rw-r--r--app/redfish/controllers/redfish-controller.html47
1 files changed, 47 insertions, 0 deletions
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>
OpenPOWER on IntegriCloud