All Downloads are FREE. Search and download functionalities are using the official Maven repository.

asysmon-res.js.asysmon-app.js Maven / Gradle / Ivy

There is a newer version: 1.0-pre28
Show newest version

angular.module('ASysMonApp', ['ngRoute', 'asysmon'], function($routeProvider, configRaw) {
    angular.forEach(configRaw.menuEntries, function(menuEntry) {
        angular.forEach(menuEntry.entries, function(pageDef) {
            $routeProvider.when('/' + pageDef.id, {templateUrl: '_$_asysmon_$_/static/partials/' + pageDef.htmlFileName, controller: pageDef.controller});
        });
    });

    $routeProvider.otherwise({ redirectTo: '/' + configRaw.defaultPage });
});

angular.module('ASysMonApp').controller('ASysMonCtrl', function($scope, $route, $location, config) {
    $scope.configRaw = config.raw();
    $scope.curTitle = function() {
        return config.forCurrentPage().fullLabel;
    };

    $scope.applicationIdentifier = function() {
        return config.raw().applicationId + " " + config.raw().applicationVersion + " [" + config.raw().applicationNode + '] on ' + config.raw().applicationDeployment;
    };

    $scope.applicationColor = function() {
        return config.raw().applicationInstanceHtmlColorCode;
    };
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy