[luci/demodata2] Revert "Corrections in style.css (consequence of merging)."
by Jan Pokorný
commit 4cef5a378d083f5a69b6a7de452b26a95081df68
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Tue Oct 13 17:55:59 2009 +0200
Revert "Corrections in style.css (consequence of merging)."
This reverts commit 02380b4d9e8a72958fc85d17d2a067d003258746.
luci/public/css/style.css | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index 2b8f054..a746ea2 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -61,7 +61,11 @@ ul.mainmenu li a {
margin-left:0;
padding:0 1.75em 0 0;
font-size: 14px;
- text-decoration: none;
+ text-decoration: none;
+}
+
+ul.mainmenu a.active {
+ color: #00729e;
}
ul.mainmenu li a:hover, ul.mainmenu li a.active {
@@ -111,8 +115,8 @@ ul.submenu li a {
text-decoration: none;
}
-ul.submenu li a:hover, ul.submenu li a.active {
- background: #ccc;
+ul.submenu li a.active {
+ background: #00729e;
}
#header {
14 years, 7 months
[luci/demodata2] Corrections in style.css (consequence of merging).
by Jan Pokorný
commit 02380b4d9e8a72958fc85d17d2a067d003258746
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Tue Oct 13 17:22:05 2009 +0200
Corrections in style.css (consequence of merging).
luci/public/css/style.css | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index a746ea2..2b8f054 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -61,11 +61,7 @@ ul.mainmenu li a {
margin-left:0;
padding:0 1.75em 0 0;
font-size: 14px;
- text-decoration: none;
-}
-
-ul.mainmenu a.active {
- color: #00729e;
+ text-decoration: none;
}
ul.mainmenu li a:hover, ul.mainmenu li a.active {
@@ -115,8 +111,8 @@ ul.submenu li a {
text-decoration: none;
}
-ul.submenu li a.active {
- background: #00729e;
+ul.submenu li a:hover, ul.submenu li a.active {
+ background: #ccc;
}
#header {
14 years, 7 months
[luci/demodata2] '/cluster' part removed ('/clusters' is directly used), small changes.
by Jan Pokorný
commit 905d515980ae9d70ca6455ed967385ad9b7668c8
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Tue Oct 13 16:58:21 2009 +0200
'/cluster' part removed ('/clusters' is directly used), small changes.
Warning from scheme.py ('*' import) resolved.
luci/controllers/cluster.py | 9 +-
luci/controllers/root.py | 8 --
luci/controllers/scheme.py | 6 +-
luci/public/css/create.css | 6 -
luci/public/css/shared.css | 2 +-
luci/public/css/style.css | 59 ++++++----
luci/public/js/shared.js | 4 +-
luci/templates/cluster.html | 123 +++++++++++++++-----
.../templates/{create.html => cluster_create.html} | 5 +-
luci/templates/cluster_list.html | 102 ----------------
luci/templates/cluster_part/failover.html | 2 +-
luci/templates/cluster_part/fence.html | 2 +-
luci/templates/cluster_part/node.html | 6 +-
luci/templates/cluster_part/service.html | 2 +-
luci/templates/homebase.html | 7 +-
luci/templates/master.html | 4 +-
luci/widgets/create_cluster_form.py | 2 +-
17 files changed, 157 insertions(+), 192 deletions(-)
---
diff --git a/luci/controllers/cluster.py b/luci/controllers/cluster.py
index d315bb3..9464282 100644
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@ -66,7 +66,7 @@ base2CmdCtrl = app_globals.scheme.base2CmdCtrl
class ClusterController(SubController):
"""Subcontroller handling basic requests related with `clusters' part."""
- @forPageShowWithUrlCorrection('luci.templates.cluster_list')
+ @forPageShowWithUrlCorrection('luci.templates.cluster')
def default(self):
"""Handle simple clusters listing.
@@ -179,15 +179,18 @@ class ClusterApplyCommands(ApplyCommands):
class ClusterCmdController(SubController, SubControllerApplyMixin):
"""Subcontroller handling commands related with `clusters' part."""
- @forPageShowWithUrlCorrection('luci.templates.create')
+ @forPageShowWithUrlCorrection('luci.templates.cluster_create')
def create(self, name=''):
"""Display form for cluster creation."""
tmpl_context.form = create_cluster_form
+
+ base_url_str = relativeUrlList2Str(scheme.APP_PREFIX, scheme.CLUSTERS)
cmd_url_str = relativeUrlList2Str(scheme.APP_PREFIX,
base2CmdCtrl(scheme.CLUSTERS))
- return dict(cmd_url=cmd_url_str, page="create_cluster")
+ return dict(base_url=base_url_str,
+ cmd_url=cmd_url_str, page='create_cluster')
@forImmediateRedirect(allowed_methods='GET')
diff --git a/luci/controllers/root.py b/luci/controllers/root.py
index 60cbda5..1ad9480 100644
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@ -120,14 +120,6 @@ class RootController(BaseController):
"""Handle the 'about' page."""
return dict(page='about')
-
- @expose('luci.templates.cluster')
- def cluster(self,clusterpage='clusterlist', **args):
- if clusterpage == 'createcluster':
- tmpl_context.form = create_cluster_form
-
- return dict(page='cluster', clusterpage=clusterpage)
-
@expose('luci.templates.storage')
def storage(self,storagepage='systemlist'):
return dict(page='storage', storagepage=storagepage)
diff --git a/luci/controllers/scheme.py b/luci/controllers/scheme.py
index 524c319..64bdcf6 100644
--- a/luci/controllers/scheme.py
+++ b/luci/controllers/scheme.py
@@ -77,7 +77,11 @@ class LuciScheme(Scheme):
@classmethod
def getMounts(cls):
"""Defined as a method to avoid circular dependency."""
- from luci.controllers.cluster_part import *
+ from cluster_part.node import NodeController, NodeCmdController
+ from cluster_part.service import ServiceController, ServiceCmdController
+ from cluster_part.failover import FailoverController, FailoverCmdController
+ from cluster_part.fence import FenceController, FenceCmdController
+
return {
cls.NODES: (NodeController, NodeCmdController),
cls.SERVICES: (ServiceController, ServiceCmdController),
diff --git a/luci/public/css/shared.css b/luci/public/css/shared.css
index db2c2b0..678b412 100644
--- a/luci/public/css/shared.css
+++ b/luci/public/css/shared.css
@@ -106,7 +106,7 @@ tr.grid_row td {
/* --------------------------------- toolbar -------------------------------- */
-#toolbar {
+.toolbar {
clear: both;
padding: 0 1em;
margin: 1em 1em 0 1em;
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index 6b6d0b1..a746ea2 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -1,5 +1,4 @@
@import url("shared.css");
-@import url("create.css");
html {
background: #555555 url('../images/pagebg.png') top left repeat-x;
@@ -36,7 +35,7 @@ a {
}
ul.mainmenu {
- background: url(../images/toolbar_line.png) top left repeat-x;
+ background: url(../images/toolbar_line.png) top left repeat-x;
margin: 0;
padding: 0;
position: relative;
@@ -55,7 +54,7 @@ ul.mainmenu li {
}
ul.mainmenu li a {
- background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%;
+ background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%;
color: #fff;
float: left;
display: block;
@@ -82,11 +81,11 @@ ul.mainmenu li.first a:hover, ul.mainmenu li.first a.active {
}
ul.mainmenu li.loginlogout {
- float: right;
+ float: right;
}
ul.mainmenu li.loginlogout a:hover {
- background: url('../images/menu-item-actibg.png') left top no-repeat;
+ background: url('../images/menu-item-actibg.png') left top no-repeat;
}
ul.submenu {
@@ -143,11 +142,11 @@ ul.headermenu li {
ul.headermenu li a {
color:#fff;
- text-decoration: none;
+ text-decoration: none;
}
#wrapper {
- width: 960px;
+ width: 960px;
}
#content {
@@ -340,46 +339,58 @@ form.loginfields input#submit
padding-right:20px;
padding-top:0px;
}
+
.foottext p {
margin: 0; padding: 0;
}
+
.code {
-font-family:monospace;
-font-size:127%;
+ font-family:monospace;
+ font-size:127%;
}
+
span.code {
-background:#EEEEEE none repeat scroll 0% 0%;
-font-weight:bold;
+ background:#EEEEEE none repeat scroll 0% 0%;
+ font-weight:bold;
}
+
#flash, .notice {
-font-size:120%;
-font-weight:bolder;
-margin:0pt auto 0.5em;
-width:680px;
+ font-size:120%;
+ font-weight:bolder;
+ margin:0pt auto 0.5em;
+ width:680px;
}
+
#flash div, .notice {
-padding:20px 15px 20px 65px;
+ padding:20px 15px 20px 65px;
}
+
#flash .ok {
-background:#d8ecd8 url(../images/ok.png) no-repeat scroll 10px center;
+ background:#d8ecd8 url(../images/ok.png) no-repeat scroll 10px center;
}
+
#flash .warning {
-background:#fff483 url(../images/warning.png) no-repeat scroll 10px center;
+ background:#fff483 url(../images/warning.png) no-repeat scroll 10px center;
}
+
#flash .error {
-background:#f9c5c1 url(../images/error.png) no-repeat scroll 10px center;
+ background:#f9c5c1 url(../images/error.png) no-repeat scroll 10px center;
}
+
#flash .alert,
#flash .info {
-background:#e9f4fa url(../images/info.png) no-repeat scroll 10px center;
+ background:#e9f4fa url(../images/info.png) no-repeat scroll 10px center;
}
+
.notice {
-background:#e9f4fa url(../images/info.png) no-repeat scroll 10px center;
+ background:#e9f4fa url(../images/info.png) no-repeat scroll 10px center;
}
+
.fielderror {
-color:red;
-font-weight:bold;
+ color:red;
+ font-weight:bold;
}
+
div.clearingdiv {
-clear:both;
+ clear:both;
}
diff --git a/luci/public/js/shared.js b/luci/public/js/shared.js
index 7e04066..5ef6e0e 100644
--- a/luci/public/js/shared.js
+++ b/luci/public/js/shared.js
@@ -15,7 +15,7 @@ function onOverviewCollapse()
if (tb_shown && tb_collapsed)
{
tb_shown.style.display = 'none';
- tb_collapsed.style.display = 'inherit';
+ tb_collapsed.style.display = 'inherit';
overview.style.display = 'none';
}
}
@@ -32,7 +32,7 @@ function onOverviewShow()
if (tb_shown && tb_collapsed)
{
tb_shown.style.display = 'inherit';
- tb_collapsed.style.display = 'none';
+ tb_collapsed.style.display = 'none';
overview.style.display = 'inherit';
}
}
diff --git a/luci/templates/cluster.html b/luci/templates/cluster.html
index 5c75249..46ec6b1 100644
--- a/luci/templates/cluster.html
+++ b/luci/templates/cluster.html
@@ -1,41 +1,102 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+<!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>
+ <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+ <title py:content="''">Template: Clusters</title>
+ <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/cluster.css')}" />
</head>
-<body>
- <table>
- <tr>
- <td valign="top">
- <div class="sidebar">
- <a href="${tg.url('/clusters/')}">Cluster List</a><br/>
- <a href="${tg.url('/cluster/createcluster')}">Create a New Cluster</a><br/>
- <a href="${tg.url('/cluster/configure')}">Configure</a><br/>
- </div>
- </td>
- <td valign="top">
- <div class="mainpage">
- <div py:if="clusterpage == 'clusterlist'">
- <h3>Choose a cluster to administer</h3>
- <hr/>
- </div>
- <div py:if="clusterpage == 'createcluster'">
- <div py:replace="tmpl_context.form()">Input Form</div>
- </div>
- <div py:if="clusterpage == 'configure'">
- <h3>Choose a cluster to administer</h3>
- </div>
- </div>
- </td>
- </tr>
- </table>
+<body py:with="clusters = app_globals.data.clusters;
+ form_utils = app_globals.form_utils">
+
+ <form action="${tg.url(cmd_url + '/apply')}" method="post">
+ <div class="toolbar">
+ <!--<input type="submit" name="${apply_cmds.UPDATE}" value="${_('update')}" class="toolbar_button" id="tb_update"/>!-->
+ <a href="${tg.url(cmd_url + '/create')}" class="toolbar_button" id="tb_create">Create</a>
+ <a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
+ <input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete"/>
+ </div>
+
+ <!--! OVERVIEW SECTION. -->
+ <div id="overview">
+ <table id="clusters_tlist" class="maintable">
+ <thead>
+ <tr>
+ <th class="checkbox"></th>
+ <th class="icon"></th>
+ <th class="main_id">Name</th>
+ <th class="cluster_tlist_status">Status</th>
+ <th class="cluster_tlist_votes">Total Votes</th>
+ <th class="cluster_tlist_quorum">Min. Required Quorum</th>
+ <td class="table_space"></td>
+ </tr>
+ </thead>
+ <tbody>
+ <!--! List all the fences. -->
+ <tr py:for="i, (entity_name, cluster_data) in enumerate(clusters.iteritems())"
+ py:attrs="not i%2 and {'class': 'even'} or None"
+ py:with="identifier = form_utils.string2Id(entity_name)">
+ <td class="checkbox"><input type="checkbox" name="${identifier}"/></td>
+ <!--! Branch according to the status of the cluster. -->
+ <py:choose test="cluster_data['status']">
+ <!--! 1) Cluster is OK. -->
+ <py:when test="cluster_data.CLUSTER_OK">
+ <td class="icon"></td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_ok">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">OK</td>
+ </py:when>
+ <!--! 2) Cluster is not OK. -->
+ <py:when test="cluster_data.CLUSTER_NOT_OK">
+ <td class="icon">
+ <img src="${tg.url('/images/exclamation.png')}" alt="Cluster is not OK." />
+ </td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_fail">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">Not OK</td>
+ </py:when>
+ <!--! 3) Status of the cluster is unknown. -->
+ <py:when test="cluster_data.CLUSTER_UNKNOWN">
+ <td class="icon">
+ <img src="${tg.url('/images/question.png')}" alt="Status of the cluster is unknown." />
+ </td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_unknown">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">Status uknown</td>
+ </py:when>
+ </py:choose>
+ <td class="cluster_tlist_votes">${cluster_data['cluster_votes']}</td>
+ <td class="cluster_tlist_quorum">${cluster_data['required_quorum']}</td>
+ <td class="table_space"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </form>
+
+ <!--! DETAILS SECTION. -->
+ <div id="details" py:if="len(clusters) == 0">
+ <div id="details_header">
+ <div id="not_selected">
+ No item to display
+ </div>
+ </div>
+ </div>
+
</body>
</html>
diff --git a/luci/templates/create.html b/luci/templates/cluster_create.html
similarity index 77%
rename from luci/templates/create.html
rename to luci/templates/cluster_create.html
index 5077542..bfd764d 100644
--- a/luci/templates/create.html
+++ b/luci/templates/cluster_create.html
@@ -16,9 +16,8 @@
<tr>
<td valign="top">
<div class="sidebar">
- <a href="${tg.url('/clusters/')}">Cluster List</a><br/>
- <a href="${tg.url('/cluster/createcluster')}">Create a New Cluster</a><br/>
- <a href="${tg.url('/cluster/configure')}">Configure</a><br/>
+ <a href="${tg.url(base_url)}">Cluster List</a><br/>
+ <a href="${tg.url(cmd_url + '/create')}">Create a New Cluster</a><br/>
</div>
</td>
<td valign="top">
diff --git a/luci/templates/cluster_part/failover.html b/luci/templates/cluster_part/failover.html
index 3602363..1dfbe6b 100644
--- a/luci/templates/cluster_part/failover.html
+++ b/luci/templates/cluster_part/failover.html
@@ -18,7 +18,7 @@
form_utils = app_globals.form_utils">
<form action="${tg.url(cmd_url + '/apply')}" method="post">
- <div id="toolbar">
+ <div class="toolbar">
<input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete"/>
<a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
</div>
diff --git a/luci/templates/cluster_part/fence.html b/luci/templates/cluster_part/fence.html
index ac74141..c17dbef 100644
--- a/luci/templates/cluster_part/fence.html
+++ b/luci/templates/cluster_part/fence.html
@@ -16,7 +16,7 @@
form_utils = app_globals.form_utils">
<form action="${tg.url(cmd_url + '/apply')}" method="post">
- <div id="toolbar">
+ <div class="toolbar">
<input type="submit" name="${apply_cmds.UPDATE}" value="${_('Update')}" class="toolbar_button" id="tb_update"/>
<input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete"/>
<a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
diff --git a/luci/templates/cluster_part/node.html b/luci/templates/cluster_part/node.html
index fd91408..39b9b53 100644
--- a/luci/templates/cluster_part/node.html
+++ b/luci/templates/cluster_part/node.html
@@ -17,12 +17,16 @@
form_utils = app_globals.form_utils">
<form action="${tg.url(cmd_url + '/apply')}" method="post">
- <div id="toolbar">
+ <div class="toolbar" id="toolbar_collapsed">
+ <div class="toolbar_view_button" onclick="onOverviewShow()">show</div>
+ </div>
+ <div class="toolbar" id="toolbar_shown">
<input type="submit" name="${apply_cmds.REBOOT}" value="${_('Reboot')}" class="toolbar_button" id="tb_reboot" />
<input type="submit" name="${apply_cmds.FENCE}" value="${_('Fence')}" class="toolbar_button" id="tb_fence" />
<input type="submit" name="${apply_cmds.LEAVE}" value="${_('Leave Cluster')}" class="toolbar_button" id="tb_leave" />
<input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete" />
<a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
+ <div class="toolbar_view_button" onclick="onOverviewCollapse()">collapse</div>
</div>
<!--! OVERVIEW SECTION. -->
diff --git a/luci/templates/cluster_part/service.html b/luci/templates/cluster_part/service.html
index 1e6295e..0b5a704 100644
--- a/luci/templates/cluster_part/service.html
+++ b/luci/templates/cluster_part/service.html
@@ -16,7 +16,7 @@
form_utils = app_globals.form_utils">
<form action="${tg.url(cmd_url + '/apply')}" method="post">
- <div id="toolbar">
+ <div class="toolbar">
<input type="submit" name="${apply_cmds.REBOOT}" value="${_('Reboot')}" class="toolbar_button" id="tb_reboot" />
<input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete" />
<a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
diff --git a/luci/templates/homebase.html b/luci/templates/homebase.html
index 45a4dac..0025f15 100644
--- a/luci/templates/homebase.html
+++ b/luci/templates/homebase.html
@@ -21,8 +21,9 @@
<a href="/adduser">Add a User</a><br/>
</div>
</div>
- <div class="mainpage" py:choose="homebasepage">
- <div py:if="homebasepage == 'managesystems'">
+ <div class="mainpage"
+ py:choose="homebasepage">
+ <div py:when="'managesystems'">
<h3>Manage Systems and Clusters</h3>
<hr/>
<fieldset><legend>Reauthenticate</legend>
@@ -54,7 +55,7 @@
<div py:when="'homebasepage'">
<h2>Problems</h2>
<p>Table with summary of problems goes here</p>
- <h2><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page==page=='clusters']}">Clusters</a></h2>
+ <h2><a href="${tg.url('/clusters')}" class="${('', 'active')[defined('page') and page==page=='clusters']}">Clusters</a></h2>
<p>Table with summary of clusters goes here.</p>
</div>
</div>
diff --git a/luci/templates/master.html b/luci/templates/master.html
index 089493d..53a1254 100644
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@ -30,9 +30,7 @@
<div id="breadcrumb">
<ul class="mainmenu">
<li><a href="${tg.url('/')}" class="${('', 'active')[defined('page') and page=='homebase']}">Homebase</a></li>
- <li><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page=='clusters']}" py:if="(defined('page') and page=='clusters' or page=='nodes') or False">Clusters</a></li>
- <li><a href="${tg.url('/clusters/'+tmpl_context.cluster_name)}" class="${('', 'active')[defined('page') and page=='nodes']}" py:if="defined('page') and page=='nodes'"><span py:replace="tmpl_context.cluster_name">Nodes</span></a></li>
- <li></li>
+ <li><a href="${tg.url('/clusters')}" class="${('', 'active')[defined('page') and page=='clusters']}">Clusters*</a></li>
</ul>
</div>
diff --git a/luci/widgets/create_cluster_form.py b/luci/widgets/create_cluster_form.py
index 44f56c7..64dce46 100644
--- a/luci/widgets/create_cluster_form.py
+++ b/luci/widgets/create_cluster_form.py
@@ -21,4 +21,4 @@ class CreateClusterForm(twd.CustomisedForm):
CheckBoxTable('opt', options=[('shared_storage', "Enable Shared Storage Support"), ('reboot_nodes', "Reboot nodes before joining cluster"), ('same_passwd', "Check if node passwords are identical")], suppress_label = True, default = ("Enable Shared Storage Support"))
]
-create_cluster_form = CreateClusterForm('create_cluster_form', action='createcluster')
+create_cluster_form = CreateClusterForm('create_cluster_form', action='cluster_create')
14 years, 7 months
[luci/demodata2: 12/12] Merge branch 'demodata' into demodata2 based on last version of master.
by Jan Pokorný
commit fb1eb620e8f81421ec1423f418bc693a4d4bd6ab
Merge: 02a49ed... af82914...
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Mon Oct 12 20:54:09 2009 +0200
Merge branch 'demodata' into demodata2 based on last version of master.
* demodata:
- cluster_list.html renamed to cluster.html
Little changes from previous 2 cherry-picks + improved scripts for deploying.
Reduced the spacing between clusters and nodes in the cluster list and node
Initial UI changes - new navigation hierarchy, css changes.
Little changes connected with previous cherry-picking.
Another round ofstructural UI cleanup (css, html)
Merged with (most of) changes in master, Jeremy's 2nd commit.
Merging continues as I forgot some things.
Merged with Jeremy's version (that was based on master branch).
Little changes (a bit better collapsing of nodes list)
Still on demo data; internal changes + global resources part added
Conflicts (resolved):
luci/controllers/cluster_part/failover.py
luci/public/css/shared.css
luci/public/css/style.css
luci/templates/cluster_list.html
luci/templates/cluster_part/failover.html
luci/templates/cluster_part/fence.html
luci/templates/cluster_part/node.html
luci/templates/cluster_part/service.html
luci/templates/homebase.html
luci/templates/master.html
MAINTENANCE | 36 ++
deploy-devel.sh | 17 +-
deploy.sh | 20 +-
luci/controllers/cluster.py | 111 ++--
luci/controllers/cluster_part/failover.py | 100 ++--
luci/controllers/cluster_part/fence.py | 51 +-
luci/controllers/cluster_part/node.py | 53 +-
luci/controllers/cluster_part/service.py | 53 +-
luci/controllers/decorators.py | 72 ++-
luci/controllers/error.py | 6 +-
luci/controllers/global_res.py | 202 +++++++
luci/controllers/root.py | 150 ++++--
luci/controllers/scheme.py | 68 ++-
luci/controllers/secure.py | 15 +-
luci/controllers/template.py | 17 +-
luci/lib/app_globals.py | 6 +-
luci/lib/app_strings.py | 72 +++
luci/lib/base.py | 201 +++++---
luci/lib/demo_data.py | 585 +++++++++++++--------
luci/lib/form_utils.py | 121 +++--
luci/lib/helpers.py | 45 ++-
luci/lib/strings.py | 44 --
luci/public/css/global_res.css | 22 +
luci/public/css/shared.css | 52 +-
luci/public/css/style.css | 67 ++--
luci/public/images/{ => buttons}/add-grey.png | Bin 293 -> 293 bytes
luci/public/images/{ => buttons}/add-white.png | Bin 253 -> 253 bytes
luci/public/images/{ => buttons}/create-grey.png | Bin 545 -> 545 bytes
luci/public/images/{ => buttons}/create-white.png | Bin 377 -> 377 bytes
luci/public/images/{ => buttons}/delete-grey.png | Bin 353 -> 353 bytes
luci/public/images/{ => buttons}/delete-white.png | Bin 295 -> 295 bytes
luci/public/images/{ => buttons}/fence-grey.png | Bin 435 -> 435 bytes
luci/public/images/{ => buttons}/fence-white.png | Bin 389 -> 389 bytes
luci/public/images/{ => buttons}/leave-grey.png | Bin 484 -> 484 bytes
luci/public/images/{ => buttons}/leave-white.png | Bin 449 -> 449 bytes
luci/public/images/{ => buttons}/reboot-grey.png | Bin 373 -> 373 bytes
luci/public/images/{ => buttons}/reboot-white.png | Bin 310 -> 310 bytes
luci/public/js/failover.js | 8 +-
luci/public/js/shared.js | 39 ++
luci/templates/cluster_list.html | 7 +-
luci/templates/cluster_part/__init__.py | 2 +-
luci/templates/cluster_part/failover.html | 9 +-
luci/templates/cluster_part/fence.html | 7 +-
luci/templates/cluster_part/node.html | 23 +-
luci/templates/cluster_part/service.html | 13 +-
luci/templates/create.html | 34 ++
luci/templates/global_res.html | 85 +++
luci/templates/homebase.html | 20 +-
luci/templates/master.html | 20 +-
luci/templates/title.html | 23 +-
luci/widgets/create_cluster_form.py | 2 +-
setup.py | 13 +-
52 files changed, 1673 insertions(+), 818 deletions(-)
---
diff --cc luci/controllers/cluster.py
index ce7e7fe,c2d8459..d315bb3
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@@ -63,25 -63,27 +63,27 @@@ base2CmdCtrl = app_globals.scheme.base2
# ITEMS LISTING.
#
- class ClusterController(Subcontroller):
+ class ClusterController(SubController):
"""Subcontroller handling basic requests related with `clusters' part."""
- @forPageShowWithUrlCorrection('luci.templates.cluster')
+ @forPageShowWithUrlCorrection('luci.templates.cluster_list')
def default(self):
- """Handle simple cluster listing.
+ """Handle simple clusters listing.
E.g. <http://example.com/clusters> for situation described
in the module's doc.
"""
- page = 'clusters'
- tmpl_context.title_list.append(TitleStrings.CLUSTERS)
+ Title.usePart('CLUSTERS')
+
+ base_url_str = relativeUrlList2Str(scheme.APP_PREFIX, scheme.CLUSTERS)
+ cmd_url_str = relativeUrlList2Str(scheme.APP_PREFIX,
+ base2CmdCtrl(scheme.CLUSTERS))
- app_url = scheme.APP_PREFIX + u'/'
- return dict(base_url=base_url_str,
++ return dict(base_url=base_url_str, page='clusters',
+ cmd_url=cmd_url_str,
+ apply_cmds=ClusterApplyCommands)
- return dict(base_url=app_url + scheme.CLUSTERS,
- cmd_url=app_url + base2CmdCtrl(scheme.CLUSTERS),
- apply_cmds=ClusterApplyCommands,page=page)
@expose()
def lookup(self, name, *args):
@@@ -173,19 -175,22 +175,22 @@@ class ClusterApplyCommands(ApplyCommand
_delete = staticmethod(_delete)
- class ClusterCmdController(Subcontroller, SubcontrollerApplyMixin):
+ @setApplyCommands(ClusterApplyCommands)
+ class ClusterCmdController(SubController, SubControllerApplyMixin):
"""Subcontroller handling commands related with `clusters' part."""
- _apply_cmds = ClusterApplyCommands
-
@forPageShowWithUrlCorrection('luci.templates.create')
- def create(self, name=""):
+ def create(self, name=''):
"""Display form for cluster creation."""
- return dict(cmd_url= \
- scheme.APP_PREFIX + u'/' + base2CmdCtrl(scheme.CLUSTERS))
+ tmpl_context.form = create_cluster_form
+ cmd_url_str = relativeUrlList2Str(scheme.APP_PREFIX,
+ base2CmdCtrl(scheme.CLUSTERS))
- @forImmediateRedirect(allowed_methods = 'GET')
- return dict(cmd_url=cmd_url_str)
++ return dict(cmd_url=cmd_url_str, page="create_cluster")
+
+
+ @forImmediateRedirect(allowed_methods='GET')
def add(self):
"""Handle addition of a new cluster."""
diff --cc luci/controllers/cluster_part/failover.py
index 8a15604,914a0cb..4ff7d80
--- a/luci/controllers/cluster_part/failover.py
+++ b/luci/controllers/cluster_part/failover.py
@@@ -74,20 -75,25 +75,25 @@@ class FailoverController(SubController)
@forPageShowWithUrlCorrection('luci.templates.cluster_part.failover')
def default(self):
"""Handle simple failovers listing.
-
+
E.g. <http://example.com/clusters/ClusterOne/failovers> for situation
- described in the module's doc.
-
+ described in the module's doc.
+
"""
- tmpl_context.title_list.append(TitleStrings.FAILOVERS)
+ Title.usePart('FAILOVERS')
- cluster_url = tmpl_context.cluster_url + u'/'
+ base_url_str = relativeUrlList2Str(tmpl_context.cluster_url,
+ cluster_scheme.FAILOVERS)
+ cmd_url_str = relativeUrlList2Str(tmpl_context.cluster_url,
+ base2CmdCtrl(cluster_scheme.FAILOVERS))
+ service_cmd_url_str = \
+ relativeUrlList2Str(tmpl_context.cluster_url,
+ base2CmdCtrl(cluster_scheme.SERVICES))
- return dict(name=None,
+ return dict(name=None, page='nodes',
- base_url=cluster_url + cluster_scheme.FAILOVERS,
- cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FAILOVERS),
- service_cmd_url= \
- cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
+ base_url=base_url_str,
+ cmd_url=cmd_url_str,
+ service_cmd_url=service_cmd_url_str,
apply_cmds=FailoverApplyCommands)
@@@ -127,18 -133,22 +133,22 @@@ class _CertainFailoverController(SubCon
E.g. <http://example.com/clusters/ClusterOne/failovers/Failover1>
for situation described in the module's doc.
-
+
"""
- tmpl_context.title_list.append(TitleStrings.CERTAIN_FAILOVER \
- % self.entity_name)
+ Title.usePart('CERTAIN_FAILOVER', self.entity_name)
- cluster_url = tmpl_context.cluster_url + u'/'
+ base_url_str = relativeUrlList2Str(tmpl_context.cluster_url,
+ cluster_scheme.FAILOVERS)
+ cmd_url_str = relativeUrlList2Str(tmpl_context.cluster_url,
+ base2CmdCtrl(cluster_scheme.FAILOVERS))
+ service_cmd_url_str = \
+ relativeUrlList2Str(tmpl_context.cluster_url,
+ base2CmdCtrl(cluster_scheme.SERVICES))
- return dict(name=self.entity_name,
+ return dict(name=self.entity_name, page='nodes',
- base_url=cluster_url + cluster_scheme.FAILOVERS,
- cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FAILOVERS),
- service_cmd_url= \
- cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
+ base_url=base_url_str,
+ cmd_url=cmd_url_str,
+ service_cmd_url=service_cmd_url_str,
apply_cmds=FailoverApplyCommands)
diff --cc luci/controllers/cluster_part/service.py
index bbdd1e7,c50dcf9..3c68cba
--- a/luci/controllers/cluster_part/service.py
+++ b/luci/controllers/cluster_part/service.py
@@@ -76,9 -78,11 +78,11 @@@ class ServiceController(SubController)
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=None,
+ return dict(name=None, page='nodes',
base_url=cluster_url + cluster_scheme.SERVICES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
+ globalres_url=relativeUrlList2Str(scheme.APP_PREFIX,
+ scheme.GLOBAL_RES),
apply_cmds=ServiceApplyCommands)
@@@ -124,9 -127,11 +127,11 @@@ class _CertainServiceController(SubCont
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=self.entity_name,
+ return dict(name=self.entity_name, page='nodes',
base_url=cluster_url + cluster_scheme.SERVICES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
+ globalres_url=relativeUrlList2Str(scheme.APP_PREFIX,
+ scheme.GLOBAL_RES),
apply_cmds=ServiceApplyCommands)
diff --cc luci/controllers/root.py
index 7584d05,cdc579d..60cbda5
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@@ -47,24 -50,70 +50,70 @@@ class RootController(BaseController)
"""
def __call__(self, environ, start_response):
- """Invoke the Controller"""
+ """Set some defaults within 'tmpl_context' and invoke the Controller."""
+ # Remembers, which title part has been already used.
+ tmpl_context.already_used = {}
+ # Vars for title parts adding and remembering appropriate arguments.
tmpl_context.title_list = []
- tmpl_context.already_used = dict()
- tmpl_context.already_used.setdefault(False)
+ tmpl_context.title_args = {}
return BaseController.__call__(self, environ, start_response)
+
# SUBCONTROLLERS
+ error = ErrorController()
+
+ # TODO: Remove? See 'luci.controllers.secure'.
secc = SecureController()
+
+ # TODO: Remove?
admin = Catwalk(model, DBSession)
- error = ErrorController()
+
# METHODS OF THE ROOT CONTROLLER
-
- @expose('luci.templates.index')
+
+ # Homebase pages.
+
+ @expose('luci.templates.homebase')
+ # Uncomment this (or replace with more suitable decorator/predicate)
+ # to apply access control.
+ #(a)require(predicates.not_anonymous())
def index(self):
"""Handle the front-page."""
- return dict(page='index')
- return dict(homebasepage='homebasepage')
++ return dict(page='homebase', homebasepage='homebasepage')
+
+ @expose('luci.templates.homebase')
+ # Uncomment this (or replace with more suitable decorator/predicate)
+ # to apply access control.
+ #(a)require(predicates.not_anonymous())
+ def addsystem(self):
+ tmpl_context.form = create_add_system_form
- return dict(homebasepage='addsystem')
++ return dict(page='homebase', homebasepage='addsystem')
+
+ @expose('luci.templates.homebase')
+ # Uncomment this (or replace with more suitable decorator/predicate)
+ # to apply access control.
+ #(a)require(predicates.not_anonymous())
+ def addexisting(self):
+ tmpl_context.form = create_add_existing_form
- return dict(homebasepage='addexisting')
++ return dict(page='homebase', homebasepage='addexisting')
+
+ @expose('luci.templates.homebase')
+ # Uncomment this (or replace with more suitable decorator/predicate)
+ # to apply access control.
+ #(a)require(predicates.not_anonymous())
+ def adduser(self):
+ tmpl_context.form = create_add_user_form
- return dict(homebasepage='adduser')
++ return dict(page='homebase', homebasepage='adduser')
+
+ @expose('luci.templates.homebase')
+ # Uncomment this (or replace with more suitable decorator/predicate)
+ # to apply access control.
+ #(a)require(predicates.not_anonymous())
+ def managesystems(self):
+ tmpl_context.form = create_manage_systems_form
- return dict(homebasepage='managesystems')
++ return dict(page='homebase', homebasepage='managesystems')
+
@expose('luci.templates.about')
def about(self):
diff --cc luci/public/css/style.css
index 85da709,67dbb1a..6b6d0b1
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@@ -41,42 -36,38 +36,42 @@@ a
}
ul.mainmenu {
- background: url(../images/toolbar_line.png) top left repeat-x;
+ background: url(../images/toolbar_line.png) top left repeat-x;
- margin: 0;
+ margin: 0;
- padding: 0;
+ padding: 0;
- position: relative;
- float: left;
+ position: relative;
+ float: left;
- display: block;
- width: 960px;
+ display: block;
+ width: 960px;
}
ul.mainmenu li {
-/* background:transparent url(../images/breadcrumb_bg.png) repeat-x scroll 100% 50%; */
+/* background:transparent url(../images/breadcrumb_bg.png) repeat-x scroll 100% 50%; */
- list-style-type: none;
+ list-style-type: none;
- float: left;
+ float: left;
- margin: 0;
+ margin: 0;
- padding: 0 0 0 1em;
+ padding: 0 0 0 1em;
- position: relative;
+ position: relative;
}
ul.mainmenu li a {
- background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%;
+ background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%;
- color: #fff;
- float: left;
- display: block;
+ color: #fff;
+ float: left;
+ display: block;
- margin-left:0;
- padding:0 1.75em 0 0;
- font-size: 14px;
+ margin-left:0;
+ padding:0 1.75em 0 0;
+ font-size: 14px;
- text-decoration: none;
+ text-decoration: none;
}
+ul.mainmenu a.active {
+ color: #00729e;
+}
+
ul.mainmenu li a:hover, ul.mainmenu li a.active {
-/* background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%; */
-/* background: url('../images/menu-item-actibg.png') left top no-repeat; */
+/* background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%; */
+/* background: url('../images/menu-item-actibg.png') left top no-repeat; */
}
ul.mainmenu li.first a {
@@@ -156,12 -147,12 +151,12 @@@ ul.headermenu li a
}
#content {
- background: #fff url('../images/contentbg.png') left bottom no-repeat;
+ background: #fff url('../images/contentbg.png') left bottom no-repeat;
- margin: 0;
+ margin: 0;
padding: 0;
- overflow: hidden;
- float: left;
+ overflow: hidden;
+ float: left;
- min-height: 400px;
+ min-height: 400px;
width: 100%;
}
@@@ -328,10 -319,10 +323,10 @@@ form.loginfields input#submi
/* Other and footer */
#footer {
- clear:both;
+ clear:both;
- padding: 10px;
+ padding: 10px;
- color:#b1c2d0;
+ color:#b1c2d0;
- font-size:90%;
+ font-size:90%;
}
#footer a {
diff --cc luci/templates/cluster_list.html
index 8386269,0000000..e28cbf6
mode 100644,000000..100644
--- a/luci/templates/cluster_list.html
+++ b/luci/templates/cluster_list.html
@@@ -1,101 -1,0 +1,102 @@@
+<!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>${title()}</title>
++ <title py:content="''">Template: Clusters</title>
++ <link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/css/cluster.css')}" />
+</head>
+
+<body py:with="clusters = app_globals.data.clusters;
+ form_utils = app_globals.form_utils">
+
+ <form action="${tg.url(cmd_url + '/apply')}" method="post">
+ <div id="toolbar">
+ <!--<input type="submit" name="${apply_cmds.UPDATE}" value="${_('update')}" class="toolbar_button" id="tb_update"/>!-->
+ <a href="${tg.url(cmd_url + '/create')}" class="toolbar_button" id="tb_create">Create</a>
+ <a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
+ <input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete"/>
+ </div>
+
+ <!--! OVERVIEW SECTION. -->
+ <div id="overview">
+ <table id="clusters_tlist" class="maintable">
+ <thead>
+ <tr>
+ <th class="checkbox"></th>
+ <th class="icon"></th>
+ <th class="main_id">Name</th>
+ <th class="cluster_tlist_status">Status</th>
+ <th class="cluster_tlist_votes">Total Votes</th>
+ <th class="cluster_tlist_quorum">Min. Required Quorum</th>
+ <td class="table_space"></td>
+ </tr>
+ </thead>
+ <tbody>
+ <!--! List all the fences. -->
+ <tr py:for="i, (entity_name, cluster_data) in enumerate(clusters.iteritems())"
+ py:attrs="not i%2 and {'class': 'even'} or None"
+ py:with="identifier = form_utils.string2Id(entity_name)">
+ <td class="checkbox"><input type="checkbox" name="${identifier}"/></td>
+ <!--! Branch according to the status of the cluster. -->
+ <py:choose test="cluster_data['status']">
+ <!--! 1) Cluster is OK. -->
+ <py:when test="cluster_data.CLUSTER_OK">
+ <td class="icon"></td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_ok">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">OK</td>
+ </py:when>
+ <!--! 2) Cluster is not OK. -->
+ <py:when test="cluster_data.CLUSTER_NOT_OK">
+ <td class="icon">
+ <img src="${tg.url('/images/exclamation.png')}" alt="Cluster is not OK." />
+ </td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_fail">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">Not OK</td>
+ </py:when>
+ <!--! 3) Status of the cluster is unknown. -->
+ <py:when test="cluster_data.CLUSTER_UNKNOWN">
+ <td class="icon">
+ <img src="${tg.url('/images/question.png')}" alt="Status of the cluster is unknown." />
+ </td>
+ <td class="main_id">
+ <a href="${tg.url(base_url + '/' + entity_name)}">
+ <span class="entity_unknown">${entity_name}</span>
+ </a>
+ </td>
+ <td class="cluster_tlist_status">Status uknown</td>
+ </py:when>
+ </py:choose>
+ <td class="cluster_tlist_votes">${cluster_data['cluster_votes']}</td>
+ <td class="cluster_tlist_quorum">${cluster_data['required_quorum']}</td>
+ <td class="table_space"></td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </form>
+
+ <!--! DETAILS SECTION. -->
+ <div id="details" py:if="len(clusters) == 0">
+ <div id="details_header">
+ <div id="not_selected">
+ No item to display
+ </div>
+ </div>
+ </div>
+
+</body>
+</html>
diff --cc luci/templates/homebase.html
index 9acff1a,dca786c..45a4dac
--- a/luci/templates/homebase.html
+++ b/luci/templates/homebase.html
@@@ -15,14 -15,15 +15,14 @@@
<div class="sidebar">
<h2>Take action</h2>
<div class="actions">
- <a href="/homebase/addsystem">Add a System</a><br/>
- <a href="/homebase/addexisting">Add an Existing Cluster</a><br/>
- <a href="/homebase/managesystems">Manage Systems</a><br/>
- <a href="/homebase/adduser">Add a User</a><br/>
+ <a href="/addsystem">Add a System</a><br/>
+ <a href="/addexisting">Add an Existing Cluster</a><br/>
+ <a href="/managesystems">Manage Systems</a><br/>
+ <a href="/adduser">Add a User</a><br/>
</div>
</div>
- <div class="mainpage">
- <div class="mainpage"
- py:choose="homebasepage">
- <div py:when="'managesystems'">
++ <div class="mainpage" py:choose="homebasepage">
+ <div py:if="homebasepage == 'managesystems'">
<h3>Manage Systems and Clusters</h3>
<hr/>
<fieldset><legend>Reauthenticate</legend>
@@@ -51,10 -52,10 +51,10 @@@
<hr/>
<div py:replace="tmpl_context.form()">Input Form</div>
</div>
- <div py:if="homebasepage == 'homebasepage'">
+ <div py:when="'homebasepage'">
<h2>Problems</h2>
<p>Table with summary of problems goes here</p>
- <h2><a href="${tg.url('/clusters')}" class="${('', 'active')[defined('page') and page==page=='clusters']}">Clusters</a></h2>
+ <h2><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page==page=='clusters']}">Clusters</a></h2>
<p>Table with summary of clusters goes here.</p>
</div>
</div>
diff --cc luci/templates/master.html
index 4ae51eb,fdfed19..089493d
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@@ -21,10 -29,8 +29,10 @@@
<div id="breadcrumb">
<ul class="mainmenu">
- <li><a href="${tg.url('/homebase')}" class="${('', 'active')[defined('page') and page=='homebase']}">Homebase</a></li>
- <li><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page=='clusters']}" py:if="defined('page') and page=='clusters' or page=='nodes'">Clusters</a></li>
+ <li><a href="${tg.url('/')}" class="${('', 'active')[defined('page') and page=='homebase']}">Homebase</a></li>
- <li><a href="${tg.url('/clusters')}" class="${('', 'active')[defined('page') and page=='clusters']}">Clusters*</a></li>
++ <li><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page=='clusters']}" py:if="(defined('page') and page=='clusters' or page=='nodes') or False">Clusters</a></li>
+ <li><a href="${tg.url('/clusters/'+tmpl_context.cluster_name)}" class="${('', 'active')[defined('page') and page=='nodes']}" py:if="defined('page') and page=='nodes'"><span py:replace="tmpl_context.cluster_name">Nodes</span></a></li>
+ <li></li>
</ul>
</div>
diff --cc luci/templates/title.html
index 4ca2211,3777aa9..895f33f
--- a/luci/templates/title.html
+++ b/luci/templates/title.html
@@@ -1,10 -1,23 +1,23 @@@
<html xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude"
py:strip="">
- <py:def function="title(title_list=tmpl_context.title_list)">
- Luci
- <py:if test="len(title_list) != 0"
- py:replace="' | ' + ' > '.join(title_list)">
- </py:if>
+ <!--! Function for page's title preparation (excluding 'title' tag) -->
+ <py:def function="title(*args)"
+ py:with="app_separator = ' | ';
+ part_separator = ' > ';
+ app_name = 'Luci'" >
+ <!--! Default title's parts list from 'tmpl_context.title_list' can be
+ overridden by explicitly passed arguments. -->
-<py:with vars="title_args = len(args[0])!=0 and args or tmpl_context.title_list">
++<py:with vars="title_args = (len(args)!=0 and len(args[0])!=0) and args or tmpl_context.title_list">
+ <!--! Branch according to the length of title's parts list. -->
+ <py:choose test="len(title_args)">
+ <!--! 1) No title part. -->
+ <py:when test="0">${app_name}</py:when>
+ <!--! 2) Only one title part. -->
+ <py:when test="1">${app_name}<py:if test="len(title_args[0]) != 0" py:replace="app_separator + title_args[0].format(**tmpl_context.title_args)"></py:if></py:when>
+ <!--! 3) 2+ title parts. -->
+ <py:otherwise>${app_name + app_separator + (part_separator.join(title_args)).format(**tmpl_context.title_args)}</py:otherwise>
+ </py:choose>
+ </py:with>
</py:def>
</html>
14 years, 7 months
[luci] (12 commits) Created branch demodata2
by Jan Pokorný
The branch 'demodata2' was created.
Summary of new commits:
aef6d6c... Still on demo data; internal changes + global resources par (*)
aa10ecd... Little changes (a bit better collapsing of nodes list) (*)
ee37884... Merged with Jeremy's version (that was based on master bran (*)
f8410d7... Merging continues as I forgot some things. (*)
c7bddb2... Merged with (most of) changes in master, Jeremy's 2nd commi (*)
79d65f3... Another round ofstructural UI cleanup (css, html) (*)
5423e9d... Little changes connected with previous cherry-picking. (*)
228b26d... Initial UI changes - new navigation hierarchy, css changes. (*)
ded7a16... Reduced the spacing between clusters and nodes in the clust (*)
bfdf633... Little changes from previous 2 cherry-picks + improved scri (*)
af82914... - cluster_list.html renamed to cluster.html (*)
fb1eb62... Merge branch 'demodata' into demodata2 based on last versio
(*) This commit already existed in another branch; no separate mail sent
14 years, 7 months
[luci] Breadcrumbs and submenus now highlight properly.
by Chris Feist
commit 02a49edea252ef5bc5c5e528d745c7d80a21880e
Author: Chris Feist <cfeist(a)redhat.com>
Date: Fri Oct 9 18:13:29 2009 -0500
Breadcrumbs and submenus now highlight properly.
- Breadcrumbs in the main menu now highlight, Jeremy should be able
to take the changes and create the proper background images when
they are highlighted.
- The cluster submenus now also highlight when they're active,
Jeremy will also be able to create rounded corners for these.
luci/public/css/style.css | 10 +++++++---
luci/templates/master.html | 15 ++++++++-------
2 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index 980265b..85da709 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -70,6 +70,10 @@ ul.mainmenu li a {
text-decoration: none;
}
+ul.mainmenu a.active {
+ color: #00729e;
+}
+
ul.mainmenu li a:hover, ul.mainmenu li a.active {
/* background:transparent url(../images/breadcrumb_separator.png) no-repeat scroll 100% 50%; */
/* background: url('../images/menu-item-actibg.png') left top no-repeat; */
@@ -117,8 +121,8 @@ ul.submenu li a {
text-decoration: none;
}
-ul.submenu li a:hover, ul.submenu li a.active {
- background: #ccc;
+ul.submenu li a.active {
+ background: #00729e;
}
#header {
@@ -383,4 +387,4 @@ font-weight:bold;
}
div.clearingdiv {
clear:both;
-}
\ No newline at end of file
+}
diff --git a/luci/templates/master.html b/luci/templates/master.html
index 31b0122..4ae51eb 100644
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@ -21,9 +21,10 @@
<div id="breadcrumb">
<ul class="mainmenu">
- <li><a href="${tg.url('/homebase')}">Homebase</a></li>
- <li><a href="${tg.url('/cluster')}" py:if="defined('page') and page=='clusters' or page=='nodes'">Clusters</a></li>
- <li><a href="${tg.url('/clusters/'+tmpl_context.cluster_name)}" py:if="defined('page') and page=='nodes'"><span py:replace="tmpl_context.cluster_name">Nodes</span></a></li>
+ <li><a href="${tg.url('/homebase')}" class="${('', 'active')[defined('page') and page=='homebase']}">Homebase</a></li>
+ <li><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page=='clusters']}" py:if="defined('page') and page=='clusters' or page=='nodes'">Clusters</a></li>
+ <li><a href="${tg.url('/clusters/'+tmpl_context.cluster_name)}" class="${('', 'active')[defined('page') and page=='nodes']}" py:if="defined('page') and page=='nodes'"><span py:replace="tmpl_context.cluster_name">Nodes</span></a></li>
+ <li></li>
</ul>
</div>
@@ -33,10 +34,10 @@
</py:with>
<py:if test="'cluster_url' in dir(tmpl_context)">
<ul class="submenu">
- <li><a href="${tg.url(tmpl_context.cluster_url + '/nodes')}">Nodes</a></li>
- <li><a href="${tg.url(tmpl_context.cluster_url + '/services')}">Services</a></li>
- <li><a href="${tg.url(tmpl_context.cluster_url + '/failovers')}">Failovers</a></li>
- <li><a href="${tg.url(tmpl_context.cluster_url +'/fences')}">Fences</a></li>
+ <li><a href="${tg.url(tmpl_context.cluster_url + '/nodes')}" class="${('', 'active')[base_url.endswith('/nodes')]}">Nodes</a></li>
+ <li><a href="${tg.url(tmpl_context.cluster_url + '/services')}" class="${('', 'active')[base_url.endswith('/services')]}">Services</a></li>
+ <li><a href="${tg.url(tmpl_context.cluster_url + '/failovers')}" class="${('', 'active')[base_url.endswith('/failovers')]}">Failovers</a></li>
+ <li><a href="${tg.url(tmpl_context.cluster_url +'/fences')}" class="${('', 'active')[base_url.endswith('/fences')]}">Fences</a></li>
</ul>
</py:if>
<py:if test="defined('page')">
14 years, 7 months
[luci] Created breadcrumbs for homebase, clusters and clusternames.
by Chris Feist
commit f6f03b6b5ff6b8ddc6060a96f151819ca3df1ed8
Author: Chris Feist <cfeist(a)redhat.com>
Date: Fri Oct 9 17:09:30 2009 -0500
Created breadcrumbs for homebase, clusters and clusternames.
luci/controllers/cluster_part/failover.py | 4 ++--
luci/controllers/cluster_part/fence.py | 4 ++--
luci/controllers/cluster_part/node.py | 4 ++--
luci/controllers/cluster_part/service.py | 4 ++--
luci/templates/master.html | 5 +++--
5 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/luci/controllers/cluster_part/failover.py b/luci/controllers/cluster_part/failover.py
index 86fcef4..8a15604 100644
--- a/luci/controllers/cluster_part/failover.py
+++ b/luci/controllers/cluster_part/failover.py
@@ -83,7 +83,7 @@ class FailoverController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=None,
+ return dict(name=None, page='nodes',
base_url=cluster_url + cluster_scheme.FAILOVERS,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FAILOVERS),
service_cmd_url= \
@@ -134,7 +134,7 @@ class _CertainFailoverController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=self.entity_name,
+ return dict(name=self.entity_name, page='nodes',
base_url=cluster_url + cluster_scheme.FAILOVERS,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FAILOVERS),
service_cmd_url= \
diff --git a/luci/controllers/cluster_part/fence.py b/luci/controllers/cluster_part/fence.py
index 565921d..c9e7d61 100644
--- a/luci/controllers/cluster_part/fence.py
+++ b/luci/controllers/cluster_part/fence.py
@@ -76,7 +76,7 @@ class FenceController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=None,
+ return dict(name=None, page='nodes',
base_url=cluster_url + cluster_scheme.FENCES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FENCES),
node_base_url=cluster_url + cluster_scheme.NODES,
@@ -125,7 +125,7 @@ class _CertainFenceController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=self.entity_name,
+ return dict(name=self.entity_name, page='nodes',
base_url=cluster_url + cluster_scheme.FENCES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.FENCES),
node_base_url=cluster_url + cluster_scheme.NODES,
diff --git a/luci/controllers/cluster_part/node.py b/luci/controllers/cluster_part/node.py
index 298408c..7007fc5 100644
--- a/luci/controllers/cluster_part/node.py
+++ b/luci/controllers/cluster_part/node.py
@@ -75,7 +75,7 @@ class NodeController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=None,
+ return dict(page='nodes',name=None,
base_url=cluster_url + cluster_scheme.NODES,
cmd_url= \
cluster_url + base2CmdCtrl(cluster_scheme.NODES),
@@ -125,7 +125,7 @@ class _CertainNodeController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=self.entity_name,
+ return dict(page='nodes', name=self.entity_name,
base_url=cluster_url + cluster_scheme.NODES,
cmd_url= \
cluster_url + base2CmdCtrl(cluster_scheme.NODES),
diff --git a/luci/controllers/cluster_part/service.py b/luci/controllers/cluster_part/service.py
index 86ec20a..bbdd1e7 100644
--- a/luci/controllers/cluster_part/service.py
+++ b/luci/controllers/cluster_part/service.py
@@ -76,7 +76,7 @@ class ServiceController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=None,
+ return dict(name=None, page='nodes',
base_url=cluster_url + cluster_scheme.SERVICES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
apply_cmds=ServiceApplyCommands)
@@ -124,7 +124,7 @@ class _CertainServiceController(Subcontroller):
cluster_url = tmpl_context.cluster_url + u'/'
- return dict(name=self.entity_name,
+ return dict(name=self.entity_name, page='nodes',
base_url=cluster_url + cluster_scheme.SERVICES,
cmd_url=cluster_url + base2CmdCtrl(cluster_scheme.SERVICES),
apply_cmds=ServiceApplyCommands)
diff --git a/luci/templates/master.html b/luci/templates/master.html
index 07d8514..31b0122 100644
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@ -21,8 +21,9 @@
<div id="breadcrumb">
<ul class="mainmenu">
- <li><a href="${tg.url('/homebase')}" class="${('', 'active')[defined('page') and page==page=='homebase']}">Homebase</a></li>
- <li><a href="${tg.url('/cluster')}" class="${('', 'active')[defined('page') and page==page=='clusters']}">Clusters*</a></li>
+ <li><a href="${tg.url('/homebase')}">Homebase</a></li>
+ <li><a href="${tg.url('/cluster')}" py:if="defined('page') and page=='clusters' or page=='nodes'">Clusters</a></li>
+ <li><a href="${tg.url('/clusters/'+tmpl_context.cluster_name)}" py:if="defined('page') and page=='nodes'"><span py:replace="tmpl_context.cluster_name">Nodes</span></a></li>
</ul>
</div>
14 years, 7 months
[luci/demodata] - cluster_list.html renamed to cluster.html
by Jan Pokorný
commit af82914bc3a268ab4722df40198c5907110b0a35
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Fri Oct 9 22:30:54 2009 +0200
- cluster_list.html renamed to cluster.html
luci/controllers/cluster.py | 2 +-
luci/templates/{cluster_list.html => cluster.html} | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/luci/controllers/cluster.py b/luci/controllers/cluster.py
index e613018..c2d8459 100644
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@ -66,7 +66,7 @@ base2CmdCtrl = app_globals.scheme.base2CmdCtrl
class ClusterController(SubController):
"""Subcontroller handling basic requests related with `clusters' part."""
- @forPageShowWithUrlCorrection('luci.templates.cluster_list')
+ @forPageShowWithUrlCorrection('luci.templates.cluster')
def default(self):
"""Handle simple clusters listing.
diff --git a/luci/templates/cluster_list.html b/luci/templates/cluster.html
similarity index 99%
rename from luci/templates/cluster_list.html
rename to luci/templates/cluster.html
index d123438..46ec6b1 100644
--- a/luci/templates/cluster_list.html
+++ b/luci/templates/cluster.html
@@ -21,7 +21,7 @@
<a href="${tg.url(cmd_url + '/create')}" class="toolbar_button" id="tb_create">Create</a>
<a href="${tg.url(cmd_url + '/add')}" class="toolbar_button" id="tb_add">Add</a>
<input type="submit" name="${apply_cmds.DELETE}" value="${_('Delete')}" class="toolbar_button" id="tb_delete"/>
- </div>
+ </div>
<!--! OVERVIEW SECTION. -->
<div id="overview">
14 years, 7 months
[luci/demodata] Little changes from previous 2 cherry-picks + improved scripts for deploying.
by Jan Pokorný
commit bfdf633f2d429e61a1ce6b949e61737f6df6a23e
Author: Jan Pokorny <jpokorny(a)redhat.com>
Date: Fri Oct 9 22:17:06 2009 +0200
Little changes from previous 2 cherry-picks + improved scripts for deploying.
MAINTENANCE | 4 +++
deploy-devel.sh | 17 +++++++++---
deploy.sh | 20 ++++++++++---
luci/controllers/root.py | 62 ++++++++++++++++++++++++-------------------
luci/public/css/shared.css | 10 +------
5 files changed, 68 insertions(+), 45 deletions(-)
---
diff --git a/MAINTENANCE b/MAINTENANCE
index 2187016..3973487 100644
--- a/MAINTENANCE
+++ b/MAINTENANCE
@@ -22,6 +22,10 @@ Following files seem to be unuseful, thus suitable for removal:
- if removed, its use has to be removed also from
luci/controllers/root.py
+* luci/templates/authentication.html
+- it comes from original TG's app template (?) and only
+ use to serve for demonstration of how to use authorization
+
* luci/model/model.template
- it comes from original TG's app template (?) and only
use to serve for demonstration of how to deal with DB
diff --git a/deploy-devel.sh b/deploy-devel.sh
index f245ddd..b960603 100755
--- a/deploy-devel.sh
+++ b/deploy-devel.sh
@@ -3,10 +3,19 @@
# Simple script for deploying luci (prepare application + database
# and start serving it) for development purposes (with automatic reload
# on appropriate files changes).
-#
-# You may need to make sure that you are running this script from
-# tg2env environment (activated with 'source bin/activate' command
-# from within tg2env directory).
+
+# If you are not using tg2env environment, you may want to comment out
+# following line, otherwise set appropriate path for it.
+tg2env_dir=~/tg2env
+
+if [ "${tg2env_dir:=no_dir}" != no_dir ]
+ then
+ echo "Starting tg2env environment from $tg2env_dir ..."
+ source $tg2env_dir/bin/activate && echo "tg2env started properly." \
+ || echo "start of tg2env failed."
+ else
+ echo "To use tg2env environment, set tg2env_dir variable in the script."
+fi
python setup.py install
paster setup-app development.ini
diff --git a/deploy.sh b/deploy.sh
index 54ddbe3..821027a 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,11 +1,21 @@
#!/bin/bash
#
-# Simple script for deploying luci (prepare application + database
+# Simple script for deploying Luci (prepare application + database
# and start serving it).
-#
-# You may need to make sure that you are running this script from
-# tg2env environment (activated with 'source bin/activate' command
-# from within tg2env directory).
+
+
+# If you are not using tg2env environment, you may want to comment out
+# following line, otherwise set appropriate path for it.
+tg2env_dir=~/tg2env
+
+if [ "${tg2env_dir:=no_dir}" != no_dir ]
+ then
+ echo "Starting tg2env environment from $tg2env_dir ..."
+ source $tg2env_dir/bin/activate && echo "tg2env started properly." \
+ || echo "start of tg2env failed."
+ else
+ echo "To use tg2env environment, set tg2env_dir variable in the script."
+fi
python setup.py install
paster setup-app development.ini
diff --git a/luci/controllers/root.py b/luci/controllers/root.py
index 0cd47d9..cdc579d 100644
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@ -5,9 +5,11 @@
from tg import expose, flash, require, url, request, redirect, app_globals, \
tmpl_context
from pylons.i18n import ugettext as _, lazy_ugettext as l_
-from catwalk.tg2 import Catwalk
from repoze.what import predicates
+# TODO: Remove?
+from catwalk.tg2 import Catwalk
+
from luci.controllers.decorators import *
from luci.lib.base import BaseController
@@ -17,7 +19,6 @@ from luci.controllers.secure import SecureController
from luci.model import DBSession, metadata
from luci import model
-#from luci.widgets.fdom_add_form import create_fdom_add_form
from luci.widgets.add_system_form import create_add_system_form
from luci.widgets.add_existing_form import create_add_existing_form
@@ -60,11 +61,13 @@ class RootController(BaseController):
# SUBCONTROLLERS
+ error = ErrorController()
+
# TODO: Remove? See 'luci.controllers.secure'.
secc = SecureController()
+ # TODO: Remove?
admin = Catwalk(model, DBSession)
- error = ErrorController()
# METHODS OF THE ROOT CONTROLLER
@@ -82,7 +85,7 @@ class RootController(BaseController):
@expose('luci.templates.homebase')
# Uncomment this (or replace with more suitable decorator/predicate)
# to apply access control.
- #(a)require(predicates.not_anonymous())
+ #(a)require(predicates.not_anonymous())
def addsystem(self):
tmpl_context.form = create_add_system_form
return dict(homebasepage='addsystem')
@@ -90,7 +93,7 @@ class RootController(BaseController):
@expose('luci.templates.homebase')
# Uncomment this (or replace with more suitable decorator/predicate)
# to apply access control.
- #(a)require(predicates.not_anonymous())
+ #(a)require(predicates.not_anonymous())
def addexisting(self):
tmpl_context.form = create_add_existing_form
return dict(homebasepage='addexisting')
@@ -98,7 +101,7 @@ class RootController(BaseController):
@expose('luci.templates.homebase')
# Uncomment this (or replace with more suitable decorator/predicate)
# to apply access control.
- #(a)require(predicates.not_anonymous())
+ #(a)require(predicates.not_anonymous())
def adduser(self):
tmpl_context.form = create_add_user_form
return dict(homebasepage='adduser')
@@ -106,7 +109,7 @@ class RootController(BaseController):
@expose('luci.templates.homebase')
# Uncomment this (or replace with more suitable decorator/predicate)
# to apply access control.
- #(a)require(predicates.not_anonymous())
+ #(a)require(predicates.not_anonymous())
def managesystems(self):
tmpl_context.form = create_manage_systems_form
return dict(homebasepage='managesystems')
@@ -129,26 +132,6 @@ class RootController(BaseController):
def storage(self,storagepage='systemlist'):
return dict(page='storage', storagepage=storagepage)
- # TODO: Automatically generated/experimental methods? Perhaps clean
- # the methods below needed.
-
- @expose('luci.templates.authentication')
- def auth(self):
- """Display some information about auth* on this application."""
- return dict(page='auth')
-
- @expose('luci.templates.index')
- @require(predicates.has_permission('manage', msg=l_('Only for managers')))
- def manage_permission_only(self, **kw):
- """Illustrate how a page for managers only works."""
- return dict(page='managers stuff')
-
- @expose('luci.templates.index')
- @require(predicates.is_user('editor', msg=l_('Only for the editor')))
- def editor_user_only(self, **kw):
- """Illustrate how a page exclusive for the editor works."""
- return dict(page='editor stuff')
-
@expose('luci.templates.login')
def login(self, came_from=url('/')):
"""Start the user login."""
@@ -158,6 +141,9 @@ class RootController(BaseController):
return dict(page='login', login_counter=str(login_counter),
came_from=came_from)
+
+ # AUTHENTICATION (LOGIN) METHODS OF THE ROOT CONTROLLER
+
@expose()
def post_login(self, came_from=url('/')):
"""
@@ -182,3 +168,25 @@ class RootController(BaseController):
flash(_('We hope to see you soon!'))
redirect(came_from)
+
+ # TODO: Automatically generated/experimental methods? Perhaps cleaning
+ # the methods below needed.
+
+ @expose('luci.templates.authentication')
+ def auth(self):
+ """Display some information about auth* on this application."""
+ return dict(page='auth')
+
+ @expose('luci.templates.index')
+ @require(predicates.has_permission('manage', msg=l_('Only for managers')))
+ def manage_permission_only(self, **kw):
+ """Illustrate how a page for managers only works."""
+ return dict(page='managers stuff')
+
+ @expose('luci.templates.index')
+ @require(predicates.is_user('editor', msg=l_('Only for the editor')))
+ def editor_user_only(self, **kw):
+ """Illustrate how a page exclusive for the editor works."""
+ return dict(page='editor stuff')
+
+
diff --git a/luci/public/css/shared.css b/luci/public/css/shared.css
index c8e24e8..db2c2b0 100644
--- a/luci/public/css/shared.css
+++ b/luci/public/css/shared.css
@@ -25,18 +25,10 @@ img {
}
-.maintable th {
+.maintable td, .maintable th {
padding: 8px;
}
-.maintable td {
- padding: 2px;
-}
-
-.maintable td {
- padding: 2px;
-}
-
.table_space {
width: 100%;
}
14 years, 7 months
[luci/demodata] Reduced the spacing between clusters and nodes in the cluster list and node
by Jan Pokorný
commit ded7a1691445499990f79c1d5fa3ed60feb85366
Author: Chris Feist <cfeist(a)redhat.com>
Date: Wed Oct 7 16:50:03 2009 -0500
Reduced the spacing between clusters and nodes in the cluster list and node
list pages.
luci/public/css/shared.css | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/luci/public/css/shared.css b/luci/public/css/shared.css
index db2c2b0..c8e24e8 100644
--- a/luci/public/css/shared.css
+++ b/luci/public/css/shared.css
@@ -25,10 +25,18 @@ img {
}
-.maintable td, .maintable th {
+.maintable th {
padding: 8px;
}
+.maintable td {
+ padding: 2px;
+}
+
+.maintable td {
+ padding: 2px;
+}
+
.table_space {
width: 100%;
}
14 years, 7 months