Refine and re-write table data interface to contain the custom code in one place

This commit is contained in:
2024-11-16 16:18:26 +00:00
parent 5205daf7ed
commit c8b109378c
3 changed files with 226 additions and 201 deletions

View File

@@ -35,7 +35,7 @@ use SrvMngr qw(theme_list init_session);
use Data::Dumper;
use esmith::util;
use esmith::util::network ;
use esmith::util::network;
use esmith::ConfigDB;
use esmith::AccountsDB;
use esmith::NetworksDB;
@@ -83,7 +83,7 @@ sub main {
#pickup any other contents needed and load them into hash shared with panel
my %returned_hash;
# subroutine returns a hash directly
%returned_hash = get_data_for_panel_${firstPanel}();
%returned_hash = $c->get_data_for_panel_${firstPanel}();
# Copy each key-value pair from the returned hash to the prefix data hash
while (my ($key, $value) = each %returned_hash) {
$$${prefix}_data{$key} = $value;
@@ -253,7 +253,7 @@ sub do_display {
# pickup any other contents needed and load them into hash shared with panel
my %returned_hash;
# subroutine returns a hash directly
%returned_hash = get_data_for_panel_${panel}();
%returned_hash = $c->get_data_for_panel_${panel}();
# Copy each key-value pair from the returned hash to the prefix data hash
while (my ($key, $value) = each %returned_hash) {
$$${prefix}_data{$key} = $value;