diff --git a/app/assets/javascripts/miq_application.js b/app/assets/javascripts/miq_application.js index 91728317ac0c..fe30bc424e50 100644 --- a/app/assets/javascripts/miq_application.js +++ b/app/assets/javascripts/miq_application.js @@ -1656,14 +1656,6 @@ function miqScrollToSelected(div_name) { } } -function miqUncompressedId(id) { - if (id.match(/r/)) { - var splat = id.split('r'); - return sprintf('%s%012s', splat[0], splat[1]); - } - return id; -} - function queryParam(name) { return QS(window.location.href).get(name); } function miqFormatNotification(text, bindings) { diff --git a/app/assets/javascripts/services/catalog/catalog_item_data.js b/app/assets/javascripts/services/catalog/catalog_item_data.js index 2d38af35fcee..fe9ed8c3ee8e 100644 --- a/app/assets/javascripts/services/catalog/catalog_item_data.js +++ b/app/assets/javascripts/services/catalog/catalog_item_data.js @@ -3,8 +3,7 @@ ManageIQ.angular.app.service('catalogItemDataFactory', ['API', function(API) { this.getCatalogItemData = function(st_id) { if (st_id !== undefined) { - return API.get(urlBase + '/' + miqUncompressedId(st_id)); + return API.get(urlBase + '/' + st_id); } }; }]); - diff --git a/spec/javascripts/miq_application_spec.js b/spec/javascripts/miq_application_spec.js index 2b7fd592a062..15c30ec4a479 100644 --- a/spec/javascripts/miq_application_spec.js +++ b/spec/javascripts/miq_application_spec.js @@ -466,18 +466,6 @@ describe('miq_application.js', function() { }); }); - describe('miqUncompressedId', function () { - it('returns uncompressed id unchanged', function() { - expect(miqUncompressedId('123')).toEqual('123'); - expect(miqUncompressedId('12345678901234567890')).toEqual('12345678901234567890'); - }); - - it('uncompresses compressed id', function() { - expect(miqUncompressedId('1r23')).toEqual('1000000000023'); - expect(miqUncompressedId('999r123456789012')).toEqual('999123456789012'); - }); - }); - describe('miqFormatNotification', function () { context('single placeholder', function () { it('replaces placeholders with bindings', function () {