commit 313033ce9620143a87d20a9c7ec3d4822ad65a5d
Author: Chris Feist <cfeist(a)redhat.com>
Date: Tue Sep 29 17:42:05 2009 -0500
- Worked on improving menu system.
- Added left menu items that should list all the clusters
- Not yet fully functional, but using the look from Eve's layouts.
luci/controllers/cluster.py | 3 +-
luci/controllers/root.py | 3 ++
luci/public/css/style.css | 69 ++++++++++++++++++++++--------------------
luci/public/images/conga.png | Bin 0 -> 4171 bytes
luci/templates/about.html | 20 +++++++++---
luci/templates/header.html | 3 +-
luci/templates/master.html | 45 +++++++++++++++++----------
7 files changed, 85 insertions(+), 58 deletions(-)
---
diff --git a/luci/controllers/cluster.py b/luci/controllers/cluster.py
index 587bb82..ce7e7fe 100644
--- a/luci/controllers/cluster.py
+++ b/luci/controllers/cluster.py
@@ -74,13 +74,14 @@ class ClusterController(Subcontroller):
in the module's doc.
"""
+ page = 'clusters'
tmpl_context.title_list.append(TitleStrings.CLUSTERS)
app_url = scheme.APP_PREFIX + u'/'
return dict(base_url=app_url + scheme.CLUSTERS,
cmd_url=app_url + base2CmdCtrl(scheme.CLUSTERS),
- apply_cmds=ClusterApplyCommands)
+ apply_cmds=ClusterApplyCommands,page=page)
@expose()
def lookup(self, name, *args):
diff --git a/luci/controllers/root.py b/luci/controllers/root.py
index 818e534..7584d05 100644
--- a/luci/controllers/root.py
+++ b/luci/controllers/root.py
@@ -94,6 +94,9 @@ class RootController(BaseController):
#flash('current is %s %s [%s]' % (clusterpage, request.method,
str(args)), 'error')
from luci.widget_validators.validate_create_cluster_form import
validate_create_cluster_form
validate_create_cluster_form(self, **args)
+ if clusterpage == 'clusterlist':
+ redirect ('/clusters/',args)
+
return dict(page='cluster', clusterpage=clusterpage)
@expose('luci.templates.storage')
diff --git a/luci/public/css/style.css b/luci/public/css/style.css
index ca7e45c..115f92d 100644
--- a/luci/public/css/style.css
+++ b/luci/public/css/style.css
@@ -26,37 +26,33 @@ a {
color: #286571;
}
-#header {
- height: 132px;
- margin: 10px 10px 0 10px;
- background: url('../images/logo.jpg') top left no-repeat;
+.leftmenu {
+ position: relative;
+ float:left;
+ width: 136px;
+ background-color: #ffffff;
}
-#header h1 {
- padding: 0;
- margin: 0;
- padding-top: 30px;
- padding-left: 180px;
- color: #fff;
- position: relative;
- font-size: 36px;
+.leftmenu h2 {
+ background-color: #bdd898;
+ border: 1px solid #000000;
+ margin: 0 0 0 0;
}
-#header h1 .subtitle {
- font-size: 60%;
- position: absolute;
- left: 240px;
- top: 70px;
+.leftmenu h3 {
+ margin: 5px 5px 5px 5px;
+ font-weight: normal;
}
-ul#mainmenu {
+ul.mainmenu {
margin: 0;
- padding: 0 10px;
- background: url('../images/menubg.png') top left no-repeat;
- height: 38px;
+ padding: 0 0px;
+ position: relative;
+ float: left;
+ height: 30px;
}
-ul#mainmenu li {
+ul.mainmenu li {
list-style-type: none;
margin: 0;
padding: 0;
@@ -65,7 +61,7 @@ ul#mainmenu li {
float: left;
}
-ul#mainmenu li a {
+ul.mainmenu li a {
color: #fff;
float: left;
height: 31px;
@@ -75,37 +71,44 @@ ul#mainmenu li a {
padding: 0 10px;
font-size: 12px;
text-decoration: none;
- background: url('../images/menu-item-border.png') left top no-repeat;
}
-ul#mainmenu li a:hover, ul#mainmenu li a.active {
+ul.mainmenu li a:hover, ul.mainmenu li a.active {
background: url('../images/menu-item-actibg.png') left top no-repeat;
}
-ul#mainmenu li.first a {
+ul.mainmenu li.first a {
background: none;
}
-ul#mainmenu li.first a:hover, ul#mainmenu li.first a.active {
- background: url('../images/menu-item-actibg-first.png') left top no-repeat;
+ul.mainmenu li.first a:hover, ul.mainmenu li.first a.active {
}
-ul#mainmenu li.loginlogout
+ul.mainmenu li.loginlogout
{
float: right;
- right: 10px;
}
-ul#mainmenu li.loginlogout a:hover
+ul.mainmenu li.loginlogout a:hover
{
- background: url('../images/menu-item-border.png') left top no-repeat;
+ background: url('../images/menu-item-actibg.png') left top no-repeat;
+}
+
+ul.submenu li a {
+ position: relative;
+ float: left;
+ height: 25px;
+ display: block;
+ font-size: 10px;
+ clear: right;
}
#content {
background: #fff url('../images/contentbg.png') left bottom no-repeat;
margin : 0 10px 10px 10px;
- padding: 0 10px;
+ padding: 0 0px;
overflow: hidden;
+ float: left;
}
#content .currentpage {
diff --git a/luci/public/images/conga.png b/luci/public/images/conga.png
new file mode 100644
index 0000000..e349cf4
Binary files /dev/null and b/luci/public/images/conga.png differ
diff --git a/luci/templates/about.html b/luci/templates/about.html
index b1f8e04..0981b4c 100644
--- a/luci/templates/about.html
+++ b/luci/templates/about.html
@@ -1,9 +1,18 @@
-<html>
- <head>
+<!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>Conga User Manual</title>
- </head>
+</head>
<body>
+ <table><tr><td width="800">
<h3>Conga Architecture</h3>
Conga is an agent/server architecture for remote administration of
@@ -34,7 +43,8 @@
which users are allowed to access which systems in the luci server
database. It is possible to import users as a batch operation in a new luci
server, just as it is possible to import systems.
-
+</td></tr>
+</table>
</body>
-
</html>
+
diff --git a/luci/templates/header.html b/luci/templates/header.html
index 931823e..560d112 100644
--- a/luci/templates/header.html
+++ b/luci/templates/header.html
@@ -3,8 +3,7 @@
py:strip="">
<py:def function="header">
<div id="header">
- <h1>
- </h1>
+ <h3></h3>
</div>
</py:def>
</html>
diff --git a/luci/templates/master.html b/luci/templates/master.html
index f23faa2..4762da3 100644
--- a/luci/templates/master.html
+++ b/luci/templates/master.html
@@ -17,23 +17,34 @@
<body py:match="body" py:attrs="select('@*')">
${header()}
- <ul id="mainmenu">
- <li><a
href="${tg.url('/homebase')}">homebase</a></li>
- <li><a
href="${tg.url('/cluster')}">cluster</a></li>
- <li><a
href="${tg.url('/storage')}">storage</a></li>
- <li><a href="${tg.url('/about')}"
class="${('', 'active')[defined('page') and
page==page=='about']}">About</a></li>
- <py:if test="'cluster_url' in dir(tmpl_context)">
- <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>
- </py:if>
- <span py:if="tg.auth_stack_enabled" py:strip="True">
- <li py:if="not request.identity" id="login"
class="loginlogout"><a
href="${tg.url('/login')}">Login</a></li>
- <li py:if="request.identity" id="login"
class="loginlogout"><a
href="${tg.url('/logout_handler')}">Logout</a></li>
- <li py:if="request.identity" id="admin"
class="loginlogout"><a
href="${tg.url('/admin')}">Admin</a></li>
- </span>
- </ul>
+ <div class="leftmenu">
+ <img src="../../images/conga.png"/>
+ <h2>CLUSTERS</h2>
+ <h3>ClusterOne</h3>
+ <h3>ClusterTwo</h3>
+ </div>
+
+ <div class="menus">
+ <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']}">cluster</a></li>
+ <li><a href="${tg.url('/about')}"
class="${('', 'active')[defined('page') and
page==page=='about']}">About</a></li>
+ <span py:if="tg.auth_stack_enabled" py:strip="True">
+ <li py:if="not request.identity" id="login"
class="loginlogout"><a
href="${tg.url('/login')}">Login</a></li>
+ <li py:if="request.identity" id="login"
class="loginlogout"><a
href="${tg.url('/logout_handler')}">Logout</a></li>
+ <li py:if="request.identity" id="admin"
class="loginlogout"><a
href="${tg.url('/admin')}">Admin</a></li>
+ </span>
+ </ul><br/><br/>
+ <py:if test="'cluster_url' in dir(tmpl_context)">
+ <ul class="mainmenu 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>
+ </ul>
+ <br/><br/>
+ </py:if>
+ </div>
<div id="content">
<py:if test="defined('page')">
<div class="currentpage">