1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
<?xml version="1.0"?>
<!--
-
- $Id$
-
- This file is part of the OpenLink Software Virtuoso Open-Source (VOS)
- project.
-
- Copyright (C) 1998-2012 OpenLink Software
-
- This project is free software; you can redistribute it and/or modify it
- under the terms of the GNU General Public License as published by the
- Free Software Foundation; only version 2 of the License, dated June 1991.
-
- This program is distributed in the hope that it will be useful, but
- WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-
-->
<v:page name="db_repl_pub"
doctype="-//W3C//DTD XHTML 1.0 Transitional//EN"
fast-render="1" xmlns:v="http://www.openlinksw.com/vspx/"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:vm="http://www.openlinksw.com/vspx/macro">
<v:variable name="p_mode" persist="0" type="varchar" default="'1'" />
<v:variable name="dumpdir" persist="0" type="varchar" default="''" />
<v:variable name="dumpname" persist="0" type="varchar" default="''" />
<v:variable name="dump_items" persist="0" type="varchar" default="'000000000'" />
<v:variable name="chqual" persist="0" type="varchar" default="''" />
<v:variable name="chuser" persist="0" type="varchar" default="''" />
<v:variable name="dbp_result" persist="0" type="varchar" default="''" />
<v:variable name="return_path" persist="0" type="varchar" default="''" />
<v:variable name="sql_stt" persist="1" type="varchar" default="''" />
<v:variable name="sql_msg" persist="1" type="varchar" default="''" />
<v:before_render>
<?vsp
-- some checking for consistency
if( self.p_mode <> '1' and self.p_mode <> '2')
self.p_mode := '1';
self.return_path := sprintf('ie_import.vspx?sid=%s&realm=%s',self.sid, self.realm);
?>
</v:before_render>
<v:template name="error_temp12" type="simple" enabled="-- neq(self.sql_stt, '')">
<table class="Warning" width="100%" border="0" cellspacing="0" cellpadding="3">
<v:form name="error_form12" type="simple" method="POST" action="--self.return_path">
<tr><td><?V get_keyword('message', self.vc_page.vc_event.ve_params, 'Error occurred') ?></td></tr>
<tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr><td>SQL_STATE:</td><td><?V self.sql_stt ?></td></tr>
<tr><td>SQL_MESSAGE:</td><td><?V self.sql_msg ?></td></tr>
</table>
</td></tr>
<tr><td align="center">
<v:button action="simple" name="OK1" value="OK">
<v:on-post>
<v:script><![CDATA[
self.sql_stt := '';
self.sql_msg := '';
return;
]]></v:script>
</v:on-post>
</v:button>
</td></tr>
</v:form>
</table>
</v:template>
<v:template name="error_temp22" type="simple" enabled="-- equ(self.sql_stt, '')">
<v:template name="mode_temp12" type="simple" enabled="-- equ(self.p_mode, '1')">
<v:form name="form1244" type="simple" method="POST" action="--self.return_path">
<table class="SubAction" border="0" cellspacing="0" cellpadding="3">
<tr>
<td>From directory<span class="attention_marker">*</span></td>
<td>
<v:text name="t_dumpdir1" value="--'./backup'" type="simple"/>
<v:browse-button name="browse_button_11" value="Browse..." selector="ie_browser.vspx" child-window-options="scrollbar=yes,resizable=yes,menubar=no,height=350,width=450">
<v:field name="t_dumpdir1" />
<v:field name="t_dumpname1" />
</v:browse-button>
</td>
</tr>
<tr>
<td>Dump name<span class="attention_marker">*</span></td>
<td>
<v:text name="t_dumpname1" value="--'backup_1'" type="simple"/>
<v:browse-button name="browse_button_22" value="Browse..." selector="ie_browser.vspx" child-window-options="scrollbar=yes,resizable=yes,menubar=no,height=350,width=450">
<v:field name="t_dumpdir1" />
<v:field name="t_dumpname1" />
</v:browse-button>
</td>
</tr>
<tr>
<td colspan="2" align="left">Advanced:</td>
</tr>
<tr>
<td/>
<td>
<v:check-box name="cb_users1" initial-checked="0" value="on" column="" xhtml_id="cb_users1"/>
<label for="cb_users1">Import Users</label>
</td>
</tr>
<tr>
<td/>
<td>
<v:check-box name="cb_grants1" initial-checked="0" value="" column="" xhtml_id="cb_grants1"/>
<label for="cb_grants1">Import Grants</label>
</td>
</tr>
<tr>
<td>Replace Catalogs</td>
<td><v:text name="t_chqual1" value="" type="simple" column=""></v:text></td>
</tr>
<tr>
<td>Replace Schemas</td>
<td><v:text name="t_chuser1" value="" type="simple" column=""></v:text></td>
</tr>
<tr>
<td/>
<td>
<v:button name="b_import1" action="simple" value="Import">
<v:on-post>
<v:script><![CDATA[
declare dump_items varchar;
dump_items := self.dump_items;
self.dumpdir := (control.vc_parent.vc_find_control('t_dumpdir1') as vspx_field).ufl_value;
self.dumpname:= (control.vc_parent.vc_find_control('t_dumpname1') as vspx_field).ufl_value;
aset( dump_items, 7, (control.vc_parent.vc_find_control('cb_users1') as vspx_field).ufl_selected);
aset( dump_items, 8, (control.vc_parent.vc_find_control('cb_grants1') as vspx_field).ufl_selected);
self.chqual := (control.vc_parent.vc_find_control('t_chqual1') as vspx_field).ufl_value;
self.chuser := (control.vc_parent.vc_find_control('t_chuser1') as vspx_field).ufl_value;
self.dump_items := dump_items;
self.dbp_result := "DB"."DBA"."RESTORE_DBPUMP'S_FOLDER" (
connection_get('vspx_user'),
sql_user_password(connection_get('vspx_user')),
"PUMP"."DBA"."GET_DSN"(),
self.dumpdir,
self.dumpname,
self.dump_items,
self.chqual,
self.chuser
);
self.p_mode := '2';
]]></v:script>
</v:on-post>
</v:button></td>
</tr>
</table>
</v:form>
</v:template>
<v:template name="mode_temp21" type="simple" enabled="-- equ(self.p_mode, '2')">
<v:form name="form21" type="simple" method="POST" action="--self.return_path">
<table class="SubAction" border="0" cellspacing="0" cellpadding="3">
<tr>
<td><?vsp http(replace(self.dbp_result,'\n','<br/>')); ?></td>
</tr>
<tr>
<td class="MainData" align="right">
<v:button name="b_ok1" action="simple" value="OK">
<v:on-post>
<v:script><![CDATA[
self.p_mode := '1';
]]></v:script>
</v:on-post>
</v:button>
</td>
</tr>
</table>
</v:form>
</v:template>
</v:template>
</v:page>
|