From afcc994a843ea65db1bb76b87f72701df33b28e8 Mon Sep 17 00:00:00 2001 From: Roman Dvornov Date: Wed, 17 Apr 2024 19:02:44 +0200 Subject: [PATCH] Don't display module & loc badges for current function --- app/pages/function.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/app/pages/function.js b/app/pages/function.js index 8118895..e734876 100644 --- a/app/pages/function.js +++ b/app/pages/function.js @@ -54,8 +54,14 @@ const descendantTree = { } }, // { view: 'total-time', when: 'children', data: 'totalTime' }, - 'module-badge:node.value', - 'loc-badge:node.value' + { + view: 'context', + when: 'node.value.id != +#.id', + content: [ + 'module-badge:node.value', + 'loc-badge:node.value' + ] + } ] } } @@ -107,8 +113,14 @@ const ancestorsTree = { content: 'text:"Total time – the entire duration spent on the execution of a function. This includes both the \'self time\', which is the time taken by the function itself to execute its own code, and the \'nested time\', which is the time spent on executing all the other functions that are called from within this function"' } }, - 'module-badge:node.value', - 'loc-badge:node.value' + { + view: 'context', + when: 'node.value.id != +#.id', + content: [ + 'module-badge:node.value', + 'loc-badge:node.value' + ] + } ] } }