[Erp5-report] r23924 - in /erp5/trunk/bt5/erp5_wizard: SkinTemplateItem/portal_skins/erp5_w...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Oct 1 10:17:19 CEST 2008


Author: ivan
Date: Wed Oct  1 10:17:08 2008
New Revision: 23924

URL: http://svn.erp5.org?rev=23924&view=rev
Log:
Decrease back timeout for status refresh.
Add simple progress bar and needed styling for it.

Added:
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_getCurrentInstallationStatus.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessage.xml
Modified:
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessageRenderer.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_generateJavaScript.xml
    erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_viewInstallationStatus.xml
    erp5/trunk/bt5/erp5_wizard/bt/revision

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_getCurrentInstallationStatus.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_getCurrentInstallationStatus.xml?rev=23924&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_getCurrentInstallationStatus.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_getCurrentInstallationStatus.xml Wed Oct  1 10:17:08 2008
@@ -1,0 +1,126 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string>"""\n
+Estimate current installation status """\n
+activity_threshold = 46\n
+\n
+\n
+return 100\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string></string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>0</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>activity_threshold</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>WizardTool_getCurrentInstallationStatus</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Added: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessage.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessage.xml?rev=23924&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessage.xml (added)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessage.xml Wed Oct  1 10:17:08 2008
@@ -1,0 +1,178 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_container</string> </key>
+                                <value> <string>container</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_context</string> </key>
+                                <value> <string>context</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_m_self</string> </key>
+                                <value> <string>script</string> </value>
+                            </item>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_body</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+# different part of the configuration process in estimatd percentages\n
+# values for machine with pystones =(1.3600000000000012, 36764.705882352908)\n
+building_bt5_part_percentage = 15.0\n
+installation_bt5_part_percentage = 26.0\n
+activity_part_percentage = 59.0\n
+calc_percentage = 0.0\n
+is_activities_running = len(installation_status[\'activity_list\'])!=0\n
+is_bt5_building_running = installation_status[\'bt5\'][\'all\']==0 and \\\n
+                          not is_activities_running\n
+is_bt5_installation_running = installation_status[\'bt5\'][\'all\']!=0 and \\\n
+                              not is_activities_running \n
+\n
+if not is_bt5_building_running:\n
+  all_bt5s = float(installation_status[\'bt5\'][\'all\'])\n
+  current_bt5s = float(installation_status[\'bt5\'][\'current\'])\n
+  bt5_percent_of_total = current_bt5s / all_bt5s\n
+  calc_percentage = calc_percentage + building_bt5_part_percentage + \\\n
+                    bt5_percent_of_total*installation_bt5_part_percentage\n
+\n
+if is_activities_running:\n
+  activity_list = installation_status[\'activity_list\']\n
+  all_activities = float(max(activity_list))\n
+  current_activities = float(activity_list[-1])\n
+  activity_percent_of_total = (all_activities - current_activities)/all_activities\n
+  calc_percentage += activity_percent_of_total*activity_part_percentage\n
+  #context.log(\'%s\\nLast:%s\\nAll:%s\\-->%s\' %(activity_list, current_activities, all_activities, activity_percent_of_total))\n
+\n
+return context.WizardTool_viewRunningInstallationMessageRenderer(percentage=int(calc_percentage))\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>installation_status</string> </value>
+        </item>
+        <item>
+            <key> <string>errors</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_code</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>co_argcount</string> </key>
+                        <value> <int>1</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>installation_status</string>
+                            <string>building_bt5_part_percentage</string>
+                            <string>installation_bt5_part_percentage</string>
+                            <string>activity_part_percentage</string>
+                            <string>calc_percentage</string>
+                            <string>len</string>
+                            <string>_getitem_</string>
+                            <string>is_activities_running</string>
+                            <string>is_bt5_building_running</string>
+                            <string>is_bt5_installation_running</string>
+                            <string>float</string>
+                            <string>all_bt5s</string>
+                            <string>current_bt5s</string>
+                            <string>bt5_percent_of_total</string>
+                            <string>activity_list</string>
+                            <string>max</string>
+                            <string>all_activities</string>
+                            <string>current_activities</string>
+                            <string>activity_percent_of_total</string>
+                            <string>_inplacevar_</string>
+                            <string>_getattr_</string>
+                            <string>context</string>
+                            <string>int</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>WizardTool_viewRunningInstallationMessage</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string>Calculate percentages and show installation message</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>

Modified: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessageRenderer.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessageRenderer.xml?rev=23924&r1=23923&r2=23924&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessageRenderer.xml (original)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/WizardTool_viewRunningInstallationMessageRenderer.xml Wed Oct  1 10:17:08 2008
@@ -39,17 +39,38 @@
             <key> <string>_text</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-<h3 i18n:translate=""\n
-    i18n:domain="ui"> \n
-  ERP5 installation process is running.</h3>\n
+<tal:block tal:define="percentage options/percentage;\n
+                       coefficient python: 4;">\n
 \n
-<p i18n:translate=""\n
-    i18n:domain="ui"> \n
-  Please be patient and do not move from current page until you get \n
-  confirmation that the installation is over. \n
-  It will last approximately 5 to 10 minutes.\n
-</p>\n
-
+  <div style="width:400px; \n
+              height:25px; \n
+              background-color:lightgray;\n
+              border:1px solid black;">\n
+    <div tal:attributes="style python: \'text-align:right;;\n
+                                        height: 25px;; \n
+                                        background-color:#f09400;; \n
+                                        width: %spx;;\' %(coefficient*percentage)">\n
+      <div style="height:20px; \n
+                  padding-top: 5px; \n
+                  padding-right: 3px; \n
+                  font-weight:bold;"\n
+           tal:condition="python: int(percentage) != 0">\n
+        <span tal:content="percentage"/>%\n
+      </div>\n
+    </div>\n
+  </div>\n
+  \n
+  <h3 i18n:translate=""\n
+      i18n:domain="ui"> \n
+    ERP5 installation process is running.</h3>\n
+  \n
+  <p i18n:translate=""\n
+      i18n:domain="ui"> \n
+    Please be patient and do not move from current page until you get \n
+    confirmation that the installation is over. \n
+    It will last approximately 5 to 10 minutes.\n
+  </p>\n
+</tal:block>
 
 ]]></string> </value>
         </item>

Modified: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_generateJavaScript.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_generateJavaScript.xml?rev=23924&r1=23923&r2=23924&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_generateJavaScript.xml (original)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_generateJavaScript.xml Wed Oct  1 10:17:08 2008
@@ -79,7 +79,7 @@
     }\n
 \n
     function checkClientInstallation() {\n
-       time_out = window.setTimeout( "checkClientInstallation()", 15000 );\n
+       time_out = window.setTimeout( "checkClientInstallation()", 5000 );\n
        var xhr_object = null;\n
        xhr_object = getNewXMLHTTP();\n
        xhr_object.onreadystatechange = function()\n

Modified: erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_viewInstallationStatus.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_viewInstallationStatus.xml?rev=23924&r1=23923&r2=23924&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_viewInstallationStatus.xml (original)
+++ erp5/trunk/bt5/erp5_wizard/SkinTemplateItem/portal_skins/erp5_wizard/Wizard_viewInstallationStatus.xml Wed Oct  1 10:17:08 2008
@@ -64,16 +64,16 @@
               tal:content="here/Wizard_generateJavaScript"/>\n
 \n
       <div class="dialog_box">\n
+<!--\n
         <h2 i18n:translate=""\n
-            i18n:domain="ui">Installation Report</h2>\n
+            i18n:domain="ui">Installation Report</h2>-->\n
   \n
         <div id="server_installation_status" \n
             tal:content="structure here/portal_wizard/getInstallationStatusReportFromServer">\n
         </div>\n
-        <br/>\n
-  \n
+\n
         <div id="client_installation_status"\n
-             style="background-color: #FFFFFF; padding: 0.5em;">\n
+             style="background-color: #FFFFFF; padding: 0.5em; margin-top: 0.5em;">\n
           Loading ...\n
         </div>\n
       </div>\n

Modified: erp5/trunk/bt5/erp5_wizard/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_wizard/bt/revision?rev=23924&r1=23923&r2=23924&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_wizard/bt/revision (original)
+++ erp5/trunk/bt5/erp5_wizard/bt/revision Wed Oct  1 10:17:08 2008
@@ -1,1 +1,1 @@
-98
+99




More information about the Erp5-report mailing list