diff options
Diffstat (limited to 'FS')
| -rw-r--r-- | FS/FS/ClientAPI/MyAccount.pm | 15 | ||||
| -rw-r--r-- | FS/FS/ClientAPI_XMLRPC.pm | 1 | ||||
| -rw-r--r-- | FS/FS/svc_Common.pm | 19 | 
3 files changed, 35 insertions, 0 deletions
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index 0af2c3e19..53e67404c 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -1521,6 +1521,21 @@ sub _customer_svc_x {  } +sub svc_status_html { +  my $p = shift; + +  my($context, $session, $custnum) = _custoragent_session_custnum($p); +  return { 'error' => $session } if $context eq 'error'; + +  my $svc_x = _customer_svc_x( $custnum, $p->{'svcnum'}) +    or return { 'error' => "Service not found" }; + +  my $html = $svc_x->getstatus_html; + +  return { 'html' => $html }; + +} +  sub list_dsl_devices {    my $p = shift; diff --git a/FS/FS/ClientAPI_XMLRPC.pm b/FS/FS/ClientAPI_XMLRPC.pm index 1940ca50e..d7528df67 100644 --- a/FS/FS/ClientAPI_XMLRPC.pm +++ b/FS/FS/ClientAPI_XMLRPC.pm @@ -120,6 +120,7 @@ sub ss2clientapi {    'list_pkgs'                 => 'MyAccount/list_pkgs',     #add to ss (added?)    'list_svcs'                 => 'MyAccount/list_svcs',     #add to ss (added?)    'list_svc_usage'            => 'MyAccount/list_svc_usage',    +  'svc_status_html'           => 'MyAccount/svc_status_html',    'list_dsl_devices'          => 'MyAccount/list_dsl_devices',       'add_dsl_device'            => 'MyAccount/add_dsl_device',       'delete_dsl_device'         => 'MyAccount/delete_dsl_device',    diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm index 3ecff337b..02e159bfa 100644 --- a/FS/FS/svc_Common.pm +++ b/FS/FS/svc_Common.pm @@ -1138,8 +1138,27 @@ sub find_duplicates {    return grep { $conflict_svcparts{$_->cust_svc->svcpart} } @dup;  } +=item getstatus_html +=cut + +sub getstatus_html { +  my $self = shift; + +  my $part_svc = $self->cust_svc->part_svc; + +  my $html = ''; + +  foreach my $export ( grep $_->can('export_getstatus'), $part_svc->part_export ) { +    my $export_html = ''; +    my %hash = (); +    $export->export_getstatus( $self, \$export_html, \%hash ); +    $html .= $export_html; +  } +  $html; + +}  =back  | 
