[Checkins] SVN: Sandbox/ulif/grok-adminui/src/grok/admin/ Fixed functional tests. Added first (non-informative) object browser view.

Uli Fouquet uli at gnufix.de
Fri Jul 13 05:19:21 EDT 2007


Log message for revision 77815:
  Fixed functional tests. Added first (non-informative) object browser view.

Changed:
  U   Sandbox/ulif/grok-adminui/src/grok/admin/README.txt
  U   Sandbox/ulif/grok-adminui/src/grok/admin/view.py
  A   Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/inspect.pt

-=-
Modified: Sandbox/ulif/grok-adminui/src/grok/admin/README.txt
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/README.txt	2007-07-13 09:16:49 UTC (rev 77814)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/README.txt	2007-07-13 09:19:20 UTC (rev 77815)
@@ -1,3 +1,4 @@
+=====================
 A basic grok admin UI
 =====================
 
@@ -16,27 +17,53 @@
   applications. Selected items may be deleted.
 
 
-To Do
+TODO:
 -----
 
-* Better application handling
+Layout/Design/Templates:
+........................
 
-  - Configure apps.
+* Get rid of garbage in docgrok-views
 
-* Maintenance tools
+* Get a new layout
 
-  - Start/stop/restart Zope3.
+* Rename topics:
 
-* Debugging tools
+  - z3index -> server
 
-  - Show error logs.
+  - appsindex -> applications
 
-* Introspection tool
+* AJAXification using some framework (MojiKit or KSS most probably)
 
+
+Functional:
+...........
+
+* Debugging
+
+  - Debugger
+
+  - Error Logs, usable for developers
+
+* Profiling
+
+* Object browser / Introspection tool
+
   - Give information concerning installed apps, their containers
     and contained objects.
 
-* Nicer layout
+* Better application handling
 
-* AJAXification using some framework (MojiKit or KSS most probably)
+  - Configure apps.
 
+* Display hints for where to find username / password for new users
+
+* Login/Logout(?)
+
+* Display username(?)
+
+* Error Messages:
+
+  - Give message, when input errors (no appname given etc.) occur
+
+  - Customizable error pages(?)

Modified: Sandbox/ulif/grok-adminui/src/grok/admin/view.py
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/view.py	2007-07-13 09:16:49 UTC (rev 77814)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/view.py	2007-07-13 09:19:20 UTC (rev 77815)
@@ -5,6 +5,7 @@
 from grok.admin.docgrok import DocGrokTextFile
 
 import zope.component
+from zope.interface import Interface
 from zope.app.folder.interfaces import IRootFolder
 
 from zope.app import zapi
@@ -88,6 +89,63 @@
         return '/docgrok/' in self.url()
 
 
+class Inspect(GAIAView):
+    """Basic object browser.
+    """
+    grok.context(Interface)
+
+    def getId(self):
+        if hasattr( self.context, '__name__'):
+            return self.context.__name__
+        if hasattr( self.context, 'id' ):
+            return self.context.id
+        return
+
+    def getZODBPath(self):
+        # XXX To be implemented.
+        return
+
+    def getDottedPath(self):
+        # XXX To be implemented.
+        return
+
+    def getSize(self):
+        # XXX To be implemented.
+        return
+
+    def getCreationDate(self):
+        # XXX To be implemented.
+        return
+
+    def getModificationDate(self):
+        # XXX To be implemented.
+        return
+
+    def isBroken(self):
+        # XXX To be implemented.
+        return
+
+    def getOwner(self):
+        # XXX To be implemented.
+        return
+
+    def getSecurityInfo(self):
+        # XXX To be implemented.
+        return
+
+    def getParent(self):
+        # XXX To be implemented.
+        return
+
+    def getChildren(self):
+        # XXX To be implemented.
+        return
+
+    def getType(self):
+        # XXX To be implemented really.
+        return str(self.context)
+
+
 class Index(GAIAView):
     """A redirector to the real frontpage."""
 
@@ -208,7 +266,7 @@
 class Macros(GAIAView):
     """Provides the o-wrap layout."""
 
-    grok.context(IRootFolder)
+    grok.context(Interface)
 
 
 class DocGrokView(GAIAView):
@@ -390,3 +448,5 @@
     def getPackagePathParts(self):
         return self.getPathParts(
             self.context.getPackagePath())
+
+

Added: Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/inspect.pt
===================================================================
--- Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/inspect.pt	                        (rev 0)
+++ Sandbox/ulif/grok-adminui/src/grok/admin/view_templates/inspect.pt	2007-07-13 09:19:20 UTC (rev 77815)
@@ -0,0 +1,15 @@
+<html metal:use-macro="context/@@macros/gaia-page">
+  <head>
+    <title></title>
+  </head>
+  <body>
+    <div metal:fill-slot="content">
+      <h1>
+	'<span tal:content="view/getId"
+	     tal:on-error="default">Unnamed Object</span>'
+	(<span tal:content="view/getType"
+	      tal:on-error="default">unknown type</span>)
+      </h1>
+    </div>
+  </body>
+</html>
\ No newline at end of file



More information about the Checkins mailing list