summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/UI/Web.pm8
-rw-r--r--FS/FS/cust_svc.pm14
-rw-r--r--FS/FS/part_export.pm8
-rw-r--r--FS/FS/part_export/prizm.pm8
-rw-r--r--FS/FS/svc_Common.pm13
5 files changed, 51 insertions, 0 deletions
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 6a97f96dd..e4a9ac1b8 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -149,6 +149,14 @@ sub svc_X_link {
"$ahref$x</A>";
}
+sub svc_export_links {
+ my ($m, $part_svc, $cust_svc) = @_ or return '';
+
+ my $ahref = $cust_svc->export_links;
+
+ join('', @$ahref);
+}
+
sub parse_lt_gt {
my($cgi, $field) = @_;
diff --git a/FS/FS/cust_svc.pm b/FS/FS/cust_svc.pm
index 8eecda3ad..51fc18688 100644
--- a/FS/FS/cust_svc.pm
+++ b/FS/FS/cust_svc.pm
@@ -392,6 +392,20 @@ sub _svc_label {
}
+=item export_links
+
+Returns a list of html elements associated with this services exports.
+
+=cut
+
+sub export_links {
+ my $self = shift;
+ my $svc_x = $self->svc_x
+ or return "can't find ". $self->part_svc->svcdb. '.svcnum '. $self->svcnum;
+
+ $svc_x->export_links;
+}
+
=item svc_x
Returns the FS::svc_XXX object for this service (i.e. an FS::svc_acct object or
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index 6adcab94d..983e0b012 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -359,6 +359,14 @@ sub _export_unsuspend {
$self->_export_replace( $svc_x, $old );
}
+=item export_links SVC_OBJECT ARRAYREF
+
+Adds a list of web elements to ARRAYREF specific to this export and SVC_OBJECT.
+The elements are displayed in the UI to lead the the operator to external
+configuration, monitoring, and similar tools.
+
+=cut
+
=back
=head1 SUBROUTINES
diff --git a/FS/FS/part_export/prizm.pm b/FS/FS/part_export/prizm.pm
index 3ba1b2762..754d428cd 100644
--- a/FS/FS/part_export/prizm.pm
+++ b/FS/FS/part_export/prizm.pm
@@ -463,6 +463,14 @@ sub _export_unsuspend {
'';
}
+sub export_links {
+ my( $self, $svc, $arrayref ) = ( shift, shift, shift );
+
+ push @$arrayref, '<A HREF="http://'. $svc->ip_addr. '">SM</A>';
+
+ '';
+}
+
sub queue_statuschange {
my( $self, $method, $jobs, $svc, @args ) = @_;
diff --git a/FS/FS/svc_Common.pm b/FS/FS/svc_Common.pm
index fd3a46aa6..313029f54 100644
--- a/FS/FS/svc_Common.pm
+++ b/FS/FS/svc_Common.pm
@@ -695,6 +695,19 @@ sub unsuspend {
$self->export('unsuspend');
}
+=item export_links
+
+Runs export_links callbacks and returns the links.
+
+=cut
+
+sub export_links {
+ my $self = shift;
+ my $return = [];
+ $self->export('links', $return);
+ $return;
+}
+
=item export HOOK [ EXPORT_ARGS ]
Runs the provided export hook (i.e. "suspend", "unsuspend") for this service.