cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: kupcevic@sourceware.org <kupcevic@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga/luci site/luci/Extensions/StorageReport. ...
Date: 9 Oct 2006 17:03:18 -0000	[thread overview]
Message-ID: <20061009170318.3188.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Changes by:	kupcevic at sourceware.org	2006-10-09 17:03:17

Modified files:
	luci/site/luci/Extensions: StorageReport.py 
	luci/storage   : form-macros 

Log message:
	luci storage: GoTo links to move up/down block device hierarchy

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/site/luci/Extensions/StorageReport.py.diff?cvsroot=cluster&r1=1.11&r2=1.12
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/luci/storage/form-macros.diff?cvsroot=cluster&r1=1.9&r2=1.10

--- conga/luci/site/luci/Extensions/StorageReport.py	2006/10/09 17:01:19	1.11
+++ conga/luci/site/luci/Extensions/StorageReport.py	2006/10/09 17:03:17	1.12
@@ -1669,6 +1669,7 @@
         for name in old_props:
             new_props['content_variable_' + d['id'] + '_' + name] = old_props[name]
         d['props'] = new_props
+        d['is_source'] = False
         
         # content's color and icon
         color = 'black'
@@ -1678,9 +1679,15 @@
             icon_name = get_fs_icon(d['xml'].getAttribute('fs_type'))
         elif type == 'mapper_source':
             mapper_type = d['xml'].getAttribute('mapper_type')
+            mapper_id = d['xml'].getAttribute('mapper_id')
+            pretty_mapper_type, dummy1, dummy2 = get_pretty_mapper_info(mapper_type)
             dummy1, dummy2, icon_name = get_mapper_icons(mapper_type)
             if mapper_type == MAPPER_VG_TYPE:
                 color = '#a43737'
+            d['is_source'] = True
+            d['mapper_type'] = mapper_type
+            d['mapper_id'] = mapper_id
+            d['pretty_mapper_type'] = pretty_mapper_type
         elif type == 'none':
             pass
         elif type == 'hidden':
--- conga/luci/storage/form-macros	2006/10/09 16:16:11	1.9
+++ conga/luci/storage/form-macros	2006/10/09 17:03:17	1.10
@@ -589,20 +589,21 @@
      <span tal:omit-tag=""
            tal:repeat="bd_data mapper/targets">
       <div tal:attributes="id    bd_data/path;
-                            class string:invisible"> 
+                           class string:invisible"> 
        <div metal:use-macro="here/form-macros/macros/display-BD"/>
       </div>
      </span>
      <span tal:omit-tag=""
            tal:repeat="bd_data mapper/new_targets">
       <div tal:attributes="id    bd_data/path;
-                            class string:invisible"> 
+                           class string:invisible"> 
        <div metal:use-macro="here/form-macros/macros/display-BD"/>
       </div>
      </span>
      <span tal:omit-tag=""
            tal:repeat="bd_data mapper/sources">
-      <div tal:attributes="id    bd_data/path;
+      <div tal:define="displaying_source python:True" 
+           tal:attributes="id    bd_data/path;
                            class string:invisible"> 
        <div metal:use-macro="here/form-macros/macros/display-BD"/>
       </div>
@@ -1419,6 +1420,15 @@
            <span tal:omit-tag=""
                  tal:condition="not: bd_data/new">
             <span tal:replace="bd_data/pretty_type"/> '<span tal:replace="bd_data/pretty_name"/>' - <span tal:replace="bd_data/path"/>
+            <span tal:omit-tag=""
+                  tal:condition="displaying_source|nothing">
+             <br/>
+             <a tal:define="tmp_URL context/storage/index_html/absolute_url;
+                            URL python:tmp_URL + '?storagename=' + storagename + '&pagetype=62'"
+                tal:attributes="href python:URL + '&mapper_type=' + bd_data['mapper_type'] + '&mapper_id=' + bd_data['mapper_id'] + '&bd_path=' + bd_data['path']"
+                style="font-size: xx-small;"
+                tal:content="python: 'Go to ' + bd_data['pretty_mapper_type']"></a>
+            </span>
            </span>
            <span tal:omit-tag=""
                  tal:condition="bd_data/new">
@@ -1485,6 +1495,18 @@
                                       value cont/id"/>
                <span tal:replace="cont/name"/>
               </span>
+              <span tal:omit-tag="" 
+                    tal:define="cont python:conts[0]" 
+                    tal:condition="not: displaying_source|nothing">
+               <span tal:condition="cont/is_source">
+                <br/>
+                <a tal:define="tmp_URL context/storage/index_html/absolute_url;
+                               URL python:tmp_URL + '?storagename=' + storagename + '&pagetype=52'"
+                   tal:attributes="href python:URL + '&mapper_type=' + cont['mapper_type'] + '&mapper_id=' + cont['mapper_id']"
+                   style="font-size: xx-small;"
+                   tal:content="python: 'Go to ' + cont['pretty_mapper_type']"></a>
+               </span>
+              </span>
              </td>
              <td style="min-width: 30px;">
               &nbsp;



             reply	other threads:[~2006-10-09 17:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-09 17:03 kupcevic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-10-09 19:11 [Cluster-devel] conga/luci site/luci/Extensions/StorageReport. kupcevic
2006-10-14 20:01 kupcevic
2006-10-15  5:09 kupcevic
2006-10-15  5:44 kupcevic
2006-10-15 22:34 kupcevic
2006-10-16  7:39 kupcevic
2006-10-16 15:30 kupcevic
2007-05-30 22:04 rmccabe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20061009170318.3188.qmail@sourceware.org \
    --to=kupcevic@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).