瀏覽代碼

AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN.2 (ababiichuk)

aBabiichuk 10 年之前
父節點
當前提交
aeff76e14b
共有 2 個文件被更改,包括 8 次插入3 次删除
  1. 4 1
      ambari-web/app/assets/data/ambari_components/component_version.json
  2. 4 2
      ambari-web/app/router.js

+ 4 - 1
ambari-web/app/assets/data/ambari_components/component_version.json

@@ -2,6 +2,9 @@
   "RootServiceComponents" : {
   "RootServiceComponents" : {
     "component_name" : "AMBARI_SERVER",
     "component_name" : "AMBARI_SERVER",
     "component_version" : "1.3.0",
     "component_version" : "1.3.0",
-    "service_name" : "AMBARI"
+    "service_name" : "AMBARI",
+    "properties": {
+      "server.os_type": "redhat"
+    }
   }
   }
 }
 }

+ 4 - 2
ambari-web/app/router.js

@@ -469,8 +469,10 @@ App.Router = Em.Router.extend({
     experimental: Em.Route.extend({
     experimental: Em.Route.extend({
       route: '/experimental',
       route: '/experimental',
       enter: function (router, context) {
       enter: function (router, context) {
-        if (!App.get('isAdmin')) {
-          router.transitionTo("main");
+        if (!App.get('isAdmin') || App.get('isOperator')) {
+          Em.run.next(function () {
+            router.transitionTo("main.dashboard.widgets");
+          });
         }
         }
       },
       },
       connectOutlets: function (router, context) {
       connectOutlets: function (router, context) {