将新导航选项卡添加到wso2 emm中的固定菜单

时间:2014-12-28 16:03:10

标签: wso2 wso2-emm

我试图在WSO2 emm的上层菜单中添加新菜单(如设备管理,报告等)。 目前,我设法在菜单中添加一个项目,但我无法运行我想要的代码(实际上,在第一阶段,我想打开与Apps Management项目相同的页面)。 / p>

是否有任何文件或任何好的例子或建议?

感谢。

1 个答案:

答案 0 :(得分:0)

您可以更改值 wso2emm-1.1.0 / repository / deployment / server / jaggeryapps / emm / controller / app.js文件

菜单定义如下

if(currentUser){
    if(role == 'admin'){
        topNavigation = [
            {name : "Dashboard" , link: appInfo().server_url + "console/dashboard", displayPage: "dashboard", icon: "icon-th-large"},
            {name : "Configurations", link: appInfo().server_url + "users/configuration", displayPage: "configuration", icon:"icon-wrench"},
            {name : "Device Management" , link: appInfo().server_url + "devices/management", displayPage: "management", icon:"icon-mobile-phone"},
            {name : "App Management"    , link: appInfo().server_url + "apps/management", displayPage: "appmanagement", icon:"icon-qrcode"},
             {name : "Reports"  , link: appInfo().server_url + "reports/", displayPage: "reports", icon:"icon-bar-chart"}               
        ];
        var configNavigation =  [
            {name : "Users", link: appInfo().server_url + "users/configuration", displayPage: "users", icon:"icon-user"},
            {name : "Roles", link: appInfo().server_url + "roles/configuration", displayPage: "roles", icon:"icon-group"},
            {name : "Policies", link: appInfo().server_url + "policies/configuration", displayPage: "policies", icon:"icon-lock"},
            {name : "Settings", link: appInfo().server_url + "tenant/configuration", displayPage: "tenant", icon:"icon-gear"},
        ];
    }else if(role == 'emmadmin'){
        topNavigation = [
            {name : "Dashboard" , link: appInfo().server_url + "console/dashboard", displayPage: "dashboard", icon: "icon-th-large"},
            {name : "Configurations", link: appInfo().server_url + "users/configuration", displayPage: "configuration", icon:"icon-wrench"},
             {name : "Device Management"    , link: appInfo().server_url + "devices/management", displayPage: "management", icon:"icon-mobile-phone"},
            {name : "App Management"    , link: appInfo().server_url + "apps/management", displayPage: "appmanagement", icon:"icon-qrcode"},
             {name : "Reports"  , link: appInfo().server_url + "reports/", displayPage: "reports", icon:"icon-bar-chart"}
        ];
        var configNavigation =  [
            {name : "Users", link: appInfo().server_url + "users/configuration", displayPage: "users", icon:"icon-user"},
            {name : "Roles", link: appInfo().server_url + "roles/configuration", displayPage: "roles", icon:"icon-group"},
            {name : "Policies", link: appInfo().server_url + "policies/configuration", displayPage: "policies", icon:"icon-lock"},
        ];
    }else{
        topNavigation = [
            {name : "My Devices"    , link: appInfo().server_url + "users/devices", displayPage: "management", icon:"icon-briefcase"}
        ];
    }
}

您可以在那里添加另一个条目