Quellcode durchsuchen

[core] Remove depender usage

bc Wong vor 13 Jahren
Ursprung
Commit
f6834177fe

+ 2 - 4
README.testing

@@ -65,7 +65,8 @@ DESKTOP_LOGLEVEL=<level>
   logger is created if one is not defined.
   logger is created if one is not defined.
 
 
 DESKTOP_DEBUG
 DESKTOP_DEBUG
-  A shorthand for DESKTOP_LOG_LEVEL=DEBUG
+  A shorthand for DESKTOP_LOG_LEVEL=DEBUG. Also turns on output HTML
+  validation.
 
 
 DESKTOP_PROFILE
 DESKTOP_PROFILE
   Turn on Python profiling. The profile data is saved in a file. See the
   Turn on Python profiling. The profile data is saved in a file. See the
@@ -74,9 +75,6 @@ DESKTOP_PROFILE
 DESKTOP_LOG_DIR=<dir>
 DESKTOP_LOG_DIR=<dir>
   Specify the HUE log directory. Defaults to ./log.
   Specify the HUE log directory. Defaults to ./log.
 
 
-DESKTOP_DEPENDER_DEBUG
-  When specified, re-evaluate the js depender every time.
-
 DESKTOP_DB_CONFIG=<db engine:db name:test db name:username:password:host:port>
 DESKTOP_DB_CONFIG=<db engine:db name:test db name:username:password:host:port>
   Specify alternate DB connection parameters for HUE to use. Useful for
   Specify alternate DB connection parameters for HUE to use. Useful for
   testing your changes against, for example, MySQL instead of sqlite. String
   testing your changes against, for example, MySQL instead of sqlite. String

+ 0 - 3
apps/beeswax/src/beeswax/settings.py

@@ -16,6 +16,3 @@
 DJANGO_APPS = [ "beeswax" ]
 DJANGO_APPS = [ "beeswax" ]
 NICE_NAME = "Beeswax (Hive UI)"
 NICE_NAME = "Beeswax (Hive UI)"
 REQUIRES_HADOOP = True
 REQUIRES_HADOOP = True
-DEPENDER_PACKAGE_YMLS = [
-    "static/js/package.yml",
-]

+ 0 - 8
apps/filebrowser/src/filebrowser/settings.py

@@ -15,14 +15,6 @@
 # See the License for the specific language governing permissions and
 # See the License for the specific language governing permissions and
 # limitations under the License.
 # limitations under the License.
 
 
-from desktop.lib.paths import get_desktop_root
-
 DJANGO_APPS = ['filebrowser']
 DJANGO_APPS = ['filebrowser']
 NICE_NAME = "File Browser"
 NICE_NAME = "File Browser"
 REQUIRES_HADOOP = False
 REQUIRES_HADOOP = False
-DEPENDER_SCRIPTS_JSON = [
-    ("fancyupload", get_desktop_root("libs/fancyupload/static/js/Source/scripts.json")),
-]
-DEPENDER_PACKAGE_YMLS = [
-    "src/filebrowser/static/js/package.yml",
-]

+ 0 - 3
apps/help/src/help/settings.py

@@ -16,6 +16,3 @@
 DJANGO_APPS = ['help']
 DJANGO_APPS = ['help']
 NICE_NAME = "Help"
 NICE_NAME = "Help"
 REQUIRES_HADOOP = False
 REQUIRES_HADOOP = False
-DEPENDER_PACKAGE_YMLS = [
-  "src/help/static/js/package.yml",
-]

+ 0 - 3
apps/jobbrowser/src/jobbrowser/settings.py

@@ -21,6 +21,3 @@
 DJANGO_APPS = ['jobbrowser']
 DJANGO_APPS = ['jobbrowser']
 NICE_NAME = "Job Browser"
 NICE_NAME = "Job Browser"
 REQUIRES_HADOOP = True
 REQUIRES_HADOOP = True
-DEPENDER_PACKAGE_YMLS = [
-    "static/js/package.yml",
-]

+ 0 - 7
apps/jobbrowser/static/bootstrap.js

@@ -30,10 +30,3 @@ Hue.Desktop.register({
 		help: '/help/jobbrowser/'
 		help: '/help/jobbrowser/'
 	}
 	}
 });
 });
-Depender.require({
-	scripts: ["Hue.JobBrowser.Poller"],
-	callback: function(){
-		if (Cookie.read('activateJobsPoller') != "false") Hue.User.withUser(Hue.Dock.startJobsPoll);
-		else Hue.Dock.statusContent.set('html', 'poller paused');
-	}
-});

+ 0 - 4
apps/jobsub/src/jobsub/settings.py

@@ -20,7 +20,3 @@ REQUIRES_HADOOP = True
 MIDDLEWARE_CLASSES=[
 MIDDLEWARE_CLASSES=[
   "jobsub.middleware.SubmissionErrorRecastMiddleware"
   "jobsub.middleware.SubmissionErrorRecastMiddleware"
 ]
 ]
-DEPENDER_PACKAGE_YMLS = [
-    "static/js/package.yml",
-]
-

+ 0 - 3
apps/shell/src/shell/settings.py

@@ -16,9 +16,6 @@
 DJANGO_APPS = [ "shell" ]
 DJANGO_APPS = [ "shell" ]
 REQUIRES_HADOOP = False
 REQUIRES_HADOOP = False
 
 
-DEPENDER_PACKAGE_YMLS = [
-    "src/shell/static/js/package.yml",
-]
 NICE_NAME = "Hue Shell"
 NICE_NAME = "Hue Shell"
 PERMISSION_ACTIONS = (
 PERMISSION_ACTIONS = (
   ("launch_pig", "Launch the Pig Shell"),
   ("launch_pig", "Launch the Pig Shell"),

+ 0 - 3
apps/useradmin/src/useradmin/settings.py

@@ -16,6 +16,3 @@
 DJANGO_APPS = [ "useradmin" ]
 DJANGO_APPS = [ "useradmin" ]
 NICE_NAME = "User Admin"
 NICE_NAME = "User Admin"
 REQUIRES_HADOOP = False
 REQUIRES_HADOOP = False
-DEPENDER_PACKAGE_YMLS = [
-    "static/js/package.yml",
-]

+ 0 - 4
desktop/core/src/desktop/app_template/src/app_name/settings.py

@@ -15,7 +15,3 @@
 # limitations under the License.
 # limitations under the License.
 DJANGO_APPS = [ "${app_name}" ]
 DJANGO_APPS = [ "${app_name}" ]
 REQUIRES_HADOOP = False
 REQUIRES_HADOOP = False
-
-DEPENDER_PACKAGE_YMLS = [
-    "src/${app_name}/static/js/package.yml",
-]

+ 0 - 7
desktop/core/src/desktop/appmanager.py

@@ -145,16 +145,9 @@ class DesktopModuleInfo(object):
     if s is not None:
     if s is not None:
       self.django_apps = getattr(s, 'DJANGO_APPS', [])
       self.django_apps = getattr(s, 'DJANGO_APPS', [])
       self.config_key = getattr(s, 'CONFIG_KEY', None)
       self.config_key = getattr(s, 'CONFIG_KEY', None)
-      self.depender_yamls = \
-          [self._resolve_appdir_path(p) for p in getattr(s, 'DEPENDER_PACKAGE_YMLS', [])]
-      self.depender_jsons = \
-          [(depname, self._resolve_appdir_path(p))
-           for depname, p in getattr(s, 'DEPENDER_SCRIPTS_JSON', [])]
     else:
     else:
       self.django_apps = []
       self.django_apps = []
       self.config_key = None 
       self.config_key = None 
-      self.depender_yamls = []
-      self.depender_jsons = []
 
 
   def _resolve_appdir_path(self, path):
   def _resolve_appdir_path(self, path):
     """ Takes a path relative to the application dir and returns an absolute path. """
     """ Takes a path relative to the application dir and returns an absolute path. """

+ 0 - 59
desktop/core/src/desktop/depender_config.json

@@ -1,59 +0,0 @@
-{
-	"copyright": ["//MooTools, <http://mootools.net>, My Object Oriented (JavaScript) Tools. Copyright (c) 2006-2009 Valerio Proietti, <http://mad4milk.net>, MIT Style License.","//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.","//Clientcide Scripts, <http://clientcide.com/js> Copyright (c) 2006-2009 Aaron Newton, MIT Style License."],
-	"compression": "none",
-	"available_compressions": [ ],
-	"cache scripts.json": false,
-	"libs": {
-		"mootools-core": {
-			"scripts": "../ext/thirdparty/js/mootools-core/Source"
-		},
-		"mootools-more": {
-			"scripts": "../ext/thirdparty/js/mootools-more/Source"
-		},
-		"clientcide": {
-			"scripts": "../ext/thirdparty/js/clientcide/Source"
-		},
-		"hue-shared": {
-			"scripts": "core/static/js/Source"
-		},
-		"fancyupload": {
-			"scripts": "libs/fancyupload/static/js/Source"
-		},
-		"filebrowser": {
-			"scripts": "core-apps/filebrowser/static/js/Source"
-		},
-		"mootools-art": {
-			"scripts": "../ext/thirdparty/js/art/Source"
-		},
-		"mootools-color": {
-			"scripts": "libs/mootools-color/static/js/Source"
-		},
-		"mootools-touch": {
-			"scripts": "libs/mootools-touch/static/js/Source"
-		},
-		"protovis" : {
-			"scripts" : "libs/protovis/static/js/Source"
-		},
-		"slick": {
-			"scripts": "../ext/thirdparty/js/art/assets/slick/Source"
-		},
-		"hue-ui": {
-			"scripts": "core-apps/UI/static/js/Source"
-		},
-		"jobbrowser": {
-			"scripts": "apps/jobbrowser/static/js/Source"
-		},
-		"jobsub": {
-			"scripts": "apps/jobsub/static/js/Source"
-		},
-		"useradmin": {
-			"scripts": "core-apps/useradmin/static/js/Source"
-		},
-		"beeswax": {
-			"scripts": "apps/beeswax/static/js/Source"
-		},
-		"depender_client": {
-			"scripts": "apps/depender/client/Source"
-		}
-	}
-}

+ 2 - 44
desktop/core/src/desktop/settings.py

@@ -141,11 +141,8 @@ INSTALLED_APPS = [
     # 'debug_toolbar',
     # 'debug_toolbar',
     'south', # database migration tool
     'south', # database migration tool
 
 
-    # JavaScript depency loading
-    'depender',
-
-	# i18n support
-	'babeldjango',
+    # i18n support
+    'babeldjango',
 
 
     # Desktop injects all the other installed apps into here magically.
     # Desktop injects all the other installed apps into here magically.
     'desktop'
     'desktop'
@@ -245,45 +242,6 @@ if SECRET_KEY == "":
 
 
 ############################################################
 ############################################################
 
 
-# Depender configuration
-DEPENDER_ROOT = get_desktop_root(".")
-
-def prep_depender_config():
-  yamls = [
-    "../ext/thirdparty/js/core/package.yml",
-    "../ext/thirdparty/js/more/package.yml",
-    "../ext/thirdparty/js/art/package.yml",
-    "../ext/thirdparty/js/touch/package.yml",
-    "../ext/thirdparty/js/color/package.yml",
-    "../ext/thirdparty/js/behavior/package.yml",
-    "../ext/thirdparty/js/more-behaviors/package.yml",
-    "../ext/thirdparty/js/widgets/package.yml",
-    "../ext/thirdparty/js/slick/package.yml",
-    "core/static/js/package.yml",
-    "core/static/js/ccs.package.yml",
-    "../ext/thirdparty/js/depender/package.yml",
-    "../ext/thirdparty/js/fittext/package.yml",
-    "../ext/thirdparty/js/jframe/package.yml",
-  ]
-  scripts_json = [
-    ("clientcide",  "../ext/thirdparty/js/clientcide/Source/scripts.json"),
-    ("protovis" ,  "../desktop/libs/protovis/static/js/Source/scripts.json"),
-  ]
-
-
-  for app in appmanager.DESKTOP_APPS:
-    yamls.extend(app.depender_yamls)
-    scripts_json.extend(app.depender_jsons)
-
-  return ([ os.path.abspath(os.path.join(DEPENDER_ROOT, x)) for x in yamls ],
-    [ (name, os.path.abspath(os.path.join(DEPENDER_ROOT, p))) for name, p in scripts_json ])
-
-DEPENDER_PACKAGE_YMLS, DEPENDER_SCRIPTS_JSON = prep_depender_config()
-DEPENDER_YUI_PATH = None
-DEPENDER_COMPRESSOR = None
-# Set to true to re-load all JS every time. (slowish)
-DEPENDER_DEBUG = os.getenv("DESKTOP_DEPENDER_DEBUG", "0") not in ["0",""]
-
 # Necessary for South to not futz with tests.  Fixed in South 0.7.1
 # Necessary for South to not futz with tests.  Fixed in South 0.7.1
 SKIP_SOUTH_TESTS = True
 SKIP_SOUTH_TESTS = True
 
 

+ 0 - 2
desktop/core/src/desktop/urls.py

@@ -23,7 +23,6 @@ from django.conf.urls.defaults import include, patterns
 from django.contrib import admin
 from django.contrib import admin
 
 
 from desktop import appmanager
 from desktop import appmanager
-import depender.urls
 
 
 # Django expects handler404 and handler500 to be defined.
 # Django expects handler404 and handler500 to be defined.
 # django.conf.urls.defaults provides them. But we want to override them.
 # django.conf.urls.defaults provides them. But we want to override them.
@@ -58,7 +57,6 @@ dynamic_patterns = patterns('',
   (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
   (r'^prefs/(?P<key>\w+)?$', 'desktop.views.prefs'),
   (r'^status_bar/?$', 'desktop.views.status_bar'),
   (r'^status_bar/?$', 'desktop.views.status_bar'),
   (r'^admin/', include(admin.site.urls)),
   (r'^admin/', include(admin.site.urls)),
-  (r'^depender/', include(depender.urls)),
   (r'^debug/threads$', 'desktop.views.threads'),
   (r'^debug/threads$', 'desktop.views.threads'),
   (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
   (r'^debug/who_am_i$', 'desktop.views.who_am_i'),
   (r'^debug/check_config$', 'desktop.views.check_config'),
   (r'^debug/check_config$', 'desktop.views.check_config'),

+ 0 - 2
tools/jenkins/jenkins-prod-tarball.sh

@@ -54,7 +54,6 @@ make apps
 ##############################
 ##############################
 # Smoke tests
 # Smoke tests
 ##############################
 ##############################
-./build/env/bin/hue depender_check
 ./build/env/bin/hue config_help
 ./build/env/bin/hue config_help
 
 
 ##############################
 ##############################
@@ -66,5 +65,4 @@ INSTALL_DIR=$(pwd)/../installdir make install
 # Check install
 # Check install
 ##############################
 ##############################
 cd ../installdir
 cd ../installdir
-./build/env/bin/hue depender_check
 ./build/env/bin/hue config_help
 ./build/env/bin/hue config_help