Skip to content

Commit

Permalink
sort list now contains the documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
donhenton authored and Donaby Henton committed Sep 8, 2017
1 parent 9363941 commit 35230f0
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion public_html/mountebank-UI/sections/home/homePage.ctl.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ angular.module('myApp')
var sortItems = [];
angular.forEach(vm.buffer.data.imposters, function (data, idx) {

sortItems.push({"value": idx, "ref": angular.copy(data), "text": vm.composeImposterAlias(idx)});
sortItems.push({"value": idx, "ref": angular.copy(data), "text": vm.composeSortAlias(idx)});
});

var modalInstance =
Expand Down Expand Up @@ -348,6 +348,21 @@ angular.module('myApp')

return "Item "+(idx+1) +" (" +verb+")";
};


vm.composeSortAlias = function(idx)
{
var verb = vm.buffer.data.imposters[idx].match.verb;
if (vm.buffer.data.imposters[idx].match.injection.use)
{
verb = "INJ";
}

var labelText = vm.buffer.data.imposters[idx].documentation;


return "(" +verb+")\n"+labelText ;
};


});

0 comments on commit 35230f0

Please sign in to comment.