/*-
 * ~~~~~~licensing~~~~~~
 * entaxy-management-plugin
 * ==========
 * Copyright (C) 2020 - 2025 EmDev LLC
 * ==========
 * You may not use this file except in accordance with the License Terms of the Copyright
 * Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
 * rights to the Software and any copies are the property of the Copyright Holder. Unless
 * it is explicitly allowed the Copyright Holder, the User is prohibited from using the
 * Software for commercial purposes to provide services to third parties.
 * 
 * The Copyright Holder hereby declares that the Software is provided on an "AS IS".
 * Under no circumstances does the Copyright Holder guarantee or promise that the
 * Software provided by him will be suitable or not suitable for the specific purposes
 * of the User, that the Software will meet all commercial and personal subjective
 * expectations of the User, that the Software will work properly, without technical
 * errors, quickly and uninterruptedly.
 * 
 * Under no circumstances shall the Copyright Holder or its Affiliates is not liable
 * to the User for any direct or indirect losses of the User, his expenses or actual
 * damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
 * or damage to data, property, etc.
 * ~~~~~~/licensing~~~~~~
 */
var Entaxy;
(function (Entaxy) {
    Entaxy.log.debug("loading navigation");
  
    Entaxy._module
    .config(configureRoutes)
    .component('entaxyNavigation', {
        template: `<hawtio-tabs tabs="$ctrl.tabs" on-change="$ctrl.goto(tab)"></hawtio-tabs>`,
        controller: EntaxyNavigationController
    })
    .name;
    Entaxy.log.debug("loaded navigation " + Entaxy.navigationModule);

    function EntaxyNavigationController($scope, $location, workspace, localStorage, jolokia, $rootScope,
                                        entaxyAttributesCacheService, entaxyPrivateObjectsCacheService) {
        'ngInject';
        let ctrl = this;
        this.$location = $location;
        let selectedMBeanName = workspace.getSelectedMBeanName();
        entaxyJmxDomain = localStorage['entaxyJmxDomain'] || "ru.entaxy.esb";

        $scope.$on('jmxTreeClicked', function (event, selectedNode) {
            ctrl.tabs = getTabs();
            let tab;
            if (selectedMBeanName !== selectedNode.objectName) {
                selectedMBeanName = selectedNode.objectName;
                tab = ctrl.tabs[0];
            } else {
                tab = _.find(ctrl.tabs, {path: ctrl.$location.path()});
                if (!tab) {
                    tab = ctrl.tabs[0];
                }
            }
            ctrl.$location.path(tab.path);
        });

        EntaxyNavigationController.prototype.$onInit = function () {
            this.tabs = getTabs();
        };

        EntaxyNavigationController.prototype.goto = function (tab) {
            this.$location.path(tab.path);
        };

        function getTabs() {

            var tabs = [];
            var enabledRoutes = Object.keys(TAB_CONFIG)
                .map(function (config) { return TAB_CONFIG[config].route; })
                .filter(function (route) { return _.startsWith(route, '/entaxy-management'); });
            if (enabledRoutes.length > 0) {
            	tabs.push(new Nav.HawtioTab(TAB_CONFIG.attributes.title, TAB_CONFIG.attributes.route));
            	
            	if (workspace.getSelectedMBeanName()) {
            		if (shouldShowConnectionsTab()) {
            			tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connections.title, TAB_CONFIG.connections.route));
            		} else if (shouldShowConnectionPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectionProperties.title, TAB_CONFIG.connectionProperties.route));
                    } else if (shouldShowProfilesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profiles.title, TAB_CONFIG.profiles.route));
                    } else if (shouldShowProfileTabs()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorsInProfile.title, TAB_CONFIG.connectorsInProfile.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileProperties.title, TAB_CONFIG.profileProperties.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.profileDiagram.title, TAB_CONFIG.profileDiagram.route));
                    } else if (shouldShowConnectorPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorProperties.title, TAB_CONFIG.connectorProperties.route));
                    } else if (shouldShowAllConnectorsTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectors.title, TAB_CONFIG.connectors.route));
                    } else if (shouldShowRoutesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routes.title, TAB_CONFIG.routes.route));
                    } else if (shouldShowSourceTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeProperties.title, TAB_CONFIG.routeProperties.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.source.title, TAB_CONFIG.source.route));
                    } else if (shouldShowResourcesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.resources.title, TAB_CONFIG.resources.route));
                    } else if (shouldShowServicesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.services.title, TAB_CONFIG.services.route));
                    } else if (shouldShowServicePropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.serviceProperties.title, TAB_CONFIG.serviceProperties.route));
                    } else if (shouldShowRealmsTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.realms.title, TAB_CONFIG.realms.route));
                    } else if (shouldShowRealmPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.realmProperties.title, TAB_CONFIG.realmProperties.route));
                    } else if (shouldShowModuleUserManagement()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.userManagement.title, TAB_CONFIG.userManagement.route));
                    } else if (shouldShowRepositoriesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.repositories.title, TAB_CONFIG.repositories.route));
                    } else if (shouldShowRepositoryPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.repositoryProperties.title, TAB_CONFIG.repositoryProperties.route));
                    } else if (shouldShowKeyStoresTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStores.title, TAB_CONFIG.keyStores.route));
                    } else if (shouldShowKeyStorePropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStoreAliases.title, TAB_CONFIG.keyStoreAliases.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.keyStoreProperties.title, TAB_CONFIG.keyStoreProperties.route));
                    } else if (shouldShowVaultsTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaults.title, TAB_CONFIG.vaults.route));
                    } else if (shouldShowVaultPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaultAliases.title, TAB_CONFIG.vaultAliases.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.vaultProperties.title, TAB_CONFIG.vaultProperties.route));
                    } else if (shouldShowConfigPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.config.title, TAB_CONFIG.config.route));
                    } else if (shouldShowRouteLibrariesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeLibraries.title, TAB_CONFIG.routeLibraries.route));
                    } else if (shouldShowRouteLibraryPropertiesTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeLibraryProperties.title, TAB_CONFIG.routeLibraryProperties.route));
                    } else {
                        Object.keys(TAB_CONFIG).forEach(key => {
                            if (key.startsWith('odata')) {
                                if (TAB_CONFIG[key].check && TAB_CONFIG[key].check(workspace)) {
                                    tabs.unshift(new Nav.HawtioTab(TAB_CONFIG[key].title, TAB_CONFIG[key].route));
                                }
                            }
                        });
                    }
            		tabs.push(new Nav.HawtioTab(TAB_CONFIG.operations.title, TAB_CONFIG.operations.route));
            	} else {
                    if (shouldShowConnectorsTab()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.connectorsInProfile.title, TAB_CONFIG.connectorsInProfile.route));
                    }
                    if (isAddedRoute()) {
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.routeProperties.title, TAB_CONFIG.routeProperties.route));
                        tabs.unshift(new Nav.HawtioTab(TAB_CONFIG.source.title, TAB_CONFIG.source.route));
                    }
                }

//                tabs.push(new Nav.HawtioTab(TAB_CONFIG.chart.title, TAB_CONFIG.chart.route));
//                tabs.push(new Nav.HawtioTab(TAB_CONFIG.test.title, TAB_CONFIG.test.route));
            }
            return tabs;
        }

        function shouldShowConnectionsTab() {
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connections'}) &&
                workspace.getSelectedMBeanName().endsWith('category=connections');
        }

        function shouldShowConnectionPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connections'}) &&
                    parsedMbean.attributes.connection && !parsedMbean.attributes.config) {
                let attributes = jolokia.getAttribute(mbeanName);
                return attributes.ObjectId ? true : false;
            } else {
                return false;
            }
        }

        function shouldShowProfilesTab() {
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
                workspace.getSelectedMBeanName().endsWith('category=profiles');
        }

        function shouldShowProfileTabs() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
                parsedMbean.attributes.profile &&
                entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.PROFILE;
        }

        function shouldShowConnectorsTab() {
            let selectedMbean = workspace.getSelectedMBean();
            return selectedMbean.parent && selectedMbean.parent.objectName &&
                selectedMbean.parent.domain === entaxyJmxDomain &&
                Core.parseMBean(selectedMbean.parent.objectName).attributes.profile &&
                entaxyAttributesCacheService
                    .getAttributes(selectedMbean.parent.objectName).RuntimeType === Entaxy.RUNTIME_TYPE.PROFILE;
        }

        function shouldShowConnectorPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'profiles'}) &&
                parsedMbean.attributes.connector &&
                entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.CONNECTOR;
        }

        function shouldShowAllConnectorsTab() {
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'connectors'}) &&
                workspace.getSelectedMBeanName().endsWith('category=connectors');
        }

        function shouldShowRoutesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            return workspace.hasDomainAndProperties(entaxyJmxDomain) &&
                entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER;
        }

        function shouldShowSourceTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain) &&
                (parsedMbean.attributes.route || parsedMbean.attributes.subroute);
        }

        function shouldShowResourcesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'resource'}) &&
                parsedMbean.attributes.provider;
        }

        function shouldShowServicesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'services'}) &&
                !parsedMbean.attributes.service;
        }

        function shouldShowServicePropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'services'}) &&
                parsedMbean.attributes.service && !parsedMbean.attributes.config;
        }

        function shouldShowRealmsTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
                !parsedMbean.attributes.realm;
        }

        function shouldShowRealmPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
                parsedMbean.attributes.realm && !parsedMbean.attributes.module && !parsedMbean.attributes.config;
        }

        function shouldShowModuleUserManagement() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            let shouldShow = false;
            if (workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'jaas'}) &&
                parsedMbean.attributes.realm && parsedMbean.attributes.module) {
                let attributes = jolokia.getAttribute(mbeanName);
                shouldShow = attributes.BackingEngineDriven;
            }
            return shouldShow;
        }

        function shouldShowRepositoriesTab() {
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'repositories'}) &&
                workspace.getSelectedMBeanName().endsWith('category=repositories');
        }

        function shouldShowRepositoryPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'repositories'}) &&
                parsedMbean.attributes.repository && !parsedMbean.attributes.config;
        }

        function shouldShowKeyStoresTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
                !parsedMbean.attributes.keystore;
        }

        function shouldShowKeyStorePropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'keystores'}) &&
                parsedMbean.attributes.keystore && !parsedMbean.attributes.config;
        }

        function shouldShowVaultsTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
                !parsedMbean.attributes.vault;
        }

        function shouldShowVaultPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'security': 'vaults'}) &&
                parsedMbean.attributes.vault && !parsedMbean.attributes.config;
        }

        function shouldShowConfigPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.selectionHasDomain(entaxyJmxDomain) && parsedMbean.attributes.config;
        }

        function shouldShowRouteLibrariesTab() {
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'route-libraries'}) &&
                workspace.getSelectedMBeanName().endsWith('category=route-libraries');
        }

        function shouldShowRouteLibraryPropertiesTab() {
            let mbeanName = workspace.getSelectedMBeanName();
            let parsedMbean = Core.parseMBean(mbeanName);
            return workspace.hasDomainAndProperties(entaxyJmxDomain, {'category': 'route-libraries'}) &&
                parsedMbean.attributes['route-library'] &&
                entaxyAttributesCacheService.getAttributes(mbeanName).RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_LIBRARY;
        }

        function isAddedRoute() {
            let selectedMbean = workspace.getSelectedMBean();
            let parentMbeanName = selectedMbean && selectedMbean.parent ?
                selectedMbean.parent.objectName : undefined;
            if (parentMbeanName) {
                let attributes = entaxyAttributesCacheService.getAttributes(parentMbeanName);
                if (attributes.RuntimeType === Entaxy.RUNTIME_TYPE.ROUTE_CONTAINER &&
                        entaxyPrivateObjectsCacheService.hasAddedChildren(parentMbeanName)) {
                    let addedObjectsInfo = entaxyPrivateObjectsCacheService.getAddedObjectsInfo(parentMbeanName);
                    for (let i = 0; i < addedObjectsInfo.length; i++) {
                        if (selectedMbean.key === selectedMbean.parent.key + '-' + addedObjectsInfo[i].ui.id) {
                            return true;
                        }
                    }
                }
            }
            return false;
        }

//        global event for entaxy extras
        $rootScope.$emit('entaxyNavigationInited', $scope);
    }
    EntaxyNavigationController.$inject = ['$scope', '$location', 'workspace', 'localStorage', 'jolokia', '$rootScope',
        'entaxyAttributesCacheService', 'entaxyPrivateObjectsCacheService']

    function configureRoutes($routeProvider) {
        $routeProvider.
        when(TAB_CONFIG.attributes.route, { templateUrl: 'plugins/jmx/html/attributes/attributes.html' }).
        when(TAB_CONFIG.operations.route, { template: '<operations></operations>' }).
        when(TAB_CONFIG.chart.route, { templateUrl: 'plugins/jmx/html/charts.html' }).
        when(TAB_CONFIG.test.route, { template: '<entaxy-test></entaxy-test>' }).
        when(TAB_CONFIG.connections.route,
            { template: '<entaxy-connections page-title="Connections"></entaxy-connections>' }).
        when(TAB_CONFIG.connectionProperties.route,
            { template: '<entaxy-properties item-name="Connection"></entaxy-properties>' }).
        when(TAB_CONFIG.profiles.route,
            { template: '<entaxy-profiles page-title="Profiles"></entaxy-profiles>' }).
        when(TAB_CONFIG.profileDiagram.route,
            { template: '<entaxy-profile-diagram></entaxy-profile-diagram>' }).
        when(TAB_CONFIG.profileProperties.route,
            { template: '<entaxy-properties item-name="Profile"></entaxy-properties>' }).
        when(TAB_CONFIG.connectorsInProfile.route,
            { template: '<entaxy-connectors page-title="Connectors"></entaxy-connectors>' }).
        when(TAB_CONFIG.connectorProperties.route,
            { template: '<entaxy-properties item-name="Connector" use-grand-parent-mbean="true"></entaxy-properties>' }).
        when(TAB_CONFIG.connectors.route,
            { template: '<entaxy-all-connectors-table></entaxy-all-connectors-table>' }).
        when(TAB_CONFIG.routes.route,
            { template: '<entaxy-routes page-title="Routes"></entaxy-routes>' }).
        when(TAB_CONFIG.source.route,
            { template: '<entaxy-source></entaxy-source>' }).
        when(TAB_CONFIG.routeProperties.route,
            { template: '<entaxy-properties item-name="Route"></entaxy-properties>' }).
        when(TAB_CONFIG.resources.route,
            {
                template: '<entaxy-resources></entaxy-resources>',
                reloadOnSearch: false
            }).
        when(TAB_CONFIG.services.route,
            { template: '<entaxy-services page-title="Services and Clients"></entaxy-services>' }).
        when(TAB_CONFIG.serviceProperties.route,
            { template: '<entaxy-properties item-name="Service"></entaxy-properties>' }).
        when(TAB_CONFIG.realms.route,
            { template: '<entaxy-realms page-title="Realms"></entaxy-realms>' }).
        when(TAB_CONFIG.realmProperties.route,
            { template: '<entaxy-properties item-name="Realm"></entaxy-properties>' }).
        when(TAB_CONFIG.userManagement.route,
            { template: '<entaxy-user-management></entaxy-user-management>' }).
        when(TAB_CONFIG.repositories.route,
            { template: '<entaxy-repositories page-title="Repositories"></entaxy-repositories>' }).
        when(TAB_CONFIG.repositoryProperties.route,
            { template: '<entaxy-properties item-name="Repository"></entaxy-properties>' }).
        when(TAB_CONFIG.keyStores.route,
            { template: '<entaxy-key-stores page-title="Key Stores"></entaxy-key-stores>' }).
        when(TAB_CONFIG.keyStoreProperties.route,
            { template: '<entaxy-properties item-name="Keystore"></entaxy-properties>' }).
        when(TAB_CONFIG.keyStoreAliases.route,
            { template: '<entaxy-aliases object-type="keystore"></entaxy-aliases>' }).
        when(TAB_CONFIG.vaults.route,
            { template: '<entaxy-vaults page-title="Vaults"></entaxy-vaults>' }).
        when(TAB_CONFIG.vaultProperties.route,
            { template: '<entaxy-properties item-name="Vault"></entaxy-properties>' }).
        when(TAB_CONFIG.vaultAliases.route,
            { template: '<entaxy-aliases object-type="vault"></entaxy-aliases>' }).
        when(TAB_CONFIG.config.route,
            { template: '<entaxy-config-properties></entaxy-config-properties>' }).
        when(TAB_CONFIG.routeLibraries.route,
            { template: '<entaxy-route-libraries page-title="Route Libraries"></entaxy-route-libraries>' }).
        when(TAB_CONFIG.routeLibraryProperties.route,
            { template: '<entaxy-properties item-name="Route Library"></entaxy-properties>' });
    }
    configureRoutes.$inject = ['$routeProvider'];

})(Entaxy || (Entaxy = {}));

var TAB_CONFIG = {
    attributes: {
        title: 'Attributes',
        route: '/entaxy-management/attributes'
    },
    operations: {
        title: 'Operations',
        route: '/entaxy-management/operations'
    },
    chart: {
        title: 'Chart',
        route: '/entaxy-management/charts'
    },
    test: {
        title: 'Test',
        route: '/entaxy-management/test'
    },
    connections: {
        title: 'Connections',
        route: '/entaxy-management/connections'
    },
    connectionProperties: {
        title: 'Properties',
        route: '/entaxy-management/connection/properties'
    },
    profiles: {
        title: 'Profiles',
        route: '/entaxy-management/profiles'
    },
    profileDiagram: {
        title: 'Profile Diagram',
        route: '/entaxy-management/profile/diagram'
    },
    profileProperties: {
        title: 'Properties',
        route: '/entaxy-management/profile/properties'
    },
    connectorsInProfile: {
        title: 'Connectors',
        route: '/entaxy-management/profile/connectors'
    },
    connectorProperties: {
        title: 'Properties',
        route: '/entaxy-management/connector/properties'
    },
    connectors: {
        title: 'Connectors',
        route: '/entaxy-management/connectors'
    },
    routes: {
        title: 'Routes',
        route: '/entaxy-management/routes'
    },
    source: {
        title: 'Source',
        route: '/entaxy-management/route/source'
    },
    routeProperties: {
        title: 'Properties',
        route: '/entaxy-management/route/properties'
    },
    resources: {
        title: 'Resources',
        route: '/entaxy-management/resources'
    },
    services: {
        title: 'Services and Clients',
        route: '/entaxy-management/services'
    },
    serviceProperties: {
        title: 'Properties',
        route: '/entaxy-management/service/properties'
    },
    realms: {
        title: 'Realms',
        route: '/entaxy-management/realms'
    },
    realmProperties: {
        title: 'Properties',
        route: '/entaxy-management/realm/properties'
    },
    userManagement: {
        title: 'User Management',
        route: '/entaxy-management/realm/module/user-management'
    },
    repositories: {
        title: 'Repositories',
        route: '/entaxy-management/repositories'
    },
    repositoryProperties: {
        title: 'Properties',
        route: '/entaxy-management/repository/properties'
    },
    keyStores: {
        title: 'Key Stores',
        route: '/entaxy-management/keystores'
    },
    keyStoreProperties: {
        title: 'Properties',
        route: '/entaxy-management/keystore/properties'
    },
    keyStoreAliases: {
        title: 'Aliases',
        route: '/entaxy-management/keystore/aliases'
    },
    vaults: {
        title: 'Vaults',
        route: '/entaxy-management/vaults'
    },
    vaultProperties: {
        title: 'Properties',
        route: '/entaxy-management/vault/properties'
    },
    vaultAliases: {
        title: 'Aliases',
        route: '/entaxy-management/vault/aliases'
    },
    config: {
        title: 'Configuration Properties',
        route: '/entaxy-management/config'
    },
    routeLibraries: {
        title: 'Route Libraries',
        route: '/entaxy-management/route-libraries'
    },
    routeLibraryProperties: {
        title: 'Properties',
        route: '/entaxy-management/route-library/properties'
    }
};
