[luci] Minor changes to failover domains page (trailing spaces removed, comments)
by Jan Pokorný
commit 02cfc3090bb2a119979013a5d6a5fc11caa0db04
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Fri Jul 31 18:05:27 2009 +0200
Minor changes to failover domains page (trailing spaces removed, comments)
luci/controllers/root.py | 27 +++--
luci/public/css/fdom.css | 18 ++-
luci/templates/fdom.html | 277 +++++++++++++++++++++++-----------------------
3 files changed, 165 insertions(+), 157 deletions(-)
---
diff --git a/luci/controllers/root.py b/luci/controllers/root.py
index f97ba47..86d2537 100644
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@ -18,21 +18,21 @@ __all__ = ['RootController']
class RootController(BaseController):
"""
The root controller for the luci application.
-
+
All the other controllers and WSGI applications should be mounted on this
controller. For example::
-
+
panel = ControlPanelController()
another_app = AnotherWSGIApplication()
-
+
Keep in mind that WSGI applications shouldn't be mounted directly: They
must be wrapped around with :class:`tg.controllers.WSGIAppController`.
-
+
"""
secc = SecureController()
-
+
admin = Catwalk(model, DBSession)
-
+
error = ErrorController()
@expose('luci.templates.index')
@@ -70,13 +70,13 @@ class RootController(BaseController):
flash(_('Wrong credentials'), 'warning')
return dict(page='login', login_counter=str(login_counter),
came_from=came_from)
-
+
@expose()
def post_login(self, came_from=url('/')):
"""
Redirect the user to the initially requested page on successful
authentication or redirect her back to the login page if login failed.
-
+
"""
if not request.identity:
login_counter = request.environ['repoze.who.logins'] + 1
@@ -90,14 +90,15 @@ class RootController(BaseController):
"""
Redirect the user to the initially requested page on logout and say
goodbye as well.
-
+
"""
flash(_('We hope to see you soon!'))
redirect(came_from)
-
+
@expose('luci.templates.fdom')
def fdom(self, name=""):
fdom_table = { \
+ # Temporary data for failover domains, format:
# name: (prioritizied, restricted, failback, [("service", is ok?), ...], [("member", is member?, priority), ...])
"Failover1":(False, True, False,
[("SAP", True), ("Oracle", True)],
@@ -115,10 +116,10 @@ class RootController(BaseController):
[("PrimaryApache", True, 1),("SecondaryApache", False, 2)]),
"FDOM c": (True, True, True,
[("Tomcat", True), ("PostgreSQL", False), ("LVM", True)],
- [("NodeExtraStrong", True, 1)])}
+ [("NodeExtraStrong", True, 1)])}
details = None
- overview = [[k,v[0],v[1],v[2]] for k,v in fdom_table.iteritems()]
+ fdoms = [[k,v[0],v[1],v[2]] for k,v in fdom_table.iteritems()]
if name != "":
if fdom_table.has_key(name):
details = fdom_table[name]
- return dict(name=name, overview=overview, details=details)
+ return dict(name=name, fdoms=fdoms, details=details)
diff --git a/luci/public/css/fdom.css b/luci/public/css/fdom.css
index 8d23bb8..521f7b6 100644
--- a/luci/public/css/fdom.css
+++ b/luci/public/css/fdom.css
@@ -8,12 +8,12 @@
height: 31px;
background: #484646 url(../images/toolbar_line.png) top left repeat-x;
}
-
+
.toolbar a {
margin: 0 1em 0 1em;
color: #ffffff;
text-decoration: none;
-}
+}
.toolbar a:hover {
color: #8e8e8e;
@@ -44,7 +44,7 @@
/* --------------------------------- details -------------------------------- */
.details {
-
+
}
@@ -62,6 +62,10 @@
float: left;
}
+.input_priority {
+ width: 3em;
+}
+
/*====================== F A I L O V E R D O M A I N S ==================== */
/* -------------------------------- overview -------------------------------- */
@@ -82,7 +86,7 @@
.fdom_tlist_name {
text-align: left;
-}
+}
th.fdom_tlist_name {
min-width: 20%;
@@ -92,7 +96,7 @@ th.fdom_tlist_name {
text-align: center;
}
-#fdom_tlist_sep{
+#fdom_tlist_sep {
border-top: black solid thin;
height: .5em;
}
@@ -126,8 +130,8 @@ th.fdom_tlist_name {
.details_header {
padding: 0;
margin: 0;
- height: 44px;
- color: #ffffff;
+ height: 44px;
+ color: #ffffff;
background: #5b5a5b url(../images/details_header_line.png) top left repeat-x;
}
diff --git a/luci/templates/fdom.html b/luci/templates/fdom.html
index c396bb1..3ff4041 100644
--- a/luci/templates/fdom.html
+++ b/luci/templates/fdom.html
@@ -1,162 +1,165 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:py="http://genshi.edgewall.org/"
- xmlns:xi="http://www.w3.org/2001/XInclude">
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="master.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
- <title>Login Form</title>
+ <title>Failover domains</title>
</head>
<body>
-<form>
-<div class="toolbar">
- <input type="submit" value="delete"/>
- <!-- <a href="./" id="tb_delete">delete</a> -->
- <a href="./" id="tb_add">add</a>
-</div>
-
-<div class="overview">
- <table id="fdom_tlist">
- <tr id="fdom_tlist_header">
- <th class="fdom_tlist_check"></th>
- <th class="fdom_tlist_name">name</th>
- <th class="fdom_tlist_attrs">enabled</th>
- <th class="fdom_tlist_attrs">prioritizied</th>
- <th class="fdom_tlist_attrs">restricted</th>
- <td class="table_space"></td>
- </tr>
- <tr id="fdom_tlist_sep">
- </tr>
- <tr py:for="fdom in overview" py:attrs="{'class': 'chosen'} if fdom[0]==name else None">
- <td class="fdom_tlist_check"><input type="checkbox"/></td>
- <td class="fdom_tlist_name"><a href="${tg.url('/fdom?name=' + fdom[0])}">${fdom[0]}</a></td>
- <td class="fdom_tlist_attrs" py:choose="False">
- <input py:when="True" type="checkbox" disabled="true" checked="checked"/>
- <input py:when="False" type="checkbox" disabled="true"/>
- </td>
- <td class="fdom_tlist_attrs"><img py:if="fdom[1]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
- <td class="fdom_tlist_attrs"><img py:if="fdom[2]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
- <td></td>
- </tr>
- </table>
-</div>
-</form>
+ <form>
+ <div class="toolbar">
+ <input type="submit" value="delete"/>
+ <!-- <a href="./" id="tb_delete">delete</a> -->
+ <a href="./" id="tb_add">add</a>
+ </div>
-<div class="details_header" py:if="details != None">
- <h3 py:replace="name">Failover1</h3>
-</div>
+ <!--! Overview section. -->
+ <div class="overview">
+ <table id="fdom_tlist">
+ <tr id="fdom_tlist_header">
+ <th class="fdom_tlist_check"></th>
+ <th class="fdom_tlist_name">name</th>
+ <th class="fdom_tlist_attrs">enabled</th>
+ <th class="fdom_tlist_attrs">prioritizied</th>
+ <th class="fdom_tlist_attrs">restricted</th>
+ <td class="table_space"></td>
+ </tr>
+ <tr id="fdom_tlist_sep">
+ </tr>
-<div class="details" py:choose="details">
-
- <py:when test="None">
- <div class="details_section">
- Please select a failover domain from the list.
+ <!--! List all the failover domains. -->
+ <tr py:for="fdom in fdoms" py:attrs="{'class': 'chosen'} if fdom[0]==name else None">
+ <td class="fdom_tlist_check"><input type="checkbox"/></td>
+ <td class="fdom_tlist_name"><a href="${tg.url('/fdom?name=' + fdom[0])}">${fdom[0]}</a></td>
+ <td class="fdom_tlist_attrs" py:choose="False">
+ <input py:when="True" type="checkbox" disabled="true" checked="checked"/>
+ <input py:when="False" type="checkbox" disabled="true"/>
+ </td>
+ <td class="fdom_tlist_attrs"><img py:if="fdom[1]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
+ <td class="fdom_tlist_attrs"><img py:if="fdom[2]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
+ <td></td>
+ </tr>
+ </table>
</div>
- </py:when>
-
- <py:otherwise>
- <!--! attributes -->
- <div class="details_section">
- <div class="details_inner">
- <form>
- <input type="submit" value="Update Properties" class="float_right"/>
- <table id="fdom_tattr">
- <tr>
- <td py:choose="details[0]">
- <input py:when="True" type="checkbox" id="prioritized" checked="checked"/>
- <input py:when="False" type="checkbox" id="prioritized"/>
- <label for="prioritized">Prioritized</label>
- </td>
- <td class="fdom_tattr_hint">
- order the nodes to which services failover
- </td>
- </tr>
- <tr>
- <td py:choose="details[1]">
- <input py:when="True" type="checkbox" id="restricted" checked="checked"/>
- <input py:when="False" type="checkbox" id="restricted"/>
- <label for="restricted">Restricted</label>
- </td>
- <td class="fdom_tattr_hint">
- kill service when all member nodes fail
- </td>
- </tr>
- <tr>
- <td py:choose="details[2]">
- <input py:when="True" type="checkbox" id="failback" checked="checked"/>
- <input py:when="False" type="checkbox" id="failback"/>
- <label for="failback">Failback</label>
- </td>
- <td class="fdom_tattr_hint">
- send service back to 1st priority node when it becomes available again
- </td>
- </tr>
- </table>
- </form>
+ </form>
+
+ <!--! Details section. -->
+ <div class="details" py:choose="details">
+
+ <div class="details_header" py:if="details != None">
+ <h3 py:replace="name">Failover1</h3>
</div>
- </div>
- <!--! services -->
- <div class="details_section">
- <input type="submit" value="Add a Service" class="float_right"/>
- <h4>Services</h4>
- <div class="details_inner">
- <ul id="fdom_services">
- <!--! for all the services related to the current failover domain -->
- <py:for each="service in details[3]" py:choose="service[1]">
- <!--! service is ok -->
- <li py:when="True" class="service_ok">
- <img src="${tg.url('/images/empty.png')}" alt="[ OK ]" title="Service is running." />
- ${service[0]}
- </li>
- <!--! service is not ok ('py:otherwise' can be used instead) -->
- <li py:when="False" class="service_fail">
- <img src="${tg.url('/images/exclamation.png')}" alt="[FAIL]" title="Service has a problem." />
- ${service[0]}
- </li>
- </py:for>
- </ul>
+ <py:when test="None">
+ <div class="details_section">
+ Please select a failover domain from the list.
</div>
- </div>
+ </py:when>
- <!--! members -->
- <div class="details_section">
- <form>
- <input type="submit" value="Update Settings" class="float_right"/>
- <h4>Members</h4>
+ <py:otherwise>
+ <!--! Details - Attributes section. -->
+ <div class="details_section">
<div class="details_inner">
- <table id="fdom_tmembers">
- <tr id="fdom_tmembers_header">
- <th></th>
- <th class="fdom_tmembers_member">member</th>
- <th>priority</th>
- <td class="table_space"></td>
- </tr>
- <!--! for all the members of the current failover domain -->
- <tr py:for="member in details[4]">
- <td>${member[0]}</td>
- <td class="fdom_tmembers_member" py:choose="member[1]">
- <input py:when="True" type="checkbox" checked="checked" />
- <input py:when="False" type="checkbox" />
- </td>
- <td>
- <input type="text" value="${member[2]}"/>
- </td>
- <td></td>
- </tr>
- </table>
+ <form>
+ <input type="submit" value="Update Properties" class="float_right"/>
+ <table id="fdom_tattr">
+ <tr>
+ <td py:choose="details[0]">
+ <input py:when="True" type="checkbox" id="prioritized" checked="checked"/>
+ <input py:when="False" type="checkbox" id="prioritized"/>
+ <label for="prioritized">Prioritized</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ order the nodes to which services failover
+ </td>
+ </tr>
+ <tr>
+ <td py:choose="details[1]">
+ <input py:when="True" type="checkbox" id="restricted" checked="checked"/>
+ <input py:when="False" type="checkbox" id="restricted"/>
+ <label for="restricted">Restricted</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ kill service when all member nodes fail
+ </td>
+ </tr>
+ <tr>
+ <td py:choose="details[2]">
+ <input py:when="True" type="checkbox" id="failback" checked="checked"/>
+ <input py:when="False" type="checkbox" id="failback"/>
+ <label for="failback">Failback</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ send service back to 1st priority node when it becomes available again
+ </td>
+ </tr>
+ </table>
+ </form>
</div>
- </form>
- </div>
-
- </py:otherwise>
+ </div>
-</div>
+ <!--! Details - Services section. -->
+ <div class="details_section">
+ <input type="submit" value="Add a Service" class="float_right"/>
+ <h4>Services</h4>
+ <div class="details_inner">
+ <ul id="fdom_services">
+ <!--! List all the services connected with the current failover domain. -->
+ <py:for each="service in details[3]" py:choose="service[1]">
+ <!--! Service is ok. -->
+ <li py:when="True" class="service_ok">
+ <img src="${tg.url('/images/empty.png')}" alt="[ OK ]" title="Service is running." />
+ ${service[0]}
+ </li>
+ <!--! Service is not ok ('py:otherwise' can be used instead). -->
+ <li py:when="False" class="service_fail">
+ <img src="${tg.url('/images/exclamation.png')}" alt="[FAIL]" title="Service has a problem." />
+ ${service[0]}
+ </li>
+ </py:for>
+ </ul>
+ </div>
+ </div>
+
+ <!--! Details - Members section. -->
+ <div class="details_section">
+ <form>
+ <input type="submit" value="Update Settings" class="float_right"/>
+ <h4>Members</h4>
+ <div class="details_inner">
+ <table id="fdom_tmembers">
+ <tr id="fdom_tmembers_header">
+ <th></th>
+ <th class="fdom_tmembers_member">member</th>
+ <th>priority</th>
+ <td class="table_space"></td>
+ </tr>
+ <!--! List all the members of the current failover domain. -->
+ <tr py:for="member in details[4]">
+ <td>${member[0]}</td>
+ <td class="fdom_tmembers_member" py:choose="member[1]">
+ <input py:when="True" type="checkbox" checked="checked" />
+ <input py:when="False" type="checkbox" />
+ </td>
+ <td>
+ <input type="text" value="${member[2]}" maxlength="3" class="input_priority"/>
+ </td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ </form>
+ </div>
+ </py:otherwise>
+
+ </div>
</body>
</html>
14 years, 9 months
[luci] Initial implementation of "failover domains" part of Luci.
by Jan Pokorný
commit 3dd831d8b973b1e8c65f3acb88a462db0b1dbb2d
Author: Jan Pokorny <jp(a)dhcp-lab-240.englab.brq.redhat.com>
Date: Thu Jul 30 17:54:29 2009 +0200
Initial implementation of "failover domains" part of Luci.
luci/controllers/root.py | 28 ++++
luci/public/css/fdom.css | 208 ++++++++++++++++++++++++++++
luci/public/css/style.css | 2 +
luci/public/images/add-grey.png | Bin 0 -> 293 bytes
luci/public/images/add-white.png | Bin 0 -> 253 bytes
luci/public/images/delete-grey.png | Bin 0 -> 353 bytes
luci/public/images/delete-white.png | Bin 0 -> 295 bytes
luci/public/images/details_header_line.png | Bin 0 -> 248 bytes
luci/public/images/dot.png | Bin 0 -> 300 bytes
luci/public/images/empty.png | Bin 0 -> 547 bytes
luci/public/images/exclamation.png | Bin 0 -> 583 bytes
luci/public/images/toolbar_line.png | Bin 0 -> 241 bytes
luci/templates/fdom.html | 162 ++++++++++++++++++++++
13 files changed, 400 insertions(+), 0 deletions(-)
---
diff --git a/luci/controllers/root.py b/luci/controllers/root.py
index 8a56500..f97ba47 100644
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@ -94,3 +94,31 @@ class RootController(BaseController):
"""
flash(_('We hope to see you soon!'))
redirect(came_from)
+
+ @expose('luci.templates.fdom')
+ def fdom(self, name=""):
+ fdom_table = { \
+ # name: (prioritizied, restricted, failback, [("service", is ok?), ...], [("member", is member?, priority), ...])
+ "Failover1":(False, True, False,
+ [("SAP", True), ("Oracle", True)],
+ [("Uno", True, 1),("Duno", False, 2),("Tre", True, 0)]),
+ "Failover2":(True, True, False,
+ [("Service X", True), ("Service Y", False), ("Service Z", True)],
+ [("NodeAlpha", True, 1),("NodeBeta", False, 2),("NodeDelta", True, 0),
+ ("NodeGamma", True, 0),("NodeEpsilon", True, 0)]),
+ "FDOM a": (True, False, False,
+ [("NFS", True), ("Samba", True)],
+ [("No1", True, 1),("No2", True, 2),("No3", True, 0),
+ ("No4", True, 0)]),
+ "FDOM b": (True, False, False,
+ [("Apache", True)],
+ [("PrimaryApache", True, 1),("SecondaryApache", False, 2)]),
+ "FDOM c": (True, True, True,
+ [("Tomcat", True), ("PostgreSQL", False), ("LVM", True)],
+ [("NodeExtraStrong", True, 1)])}
+ details = None
+ overview = [[k,v[0],v[1],v[2]] for k,v in fdom_table.iteritems()]
+ if name != "":
+ if fdom_table.has_key(name):
+ details = fdom_table[name]
+ return dict(name=name, overview=overview, details=details)
diff --git a/luci/public/css/fdom.css b/luci/public/css/fdom.css
new file mode 100644
index 0000000..8d23bb8
--- /dev/null
+++ b/luci/public/css/fdom.css
@@ -0,0 +1,208 @@
+/*=============================== G E N E R A L ============================= */
+
+/* --------------------------------- toolbar -------------------------------- */
+
+.toolbar {
+ padding-left: 1em;
+ line-height: 23px;
+ height: 31px;
+ background: #484646 url(../images/toolbar_line.png) top left repeat-x;
+}
+
+.toolbar a {
+ margin: 0 1em 0 1em;
+ color: #ffffff;
+ text-decoration: none;
+}
+
+.toolbar a:hover {
+ color: #8e8e8e;
+ text-decoration: none;
+}
+
+/* toolbar's buttons */
+
+#tb_add {
+ background: url('../images/add-white.png') center left no-repeat;
+ padding-left: 17px;
+}
+
+#tb_add:hover {
+ background-image: url('../images/add-grey.png');
+}
+
+#tb_delete {
+ background: url('../images/delete-white.png') center left no-repeat;
+ padding-left: 17px;
+}
+
+#tb_delete:hover {
+ background-image: url('../images/delete-grey.png');
+}
+
+
+/* --------------------------------- details -------------------------------- */
+
+.details {
+
+}
+
+
+/* ---------------------------------- misc. --------------------------------- */
+
+.table_space {
+ width: 100%;
+}
+
+.float_right {
+ float: right;
+}
+
+.float_left {
+ float: left;
+}
+
+/*====================== F A I L O V E R D O M A I N S ==================== */
+
+/* -------------------------------- overview -------------------------------- */
+
+/* list of failover domains */
+
+#fdom_tlist {
+ border-collapse: collapse;
+}
+
+#fdom_tlist td,th {
+ padding: 0 1em;
+}
+
+#fdom_tlist th {
+ font-weight: normal;
+}
+
+.fdom_tlist_name {
+ text-align: left;
+}
+
+th.fdom_tlist_name {
+ min-width: 20%;
+}
+
+.fdom_tlist_attrs {
+ text-align: center;
+}
+
+#fdom_tlist_sep{
+ border-top: black solid thin;
+ height: .5em;
+}
+
+#fdom_tlist tr.chosen {
+ background-color: #d2edaa;
+}
+
+#fdom_tlist tr:hover {
+ background-color: #e8f6d4;
+}
+
+#fdom_tlist tr#fdom_tlist_header:hover {
+ background-color: inherit;
+}
+
+/* --------------------------------- details -------------------------------- */
+
+.details_section {
+ margin-left: 1em;
+}
+
+.details_section h4 {
+ margin: 1em 0 .5em 0;
+}
+
+.details_inner {
+ margin-left: 1em;
+}
+
+.details_header {
+ padding: 0;
+ margin: 0;
+ height: 44px;
+ color: #ffffff;
+ background: #5b5a5b url(../images/details_header_line.png) top left repeat-x;
+}
+
+.details_header h3 {
+ margin-left: 1em;
+ font-weight: bold;
+}
+
+
+/* attributes setting */
+
+#fdom_tattr {
+ border-collapse: collapse;
+}
+
+#fdom_tattr td {
+ padding: 0 2em 0 0;
+}
+
+fdom_tattr_hint {
+ font-size: small;
+}
+
+/* list of services */
+
+#fdom_services {
+ padding: 0;
+ margin: 0;
+}
+
+#fdom_services li {
+ margin: 2px 0;
+ padding-left: 8px;
+ background-color: #f2f2f2;
+ list-style-type: none;
+}
+
+#fdom_services li.service_ok {
+ color: green;
+}
+
+#fdom_services li.service_fail {
+ color: red;
+}
+
+#fdom_services span.hide {
+ display: none;
+ overflow: hidden;
+}
+
+
+/* table of members */
+
+#fdom_tmembers {
+ border-collapse: collapse;
+}
+
+#fdom_tmembers td,th {
+ padding: 0 1em;
+}
+
+#fdom_tmembers th {
+ font-weight: normal;
+}
+
+#fdom_tmembers tr {
+ border-bottom: solid 2px white;
+ background-color: #f2f2f2;
+}
+
+#fdom_tmembers tr#fdom_tmembers_header {
+ background-color: inherit;
+}
+
+.fdom_tmembers_member {
+ text-align: center;
+}
+
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index 314f084..8ca6f90 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -1,3 +1,5 @@
+@import url("fdom.css");
+
html {
background: #555555 url('../images/pagebg.png') top left repeat-x;
text-align: center;
diff --git a/luci/public/images/add-grey.png b/luci/public/images/add-grey.png
new file mode 100644
index 0000000..1229c49
Binary files /dev/null and b/luci/public/images/add-grey.png differ
diff --git a/luci/public/images/add-white.png b/luci/public/images/add-white.png
new file mode 100644
index 0000000..476e121
Binary files /dev/null and b/luci/public/images/add-white.png differ
diff --git a/luci/public/images/delete-grey.png b/luci/public/images/delete-grey.png
new file mode 100644
index 0000000..917a42a
Binary files /dev/null and b/luci/public/images/delete-grey.png differ
diff --git a/luci/public/images/delete-white.png b/luci/public/images/delete-white.png
new file mode 100644
index 0000000..b6f757d
Binary files /dev/null and b/luci/public/images/delete-white.png differ
diff --git a/luci/public/images/details_header_line.png b/luci/public/images/details_header_line.png
new file mode 100644
index 0000000..ff8acfd
Binary files /dev/null and b/luci/public/images/details_header_line.png differ
diff --git a/luci/public/images/dot.png b/luci/public/images/dot.png
new file mode 100644
index 0000000..cb0cf30
Binary files /dev/null and b/luci/public/images/dot.png differ
diff --git a/luci/public/images/empty.png b/luci/public/images/empty.png
new file mode 100644
index 0000000..16cac2a
Binary files /dev/null and b/luci/public/images/empty.png differ
diff --git a/luci/public/images/exclamation.png b/luci/public/images/exclamation.png
new file mode 100644
index 0000000..a5c8dde
Binary files /dev/null and b/luci/public/images/exclamation.png differ
diff --git a/luci/public/images/toolbar_line.png b/luci/public/images/toolbar_line.png
new file mode 100644
index 0000000..5738646
Binary files /dev/null and b/luci/public/images/toolbar_line.png differ
diff --git a/luci/templates/fdom.html b/luci/templates/fdom.html
new file mode 100644
index 0000000..c396bb1
--- /dev/null
+++ b/luci/templates/fdom.html
@@ -0,0 +1,162 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:py="http://genshi.edgewall.org/"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+<xi:include href="master.html" />
+
+<head>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title>Login Form</title>
+</head>
+
+<body>
+
+<form>
+<div class="toolbar">
+ <input type="submit" value="delete"/>
+ <!-- <a href="./" id="tb_delete">delete</a> -->
+ <a href="./" id="tb_add">add</a>
+</div>
+
+<div class="overview">
+ <table id="fdom_tlist">
+ <tr id="fdom_tlist_header">
+ <th class="fdom_tlist_check"></th>
+ <th class="fdom_tlist_name">name</th>
+ <th class="fdom_tlist_attrs">enabled</th>
+ <th class="fdom_tlist_attrs">prioritizied</th>
+ <th class="fdom_tlist_attrs">restricted</th>
+ <td class="table_space"></td>
+ </tr>
+ <tr id="fdom_tlist_sep">
+ </tr>
+ <tr py:for="fdom in overview" py:attrs="{'class': 'chosen'} if fdom[0]==name else None">
+ <td class="fdom_tlist_check"><input type="checkbox"/></td>
+ <td class="fdom_tlist_name"><a href="${tg.url('/fdom?name=' + fdom[0])}">${fdom[0]}</a></td>
+ <td class="fdom_tlist_attrs" py:choose="False">
+ <input py:when="True" type="checkbox" disabled="true" checked="checked"/>
+ <input py:when="False" type="checkbox" disabled="true"/>
+ </td>
+ <td class="fdom_tlist_attrs"><img py:if="fdom[1]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
+ <td class="fdom_tlist_attrs"><img py:if="fdom[2]" src="${tg.url('/images/dot.png')}" alt="*" title="Attribute is active."/></td>
+ <td></td>
+ </tr>
+ </table>
+</div>
+</form>
+
+<div class="details_header" py:if="details != None">
+ <h3 py:replace="name">Failover1</h3>
+</div>
+
+<div class="details" py:choose="details">
+
+ <py:when test="None">
+ <div class="details_section">
+ Please select a failover domain from the list.
+ </div>
+ </py:when>
+
+ <py:otherwise>
+ <!--! attributes -->
+ <div class="details_section">
+ <div class="details_inner">
+ <form>
+ <input type="submit" value="Update Properties" class="float_right"/>
+ <table id="fdom_tattr">
+ <tr>
+ <td py:choose="details[0]">
+ <input py:when="True" type="checkbox" id="prioritized" checked="checked"/>
+ <input py:when="False" type="checkbox" id="prioritized"/>
+ <label for="prioritized">Prioritized</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ order the nodes to which services failover
+ </td>
+ </tr>
+ <tr>
+ <td py:choose="details[1]">
+ <input py:when="True" type="checkbox" id="restricted" checked="checked"/>
+ <input py:when="False" type="checkbox" id="restricted"/>
+ <label for="restricted">Restricted</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ kill service when all member nodes fail
+ </td>
+ </tr>
+ <tr>
+ <td py:choose="details[2]">
+ <input py:when="True" type="checkbox" id="failback" checked="checked"/>
+ <input py:when="False" type="checkbox" id="failback"/>
+ <label for="failback">Failback</label>
+ </td>
+ <td class="fdom_tattr_hint">
+ send service back to 1st priority node when it becomes available again
+ </td>
+ </tr>
+ </table>
+ </form>
+ </div>
+ </div>
+
+ <!--! services -->
+ <div class="details_section">
+ <input type="submit" value="Add a Service" class="float_right"/>
+ <h4>Services</h4>
+ <div class="details_inner">
+ <ul id="fdom_services">
+ <!--! for all the services related to the current failover domain -->
+ <py:for each="service in details[3]" py:choose="service[1]">
+ <!--! service is ok -->
+ <li py:when="True" class="service_ok">
+ <img src="${tg.url('/images/empty.png')}" alt="[ OK ]" title="Service is running." />
+ ${service[0]}
+ </li>
+ <!--! service is not ok ('py:otherwise' can be used instead) -->
+ <li py:when="False" class="service_fail">
+ <img src="${tg.url('/images/exclamation.png')}" alt="[FAIL]" title="Service has a problem." />
+ ${service[0]}
+ </li>
+ </py:for>
+ </ul>
+ </div>
+ </div>
+
+ <!--! members -->
+ <div class="details_section">
+ <form>
+ <input type="submit" value="Update Settings" class="float_right"/>
+ <h4>Members</h4>
+ <div class="details_inner">
+ <table id="fdom_tmembers">
+ <tr id="fdom_tmembers_header">
+ <th></th>
+ <th class="fdom_tmembers_member">member</th>
+ <th>priority</th>
+ <td class="table_space"></td>
+ </tr>
+ <!--! for all the members of the current failover domain -->
+ <tr py:for="member in details[4]">
+ <td>${member[0]}</td>
+ <td class="fdom_tmembers_member" py:choose="member[1]">
+ <input py:when="True" type="checkbox" checked="checked" />
+ <input py:when="False" type="checkbox" />
+ </td>
+ <td>
+ <input type="text" value="${member[2]}"/>
+ </td>
+ <td></td>
+ </tr>
+ </table>
+ </div>
+ </form>
+ </div>
+
+ </py:otherwise>
+
+</div>
+
+</body>
+</html>
14 years, 9 months
[luci] Removed unneeded README file.
by Chris Feist
commit ee672953528bf7a74fec19f46b93025e3c766eef
Author: Chris Feist <cfeist(a)redhat.com>
Date: Tue Jul 21 14:40:46 2009 -0500
Removed unneeded README file.
0 files changed, 0 insertions(+), 0 deletions(-)
14 years, 10 months