Skip to content

Commit

Permalink
Checkin artifacts for inventory HWKINVENT-121
Browse files Browse the repository at this point in the history
  • Loading branch information
mtho11 committed Aug 25, 2015
1 parent 7fd1570 commit 13dc941
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
19 changes: 19 additions & 0 deletions dist/hawkular-ui-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@ var hawkularRest;

var hawkularRest;
(function (hawkularRest) {
hawkularRest._module.constant("inventoryInterceptURLS", [new RegExp('.+/inventory/.+/resources/.+%2F.+')]);
hawkularRest._module.config(['$httpProvider', 'inventoryInterceptURLS', function ($httpProvider, inventoryInterceptURLS) {
var ENCODED_SLASH = new RegExp("%2F", 'g');
$httpProvider.interceptors.push(function ($q) {
return {
'request': function (config) {
var url = config.url;
for (var i = 0; i < inventoryInterceptURLS.length; i++) {
if (url.match(inventoryInterceptURLS[i])) {
url = url.replace(ENCODED_SLASH, "/");
break;
}
}
config.url = url;
return config || $q.when(config);
}
};
});
}]);
hawkularRest._module.provider('HawkularInventory', function () {
this.setProtocol = function (protocol) {
this.protocol = protocol;
Expand Down
19 changes: 19 additions & 0 deletions dist/hawkular-ui-service.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,25 @@ var hawkularRest;

var hawkularRest;
(function (hawkularRest) {
hawkularRest._module.constant("inventoryInterceptURLS", [new RegExp('.+/inventory/.+/resources/.+%2F.+')]);
hawkularRest._module.config(['$httpProvider', 'inventoryInterceptURLS', function ($httpProvider, inventoryInterceptURLS) {
var ENCODED_SLASH = new RegExp("%2F", 'g');
$httpProvider.interceptors.push(function ($q) {
return {
'request': function (config) {
var url = config.url;
for (var i = 0; i < inventoryInterceptURLS.length; i++) {
if (url.match(inventoryInterceptURLS[i])) {
url = url.replace(ENCODED_SLASH, "/");
break;
}
}
config.url = url;
return config || $q.when(config);
}
};
});
}]);
hawkularRest._module.provider('HawkularInventory', function () {
this.setProtocol = function (protocol) {
this.protocol = protocol;
Expand Down

0 comments on commit 13dc941

Please sign in to comment.