Setup to extract device types for dropdown
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user