From 35230f01ff9c8f38ba87048fb4d85cae37b241bf Mon Sep 17 00:00:00 2001 From: Don Henton Date: Fri, 8 Sep 2017 11:56:22 -0500 Subject: [PATCH] sort list now contains the documentation --- .../mountebank-UI/sections/home/homePage.ctl.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/public_html/mountebank-UI/sections/home/homePage.ctl.js b/public_html/mountebank-UI/sections/home/homePage.ctl.js index 09a9f55..f5a2fbd 100644 --- a/public_html/mountebank-UI/sections/home/homePage.ctl.js +++ b/public_html/mountebank-UI/sections/home/homePage.ctl.js @@ -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 = @@ -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 ; + }; });