Setup to extract device types for dropdown

This commit is contained in:
2025-02-14 20:02:08 +00:00
parent 8ff23b4775
commit 75aaf42204
2 changed files with 33 additions and 6 deletions

View File

@@ -147,10 +147,10 @@ our $ddb = esmith::DomainsDB->open() || die("Couldn't open Domains db");
my $prefix_data = shift; #Data hash as parameter
my $ret = "";
my $db = $cdb; #maybe one of the others
my $dbkey = 'ChangeThis';
my $dbkey = 'nut';
# To make it write to DB as comment, delete this (regex) string in each if statement "TRUE\) \#copy or perform with value: .* e.g."
if (! TRUE) #copy or perform with value: status e.g. $db->set_prop($dbkey,'status',$c->param('status'),type=>'service'))
if (!$db->set_prop($dbkey,'status',$c->param('status'),type=>'service'))
{$ret .= 'Perform/save failed for status';}
if (! TRUE) #copy or perform with value: Nutmode e.g. $db->set_prop($dbkey,'Nutmode',$c->param('Nutmode'),type=>'service'))
{$ret .= 'Perform/save failed for Nutmode';}
@@ -191,11 +191,11 @@ sub get_model_options {
return ['Error occurred'];
}
# Remove "/usr/sbin" from the front of each line
s{^/usr/sbin}{} for @output;
# Remove "/usr/sbin/" from the front of each line
s{^/usr/sbin/}{} for @output;
# Trim whitespace from each element and return the array
chomp(@output); # Remove newline characters from each line
return ["fred","Art"] #@output; # Return the array of modified output lines
return @output; # Return the array of modified output lines
}
1;
1;