From a7c1b602f88c177db34477ed4cdc1f72603f8995 Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 11 Apr 2002 22:05:31 +0000 Subject: (almost) everything for bug#375 - create export_svc table - part_svc to part_export is now properly many-to-many, not one-to-many still need to finish service editing (choosing exports) in httemplate/edit/part_svc.cgi and httemplate/edti/process/part_svc.cgi and do somethinga about that manual $svcdb = 'svc_acct' in httemplate/edit/part_export.cgi (do part_export records need a svcdb? probably not... should be able to just pass an svcdb on creation of new exports, move the big %exports hash into part_export.pm and allow httemplate/edit/part_svc.cgi to query it for exports that can apply to a given svcdb.... --- httemplate/browse/part_export.cgi | 42 +++++++++++++++++++++++++++++++++ httemplate/browse/part_svc.cgi | 25 +------------------- httemplate/docs/schema.html | 7 +++++- httemplate/docs/upgrade8.html | 10 +++++++- httemplate/edit/part_export.cgi | 39 +++++++----------------------- httemplate/edit/process/part_export.cgi | 3 ++- httemplate/index.html | 2 ++ httemplate/misc/delete-part_export.cgi | 2 +- 8 files changed, 72 insertions(+), 58 deletions(-) create mode 100755 httemplate/browse/part_export.cgi (limited to 'httemplate') diff --git a/httemplate/browse/part_export.cgi b/httemplate/browse/part_export.cgi new file mode 100755 index 000000000..e9d9fa3d4 --- /dev/null +++ b/httemplate/browse/part_export.cgi @@ -0,0 +1,42 @@ + +<%= header("Export Listing", menubar( 'Main Menu' => $p )) %> +Provisioning services to external machines, databases and APIs.

+ + + +<%= table() %> + + Export + Options + + +<% foreach my $part_export ( sort { + $a->getfield('exportnum') <=> $b->getfield('exportnum') + } qsearch('part_export',{}) ) { +%> + + <%= $part_export->exportnum %> + <%= $part_export->exporttype %> to <%= $part_export->machine %> (edit | delete) + + <%= itable() %> + <% my %opt = $part_export->options; + foreach my $opt ( keys %opt ) { %> + <%= $opt %><%= $opt{$opt} %> + <% } %> + + + + +<% } %> + + + Add a new export + + + + diff --git a/httemplate/browse/part_svc.cgi b/httemplate/browse/part_svc.cgi index 250b1ff4e..c8adebcd6 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 ) { %> - <%= $part_export->exporttype %> to <%= $part_export->machine %> (edit | delete) - - <%= itable() %> - <% my %opt = $part_export->options; - foreach my $opt ( keys %opt ) { %> - <%= $opt %><%= $opt{$opt} %> - <% } %> - - + <%= $part_export->exporttype %> to <%= $part_export->machine %> <% } %> - Add a new export -<% if (@part_export) { %> - -
- - - -
-<% } %> <% my($n1)=''; diff --git a/httemplate/docs/schema.html b/httemplate/docs/schema.html index a7c21c7c9..6ed96d229 100644 --- a/httemplate/docs/schema.html +++ b/httemplate/docs/schema.html @@ -256,10 +256,15 @@
  • svcpart - Service definition
  • quantity - quantity of this service that this package includes +
  • export_svc +
  • part_export - Export to external provisioning