Browse Source

[oozie] Prevent enter key from submitting the search forms

Remove unused permissions
Romain Rigaux 13 years ago
parent
commit
44e9f29

+ 1 - 9
apps/oozie/src/oozie/settings.py

@@ -16,16 +16,8 @@
 
 
 DJANGO_APPS=['oozie']
 DJANGO_APPS=['oozie']
 NICE_NAME = "Oozie Editor/Dashboard"
 NICE_NAME = "Oozie Editor/Dashboard"
-REQUIRES_HADOOP = True
-
-# Unused
-PERMISSION_ACTIONS = (
-  ("launch_editor", "Launch the Oozie Editor"),
-  ("launch_dashboard", "Launch the Oozie Dashboard"),
-  ("launch_jobs", "Can submit Oozie jobs"),
-)
-
 ICON = "/oozie/static/art/icon_oozie_24.png"
 ICON = "/oozie/static/art/icon_oozie_24.png"
 MENU_INDEX = 41
 MENU_INDEX = 41
 
 
+REQUIRES_HADOOP = True
 IS_URL_NAMESPACED = True
 IS_URL_NAMESPACED = True

+ 15 - 9
apps/oozie/src/oozie/templates/dashboard/list_oozie_coordinators.mako

@@ -31,7 +31,7 @@ ${layout.menubar(section='dashboard')}
 
 
   <div class="well hueWell">
   <div class="well hueWell">
     <form>
     <form>
-      ${ _('Filter:') } <input id="filterInput" class="input-xlarge search-query" placeholder="Search for username, name, etc...">
+      ${ _('Filter:') } <input id="filterInput" class="input-xlarge search-query" placeholder="${ _('Search for username, name, etc...') }">
 
 
       <span class="pull-right">
       <span class="pull-right">
         <span style="padding-right:10px;float:left;margin-top:3px">
         <span style="padding-right:10px;float:left;margin-top:3px">
@@ -57,7 +57,7 @@ ${layout.menubar(section='dashboard')}
     <table class="table table-condensed" id="running-table">
     <table class="table table-condensed" id="running-table">
       <thead>
       <thead>
         <tr>
         <tr>
-          <th width="10%">${ _('Submission') }</th>
+          <th width="10%">${ _('Next submission') }</th>
           <th width="10%">${ _('Status') }</th>
           <th width="10%">${ _('Status') }</th>
           <th width="30%">${ _('Name') }</th>
           <th width="30%">${ _('Name') }</th>
           <th width="10%">${ _('Progress') }</th>
           <th width="10%">${ _('Progress') }</th>
@@ -187,18 +187,24 @@ ${layout.menubar(section='dashboard')}
         "aaSorting": [[ 0, "desc" ]]
         "aaSorting": [[ 0, "desc" ]]
     });
     });
 
 
+    $('#filterInput').keydown(function(e) {
+      if (e.which == 13) {
+        e.preventDefault();
+        return False;
+      }
+    });
 
 
     $("#filterInput").keyup(function() {
     $("#filterInput").keyup(function() {
-        runningTable.fnDraw();
-        completedTable.fnDraw();
+      runningTable.fnDraw();
+      completedTable.fnDraw();
 
 
-        hash = "#";
+      hash = "#";
 
 
-        if ($("a.btn-date.active").length > 0) {
-          hash += "date=" + $("a.btn-date.active").text();
-        }
+      if ($("a.btn-date.active").length > 0) {
+        hash += "date=" + $("a.btn-date.active").text();
+      }
 
 
-        window.location.hash = hash;
+      window.location.hash = hash;
     });
     });
 
 
 
 

+ 13 - 7
apps/oozie/src/oozie/templates/dashboard/list_oozie_workflows.mako

@@ -187,18 +187,24 @@ ${ layout.menubar(section='dashboard') }
         "aaSorting": [[ 0, "desc" ]]
         "aaSorting": [[ 0, "desc" ]]
     });
     });
 
 
+    $('#filterInput').keydown(function(e) {
+      if (e.which == 13) {
+        e.preventDefault();
+        return False;
+      }
+    });
 
 
     $("#filterInput").keyup(function() {
     $("#filterInput").keyup(function() {
-        runningTable.fnDraw();
-        completedTable.fnDraw();
+      runningTable.fnDraw();
+      completedTable.fnDraw();
 
 
-        hash = "#";
+      hash = "#";
 
 
-        if ($("a.btn-date.active").length > 0) {
-          hash += "date=" + $("a.btn-date.active").text();
-        }
+      if ($("a.btn-date.active").length > 0) {
+        hash += "date=" + $("a.btn-date.active").text();
+      }
 
 
-        window.location.hash = hash;
+      window.location.hash = hash;
     });
     });
 
 
 
 

+ 10 - 3
apps/oozie/src/oozie/templates/editor/list_coordinators.mako

@@ -36,7 +36,7 @@ ${ layout.menubar(section='coordinators') }
 
 
     <div class="row-fluid">
     <div class="row-fluid">
       <div class="span3">
       <div class="span3">
-        <form class="form-search">
+        <form>
           ${ _('Filter:') }
           ${ _('Filter:') }
           <input id="filterInput" class="input-xlarge search-query" placeholder="${ _('Search for username, name, etc...') }">
           <input id="filterInput" class="input-xlarge search-query" placeholder="${ _('Search for username, name, etc...') }">
         </form>
         </form>
@@ -220,10 +220,17 @@ ${ layout.menubar(section='coordinators') }
         null
         null
       ],
       ],
       "aaSorting": [[ 4, "desc" ]]
       "aaSorting": [[ 4, "desc" ]]
-        });
+    });
+
+    $('#filterInput').keydown(function(e) {
+      if (e.which == 13) {
+        e.preventDefault();
+        return False;
+      }
+    });
 
 
     $("#filterInput").keyup(function() {
     $("#filterInput").keyup(function() {
-        oTable.fnFilter($(this).val());
+      oTable.fnFilter($(this).val());
     });
     });
 
 
     $("a[data-row-selector='true']").jHueRowSelector();
     $("a[data-row-selector='true']").jHueRowSelector();

+ 8 - 1
apps/oozie/src/oozie/templates/editor/list_workflows.mako

@@ -39,7 +39,7 @@ ${ layout.menubar(section='workflows') }
 
 
     <div class="row-fluid">
     <div class="row-fluid">
       <div class="span4">
       <div class="span4">
-        <form class="form-search">
+        <form>
           ${ _('Filter:') } <input id="filterInput" class="input-xlarge search-query" placeholder="${ _('Search for username, name, etc...') }">
           ${ _('Filter:') } <input id="filterInput" class="input-xlarge search-query" placeholder="${ _('Search for username, name, etc...') }">
         </form>
         </form>
       </div>
       </div>
@@ -232,6 +232,13 @@ ${ layout.menubar(section='workflows') }
       "aaSorting": [[3, 'desc'], [ 1, "asc" ]]
       "aaSorting": [[3, 'desc'], [ 1, "asc" ]]
     });
     });
 
 
+    $('#filterInput').keydown(function(e) {
+      if (e.which == 13) {
+        e.preventDefault();
+        return False;
+      }
+    });
+
     $("#filterInput").keyup(function() {
     $("#filterInput").keyup(function() {
       oTable.fnFilter($(this).val());
       oTable.fnFilter($(this).val());
     });
     });