X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_export.pm;h=c0d3c54a2c0c9898b4a385482e11a64ec74062f4;hb=b49c1bd5510a5f10b05bffacc6cc8b6a1b2153e8;hp=16aad6dcd655dfb5e5c4e57e75bfcf20cd4e6365;hpb=083d1fef19686b9b72f1b92e72a4fa56a3f392a9;p=freeside.git diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm index 16aad6dcd..c0d3c54a2 100644 --- a/FS/FS/part_export.pm +++ b/FS/FS/part_export.pm @@ -50,6 +50,8 @@ fields are currently supported: =item exportnum - primary key +=item exportname - Descriptive name + =item machine - Machine name =item exporttype - Export type @@ -159,6 +161,7 @@ sub check { my $self = shift; my $error = $self->ut_numbern('exportnum') + || $self->ut_textn('exportname') || $self->ut_domain('machine') || $self->ut_alpha('exporttype') ; @@ -174,6 +177,17 @@ sub check { $self->SUPER::check; } +=item label + +Returns a label for this export, "exportname||exportype (machine)". + +=cut + +sub label { + my $self = shift; + ($self->exportname || $self->exporttype ). ' ('. $self->machine. ')'; +} + #=item part_svc # #Returns the service definition (see L) for this export. @@ -226,6 +240,17 @@ sub export_svc { qsearch('export_svc', { 'exportnum' => $self->exportnum } ); } +=item export_device + +Returns a list of associated FS::export_device records. + +=cut + +sub export_device { + my $self = shift; + qsearch('export_device', { 'exportnum' => $self->exportnum } ); +} + =item part_export_option Returns all options as FS::part_export_option objects (see @@ -365,6 +390,15 @@ 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. +=item export_getsettings SVC_OBJECT SETTINGS_HASHREF DEFAUTS_HASHREF + +Adds a hashref of settings to SETTINGSREF specific to this export and +SVC_OBJECT. The elements can be displayed in the UI on the service view. + +DEFAULTSREF is a hashref with the same keys where true values indicate the +setting is a default (and thus can be displayed in the UI with less emphasis, +or hidden by default). + =cut =back