瀏覽代碼

HUE-6343 [core] Mix of little polishing in useradmin and jobbrowser

Romain Rigaux 8 年之前
父節點
當前提交
4e9947a

+ 1 - 1
apps/jobbrowser/src/jobbrowser/static/jobbrowser/css/jobbrowser-embeddable.css

@@ -14,4 +14,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
- */.jobbrowser-components .content-panel-inner{padding:10px}.jobbrowser-components .tab-content{padding:10px;border:none !important}.jobbrowser-components .jb-breadcrumbs{background-color:#F8F8F8;margin-bottom:0}.jobbrowser-components .jb-panel{padding-left:10px;padding-right:10px}.jobbrowser-components .hue-breadcrumbs-bar{padding:0}.jobbrowser-components .hue-breadcrumbs-bar li{padding:12px}.jobbrowser-components .hue-breadcrumbs-bar li:first-child{padding-left:0;padding-right:0}.jobbrowser-components .hue-breadcrumbs-bar a{color:#0B7FAD !important;display:inline !important}.jobbrowser-components .divider{color:#CCC;padding-right:12px}.jobbrowser-components .app-icon{vertical-align:text-top}.jobbrowser-components .sidebar-nav .progress{margin-bottom:0}.jobbrowser-components .sidebar-nav .nav-list li:not(.nav-header){text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}
+ */.jobbrowser-components .content-panel-inner{padding:10px}.jobbrowser-components .tab-content{padding:10px;border:none !important}.jobbrowser-components .jb-breadcrumbs{margin-bottom:0}.jobbrowser-components .jb-panel{padding-left:10px;padding-right:10px}.jobbrowser-components .hue-breadcrumbs-bar{padding:0}.jobbrowser-components .hue-breadcrumbs-bar li{padding:12px}.jobbrowser-components .hue-breadcrumbs-bar li:first-child{padding-left:0;padding-right:0}.jobbrowser-components .hue-breadcrumbs-bar a{color:#0B7FAD !important;display:inline !important}.jobbrowser-components .divider{color:#CCC;padding-right:12px}.jobbrowser-components .app-icon{vertical-align:text-top}.jobbrowser-components .sidebar-nav .progress{margin-bottom:0}.jobbrowser-components .sidebar-nav .nav-list li:not(.nav-header){text-overflow:ellipsis;overflow-x:hidden;white-space:nowrap}

+ 0 - 1
apps/jobbrowser/src/jobbrowser/static/jobbrowser/less/jobbrowser-embeddable.less

@@ -27,7 +27,6 @@
   }
 
   .jb-breadcrumbs {
-    background-color: @cui-gray-050;
     margin-bottom: 0;
   }
 

+ 2 - 2
apps/useradmin/src/useradmin/views.py

@@ -328,12 +328,12 @@ def edit_user(request, username=None):
         else:
           updated = True
 
-      # Change langugage preference, if necessary
+      # Change language preference, if necessary
       if form.cleaned_data.get('language') and form.cleaned_data.get('language') != get_language():
         request.session['django_language'] = form.cleaned_data.get('language')
         updated = True
 
-      if updated:
+      if updated and is_embeddable:
         request.info(_('User information updated'))
 
       # Audit log

+ 3 - 3
desktop/core/src/desktop/templates/hue.mako

@@ -486,7 +486,7 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
         500: { url: '/500', title: '500' },
         editor: { url: '/editor', title: '${_('Editor')}' },
         notebook: { url: '/notebook', title: '${_('Notebook')}' },
-        metastore: { url: '/metastore/*', title: '${_('Metastore')}' },
+        metastore: { url: '/metastore/*', title: '${_('Table Browser')}' },
         dashboard: { url: '/dashboard/*', title: '${_('Dashboard')}' },
         oozie_workflow: { url: '/oozie/editor/workflow/*', title: '${_('Workflow')}' },
         oozie_coordinator: { url: '/oozie/editor/coordinator/*', title: '${_('Schedule')}' },
@@ -510,9 +510,9 @@ ${ smart_unicode(login_modal(request).content) | n,unicode }
         useradmin_addldapusers: { url: '/useradmin/users/add_ldap_users', title: '${_('User Admin - Add LDAP User')}' },
         useradmin_edituser: { url: '/useradmin/users/edit/:user', title: '${_('User Admin - Edit User')}' },
         useradmin_addldapgroups: { url: '/useradmin/users/add_ldap_groups', title: '${_('User Admin - Add LDAP Groups')}' },
-        hbase: { url: '/hbase/', title: '${_('HBase')}' },
+        hbase: { url: '/hbase/', title: '${_('HBase Browser')}' },
         security_hive: { url: '/security/hive', title: '${_('Security - Hive')}' },
-        security_hdfs: { url: '/security/hdfs', title: '${_('Security HDFS')}' },
+        security_hdfs: { url: '/security/hdfs', title: '${_('Security - HDFS')}' },
         security_hive2: { url: '/security/hive2', title: '${_('Security - Hive')}' },
         security_solr: { url: '/security/solr', title: '${_('Security - SOLR')}' },
         help: { url: '/help/', title: '${_('Help')}' },

+ 3 - 2
desktop/libs/metadata/src/metadata/optimizer_client.py

@@ -75,8 +75,9 @@ def check_privileges(view_func):
         if kwargs.get('table_name'):
           objects[0]['table'] = kwargs['table_name']
 
-      if len(list(checker.filter_objects(objects, action))) != len(objects):
-        raise MissingSentryPrivilegeException(objects)
+      filtered = list(checker.filter_objects(objects, action))
+      if len(filtered) != len(objects):
+        raise MissingSentryPrivilegeException({'pre_filtering': objects, 'post_filtering': filtered, 'diff': len(objects) - len(filtered)})
 
     return view_func(*args, **kwargs)
   return wraps(view_func)(decorate)