diff --git a/ui/src/js/components/home/ComposeDisplay.js b/ui/src/js/components/home/ComposeDisplay.js index ee9df9b..d5bac72 100644 --- a/ui/src/js/components/home/ComposeDisplay.js +++ b/ui/src/js/components/home/ComposeDisplay.js @@ -22,7 +22,7 @@ const ComposeDisplay = React.createClass({ compose: function() { var data = this.prepareRequest(); - var url = config.url + '/redfish/v1/Nodes/Actions/Allocate'; + var url = config.url + '/Nodes/Actions/Allocate'; $.ajax({ url: url, type: 'POST', diff --git a/ui/src/js/components/home/Home.js b/ui/src/js/components/home/Home.js index b0d01ea..39e9753 100644 --- a/ui/src/js/components/home/Home.js +++ b/ui/src/js/components/home/Home.js @@ -28,7 +28,7 @@ const Home = React.createClass({ * * TODO(ntpttr): Remove this once the compose menu is fully flushed out. */ - var url = config.url + '/redfish/v1/Nodes/Actions/Allocate'; + var url = config.url + '/Nodes/Actions/Allocate'; $.ajax({ url: url, type: 'POST', diff --git a/ui/src/js/components/home/NodeList.js b/ui/src/js/components/home/NodeList.js index 4b9bc76..2a8d50e 100644 --- a/ui/src/js/components/home/NodeList.js +++ b/ui/src/js/components/home/NodeList.js @@ -21,7 +21,7 @@ var util = require('../../util.js'); const NodeList = React.createClass({ delete: function(nodeId) { - var url = config.url + '/redfish/v1/Nodes/' + nodeId; + var url = config.url + '/Nodes/' + nodeId; $.ajax({ url: url, type: 'DELETE', @@ -39,7 +39,7 @@ const NodeList = React.createClass({ }, setBoot: function(nodeId) { - var url = config.url + '/redfish/v1/Nodes/' + nodeId; + var url = config.url + '/Nodes/' + nodeId; $.ajax({ url: url, type: 'PATCH', @@ -62,7 +62,7 @@ const NodeList = React.createClass({ }, assemble: function(nodeId) { - var url = config.url + '/redfish/v1/Nodes/' + nodeId + '/Actions/ComposedNode.Assemble'; + var url = config.url + '/Nodes/' + nodeId + '/Actions/ComposedNode.Assemble'; $.ajax({ url: url, type: 'POST', @@ -76,7 +76,7 @@ const NodeList = React.createClass({ }, powerOn: function(nodeId) { - var url = config.url + '/redfish/v1/Nodes/' + nodeId + '/Actions/ComposedNode.Reset'; + var url = config.url + '/Nodes/' + nodeId + '/Actions/ComposedNode.Reset'; $.ajax({ url: url, type: 'POST', diff --git a/ui/src/js/config.js b/ui/src/js/config.js index ac8c9e0..5a0e1c2 100644 --- a/ui/src/js/config.js +++ b/ui/src/js/config.js @@ -17,9 +17,7 @@ * Configuration file for RSC UI. */ -exports.url = "http://127.0.0.1:6000" -exports.username = "admin" -exports.password = "admin" +exports.url = "http://127.0.0.1:8181" exports.nodeConfig = { diff --git a/ui/src/js/util.js b/ui/src/js/util.js index 4e68393..db307dd 100644 --- a/ui/src/js/util.js +++ b/ui/src/js/util.js @@ -16,16 +16,8 @@ var config = require('./config.js'); var util = require('./util.js'); -// Base64 username:password on client-side, and append into request header -$.ajaxSetup({ - beforeSend: function(xhr) { - xhr.setRequestHeader('Authorization', - 'Basic ' + btoa(config.username + ':' + config.password)); - } -}); - exports.getPods = function(callback) { - var url = config.url + '/redfish/v1/Chassis'; + var url = config.url + '/Chassis'; $.ajax({ url: url, type: 'GET', @@ -43,7 +35,7 @@ exports.getPods = function(callback) { }; exports.getRacks = function(callback) { - var url = config.url + '/redfish/v1/Chassis'; + var url = config.url + '/Chassis'; $.ajax({ url: url, type: 'GET', @@ -61,7 +53,7 @@ exports.getRacks = function(callback) { }; exports.getSystems = function(callback) { - var url = config.url + '/redfish/v1/Systems'; + var url = config.url + '/Systems'; $.ajax({ url: url, type: 'GET', @@ -78,7 +70,7 @@ exports.getSystems = function(callback) { }; exports.getNodes = function(callback) { - var url = config.url + '/redfish/v1/Nodes'; + var url = config.url + '/Nodes'; $.ajax({ url: url, type: 'GET', @@ -95,7 +87,7 @@ exports.getNodes = function(callback) { }; exports.getStorage = function(callback) { - var url = config.url + '/redfish/v1/Services'; + var url = config.url + '/Services'; $.ajax({ url: url, type: 'GET', @@ -154,6 +146,8 @@ exports.filterChassis = function(memberList, filter) { }; exports.readAndReturn = function(resource) { + // remove redfish from URL for passthrough + resource = resource.replace("/redfish/v1", ""); var url = config.url + resource; return $.ajax({ url: url,