diff --git a/VERSIONS_WIP/50182 b/VERSIONS_WIP/50182 index e08c1484ab9964625d450edcae55805642326d6f..e61d1ba23a31a4870fa93d0080b428f902d89582 100644 --- a/VERSIONS_WIP/50182 +++ b/VERSIONS_WIP/50182 @@ -1 +1 @@ - - ticket #50182 : 10/55 Seaside : meilleur reporting poker 1 : génération du rapport HTML dans Bokeh + JSON \ No newline at end of file + - ticket #50182 : ajout d'un rapport html + json sur l'état du portail: intégrations, connecteurs, communication SIGB \ No newline at end of file diff --git a/application/modules/admin/controllers/SystemeController.php b/application/modules/admin/controllers/SystemeController.php index 0490ec34a6ae5a600962dba729bf3b2ab2beb5ee..e5089697706eefdb9b3ada1e08f73f05f67d31cf 100644 --- a/application/modules/admin/controllers/SystemeController.php +++ b/application/modules/admin/controllers/SystemeController.php @@ -303,7 +303,7 @@ class Admin_SystemeController extends Zend_Controller_Action { public function statusAction() { - $this->view->titre = $this->_('Vue d\'ensemble'); + $this->view->titre = $this->_('Etat du système'); } } ?> \ No newline at end of file diff --git a/library/Class/AdminVar.php b/library/Class/AdminVar.php index 2a9d6f7accef88773f6d0adbc20fe45c73b2756f..322ebeedbdb385c51efd05dee281199f10fed09f 100644 --- a/library/Class/AdminVar.php +++ b/library/Class/AdminVar.php @@ -22,9 +22,6 @@ class Class_AdminVarLoader extends Storm_Model_Loader { use Trait_Translator; - const HARVEST = "HARVEST"; - const SSO = "SSO"; - /** @var array */ protected $all_vars; @@ -665,10 +662,6 @@ class Class_AdminVarLoader extends Storm_Model_Loader { } - public function isHarvested($numeric_resource_name) { - return (class_exists('Class_WebService_BibNumerique_'.$numeric_resource_name)); - } - /** * @return bool */ diff --git a/library/Class/Systeme/Report.php b/library/Class/Systeme/Report.php index 0d15562a709c36e6ba0f7e0fb3664223f33f5bce..adb13dd86acc502e5f024292103d0891c556f8c0 100644 --- a/library/Class/Systeme/Report.php +++ b/library/Class/Systeme/Report.php @@ -163,8 +163,8 @@ class Class_Systeme_Report_Ils extends Class_Systeme_Report_Abstract { class Class_Systeme_Report_DigitalConnectors extends Class_Systeme_Report_Abstract { public function acceptVisitor($visitor) { - $visitor->visitRecordHeader(['label' => $this->_('Label'), - 'enabled' => $this->_('Activation'), + $visitor->visitRecordHeader(['label' => $this->_('Libellé'), + 'enabled' => $this->_('Activé'), 'features' => $this->_('Fonctionnalités'), 'album_count' => $this->_('Nombre d\'albums')]); @@ -174,15 +174,16 @@ class Class_Systeme_Report_DigitalConnectors extends Class_Systeme_Report_Abstra protected function _reportConnector($visitor, $description) { - $album_count = 0; + $record = ['code' => $description['code'], + 'label' => $description['label'], + 'enabled' => $description['enabled'] ? '1' : '0', + 'features' => $description['features']]; + if ($description['doctype_id'] && in_array('HARVEST', $description['features'])) - $album_count = Class_Album::countBy(['type_doc_id' => $description['doctype_id']]); + $record['album_count'] = Class_Album::countBy(['type_doc_id' => $description['doctype_id']]); - if ($description['enabled'] || $album_count) - $visitor->visitRecordValues(['label' => $description['label'], - 'enabled' => $description['enabled'] ? '1' : '0', - 'features' => $description['features'], - 'album_count' => $album_count]); + if ($description['enabled'] || isset($record['album_count'])) + $visitor->visitRecordValues($record); } } diff --git a/library/Class/WebService/Redmine.php b/library/Class/WebService/Redmine.php index 02413d2250815c2e017d572c6b997318d3634586..daa11a004ac154787da22d2b59b08fa2076791c7 100644 --- a/library/Class/WebService/Redmine.php +++ b/library/Class/WebService/Redmine.php @@ -19,7 +19,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ - class Class_WebService_Redmine extends Class_WebService_Abstract { +class Class_WebService_Redmine extends Class_WebService_Abstract { use Trait_Translator; const CUSTOM_PRIORITY_ID = 5; diff --git a/library/ZendAfi/View/Helper/Status/Abstract.php b/library/ZendAfi/View/Helper/Status/Abstract.php index 079aa0add6da2ab27bd18ce9310a6bc7bd6387fd..5aea83504b7224fb4d25584636ba28d1b6466b21 100644 --- a/library/ZendAfi/View/Helper/Status/Abstract.php +++ b/library/ZendAfi/View/Helper/Status/Abstract.php @@ -23,5 +23,14 @@ abstract class ZendAfi_View_Helper_Status_Abstract extends ZendAfi_View_Helper_BaseHelper { use Trait_TimeSource; + abstract public function visitSection($id, $label, $section); + abstract public function visitData($id, $label, $value); + abstract public function visitDatetime($id, $label, $value); + abstract public function visitDataArray($id, $label, $values); + abstract public function visitAlert($id, $label, $unit, $value); + abstract public function visitCounter($id, $label, $count); + abstract public function visitRecordHeader($headers); + abstract public function visitRecordValues($values); + } ?> \ No newline at end of file diff --git a/public/admin/skins/retro/global.css b/public/admin/skins/retro/global.css index 5dbd764f409c680a56c1857e00d34d05d8bf6473..8e5639fac054e4cc65512823af4dafe3a83704dc 100755 --- a/public/admin/skins/retro/global.css +++ b/public/admin/skins/retro/global.css @@ -498,6 +498,15 @@ div.boutons .bouton { padding-left: 1em; } + +.modules .digital_connectors div.enabled { + background-color: #59e625; + width: 200px; + padding: 5px; + text-align: center; +} + + .pager { text-align: center; margin-top: 5px; diff --git a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php index 4b6919382b3c70cdb455ff571c4664d0dd8178b6..87a988ca5ff17d2c6edb45c6aa8163ff8f4696e9 100644 --- a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php +++ b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php @@ -366,29 +366,7 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes "label" => "SoundCloud", "enabled" => false, "features" => ["HARVEST"], - ], - $this->_report['digital_connectors']); - } - - - /** @test */ - public function BabelioShouldBeDisabled() { - $this->assertContains(["code" => "BABELIO", - "label" => "Babelthèque", - "enabled" => false, - "features" => ["EMBEDED"], - ], - $this->_report['digital_connectors']); - } - - - - /** @test */ - public function EuropressShouldBeDisabled() { - $this->assertContains(["code" => "EUROPRESSE", - "label" => "Europresse", - "enabled" => '', - "features" => [], + "album_count" => 0 ], $this->_report['digital_connectors']); }