Merge pull request #2208 from recena/JENKINS-33972

[JENKINS-33972] The REST API URL has been removed to [..]/itemCategories
This commit is contained in:
Daniel Beck committed 2016-04-02 01:47:13 +02:00
commit 4649e04cbe
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -1041,10 +1041,10 @@ public abstract class View extends AbstractModelObject implements AccessControll
/**
* An API REST method to get the allowed {$link TopLevelItem}s and its categories.
*
* @return A {@link Categories} entity that is shown as JSON file.
* @return A {@link Categories} entity that is shown as JSON file.
*/
@Restricted(DoNotUse.class)
public Categories doCategories(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
public Categories doItemCategories(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
Categories categories = new Categories();
int order = 0;
for (TopLevelItemDescriptor descriptor : DescriptorVisibilityFilter.apply(getOwnerItemGroup(), Items.all(Jenkins.getAuthentication(), getOwnerItemGroup()))) {
+1 -1
View File
@@ -3,7 +3,7 @@ var $ = require('jquery-detached').getJQuery();
var getItems = function(){
var d = $.Deferred();
$.get('categories?depth=3').done(
$.get('itemCategories?depth=3').done(
function(data){
d.resolve(data);
}