[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2928] trunk/py/scripts/addons/ netrender: netrender

Martin Poirier theeth at yahoo.com
Mon Jan 23 02:36:41 CET 2012


Revision: 2928
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2928
Author:   theeth
Date:     2012-01-23 01:36:40 +0000 (Mon, 23 Jan 2012)
Log Message:
-----------
netrender

new jquery-based web interface developed by Philippe Van Hecke (great thanks)
Works in parallel with the existing html interface (both have a link pointing to the other) which might very well be phased out at some point.

Modified Paths:
--------------
    trunk/py/scripts/addons/netrender/balancing.py
    trunk/py/scripts/addons/netrender/master_html.py
    trunk/py/scripts/addons/netrender/model.py
    trunk/py/scripts/addons/netrender/netrender.js

Added Paths:
-----------
    trunk/py/scripts/addons/netrender/css/
    trunk/py/scripts/addons/netrender/css/jquery-ui.css
    trunk/py/scripts/addons/netrender/css/jquery.themes.css
    trunk/py/scripts/addons/netrender/js/
    trunk/py/scripts/addons/netrender/js/jquery-ui.js
    trunk/py/scripts/addons/netrender/js/jquery.js
    trunk/py/scripts/addons/netrender/js/jquery.themes.js
    trunk/py/scripts/addons/netrender/js/netrender-action.js
    trunk/py/scripts/addons/netrender/js/netrender-widget.js
    trunk/py/scripts/addons/netrender/js/netrender.js
    trunk/py/scripts/addons/netrender/js/netrender_balance.js
    trunk/py/scripts/addons/netrender/newui.html

Modified: trunk/py/scripts/addons/netrender/balancing.py
===================================================================
--- trunk/py/scripts/addons/netrender/balancing.py	2012-01-22 03:44:09 UTC (rev 2927)
+++ trunk/py/scripts/addons/netrender/balancing.py	2012-01-23 01:36:40 UTC (rev 2928)
@@ -24,6 +24,7 @@
 class RatingRule:
     def __init__(self):
         self.enabled = True
+        self.editable = False
 
     def id(self):
         return str(id(self))
@@ -34,7 +35,7 @@
 class ExclusionRule:
     def __init__(self):
         self.enabled = True
-
+        self.editable = True
     def id(self):
         return str(id(self))
 
@@ -44,7 +45,7 @@
 class PriorityRule:
     def __init__(self):
         self.enabled = True
-
+        self.editable = True
     def id(self):
         return str(id(self))
 
@@ -118,6 +119,13 @@
     def rate(self, job):
         # less usage is better
         return job.usage / job.priority
+    def serialize(self):
+        return { "type": "rating",
+                 "enabled": self.enabled,
+                 "descritpiton":str(self),
+                 "limit":"",
+                 "id":self.id()
+	  }
 
 class RatingUsageByCategory(RatingRule):
     def __init__(self, get_jobs):
@@ -134,6 +142,16 @@
         # less usage is better
         return total_category_usage / maximum_priority
 
+    def serialize(self):
+        return { "type": "rating",
+                 "enabled": self.enabled,
+                 "editable": self.editable,
+                 "descritpiton":str(self),
+                 "limit":"",
+                 "id":self.id()
+	  }
+
+
 class NewJobPriority(PriorityRule):
     def __init__(self, limit = 1):
         super().__init__()
@@ -150,6 +168,15 @@
 
     def test(self, job):
         return job.countFrames(status = FRAME_DONE) < self.limit
+    def serialize(self):
+        return { "type": "priority",
+                 "enabled": self.enabled,
+                 "editable": self.editable,
+                 "descritpiton":str(self),
+                 "limit": self.limit,           
+                 "limit_str":self.str_limit(),
+                 "id":self.id()
+	  }
 
 class MinimumTimeBetweenDispatchPriority(PriorityRule):
     def __init__(self, limit = 10):
@@ -168,12 +195,36 @@
     def test(self, job):
         return job.countFrames(status = FRAME_DISPATCHED) == 0 and (time.time() - job.last_dispatched) / 60 > self.limit
 
+    def serialize(self):
+        return { "type": "priority",
+                 "enabled": self.enabled,
+                 "editable": self.editable,
+                 "descritpiton":str(self),
+                 "limit": self.limit,
+                 "limit_str":self.str_limit(),
+                 "id":self.id()
+                 
+	  }
+
 class ExcludeQueuedEmptyJob(ExclusionRule):
+    def __init__(self):
+        super().__init__()
+        self.editable= False
     def __str__(self):
         return "Exclude non queued or empty jobs"
 
     def test(self, job):
         return job.status != JOB_QUEUED or job.countFrames(status = FRAME_QUEUED) == 0
+    
+    def serialize(self):
+        return { "type": "exception",
+                 "enabled": self.enabled,
+                 "editable": self.editable,
+                 "descritpiton":str(self),
+                 "limit": "",
+                 "limit_str":"",
+                 "id":self.id()
+	  }
 
 class ExcludeSlavesLimit(ExclusionRule):
     def __init__(self, count_jobs, count_slaves, limit = 0.75):
@@ -193,3 +244,13 @@
 
     def test(self, job):
         return not ( self.count_jobs() == 1 or self.count_slaves() <= 1 or float(job.countSlaves() + 1) / self.count_slaves() <= self.limit )
+
+    def serialize(self):
+        return { "type": "exception",
+                 "enabled": self.enabled,
+                 "editable": self.editable,
+                 "descritpiton":str(self),
+                 "limit": self.limit,
+                 "limit_str":self.str_limit(),
+                 "id":self.id()
+	  }

Added: trunk/py/scripts/addons/netrender/css/jquery-ui.css
===================================================================
--- trunk/py/scripts/addons/netrender/css/jquery-ui.css	                        (rev 0)
+++ trunk/py/scripts/addons/netrender/css/jquery-ui.css	2012-01-23 01:36:40 UTC (rev 2928)
@@ -0,0 +1,568 @@
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.16
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=333333&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=25&borderColorHeader=333333&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=000000&bgTextureContent=05_inset_soft.png&bgImgOpacityContent=25&borderColorContent=666666&fcContent=ffffff&iconColorContent=cccccc&bgColorDefault=555555&bgTextureDefault=02_glass.png&bgImgOpacityDefault=20&borderColorDefault=666666&fcDefault=eeeeee&iconColorDefault=cccccc&bgColorHover=0078a3&bgTextureHover=02_glass.png&bgImgOpacityHover=40&borderColorHover=59b4d4&fcHover=ffffff&iconColorHover=ffffff&bgColorActive=f58400&bgTextureActive=05_inset_soft.png&bgImgOpacityActive=30&borderColorActive=ffaf0f&fcActive=ffffff&iconColorActive=222222&bgColorHighlight=eeeeee&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=80&borderColorHighlight=cccccc&fcHig
 hlight=2e7db2&iconColorHighlight=4b8e0b&bgColorError=ffc73d&bgTextureError=02_glass.png&bgImgOpacityError=40&borderColorError=ffb73d&fcError=111111&iconColorError=a83300&bgColorOverlay=5c5c5c&bgTextureOverlay=01_flat.png&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=cccccc&bgTextureShadow=01_flat.png&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Segoe UI, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Segoe UI, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #666666; background: #000000 url(images/ui-bg_inset-soft_25_000000_1x100.png) 50% bottom repeat-x; color: #ffffff; }
+.ui-widget-content a { color: #ffffff; }
+.ui-widget-header { border: 1px solid #333333; background: #333333 url(images/ui-bg_gloss-wave_25_333333_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; }
+.ui-widget-header a { color: #ffffff; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #666666; background: #555555 url(images/ui-bg_glass_20_555555_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eeeeee; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #eeeeee; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #59b4d4; background: #0078a3 url(images/ui-bg_glass_40_0078a3_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #ffffff; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #ffaf0f; background: #f58400 url(images/ui-bg_inset-soft_30_f58400_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  {border: 1px solid #cccccc; background: #eeeeee url(images/ui-bg_highlight-soft_80_eeeeee_1x100.png) 50% top repeat-x; color: #2e7db2; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #2e7db2; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #ffb73d; background: #ffc73d url(images/ui-bg_glass_40_ffc73d_1x400.png) 50% 50% repeat-x; color: #111111; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #111111; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #111111; }

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list