summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--FS/FS.pm3
-rw-r--r--FS/FS/export_svc.pm123
-rw-r--r--FS/FS/part_export.pm89
-rw-r--r--FS/FS/part_svc.pm9
-rw-r--r--FS/MANIFEST2
-rw-r--r--FS/t/export_svc.t5
-rw-r--r--README.1.4.0pre1211
-rwxr-xr-xbin/fs-setup15
-rw-r--r--bin/sqlradius_reset8
-rwxr-xr-xhttemplate/browse/part_export.cgi42
-rwxr-xr-xhttemplate/browse/part_svc.cgi25
-rw-r--r--httemplate/docs/schema.html7
-rw-r--r--httemplate/docs/upgrade8.html10
-rw-r--r--httemplate/edit/part_export.cgi39
-rw-r--r--httemplate/edit/process/part_export.cgi3
-rw-r--r--httemplate/index.html2
-rwxr-xr-xhttemplate/misc/delete-part_export.cgi2
17 files changed, 301 insertions, 94 deletions
diff --git a/FS/FS.pm b/FS/FS.pm
index 60831ec..36fabcb 100644
--- a/FS/FS.pm
+++ b/FS/FS.pm
@@ -57,6 +57,9 @@ L<FS::part_svc> - Service definition class
L<FS::part_svc_column> - Column constraint class
+L<FS::export_svc> - Class linking service definitions (see L<FS::part_svc>)
+with exports (see L<FS::part_export>)
+
L<FS::part_export> - External provisioning export class
L<FS::part_export_option> - Export option class
diff --git a/FS/FS/export_svc.pm b/FS/FS/export_svc.pm
new file mode 100644
index 0000000..da9ac69
--- /dev/null
+++ b/FS/FS/export_svc.pm
@@ -0,0 +1,123 @@
+package FS::export_svc;
+
+use strict;
+use vars qw( @ISA );
+use FS::Record qw( qsearch qsearchs );
+use FS::part_export;
+use FS::part_svc;
+
+@ISA = qw(FS::Record);
+
+=head1 NAME
+
+FS::export_svc - Object methods for export_svc records
+
+=head1 SYNOPSIS
+
+ use FS::export_svc;
+
+ $record = new FS::export_svc \%hash;
+ $record = new FS::export_svc { 'column' => 'value' };
+
+ $error = $record->insert;
+
+ $error = $new_record->replace($old_record);
+
+ $error = $record->delete;
+
+ $error = $record->check;
+
+=head1 DESCRIPTION
+
+An FS::export_svc object links a service definition (see L<FS::part_svc>) to
+an export (see L<FS::part_export>). FS::export_svc inherits from FS::Record.
+The following fields are currently supported:
+
+=over 4
+
+=item exportsvcnum - primary key
+
+=item exportnum - export (see L<FS::part_export>)
+
+=item svcpart - service definition (see L<FS::part_svc>)
+
+=back
+
+=head1 METHODS
+
+=over 4
+
+=item new HASHREF
+
+Creates a new record. To add the record to the database, see L<"insert">.
+
+Note that this stores the hash reference, not a distinct copy of the hash it
+points to. You can ask the object for a copy with the I<hash> method.
+
+=cut
+
+# the new method can be inherited from FS::Record, if a table method is defined
+
+sub table { 'export_svc'; }
+
+=item insert
+
+Adds this record to the database. If there is an error, returns the error,
+otherwise returns false.
+
+=cut
+
+# the insert method can be inherited from FS::Record
+
+=item delete
+
+Delete this record from the database.
+
+=cut
+
+# the delete method can be inherited from FS::Record
+
+=item replace OLD_RECORD
+
+Replaces the OLD_RECORD with this one in the database. If there is an error,
+returns the error, otherwise returns false.
+
+=cut
+
+# the replace method can be inherited from FS::Record
+
+=item check
+
+Checks all fields to make sure this is a valid record. If there is
+an error, returns the error, otherwise returns false. Called by the insert
+and replace methods.
+
+=cut
+
+# the check method should currently be supplied - FS::Record contains some
+# data checking routines
+
+sub check {
+ my $self = shift;
+
+ $self->ut_numbern('exportsvcnum')
+ || $self->ut_number('exportnum')
+ || $self->ut_foreign_key('exportnum', 'part_export', 'exportnum')
+ || $self->ut_number('svcpart')
+ || $self->ut_foreign_key('svcpart', 'part_svc', 'svcpart')
+ ;
+}
+
+=back
+
+=head1 BUGS
+
+=head1 SEE ALSO
+
+L<FS::part_export>, L<FS::part_svc>, L<FS::Record>, schema.html from the base
+documentation.
+
+=cut
+
+1;
+
diff --git a/FS/FS/part_export.pm b/FS/FS/part_export.pm
index a43c384..8af413b 100644
--- a/FS/FS/part_export.pm
+++ b/FS/FS/part_export.pm
@@ -5,6 +5,7 @@ use vars qw( @ISA );
use FS::Record qw( qsearch qsearchs dbh );
use FS::part_svc;
use FS::part_export_option;
+use FS::export_svc;
@ISA = qw(FS::Record);
@@ -19,7 +20,7 @@ FS::part_export - Object methods for part_export records
$record = new FS::part_export \%hash;
$record = new FS::part_export { 'column' => 'value' };
- ($new_record, $options) = $template_recored->clone( $svcpart );
+ #($new_record, $options) = $template_recored->clone( $svcpart );
$error = $record->insert( { 'option' => 'value' } );
$error = $record->insert( \%options );
@@ -40,8 +41,6 @@ fields are currently supported:
=item exportnum - primary key
-=item svcpart - Service definition (see L<FS::part_svc>) to which this export applies
-
=item machine - Machine name
=item exporttype - Export type
@@ -67,27 +66,29 @@ points to. You can ask the object for a copy with the I<hash> method.
sub table { 'part_export'; }
-=item clone SVCPART
-
-An alternate constructor. Creates a new export by duplicating an existing
-export. The given svcpart is assigned to the new export.
-
-Returns a list consisting of the new export object and a hashref of options.
-
=cut
-sub clone {
- my $self = shift;
- my $class = ref($self);
- my %hash = $self->hash;
- $hash{'exportnum'} = '';
- $hash{'svcpart'} = shift;
- ( $class->new( \%hash ),
- { map { $_->optionname => $_->optionvalue }
- qsearch('part_export_option', { 'exportnum' => $self->exportnum } )
- }
- );
-}
+#=item clone SVCPART
+#
+#An alternate constructor. Creates a new export by duplicating an existing
+#export. The given svcpart is assigned to the new export.
+#
+#Returns a list consisting of the new export object and a hashref of options.
+#
+#=cut
+#
+#sub clone {
+# my $self = shift;
+# my $class = ref($self);
+# my %hash = $self->hash;
+# $hash{'exportnum'} = '';
+# $hash{'svcpart'} = shift;
+# ( $class->new( \%hash ),
+# { map { $_->optionname => $_->optionvalue }
+# qsearch('part_export_option', { 'exportnum' => $self->exportnum } )
+# }
+# );
+#}
=item insert HASHREF
@@ -173,6 +174,14 @@ sub delete {
}
}
+ foreach my $export_svc ( $self->export_svc ) {
+ my $error = $export_svc->delete;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+
$dbh->commit or die $dbh->errstr if $oldAutoCommit;
'';
@@ -258,13 +267,11 @@ sub check {
my $error =
$self->ut_numbern('exportnum')
|| $self->ut_domain('machine')
- || $self->ut_number('svcpart')
|| $self->ut_alpha('exporttype')
;
return $error if $error;
- return "Unknown svcpart: ". $self->svcpart
- unless qsearchs( 'part_svc', { 'svcpart' => $self->svcpart } );
+ warn $self->machine. "!!!\n";
$self->machine =~ /^([\w\-\.]*)$/
or return "Illegal machine: ". $self->machine;
@@ -273,20 +280,39 @@ sub check {
$self->nodomain =~ /^(Y?)$/ or return "Illegal nodomain: ". $self->nodomain;
$self->nodomain($1);
+ $self->deprecated(1); #BLAH
+
#check exporttype?
''; #no error
}
-=item part_svc
+#=item part_svc
+#
+#Returns the service definition (see L<FS::part_svc>) for this export.
+#
+#=cut
+#
+#sub part_svc {
+# my $self = shift;
+# qsearchs('part_svc', { svcpart => $self->svcpart } );
+#}
+
+sub part_svc {
+ use Carp;
+ croak "FS::part_export::part_svc deprecated";
+ #confess "FS::part_export::part_svc deprecated";
+}
+
+=item export_svc
-Returns the service definition (see L<FS::part_svc>) for this export.
+Returns a list of associated FS::export_svc records.
=cut
-sub part_svc {
+sub export_svc {
my $self = shift;
- qsearchs('part_svc', { svcpart => $self->svcpart } );
+ qsearch('export_svc', { 'exportnum' => $self->exportnum } );
}
=item part_export_option
@@ -413,9 +439,12 @@ Probably.
Hmm... cust_export class (not necessarily a database table...) ... ?
+deprecated column...
+
=head1 SEE ALSO
-L<FS::part_export_option>, L<FS::part_svc>, L<FS::svc_acct>, L<FS::svc_domain>,
+L<FS::part_export_option>, L<FS::export_svc>, L<FS::svc_acct>,
+L<FS::svc_domain>,
L<FS::svc_forward>, L<FS::Record>, schema.html from the base documentation.
=cut
diff --git a/FS/FS/part_svc.pm b/FS/FS/part_svc.pm
index 7ef996f..959a3f8 100644
--- a/FS/FS/part_svc.pm
+++ b/FS/FS/part_svc.pm
@@ -5,6 +5,7 @@ use vars qw( @ISA );
use FS::Record qw( qsearch qsearchs fields dbh );
use FS::part_svc_column;
use FS::part_export;
+use FS::export_svc;
@ISA = qw(FS::Record);
@@ -316,15 +317,15 @@ sub all_part_svc_column {
sub part_export {
my $self = shift;
- my %search = ( 'svcpart' => $self->svcpart );
- qsearch('part_export', \%search);
+ map { qsearchs('part_export', { 'exportnum' => $_->exportnum } ) }
+ qsearch('export_svc', { 'svcpart' => $self->svcpart } );
}
=back
=head1 VERSION
-$Id: part_svc.pm,v 1.12 2002-03-26 13:58:29 ivan Exp $
+$Id: part_svc.pm,v 1.13 2002-04-11 22:05:31 ivan Exp $
=head1 BUGS
@@ -333,6 +334,8 @@ Delete is unimplemented.
The list of svc_* tables is hardcoded. When svc_acct_pop is renamed, this
should be fixed.
+all_part_svc_column and part_export methods should be documented
+
=head1 SEE ALSO
L<FS::Record>, L<FS::part_svc_column>, L<FS::part_pkg>, L<FS::pkg_svc>,
diff --git a/FS/MANIFEST b/FS/MANIFEST
index dd9eb09..440c755 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -45,6 +45,7 @@ FS/cust_refund.pm
FS/cust_credit_refund.pm
FS/cust_svc.pm
FS/part_bill_event.pm
+FS/export_svc.pm
FS/part_export.pm
FS/part_export_option.pm
FS/part_export/infostreet.pm
@@ -97,6 +98,7 @@ t/cust_svc.t
t/domain_record.t
t/nas.t
t/part_bill_event.t
+t/export_svc.t
t/part_export.t
t/part_export_option.t
t/part_export-infostreet.t
diff --git a/FS/t/export_svc.t b/FS/t/export_svc.t
new file mode 100644
index 0000000..773c5de
--- /dev/null
+++ b/FS/t/export_svc.t
@@ -0,0 +1,5 @@
+BEGIN { $| = 1; print "1..1\n" }
+END {print "not ok 1\n" unless $loaded;}
+use FS::export_svc;
+$loaded=1;
+print "ok 1\n";
diff --git a/README.1.4.0pre12 b/README.1.4.0pre12
index ea1f952..e8fdd30 100644
--- a/README.1.4.0pre12
+++ b/README.1.4.0pre12
@@ -32,6 +32,17 @@ CREATE TABLE msgcat (
);
CREATE INDEX msgcat1 ON msgcat ( msgcode, locale );
+CREATE TABLE export_svc (
+ exportsvcnum int primary key,
+ exportnum int not null,
+ svcpart int not null
+);
+CREATE UNIQUE INDEX export_svc1 ON export_svc ( exportnum, svcpart );
+CREATE INDEX export_svc2 ON export_svc ( exportnum );
+CREATE INDEX export_svc3 ON export_svc ( svcpart );
+
+ALTER TABLE part_export RENAME svcpart TO deprecated;
+
Run bin/dbdef-create
Run bin/create-history-tables
diff --git a/bin/fs-setup b/bin/fs-setup
index 2da0431..5354088 100755
--- a/bin/fs-setup
+++ b/bin/fs-setup
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# $Id: fs-setup,v 1.86 2002-04-10 08:39:47 ivan Exp $
+# $Id: fs-setup,v 1.87 2002-04-11 22:05:31 ivan Exp $
#to delay loading dbdef until we're ready
BEGIN { $FS::Record::setup_hack = 1; }
@@ -927,10 +927,21 @@ sub tables_hash_hack {
'index' => [ [ 'jobnum' ] ],
},
+ 'export_svc' => {
+ 'columns' => [
+ 'exportsvcnum' => 'int', '', '',
+ 'exportnum' => 'int', '', '',
+ 'svcpart' => 'int', '', '',
+ ]
+ 'primary_key' => 'exportsvcnum',
+ 'unique' => [ [ 'exportnum', 'svcpart' ] ],
+ 'index' => [ [ 'exportnum' ], [ 'svcpart' ] ],
+ },
+
'part_export' => {
'columns' => [
'exportnum', 'int', '', '',
- 'svcpart', 'int', '', '',
+ #'svcpart', 'int', '', '',
'machine', 'varchar', '', $char_d,
'exporttype', 'varchar', '', $char_d,
'nodomain', 'char', 'NULL', 1,
diff --git a/bin/sqlradius_reset b/bin/sqlradius_reset
index da98fe6..454043f 100644
--- a/bin/sqlradius_reset
+++ b/bin/sqlradius_reset
@@ -25,9 +25,15 @@ foreach my $export ( @exports ) {
}
foreach my $export ( @exports ) {
+
+ #my @svcparts = map { $_->svcpart } $export->export_svc;
+
my @svc_acct =
map { qsearchs('svc_acct', { 'svcnum' => $_->svcnum } ) }
- qsearch('cust_svc', { 'svcpart' => $export->part_svc->svcpart } );
+ map { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
+ grep { qsearch('cust_svc', { 'svcpart' => $_->svcpart } ) }
+ $export->export_svc;
+
foreach my $svc_acct ( @svc_acct ) {
#false laziness with FS::svc_acct::insert (like it matters)
diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi
new file mode 100755
index 0000000..e9d9fa3
--- /dev/null
+++ b/httemplate/browse/part_export.cgi
@@ -0,0 +1,42 @@
+<!-- mason kludge -->
+<%= header("Export Listing", menubar( 'Main Menu' => $p )) %>
+Provisioning services to external machines, databases and APIs.<BR><BR>
+
+<SCRIPT>
+function part_export_areyousure(href) {
+ if (confirm("Are you sure you want to delete this export?") == true)
+ window.location.href = href;
+}
+</SCRIPT>
+
+<%= table() %>
+ <TR>
+ <TH COLSPAN=2>Export</TH>
+ <TH>Options</TH>
+ </TR>
+
+<% foreach my $part_export ( sort {
+ $a->getfield('exportnum') <=> $b->getfield('exportnum')
+ } qsearch('part_export',{}) ) {
+%>
+ <TR>
+ <TD><A HREF="<%= $p %>edit/part_export.cgi?<%= $part_export->exportnum %>"><%= $part_export->exportnum %></A></TD>
+ <TD><%= $part_export->exporttype %> to <%= $part_export->machine %> (<A HREF="<%= $p %>edit/part_export.cgi?<%= $part_export->exportnum %>">edit</A>&nbsp;|&nbsp;<A HREF="javascript:part_export_areyousure('<%= $p %>misc/delete-part_export.cgi?<%= $part_export->exportnum %>')">delete</A>)</TD>
+ <TD>
+ <%= itable() %>
+ <% my %opt = $part_export->options;
+ foreach my $opt ( keys %opt ) { %>
+ <TR><TD><%= $opt %></TD><TD><%= $opt{$opt} %></TD></TR>
+ <% } %>
+ </TABLE>
+ </TD>
+ </TR>
+
+<% } %>
+
+ <TR>
+ <TD COLSPAN=3><A HREF="<%= $p %>edit/part_export.cgi"><I>Add a new export</I></A></TD>
+ </TR>
+</TABLE>
+</BODY>
+</HTML>
diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi
index 250b1ff..c8adebc 100755
--- a/httemplate/browse/part_svc.cgi
+++ b/httemplate/browse/part_svc.cgi
@@ -70,31 +70,8 @@ function part_export_areyousure(href) {
foreach my $part_export ( @part_export ) {
%>
<TR>
- <TD><%= $part_export->exporttype %> to <%= $part_export->machine %> (<A HREF="<%= $p %>edit/part_export.cgi?<%= $part_export->exportnum %>">edit</A>&nbsp;|&nbsp;<A HREF="javascript:part_export_areyousure('<%= $p %>misc/delete-part_export.cgi?<%= $part_export->exportnum %>')">delete</A>)</TD>
- <TD>
- <%= itable() %>
- <% my %opt = $part_export->options;
- foreach my $opt ( keys %opt ) { %>
- <TR><TD><%= $opt %></TD><TD><%= $opt{$opt} %></TD></TR>
- <% } %>
- </TABLE>
- </TD>
+ <TD><A HREF="<%= $p %>edit/part_export.cgi?<%= $part_export->exportnum %>"><%= $part_export->exporttype %> to <%= $part_export->machine %></A></TD></TR>
<% } %>
- </TR><TR><TD COLSPAN=2><A HREF="<%= $p %>edit/part_export.cgi?new_with_svcpart=<%= $part_svc->svcpart %>"><I>Add a new export</I></A></TD></TR>
-<% if (@part_export) { %>
- <TR><TD COLSPAN=2>
- <FORM METHOD="POST" ACTION="<%= $p %>edit/part_export.cgi">
- <INPUT TYPE="hidden" NAME="svcpart" VALUE="<%= $part_svc->svcpart %>">
- <SELECT NAME="clone"><OPTION></OPTION>
-<% foreach my $part_export ( @part_export ) { %>
- <OPTION VALUE="<%= $part_export->exportnum %>">
- <%= $part_export->exporttype %> to <%= $part_export->machine %>
- </OPTION>
-<% } %>
- </SELECT>
- <INPUT TYPE="submit" VALUE="clone existing export">
- </FORM></TD></TR>
-<% } %>
</TABLE></TD>
<% my($n1)='';
diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html
index a7c21c7..6ed96d2 100644
--- a/httemplate/docs/schema.html
+++ b/httemplate/docs/schema.html
@@ -256,10 +256,15 @@
<li>svcpart - <a href="#part_svc">Service definition</a>
<li>quantity - quantity of this service that this package includes
</ul>
+ <li><a name="export_svc" href="man/FS/export_svc.html">export_svc</a>
+ <ul>
+ <li>exportsvcnum - primary key
+ <li>svcpart - <a href="#part_svc">Service definition</a>
+ <li>exportnum - <a href="#exportnum">Export</a>
+ </ul>
<li><a name="part_export" href="man/FS/part_export.html">part_export</a> - Export to external provisioning
<ul>
<li>exportnum - primary key
- <li>svcpart - <a href="#part_svc">Service definition</a>
<li>machine - Machine name
<li>exporttype - Export type
<li>nodomain - blank or Y: usernames are exported to this service with no domain
diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html
index d1b13fe..841a053 100644
--- a/httemplate/docs/upgrade8.html
+++ b/httemplate/docs/upgrade8.html
@@ -152,9 +152,17 @@ CREATE TABLE part_bill_event (
);
CREATE INDEX part_bill_event1 ON part_bill_event ( payby );
+CREATE TABLE export_svc (
+ exportsvcnum int primary key,
+ exportnum int not null,
+ svcpart int not null
+);
+CREATE UNIQUE INDEX export_svc1 ON export_svc ( exportnum, svcpart );
+CREATE INDEX export_svc2 ON export_svc ( exportnum );
+CREATE INDEX export_svc3 ON export_svc ( svcpart );
+
CREATE TABLE part_export (
exportnum int primary key,
- svcpart int not null,
machine varchar(80) not null,
exporttype varchar(80) not null,
nodomain char(1) NULL
diff --git a/httemplate/edit/part_export.cgi b/httemplate/edit/part_export.cgi
index 0ca964e..f312740 100644
--- a/httemplate/edit/part_export.cgi
+++ b/httemplate/edit/part_export.cgi
@@ -6,34 +6,18 @@
#} else {
# $cgi->param('clone', '');
#}
-#if ( $cgi->param('svcpart') && $cgi->param('svcpart') =~ /^(\d+)$/ ) {
-# $cgi->param('svcpart', $1);
-#} else {
-# $cgi->param('svcpart', '');
-#}
my($query) = $cgi->keywords;
my $action = '';
my $part_export = '';
-my $options = {};
if ( $cgi->param('error') ) {
$part_export = new FS::part_export ( {
map { $_, scalar($cgi->param($_)) } fields('part_export')
} );
-}
-
-#warn "***$query***";
-if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) {
- $action = 'Add';
- my $old_part_export = qsearchs('part_export', { 'exportnum' => $1 } );
- unless ( $part_export ) {
- ($part_export, $options) = $old_part_export->clone($cgi->param('svcpart'));
- }
-} elsif ( $cgi->param('new_with_svcpart')
- && $cgi->param('new_with_svcpart') =~ /^(\d+)$/ ) {
- $part_export ||= new FS::part_export ( { 'svcpart' => $1 } );
} elsif ( $query =~ /^(\d+)$/ ) {
- $part_export ||= qsearchs('part_export', { 'exportnum' => $1 } );
+ $part_export = qsearchs('part_export', { 'exportnum' => $1 } );
+} else {
+ $part_export = new FS::part_export;
}
$action ||= $part_export->exportnum ? 'Edit' : 'Add';
@@ -101,18 +85,20 @@ my %exports = (
);
-my $svcdb = $part_export->part_svc->svcdb;
+#my $svcdb = $part_export->part_svc->svcdb;
+#YUCK
+my $svcdb = 'svc_acct';
+
my %layers = map { $_ => "$_ - ". $exports{$svcdb}{$_}{desc} }
keys %{$exports{$svcdb}};
$layers{''}='';
my $widget = new HTML::Widgets::SelectLayers(
'selected_layer' => $part_export->exporttype,
- 'selected_layer' => $part_export->exporttype,
'options' => \%layers,
'form_name' => 'dummy',
'form_action' => 'process/part_export.cgi',
- 'form_text' => [qw( exportnum svcpart machine )],
+ 'form_text' => [qw( exportnum machine )],
# 'form_checkbox' => [qw()],
'html_between' => "</TD></TR></TABLE>\n",
'layer_callback' => sub {
@@ -123,7 +109,7 @@ my $widget = new HTML::Widgets::SelectLayers(
# foreach my $option ( qw(url login password groupID ) ) {
my $optinfo = $exports{$svcdb}->{$layer}{options}{$option};
my $label = $optinfo->{label};
- my $value = $part_export->option($option);
+ my $value = $cgi->param($option) || $part_export->option($option);
$html .= qq!<TR><TD ALIGN="right">$label</TD><TD>!.
qq!<TD><INPUT TYPE="text" NAME="$option" VALUE="$value"></TD>!.
'</TR>';
@@ -160,13 +146,6 @@ my $widget = new HTML::Widgets::SelectLayers(
<%= ntable("#cccccc",2) %>
<TR>
- <TD ALIGN="right">Service</TD>
- <TD BGCOLOR="#ffffff">
- <%= $part_export->svcpart %> - <%= $part_export->part_svc->svc %>
- <INPUT TYPE="hidden" NAME="svcpart" VALUE="<%= $part_export->svcpart %>">
- </TD>
-</TR>
-<TR>
<TD ALIGN="right">Export host</TD>
<TD>
<INPUT TYPE="text" NAME="machine" VALUE="<%= $part_export->machine %>">
diff --git a/httemplate/edit/process/part_export.cgi b/httemplate/edit/process/part_export.cgi
index d0c87a0..34eb699 100644
--- a/httemplate/edit/process/part_export.cgi
+++ b/httemplate/edit/process/part_export.cgi
@@ -18,6 +18,7 @@ my $error;
if ( $exportnum ) {
warn $old;
warn $exportnum;
+ warn $new->machine;
$error = $new->replace($old,\%options);
} else {
$error = $new->insert(\%options);
@@ -28,7 +29,7 @@ if ( $error ) {
$cgi->param('error', $error );
print $cgi->redirect(popurl(2). "part_export.cgi?". $cgi->query_string );
} else {
- print $cgi->redirect(popurl(3). "browse/part_svc.cgi");
+ print $cgi->redirect(popurl(3). "browse/part_export.cgi");
}
%>
diff --git a/httemplate/index.html b/httemplate/index.html
index 99d8df9..c638aec 100644
--- a/httemplate/index.html
+++ b/httemplate/index.html
@@ -167,6 +167,8 @@
<ul>
<LI><A HREF="browse/part_svc.cgi">View/Edit service definitions</A>
- Services are items you offer to your customers.
+ <LI><A HREF="browse/part_export.cgi">View/Edit exports</A>
+ - Provisioning services to external machines, databases and APIs.
<LI><A HREF="browse/part_pkg.cgi">View/Edit package definitions</A>
- One or more services are grouped together into a package and
given pricing information. Customers purchase packages, not
diff --git a/httemplate/misc/delete-part_export.cgi b/httemplate/misc/delete-part_export.cgi
index a5166d9..34ef06b 100755
--- a/httemplate/misc/delete-part_export.cgi
+++ b/httemplate/misc/delete-part_export.cgi
@@ -10,6 +10,6 @@ my $part_export = qsearchs('part_export',{'exportnum'=>$exportnum});
my $error = $part_export->delete;
eidiot($error) if $error;
-print $cgi->redirect($p. "browse/part_svc.cgi");
+print $cgi->redirect($p. "browse/part_export.cgi");
%>