[CalendarServer-changes] [12703] CalendarServer/trunk/calendarserver/webadmin
source_changes at macosforge.org
source_changes at macosforge.org
Wed Mar 12 11:15:55 PDT 2014
Revision: 12703
http://trac.calendarserver.org//changeset/12703
Author: wsanchez at apple.com
Date: 2014-02-14 10:13:25 -0800 (Fri, 14 Feb 2014)
Log Message:
-----------
Add work resources
Added Paths:
-----------
CalendarServer/trunk/calendarserver/webadmin/work.py
CalendarServer/trunk/calendarserver/webadmin/work.xhtml
Added: CalendarServer/trunk/calendarserver/webadmin/work.py
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/work.py (rev 0)
+++ CalendarServer/trunk/calendarserver/webadmin/work.py 2014-02-14 18:13:25 UTC (rev 12703)
@@ -0,0 +1,64 @@
+# -*- test-case-name: calendarserver.webadmin.test.test_principals -*-
+##
+# Copyright (c) 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.
+##
+
+from __future__ import print_function
+
+"""
+Calendar Server principal management web UI.
+"""
+
+__all__ = [
+ "WorkMonitorResource",
+]
+
+# from twisted.internet.defer import inlineCallbacks, returnValue
+# from twisted.web.template import tags as html, renderer
+
+from .resource import PageElement, TemplateResource
+
+
+
+class WorkMonitorPageElement(PageElement):
+ """
+ Principal management page element.
+ """
+
+ def __init__(self, store):
+ PageElement.__init__(self, u"work")
+
+ self._store = store
+
+
+ def pageSlots(self):
+ return {
+ u"title": u"Workload Monitor",
+ }
+
+
+
+class WorkMonitorResource(TemplateResource):
+ """
+ Principal management page resource.
+ """
+
+ addSlash = True
+
+
+ def __init__(self, store):
+ TemplateResource.__init__(
+ self, lambda: WorkMonitorPageElement(store)
+ )
Added: CalendarServer/trunk/calendarserver/webadmin/work.xhtml
===================================================================
--- CalendarServer/trunk/calendarserver/webadmin/work.xhtml (rev 0)
+++ CalendarServer/trunk/calendarserver/webadmin/work.xhtml 2014-02-14 18:13:25 UTC (rev 12703)
@@ -0,0 +1,18 @@
+<!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>
+
+
+
+
+ </body>
+
+</html>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140312/579c733f/attachment.html>
More information about the calendarserver-changes
mailing list