Merge "Switch target API to Valence"

This commit is contained in:
Jenkins 2016-11-08 19:49:01 +00:00 committed by Gerrit Code Review
commit 97df1e9687
5 changed files with 14 additions and 22 deletions

View File

@ -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',

View File

@ -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',

View File

@ -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',

View File

@ -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 =
{

View File

@ -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,