Pārlūkot izejas kodu

AMBARI-11055. Going to an ambari-view from UI always hits a 302 redirect before view shows up (srimanth)

Srimanth Gunturi 10 gadi atpakaļ
vecāks
revīzija
54fd073253

+ 1 - 1
ambari-web/app/controllers/main/views_controller.js

@@ -87,7 +87,7 @@ App.MainViewsController = Em.Controller.extend({
             description: instance.ViewInstanceInfo.description || Em.I18n.t('views.main.instance.noDescription'),
             viewName: instance.ViewInstanceInfo.view_name,
             instanceName: instance.ViewInstanceInfo.instance_name,
-            href: instance.ViewInstanceInfo.context_path
+            href: instance.ViewInstanceInfo.context_path + "/"
           });
           if( current_instance.visible ){
             instances.push(current_instance);

+ 1 - 1
ambari-web/app/routes/views.js

@@ -36,7 +36,7 @@ module.exports = Em.Route.extend({
     connectOutlets: function (router, params) {
       // find and set content for `mainViewsDetails` and associated controller
 
-      var href = ['/views', params.viewName, params.version, params.instanceName].join('/');
+      var href = ['/views', params.viewName, params.version, params.instanceName + "/"].join('/');
       var viewPath = this.parseViewPath(window.location.href.slice(window.location.href.indexOf('?')));
       if (viewPath) {
         href = ['/views', params.viewName, params.version, params.instanceName.slice(0, params.instanceName.lastIndexOf('?'))].join('/');