0

I'm trying to add new menu to the upper menu in WSO2 emm (like device management, reports, etc.). Currently, I managed to add an item to the menu, but i can't make it to run the code i want (actually, at the first stage, i want to open the same page as the Apps Management item).

Is there any documentation or any good example or advice?

Thanks.

Community
  • 1
  • 1
Sharas
  • 1,985
  • 3
  • 20
  • 43

1 Answers1

0

You can change the values in wso2emm-1.1.0/repository/deployment/server/jaggeryapps/emm/controller/app.js file

Menus are defined as follows

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"}
        ];
    }
}

You can add another entry there

Chatura Dilan
  • 1,502
  • 1
  • 16
  • 29