Changeset 852 for trunk/cgi-bin


Ignore:
Timestamp:
04/13/16 18:18:54 (9 years ago)
Author:
Kris Deugau
Message:

/trunk

Add an RPC sub to export a list of "devices to be backed up" per long-ago
request

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/cgi-bin/ipdb-rpc.cgi

    r851 r852  
    8888        'ipdb.getCityList'      => \&rpc_getCityList,
    8989        'ipdb.getAvailableStatics'      => \&rpc_getAvailableStatics,
     90        'ipdb.getBackupList'    => \&rpc_getBackupList,
    9091};
    9192
     
    409410  return $ret;
    410411} # rpc_getAvailableStatics()
     412
     413
     414sub rpc_getBackupList {
     415  my %args = @_;
     416
     417  _commoncheck(\%args, 'n');
     418
     419  # grab the whole waffle.
     420  my $sql = "SELECT backup_id, bkbrand, bkmodel, bktype, bkport, bksrc, bkuser, bkvpass, bkepass, ip FROM backuplist";
     421  my $result = $ip_dbh->selectall_arrayref($sql, { Slice => {} });
     422  die $ip_dbh->errstr if !$result;
     423
     424  return $result;
     425} # rpc_getBackupList()
Note: See TracChangeset for help on using the changeset viewer.