OSDN Git Service

commited
authorJunichi Shinohara <junichi@karesansui-project.info>
Wed, 21 Jul 2010 05:02:33 +0000 (14:02 +0900)
committerJunichi Shinohara <junichi@karesansui-project.info>
Wed, 21 Jul 2010 05:02:33 +0000 (14:02 +0900)
karesansui/templates/default/host/host.part

index 97613aa..6128e60 100644 (file)
@@ -1,5 +1,9 @@
 <%doc>Copyright (C) 2009-2010 HDE, Inc.</%doc>
 <%inherit file="../include/common.part" />
+<%!
+from karesansui.lib.template import clipping
+from karesansui.lib.const import MACHINE_NAME_CLIPPING_RANGE
+%>
 <script type="text/javascript">
 <!--
 
@@ -300,7 +304,7 @@ $(document).ready(function(){
                                     <img src="${host.webicon()}" alt="" width="114px" height="114px" />
     % endif
                                 </div>
-                                ${host.name}
+                                ${clipping(host.name, MACHINE_NAME_CLIPPING_RANGE) | h}
                                 <br/>
                                 <span class="status">(${_('Host')})</span>
                             </div>
@@ -313,7 +317,7 @@ $(document).ready(function(){
                                     <img src="${'http://%s%s' % (host.hostname, host.webicon())}" alt="" width="114px" height="114px" />
     % endif
                                 </div>
-                                ${host.name}
+                                ${clipping(host.name, MACHINE_NAME_CLIPPING_RANGE) | h}
                                 <br/>
                                 <span class="status">(${_('Host')})</span>
                             </div>