Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/10/15 14:05:24 (9 years ago)
Author:
dglaser
Message:

#2388: Added PluginManager and updated WebApp project

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp/WebApp/plugins/plugins/pluginsCtrl.js

    r12419 r12425  
    11(function () {
    2     var module = appPluginsModule.getAngularModule();
     2    var module = appPluginsPlugin.getAngularModule();
    33    module.controller('app.plugins.ctrl',
    4         ['$scope', function ($scope) {
    5             $scope.test = "a test message";
     4        ['$scope', 'app.plugins.service', function ($scope, pluginService) {
     5            var getPlugins = function () {
     6                pluginService.getPlugins({}, function (plugins) {
     7                    $scope.plugins = plugins;
     8                    var length = $scope.plugins.length;
     9                    for (var i = 0; i < length; ++i) {
     10                        if (!isDefined($scope.plugins[i].AssemblyName)) {
     11                            $scope.plugins[i].AssemblyName = 'Not found';
     12                        }
     13                        var datetime = $scope.plugins[i].LastReload;
     14                        if (isDefined(datetime)) {
     15                            $scope.plugins[i].LastReload = CSharpDateToString(datetime);
     16                        } else {
     17                            $scope.plugins[i].LastReload = 'Never';
     18                        }
     19                    }
     20                });
     21            };
     22
     23            $scope.reloadPlugin = function (name) {
     24                pluginService.reloadPlugin({ name: name }, function() {
     25                    getPlugins();
     26                });
     27            };
     28
     29            getPlugins();
    630        }]
    731    );
Note: See TracChangeset for help on using the changeset viewer.