Procházet zdrojové kódy

[editor] Moved hueDebug to the require common file

Enrico Berti před 10 roky
rodič
revize
9c9aba7

+ 0 - 5
apps/beeswax/src/beeswax/templates/create_database.mako

@@ -281,11 +281,6 @@ ${ assist.assistPanel() }
 
       ko.applyBindings(viewModel);
 
-      window.hueDebug = {
-        viewModel: viewModel,
-        ko: ko
-      };
-
       // Routing
       var step = 1;
       routie({

+ 0 - 5
apps/metastore/src/metastore/templates/databases.mako

@@ -222,11 +222,6 @@ ${ assist.assistPanel() }
 
       ko.applyBindings(viewModel);
 
-      window.hueDebug = {
-        viewModel: viewModel,
-        ko: ko
-      };
-
       if (location.getParameter("error") != "") {
         $.jHueNotify.error(location.getParameter("error"));
       }

+ 0 - 4
apps/metastore/src/metastore/templates/describe_table.mako

@@ -795,10 +795,6 @@ ${ assist.assistPanel() }
         }
       });
 
-      window.hueDebug = {
-        viewModel: viewModel,
-        ko: ko
-      };
     });
   });
 

+ 0 - 5
apps/metastore/src/metastore/templates/tables.mako

@@ -259,11 +259,6 @@ ${ assist.assistPanel() }
 
       ko.applyBindings(viewModel);
 
-      window.hueDebug = {
-        viewModel: viewModel,
-        ko: ko
-      };
-
       if (location.getParameter("error") != "") {
         $.jHueNotify.error(location.getParameter("error"));
       }

+ 6 - 0
desktop/core/src/desktop/templates/require.mako

@@ -52,6 +52,12 @@ DEBUG = DJANGO_DEBUG_MODE.get()
       deps: ["knockout", "knockout-mapping"],
       callback: function(ko, mapping) {
         ko.mapping = mapping;
+        window.hueDebug = {
+          ko: ko,
+          viewModel: function () {
+            return ko.dataFor(document.body);
+          }
+        }
       }
     });
   </script>

+ 0 - 6
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -1884,15 +1884,9 @@ ${ require.config() }
         }
       }
 
-      window.hueDebug = {
-        viewModel: viewModel,
-        ko: ko
-      };
-
       var isAssistAvailable = viewModel.assistAvailable();
       var wasAssistVisible = viewModel.isLeftPanelVisible();
 
-
       viewModel.isPlayerMode.subscribe(function (value) {
         if (value){
           $(".jHueNotify").hide();