Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/26/15 13:58:34 (9 years ago)
Author:
dglaser
Message:

#2394:

HeuristicLab.Services.WebApp-3.3:

  • added exception property
  • added an icon and exception message in the plugin app
Location:
trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/plugins/plugins.cshtml

    r12428 r12523  
    11<div class="default-view-container">
     2    <script type="text/ng-template" id="pluginsExceptionDialog">
     3        <div class="modal-header">
     4            <button type="button" ng-click="close()" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
     5            <h4 class="modal-title">Plugin {{pluginName}}</h4>
     6        </div>
     7        <div class="modal-body">
     8            {{exception}}
     9        </div>
     10    </script>
    211    <div class="row">
    312        <div class="col-lg-12">
     
    1423                                <th>Assembly</th>
    1524                                <th>Last reload</th>
     25                                <th>Status</th>
    1626                                <th></th>
    1727                            </tr>
     
    2232                            <td>{{plugin.AssemblyName}}</td>
    2333                            <td>{{plugin.LastReload}}</td>
     34                            <td>
     35                                <span ng-hide="plugin.Exception" class="glyphicon glyphicon glyphicon-ok" style="color: green"></span>
     36                                <span ng-show="plugin.Exception" class="glyphicon glyphicon glyphicon-remove" style="color: darkred"
     37                                      ng-click="open(plugin.Name, plugin.Exception)"></span>
     38                            </td>
    2439                            <td>
    2540                                <a ng-href="" data-ng-click="reloadPlugin(plugin.Name)">Reload</a>
  • trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/plugins/plugins.js

    r12428 r12523  
    55    plugin.files = [
    66        'pluginsService.js',
    7         'pluginsCtrl.js'
     7        'pluginsCtrl.js',
     8        'pluginsExceptionCtrl.js'
    89    ];
    910    plugin.view = 'plugins.cshtml';
  • trunk/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/plugins/pluginsCtrl.js

    r12428 r12523  
    22    var module = appPluginsPlugin.getAngularModule();
    33    module.controller('app.plugins.ctrl',
    4         ['$scope', 'app.plugins.service', function ($scope, pluginService) {
     4        ['$scope', '$modal', 'app.plugins.service', function ($scope, $modal, pluginService) {
    55            var getPlugins = function () {
    66                pluginService.getPlugins({}, function (plugins) {
     
    2222
    2323            $scope.reloadPlugin = function (name) {
    24                 pluginService.reloadPlugin({ name: name }, function() {
     24                pluginService.reloadPlugin({ name: name }, function () {
    2525                    getPlugins();
     26                });
     27            };
     28
     29            $scope.open = function (pluginName, exception) {
     30                $scope.pluginName = pluginName;
     31                $scope.exception = exception;
     32                $modal.open({
     33                    animation: true,
     34                    templateUrl: 'pluginsExceptionDialog',
     35                    controller: 'app.plugins.pluginsExceptionCtrl',
     36                    resolve: {
     37                        pluginName: function () {
     38                            return $scope.pluginName;
     39                        },
     40                        exception: function () {
     41                            return $scope.exception;
     42                        }
     43                    }
    2644                });
    2745            };
Note: See TracChangeset for help on using the changeset viewer.