Commit 3acad336 authored by Jérome Perrin's avatar Jérome Perrin

ZMySQLDA: fixes for Zope4 ZMI

Update ZMI pages with the design of Products.ZMySQLDA and with the
usage of manage_page_header, which sets the content-type to html
parent 1c3e53ce
<html> <dtml-var manage_page_header>
<head><title><!--#var title_or_id--> tables</title></head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B"> <dtml-with "_(management_view='Browse')">
<!--#var manage_tabs--> <dtml-var manage_tabs>
<!--#tree header=info--> </dtml-with>
<IMG SRC="<!--#var BASEPATH1-->/misc_/ZMySQLDA/<!--#var icon-->"
ALT="<!--#var Type-->" BORDER="0"> <main class="container-fluid">
<!--#var Name--><!--#var Description-->
<!--#/tree--> <dtml-tree header=info>
<img src="&dtml-SCRIPT_NAME;/misc_/ZMySQLDA/&dtml-icon;" alt="&dtml-Type;" title="&dtml-Type;" style="height:16px;width:20px;" />
</body> <b><dtml-var Name></b>&nbsp;&nbsp;<code><dtml-var description></code>
</html> </dtml-tree>
</main>
<style>
img:not([alt=table]) {
opacity:.35;
}
</style>
<dtml-var manage_page_footer>
\ No newline at end of file
<html> <dtml-var manage_page_header>
<head><title>Add Z MySQL Database Connection</title></head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B">
<h2>Add Z MySQL Database Connection</h2> <main class="container-fluid">
<form action="manage_addZMySQLConnection" method="POST"> <dtml-var "manage_form_title(this(), _, form_title='Add Z MySQL Database Connection')">
<table cellspacing="2">
<tr> <form action="manage_addZMySQLConnection" method="post">
<th align="LEFT" valign="TOP">Id</th> <div class="form-group row">
<td align="LEFT" valign="TOP"> <label for="id" class="col-sm-4 col-md-3">
<input type="TEXT" name="id" size="40" Id
value="MySQL_database_connection"> </label>
</td> <div class="col-sm-8 col-md-9">
</tr> <input id="id" name="id" class="form-control" value="" />
<tr> </div>
<th align="LEFT" valign="TOP"><em>Title</em></th> </div>
<td align="LEFT" valign="TOP">
<input type="TEXT" name="title" size="40"
value="Z MySQL Database Connection">
</td>
</tr>
<tr>
<th align="LEFT" valign="TOP">
Enter a Database Connection String
<a href="#1"><sup>1</sup></a></th>
<td align="LEFT" valign="TOP">
<input type="TEXT" name="connection_string" size="40">
</td>
</tr>
<tr>
<th align="LEFT" valign="TOP">Create Deferred Connection</th>
<td align="LEFT" valign="TOP">
<input name="deferred:int" type="CHECKBOX" value="1">
</td>
</tr>
<tr>
<th align="LEFT" valign="TOP">Connect immediately</th>
<td align="LEFT" valign="TOP">
<input name="check:int" type="CHECKBOX" value="1" CHECKED>
</td>
</tr>
<tr>
<td></td>
<td><br><input type="SUBMIT" value="Add"></td>
</tr>
</table>
</form>
<div class="form-group row">
<label for="title" class="col-sm-4 col-md-3">
Title
</label>
<div class="col-sm-8 col-md-9">
<input id="title" name="title" type="text" class="form-control" value="" />
</div>
</div>
<div class="form-group row">
<label for="connection_string" class="col-sm-4 col-md-3">
Database Connection String&nbsp;<a href="#1"><sup>1</sup></a>
</label>
<div class="col-sm-8 col-md-9">
<input id="connection_string" name="connection_string" type="text" class="form-control" value="" />
</div>
</div>
<dt><a hname="1"><sup>1</sup></a> Connection Strings</dt> <div class="form-group row">
<dd> <label for="check" class="col-sm-4 col-md-3">
<p> Connect immediately
The connection string used for Z MySQL Database Connection </label>
is of the form: <div class="col-sm-8 col-md-9">
<pre> <input name="check" type="checkbox" value="yes" checked="checked" class="mr-1" />
[~] [*lock] [+|-][database][@unix_socket|@host[:port]] [user [password]] <small>Open the database connection after instantiation.</small>
</pre> </div>
</div>
<div class="zmi-controls">
<input type="submit" class="btn btn-primary" value="Add" />
</div>
</form>
<hr class="my-5" />
<dl>
<dt><a name="1"><sup>1</sup></a>
Database Connection String
</dt>
<dd>
The connection string used for Z MySQL Database Connection is of the form:
<br />
<code>[*lock] [+/-][database][@host[:port]] [user [password [unix_socket]]]</code>
<br />
or typically: or typically:
<pre> <br />
database user password <code>database user password</code>
</pre> <br />
to use a MySQL server on localhost via the standard UNIX socket. to use a MySQL server on localhost via the standard UNIX socket.
Only specify host if the server is on a remote system. You can Only specify host if the server is on a remote system. You can
use a non-standard port, if necessary. Hint: To use a non-standard use a non-standard port, if necessary. Hint: To use a non-standard
port on the local system, use 127.0.0.1 for the host instead of port on the local system, use 127.0.0.1 for the host instead of
localhost. localhost.
<p> </dd>
IPv6 are supported and must be surrounded with brackets. <dd>
A UNIX socket absolute path can be specified in place of a TCP address. Either a database or a host or both must be specified.
<p> If the UNIX socket is in a non-standard location, you can specify
the full path to it after the password.
</dd>
<dd>
A '-' in front of the database tells ZMySQLDA to not use Zope's A '-' in front of the database tells ZMySQLDA to not use Zope's
Transaction Manager, even if the server supports transactions. A Transaction Manager, even if the server supports transactions. A
'+' in front of the database tells ZMySQLDA that it must use '+' in front of the database tells ZMySQLDA that it must use
...@@ -79,21 +83,22 @@ ...@@ -79,21 +83,22 @@
are using non-transaction safe tables (TSTs) on a server that are using non-transaction safe tables (TSTs) on a server that
supports TSTs, use '-'. If you require transactions, use '+'. If supports TSTs, use '-'. If you require transactions, use '+'. If
you aren't sure, don't use either. you aren't sure, don't use either.
<p> </dd>
A '~' at the begining of the connection string enables client-server <dd>
exchange compression (if supported by both client and server). *<em>lock</em> at the begining of the connection string means to
<p> pseudo-transactional. When the transaction begins, it will acquire
*<em>lock</em> means to
psuedo-transactional. When the transaction begins, it will acquire
a lock on the server named <em>lock</em> (i.e. MYLOCK). When the a lock on the server named <em>lock</em> (i.e. MYLOCK). When the
transaction commits, the lock will be released. If the transaction transaction commits, the lock will be released. If the transaction
is aborted and restarted, which can happen due to a ConflictError, is aborted and restarted, which can happen due to a ConflictError,
you'll get an error in the logs, and inconsistent data. In this you'll get an error in the logs, and inconsistent data. In this
respect, it's equivalent to transactions turned off. respect, it's equivalent to transactions turned off.
<p> </dd>
<dd>
Transactions are highly recommended. Using a named lock in Transactions are highly recommended. Using a named lock in
conjunctions with transactions is probably pointless. conjunctions with transactions is probably pointless.
</dd></dl> </dd>
<dl>
</main>
</body> <dtml-var manage_page_footer>
</html> \ No newline at end of file
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <dtml-var manage_page_header>
<html lang="en">
<head><title>Edit <dtml-var title_or_id></title></head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B">
<dtml-var manage_tabs> <dtml-var manage_tabs>
<h2>Edit <dtml-var title_or_id></h2> <main class="container-fluid">
<form action="manage_edit" method="POST"> <div class="form-group row">
<table cellspacing="2"> <label for="status" class="col-sm-4 col-md-3">
Status
<tr> </label>
<th align="LEFT" valign="TOP">Id</th> <div class="col-sm-8 col-md-9">
<td align="LEFT" valign="TOP"><dtml-var id></td> <div id="status" class="btn-group">
</tr> <button type="button" class="form-control mr-2" disabled="disabled">
The database connection is &nbsp;
<tr> <dtml-if connected>
<th align="LEFT" valign="TOP"><em>Title</em></th> <span class="badge badge-success">OPEN</span>
<td align="LEFT" valign="TOP"> <dtml-else>
<input type="TEXT" name="title" size="40" <span class="badge badge-danger">CLOSED</span>
value="<dtml-var title html_quote>"> </dtml-if>
</td> </button>
</tr> <dtml-if connected>
<form action="manage_close_connection" method="get">
<tr> <input class="btn btn-primary" type="submit" name="submit" value="Close Connection" />
<th align="LEFT" valign="TOP">Database Connection String</th>
<td align="LEFT" valign="TOP">
<input type="TEXT" name="connection_string" size="40"
value="<dtml-var connection_string html_quote>">
</td>
</tr>
<tr>
<th align="LEFT" valign="TOP">Connect immediately</th>
<td align="LEFT" valign="TOP">
<input name="check:int" type="CHECKBOX" value="1" CHECKED>
</td>
</tr>
<tr>
<td></td>
<td><br><input type="SUBMIT" value="Change"></td>
</tr>
</table>
</form> </form>
<dtml-else>
<form action="manage_open_connection" method="get">
<input class="btn btn-primary" type="submit" name="submit" value="Open Connection" />
</form>
</dtml-if>
</div>
</div>
</div>
<form action="manage_edit" method="post" title="">
<div class="form-group row">
<label for="id" class="col-sm-4 col-md-3">
Id
</label>
<div class="col-sm-8 col-md-9">
<input id="id" class="form-control" disabled="disabled" value="<dtml-var id>" />
</div>
</div>
<div class="form-group row">
<label for="title" class="col-sm-4 col-md-3">
Title
</label>
<div class="col-sm-8 col-md-9">
<input name="title" id="title" type="text" class="form-control"
value="<dtml-var title html_quote>" />
</div>
</div>
<div class="form-group row">
<label for="connection_string" class="col-sm-4 col-md-3">
Database Connection String&nbsp;<a href="#1"><sup>1</sup></a>
</label>
<div class="col-sm-8 col-md-9">
<input id="connection_string" type="text" name="connection_string" class="form-control"
value="<dtml-var connection_string html_quote>" />
</div>
</div>
<div class="form-group row">
<label for="check" class="col-sm-4 col-md-3">
Connect immediately
</label>
<div class="col-sm-8 col-md-9">
<input name="check" type="checkbox" value="yes" checked="checked" />
</div>
</div>
<div class="zmi-controls">
<input type="submit" class="btn btn-primary" value="Change">
</div>
</form>
<hr class="my-5" />
<dl>
<dt><a name="1"><sup>1</sup></a>
Database Connection String
</dt>
<dd>
Information about how to format the connection string can be found
in the <a href="https://zmysqlda.readthedocs.io/en/latest/connstring.html">
documentation</a>.
</dd>
<dl>
</main>
</body> <dtml-var manage_page_footer>
</html> \ No newline at end of file
<dtml-var standard_html_header> <dtml-var standard_html_header>
<dtml-var TABLE_TYPE><dtml-if TABLE_OWNER> <dtml-var Type><dtml-if table_owner>
owned by <dtml-var TABLE_OWNER></dtml-if> owned by <dtml-var table_owner></dtml-if>
<dtml-if REMARKS><br><dtml-var REMARKS></dtml-if> <dtml-if remarks><br><dtml-var remarks></dtml-if>
<dtml-var standard_html_footer> <dtml-var standard_html_footer>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment