Added: option for modules to manipulate KPI data

This commit is contained in:
Shreesh Arora
2024-06-03 19:52:39 +05:30
parent d97c22d7af
commit d390dd5fdf
11 changed files with 151 additions and 159 deletions

View File

@@ -1333,7 +1333,7 @@ class AdminModulesControllerCore extends AdminController
$helper->color = 'color1';
$helper->title = $this->l('Installed Modules', null, null, false);
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=installed_modules';
$kpis[] = $helper;
$this->kpis[] = $helper;
$helper = new HelperKpi();
$helper->id = 'box-disabled-modules';
@@ -1341,7 +1341,7 @@ class AdminModulesControllerCore extends AdminController
$helper->color = 'color2';
$helper->title = $this->l('Disabled Modules', null, null, false);
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=disabled_modules';
$kpis[] = $helper;
$this->kpis[] = $helper;
$helper = new HelperKpi();
$helper->id = 'box-update-modules';
@@ -1349,15 +1349,9 @@ class AdminModulesControllerCore extends AdminController
$helper->color = 'color3';
$helper->title = $this->l('Modules to Update', null, null, false);
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=update_modules';
$kpis[] = $helper;
$this->kpis[] = $helper;
Hook::exec('action'.$this->controller_name.'KPIListingModifier', array(
'kpis' => &$kpis,
));
$helper = new HelperKpiRow();
$helper->kpis = $kpis;
return $helper->generate();
return parent::renderKpis();
}
public function initModal()