[CalendarServer-changes] [12622] CalendarServer/trunk/calendarserver/webadmin

source_changes at macosforge.org source_changes at macosforge.org
Wed Mar 12 11:23:24 PDT 2014


Revision: 12622
          http://trac.calendarserver.org//changeset/12622
Author:   wsanchez at apple.com
Date:     2014-02-08 14:34:30 -0800 (Sat, 08 Feb 2014)
Log Message:
-----------
Add logs resource

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/webadmin/landing.py
    CalendarServer/trunk/calendarserver/webadmin/landing.xhtml

Added Paths:
-----------
    CalendarServer/trunk/calendarserver/webadmin/logs.py
    CalendarServer/trunk/calendarserver/webadmin/logs.xhtml

Modified: CalendarServer/trunk/calendarserver/webadmin/landing.py
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/landing.py	2014-02-08 22:14:21 UTC (rev 12621)
+++ CalendarServer/trunk/calendarserver/webadmin/landing.py	2014-02-08 22:34:30 UTC (rev 12622)
@@ -26,6 +26,7 @@
 # from twisted.web.template import renderer
 
 from .resource import PageElement, TemplateResource
+from .logs import LogsResource
 
 
 
@@ -60,3 +61,5 @@
         self.directory = directory
         self.store = store
         self._principalCollections = principalCollections
+
+        self.putChild("logs", LogsResource())

Modified: CalendarServer/trunk/calendarserver/webadmin/landing.xhtml
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/landing.xhtml	2014-02-08 22:14:21 UTC (rev 12621)
+++ CalendarServer/trunk/calendarserver/webadmin/landing.xhtml	2014-02-08 22:34:30 UTC (rev 12622)
@@ -11,6 +11,7 @@
     <h1><t:slot name="title" /></h1>
 
     <ul>
+      <li><a href="logs">Server Logs</a></li>
     </ul>
 
   </body>

Added: CalendarServer/trunk/calendarserver/webadmin/logs.py
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/logs.py	                        (rev 0)
+++ CalendarServer/trunk/calendarserver/webadmin/logs.py	2014-02-08 22:34:30 UTC (rev 12622)
@@ -0,0 +1,56 @@
+# -*- test-case-name: calendarserver.webadmin.test.test_log -*-
+##
+# Copyright (c) 2009-2014 Apple Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##
+
+"""
+Calendar Server Web Admin UI.
+"""
+
+__all__ = [
+    "LogsResource",
+]
+
+# from twisted.web.template import renderer
+
+from .resource import PageElement, TemplateResource
+
+
+
+class LogsPageElement(PageElement):
+    """
+    Logs page element.
+    """
+
+    def __init__(self):
+        PageElement.__init__(self, "logs")
+
+
+    def pageSlots(self):
+        return {
+            u"title": u"Calendar & Contacts Server Logs",
+        }
+
+
+
+class LogsResource(TemplateResource):
+    """
+    Web administration landing page resource.
+    """
+
+    addSlash = False
+
+    def __init__(self):
+        TemplateResource.__init__(self, LogsPageElement())

Added: CalendarServer/trunk/calendarserver/webadmin/logs.xhtml
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/logs.xhtml	                        (rev 0)
+++ CalendarServer/trunk/calendarserver/webadmin/logs.xhtml	2014-02-08 22:34:30 UTC (rev 12622)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html xmlns:t="http://twistedmatrix.com/ns/twisted.web.template/0.1" t:render="main">
+
+  <head>
+    <title><t:slot name="title" /></title>
+    <link t:render="stylesheet" />
+  </head>
+
+  <body>
+
+    <h1><t:slot name="title" /></h1>
+
+    <p>...</p>
+
+  </body>
+
+</html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/8639a183/attachment.html>


More information about the calendarserver-changes mailing list