Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/25/15 18:34:40 (9 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.Hive.DataAccess-3.3:

  • updated daos
  • changed statistics database schema
  • updated HiveStatisticsGenerator

HeuristicLab.Services.WebApp.Statistics-3.3:

  • added jobs, client and user page
Location:
branches/HiveStatistics/sources
Files:
30 added
1 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources

  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3

    • Property svn:global-ignores set to
      obj
    • Property svn:ignore set to
      bin
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/HeuristicLab.Services.WebApp.Statistics-3.3.csproj

    r12477 r12516  
    140140  </ItemGroup>
    141141  <ItemGroup>
    142     <Compile Include="WebApi\DataController.cs" />
     142    <Compile Include="WebApi\ClientController.cs" />
    143143    <Compile Include="Properties\AssemblyInfo.cs" />
    144144    <Compile Include="WebApi\DataTransfer\Client.cs" />
     145    <Compile Include="WebApi\DataTransfer\ClientDetails.cs" />
     146    <Compile Include="WebApi\DataTransfer\ClientPage.cs" />
     147    <Compile Include="WebApi\DataTransfer\ClientStatus.cs" />
     148    <Compile Include="WebApi\DataTransfer\Integer.cs" />
    145149    <Compile Include="WebApi\DataTransfer\Job.cs" />
     150    <Compile Include="WebApi\DataTransfer\JobDetails.cs" />
     151    <Compile Include="WebApi\DataTransfer\JobPage.cs" />
    146152    <Compile Include="WebApi\DataTransfer\Task.cs" />
     153    <Compile Include="WebApi\DataTransfer\TaskPage.cs" />
     154    <Compile Include="WebApi\DataTransfer\TaskStateCount.cs" />
    147155    <Compile Include="WebApi\DataTransfer\User.cs" />
     156    <Compile Include="WebApi\JavascriptUtils.cs" />
     157    <Compile Include="WebApi\JobController.cs" />
     158    <Compile Include="WebApi\TaskController.cs" />
     159    <Compile Include="WebApi\UserController.cs" />
    148160  </ItemGroup>
    149161  <ItemGroup>
     
    151163      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    152164    </Content>
     165    <Content Include="WebApp\clients\details\clientDetailsCtrl.js">
     166      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     167    </Content>
    153168    <Content Include="WebApp\clients\clientsCtrl.js">
    154169      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    155170    </Content>
     171    <Content Include="WebApp\clients\details\clientTaskDetailsDialogCtrl.js">
     172      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     173    </Content>
     174    <Content Include="WebApp\jobs\details\jobDetailsCtrl.js">
     175      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     176    </Content>
     177    <Content Include="WebApp\jobs\details\jobTaskDetailsDialogCtrl.js">
     178      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     179    </Content>
    156180    <Content Include="WebApp\jobs\jobsCtrl.js">
    157181      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    158182    </Content>
     183    <Content Include="WebApp\services\clientService.js">
     184      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     185    </Content>
     186    <Content Include="WebApp\services\jobService.js">
     187      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     188    </Content>
    159189    <Content Include="WebApp\services\statisticsService.js">
    160190      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    161191    </Content>
     192    <Content Include="WebApp\services\taskService.js">
     193      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     194    </Content>
     195    <Content Include="WebApp\services\userService.js">
     196      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     197    </Content>
    162198    <Content Include="WebApp\statistics.css">
     199      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     200    </Content>
     201    <Content Include="WebApp\users\details\userDetailsCtrl.js">
    163202      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    164203    </Content>
     
    179218    </Content>
    180219    <Content Include="WebApp\users\users.cshtml">
     220      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     221    </Content>
     222    <None Include="WebApp\clients\details\clientDetails.cshtml">
     223      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     224    </None>
     225    <None Include="WebApp\clients\details\clientTaskDetailsDialog.cshtml">
     226      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     227    </None>
     228    <None Include="WebApp\jobs\details\jobDetails.cshtml">
     229      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     230    </None>
     231    <None Include="WebApp\jobs\details\jobTaskDetailsDialog.cshtml">
     232      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     233    </None>
     234    <Content Include="WebApp\users\details\userDetails.cshtml">
    181235      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
    182236    </Content>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Client.cs

    r12477 r12516  
    2626    public Guid Id { get; set; }
    2727    public string Name { get; set; }
     28    public int TotalCores { get; set; }
     29    public int UsedCores { get; set; }
     30    public int TotalMemory { get; set; }
     31    public int UsedMemory { get; set; }
     32    public double CpuUtilization { get; set; }
     33    public string State { get; set; }
     34    public DateTime LastUpdate { get; set; }
    2835  }
    2936}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Job.cs

    r12477 r12516  
    2626    public Guid Id { get; set; }
    2727    public string Name { get; set; }
     28    public Guid UserId { get; set; }
     29    public string UserName { get; set; }
    2830    public DateTime DateCreated { get; set; }
     31    public int TotalTasks { get; set; }
     32    public int CompletedTasks { get; set; }
     33    public DateTime? DateCompleted { get; set; }
    2934  }
    3035}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApi/DataTransfer/Task.cs

    r12484 r12516  
    2525  public class Task {
    2626    public Guid Id { get; set; }
     27    public Guid JobId { get; set; }
     28    public string JobName { get; set; }
     29    public long TotalTime { get; set; }
    2730    public double CalculatingTime { get; set; }
    2831    public double WaitingTime { get; set; }
     
    3639    public string State { get; set; }
    3740    public Guid? LastClientId { get; set; }
     41    public string LastClientName { get; set; }
     42    public Guid UserId { get; set; }
     43    public string UserName { get; set; }
    3844    public DateTime? StartTime { get; set; }
    3945    public DateTime? EndTime { get; set; }
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clients.cshtml

    r12477 r12516  
    11@using HeuristicLab.Services.Access.DataTransfer
    22@using HeuristicLab.Services.Hive
    3 @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator)) {
    43<header class="view-header">
    54    <ul class="nav nav-list nav-list-topbar pull-left">
    6         <li>
    7             <a ng-href="#/statistics/jobs">Jobs</a>
    8         </li>
     5    <li>
     6        <a ng-href="#/statistics/jobs">Jobs</a>
     7    </li>
     8    @if (Request.IsAuthenticated && User.IsInRole(HiveRoles.Administrator))
     9    {
    910        <li>
    1011            <a ng-href="#/statistics/users">Users</a>
    1112        </li>
    12         <li class="active">
    13             <a ng-href="#/statistics/clients">Clients</a>
    14         </li>
     13    }
     14    <li class="active">
     15        <a ng-href="#/statistics/clients">Clients</a>
     16    </li>
    1517    </ul>
    1618</header>
    1719
    1820<div class="default-view-container">
     21    <div class="row">
     22        <div class="col-lg-12">
     23            <div class="panel panel-default">
     24                <div class="panel-heading">
     25                    <h3 class="panel-title">Current Clients</h3>
     26                </div>
     27                <div class="panel-body">
     28                    <table class="table table-hover table-condensed">
     29                        <thead>
     30                        <tr>
     31                            <th>#</th>
     32                            <th>Client Name</th>
     33                            <th>Cores</th>
     34                            <th>Cpu Utilization</th>
     35                            <th>State</th>
     36                            <th></th>
     37                        </tr>
     38                        </thead>
     39                        <tr ng-repeat="client in clientPage.Clients">
     40                            <td>{{($index + 1)+((curClientsPage-1)*(clientsPageSize))}}</td>
     41                            <td>{{client.Name}}</td>
     42                            <td>{{client.UsedCores}} / {{client.TotalCores}}</td>
     43                            <td>{{client.CpuUtilization | number: 2}} %</td>
     44                            <td>{{client.State}}</td>
     45                            <td>
     46                                <a ng-href="#/statistics/clients/{{client.Id}}">Details</a>
     47                            </td>
     48                        </tr>
     49                        <tr ng-hide="clientPage.Clients.length">
     50                            <td colspan="6" class="text-center">No clients found!</td>
     51                        </tr>
     52                    </table>
     53                    <div class="row text-center" ng-show="clientPage.TotalClients > clientPage.Clients.length">
     54                        <pagination max-size="10" total-items="clientPage.TotalClients" ng-model="curClientsPage" ng-change="changeClientsPage()" items-per-page="clientsPageSize"
     55                                    boundary-links="true" rotate="false" num-pages="numPages"></pagination>
     56                    </div>
     57                </div>
     58            </div>
     59        </div>
     60    </div>
    1961
     62    <div class="row">
     63        <div class="col-lg-12">
     64            <div class="panel panel-default">
     65                <div class="panel-heading">
     66                    <h3 class="panel-title">Expired Clients</h3>
     67                </div>
     68                <div class="panel-body">
     69                    <table class="table table-hover table-condensed">
     70                        <thead>
     71                            <tr>
     72                                <th>#</th>
     73                                <th>Client Name</th>
     74                                <th>Cores</th>
     75                                <th>Cpu Utilization</th>
     76                                <th>State</th>
     77                                <th></th>
     78                            </tr>
     79                        </thead>
     80                        <tr ng-repeat="client in expiredClientPage.Clients">
     81                            <td>{{($index + 1)+((curExpiredClientsPage-1)*(expiredClientsPageSize))}}</td>
     82                            <td>{{client.Name}}</td>
     83                            <td>{{client.UsedCores}} / {{client.TotalCores}}</td>
     84                            <td>{{client.CpuUtilization | number: 2}} %</td>
     85                            <td>{{client.State}}</td>
     86                            <td>
     87                                <a ng-href="#/statistics/clients/{{client.Id}}">Details</a>
     88                            </td>
     89                        </tr>
     90                        <tr ng-hide="expiredClientPage.Clients.length">
     91                            <td colspan="6" class="text-center">No expired clients found!</td>
     92                        </tr>
     93                    </table>
     94                    <div class="row text-center" ng-show="expiredClientPage.TotalClients > expiredClientPage.Clients.length">
     95                        <pagination max-size="10" total-items="expiredClientPage.TotalClients" ng-model="curExpiredClientsPage" ng-change="changeExpiredClientsPage()" items-per-page="expiredClientsPageSize"
     96                                    boundary-links="true" rotate="false" num-pages="numPages"></pagination>
     97                    </div>
     98                </div>
     99            </div>
     100        </div>
     101    </div>
    20102</div>
    21 }
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/clients/clientsCtrl.js

    r12477 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    module.controller('app.statistics.clientsCtrl',
    4         ['$scope', 'app.statistics.data.service', function($scope, statisticsService) {
    5            
     4        ['$scope', '$interval', 'app.statistics.clientService',
     5        function ($scope, $interval, clientService) {
     6            $scope.interval = defaultPageUpdateInterval;
     7            $scope.curClientsPage = 1;
     8            $scope.clientsPageSize = 20;
     9            $scope.curExpiredClientsPage = 1;
     10            $scope.expiredClientsPageSize = 20;
     11
     12            var getClients = function () {
     13                clientService.getClients({ page: $scope.curClientsPage, size: $scope.clientsPageSize, expired: false },
     14                    function (clientPage) {
     15                        $scope.clientPage = clientPage;
     16                    }
     17                );
     18            };
     19
     20            var getExpiredClients = function() {
     21                clientService.getClients({ page: $scope.curExpiredClientsPage, size: $scope.expiredClientsPageSize, expired: true },
     22                    function (clientPage) {
     23                        $scope.expiredClientPage = clientPage;
     24                    }
     25                );
     26            };
     27
     28            var update = function () {
     29                getClients();
     30                getExpiredClients();
     31            };
     32
     33            $scope.changeClientsPage = function () {
     34                update();
     35            };
     36
     37            $scope.changeExpiredClientsPage = function () {
     38                update();
     39            };
     40
     41            $scope.updateInterval = $interval(update, $scope.interval);
     42            var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
     43                $interval.cancel($scope.updateInterval);
     44                cancelInterval();
     45            });
     46            update(); // init page
     47
    648        }]
    749    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobs.cshtml

    r12484 r12516  
    1010                <a ng-href="#/statistics/users">Users</a>
    1111            </li>
    12             <li>
    13                 <a ng-href="#/statistics/clients">Clients</a>
    14             </li>
    1512        }
     13        <li>
     14            <a ng-href="#/statistics/clients">Clients</a>
     15        </li>
    1616    </ul>
    1717</header>
    1818
    1919<div class="default-view-container">
    20 
    21 
    2220    <div class="row">
    2321        <div class="col-lg-12">
    2422            <div class="panel panel-default">
    2523                <div class="panel-heading">
    26                     <h3 class="panel-title">My Jobs</h3>
     24                    <h3 class="panel-title">Current Jobs</h3>
    2725                </div>
    2826                <div class="panel-body">
    2927                    <table class="table table-hover table-condensed">
    3028                        <thead>
    31                             <tr>
    32                                 <th>#</th>
    33                                 <th>Job Name</th>
    34                                 <th>Date Created</th>
    35                                 <th></th>
    36                             </tr>
     29                        <tr>
     30                            <th>#</th>
     31                            <th>Job Name</th>
     32                            <th>Date Created</th>
     33                            <th>Progress</th>
     34                            <th></th>
     35                        </tr>
    3736                        </thead>
    3837                        <tr ng-repeat="job in jobs">
     
    4039                            <td>{{job.Name}}</td>
    4140                            <td>{{job.DateCreated}}</td>
    42                             <td><a ng-href="" data-ng-click="getTasksByJobId(job.Id)">Load Tasks</a></td>
     41                            <td>
     42                                <progressbar class="progress active" max="job.TotalTasks" value="job.CompletedTasks" type="success"><i style="color:black; white-space:nowrap;">{{job.CompletedTasks}} / {{job.TotalTasks}}</i></progressbar>
     43                            </td>
     44                            <td>
     45                                <a ng-href="#/statistics/jobs/{{job.Id}}">Details</a>
     46                            </td>
    4347                        </tr>
    4448                        <tr ng-hide="jobs.length">
    45                             <td colspan="4" class="text-center">No jobs found!</td>
     49                            <td colspan="5" class="text-center">No active jobs found!</td>
    4650                        </tr>
    4751                    </table>
     
    5155    </div>
    5256
    53     <div class="row" ng-show="tasks.length">
    54 
    55         <div class="col-lg-3 col-md-6" ng-repeat="task in tasks">
     57    <div class="row">
     58        <div class="col-lg-12">
    5659            <div class="panel panel-default">
    57 
    5860                <div class="panel-heading">
    59                     <h3 class="panel-title">Task {{$index + 1}}</h3>
     61                    <h3 class="panel-title">Completed Jobs</h3>
    6062                </div>
    6163                <div class="panel-body">
    62                     <table class="table table-hover table-condensed table-no-border table-auto-width">
     64                    <table class="table table-hover table-condensed">
     65                        <thead>
    6366                        <tr>
    64                             <td>Initial Waiting Time:</td>
    65                             <td>{{task.InitialWaitingTime}}</td>
     67                            <th>#</th>
     68                            <th>Job Name</th>
     69                            <th>Date Created</th>
     70                            <th>Date Completed</th>
     71                            <th>Tasks</th>
     72                            <th></th>
    6673                        </tr>
    67                         <tr>
    68                             <td>Waiting Time:</td>
    69                             <td>{{task.WaitingTime}}</td>
     74                        </thead>
     75                        <tr ng-repeat="job in completedJobPage.Jobs">
     76                            <td>{{($index + 1)+((completedJobCurPage-1)*(completedJobPageSize))}}</td>
     77                            <td>{{job.Name}}</td>
     78                            <td>{{job.DateCreated}}</td>
     79                            <td>{{job.DateCompleted}}</td>
     80                            <td>{{job.TotalTasks}}</td>
     81                            <td><a ng-href="#/statistics/jobs/{{job.Id}}">Details</a></td>
    7082                        </tr>
    71                         <tr>
    72                             <td>Calculating Time:</td>
    73                             <td>{{task.CalculatingTime}}</td>
    74                         </tr>
    75                         <tr>
    76                             <td>Transfer Time:</td>
    77                             <td>{{task.TransferTime}}</td>
    78                         </tr>
    79                         <tr>
    80                             <td>Start Time:</td>
    81                             <td>{{task.StartTime}}</td>
    82                         </tr>
    83                         <tr>
    84                             <td>End Time:</td>
    85                             <td>{{task.EndTime}}</td>
    86                         </tr>
    87                         <tr>
    88                             <td>Calculation Runs:</td>
    89                             <td>{{task.NumCalculationRuns}}</td>
    90                         </tr>
    91                         <tr>
    92                             <td>Retries Runs:</td>
    93                             <td>{{task.NumRetries}}</td>
    94                         </tr>
    95                         <tr>
    96                             <td>Cores Required:</td>
    97                             <td>{{task.CoresRequired}}</td>
    98                         </tr>
    99                         <tr>
    100                             <td>Memory Required:</td>
    101                             <td>{{task.MemoryRequired}}</td>
    102                         </tr>
    103                         <tr>
    104                             <td>Priority:</td>
    105                             <td>{{task.Priority}}</td>
     83                        <tr ng-hide="completedJobPage.Jobs.length">
     84                            <td colspan="6" class="text-center">No completed jobs found!</td>
    10685                        </tr>
    10786                    </table>
     87                    <div class="row text-center" ng-show="completedJobPage.TotalJobs > completedJobPage.Jobs.length">
     88                        <pagination max-size="10" total-items="completedJobPage.TotalJobs"
     89                                    ng-model="completedJobCurPage" items-per-page="completedJobPageSize"
     90                                    ng-change="changeCompletedJobPage()"
     91                                    boundary-links="true" rotate="false" num-pages="numPages"></pagination>
     92                    </div>
    10893                </div>
    109 
    11094            </div>
    11195        </div>
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/jobs/jobsCtrl.js

    r12484 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    module.controller('app.statistics.jobsCtrl',
    4         ['$scope', 'app.statistics.data.service', function($scope, statisticsService) {
    5             var getJobs = function() {
    6                 statisticsService.getJobs({}, function(jobs) {
     4        ['$scope', '$interval', 'app.statistics.jobService', function ($scope, $interval, jobService) {
     5            $scope.interval = defaultPageUpdateInterval;
     6            $scope.completedJobCurPage = 1;
     7            $scope.completedJobPageSize = 20;
     8
     9            var getAllJobs = function() {
     10                jobService.getAllJobs({ completed: false }, function(jobs) {
    711                    $scope.jobs = jobs;
     12                    var length = $scope.jobs.length;
     13                    for (var i = 0; i < length; ++i) {
     14                        $scope.jobs[i].DateCreated = CSharpDateToString($scope.jobs[i].DateCreated);
     15                    }
    816                });
    917            };
    1018
    11             $scope.getTasksByJobId = function(id) {
    12                 statisticsService.getTasksByJobId({ id: id }, function(tasks) {
    13                     $scope.tasks = tasks;
    14                 });
     19            var getCompletedJobs = function() {
     20                jobService.getJobs({ page: $scope.completedJobCurPage, size: $scope.completedJobPageSize, completed: true },
     21                    function (jobPage) {
     22                        $scope.completedJobPage = jobPage;
     23                        var length = $scope.completedJobPage.Jobs.length;
     24                        for (var i = 0; i < length; ++i) {
     25                            $scope.completedJobPage.Jobs[i].DateCreated = CSharpDateToString($scope.completedJobPage.Jobs[i].DateCreated);
     26                            $scope.completedJobPage.Jobs[i].DateCompleted = CSharpDateToString($scope.completedJobPage.Jobs[i].DateCompleted);
     27                        }
     28                    }
     29                );
    1530            };
    1631
    17             getJobs();
     32            $scope.changeCompletedJobPage = function () {
     33                update();
     34            };
     35
     36            var update = function () {
     37                getAllJobs();
     38                getCompletedJobs();
     39            };
     40
     41            $scope.updateInterval = $interval(update, $scope.interval);
     42            var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
     43                $interval.cancel($scope.updateInterval);
     44                cancelInterval();
     45            });
     46            update(); // init page
    1847        }]
    1948    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/services/statisticsService.js

    r12477 r12516  
    44    module.factory('app.statistics.data.service',
    55        ['$resource', function ($resource) {
    6             return $resource(apiUrl + ':action', { id: '@id' }, {
     6            return $resource(apiUrl + ':action', { id: '@id', page: '@page', size: '@size', states: '@states', expired: '@expired'}, {
     7                getJob: { method: 'GET', params: { action: 'GetJob' } },
    78                getJobs: { method: 'GET', params: { action: 'GetJobs' }, isArray: true },
     9                getCompletedJobs: { method: 'GET', params: { action: 'GetCompletedJobs' }, isArray: true },
     10                getCompletedJobsByUserId: { method: 'GET', params: { action: 'GetCompletedJobsByUserId' }, isArray: true },
     11                getCompletedJobsCount: { method: 'GET', params: { action: 'GetCompletedJobsCount' } },
     12                getCompletedJobsCountByUserId: { method: 'GET', params: { action: 'GetCompletedJobsCountByUserId' } },
    813                getJobsByUserId: { method: 'GET', params: { action: 'GetJobsByUserId' }, isArray: true },
    9                 getTasksByJobId: { method: 'GET', params: { action: 'GetTasksByJobId' }, isArray: true }
     14                getTaskCountByJobId: { method: 'GET', params: { action: 'GetTaskCountByJobId' } },
     15                getTasksByJobId: { method: 'GET', params: { action: 'GetTasksByJobId' }, isArray: true },
     16                getJobTasksStatesByJobId: { method: 'GET', params: { action: 'GetJobTasksStatesByJobId' }, isArray: true },
     17                getClient: { method: 'GET', params: { action: 'GetClient' } },
     18                getClientCount: { method: 'GET', params: { action: 'GetClientCount' } },
     19                getClients: { method: 'GET', params: { action: 'GetClients' }, isArray: true },
     20                getTaskCountByClientId: { method: 'GET', params: { action: 'GetTaskCountByClientId' } },
     21                getTasksByClientId: { method: 'GET', params: { action: 'GetTasksByClientId' }, isArray: true },
     22                getJobTasksStatesByClientId: { method: 'GET', params: { action: 'GetJobTasksStatesByClientId' }, isArray: true },
     23                getClientHistory: { method: 'GET', params: { action: 'GetClientHistory' }, isArray: true },
     24                getUsers: { method: 'GET', params: { action: 'GetUsers' }, isArray: true },
     25                getUser: { method: 'GET', params: { action: 'GetUser' } }
    1026            });
    1127        }]
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/statistics.css

    r12477 r12516  
    1 
     1#job-filter-header {
     2  padding: 30px;
     3  background: #F5F5F5;
     4  border-top: 1px solid #D3D3D3;
     5  border-bottom: 1px solid #D3D3D3;
     6}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/users.cshtml

    r12477 r12516  
    1717
    1818<div class="default-view-container">
    19 
     19    <div class="row">
     20        <div class="col-lg-12">
     21            <div class="panel panel-default">
     22                <div class="panel-heading">
     23                    <h3 class="panel-title">Users</h3>
     24                </div>
     25                <div class="panel-body">
     26                    <table class="table table-hover table-condensed">
     27                        <thead>
     28                            <tr>
     29                                <th>#</th>
     30                                <th>Username</th>
     31                                <th></th>
     32                            </tr>
     33                        </thead>
     34                        <tr ng-repeat="user in users">
     35                            <td>{{$index + 1}}</td>
     36                            <td>{{user.Name}}</td>
     37                            <td>
     38                                <a ng-href="#/statistics/users/{{user.Id}}">Details</a>
     39                            </td>
     40                        </tr>
     41                        <tr ng-hide="users.length">
     42                            <td colspan="4" class="text-center">No users found!</td>
     43                        </tr>
     44                    </table>
     45                </div>
     46            </div>
     47        </div>
     48    </div>
    2049</div>
    2150}
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/WebApp/users/usersCtrl.js

    r12477 r12516  
    22    var module = appStatisticsPlugin.getAngularModule();
    33    module.controller('app.statistics.usersCtrl',
    4         ['$scope', 'app.statistics.data.service', function($scope, statisticsService) {
    5            
     4        ['$scope', '$interval', 'app.statistics.userService', function ($scope, $interval, userService) {
     5            $scope.interval = defaultPageUpdateInterval;
     6
     7            var getUsers = function() {
     8                userService.getUsers({}, function(users) {
     9                    users.splice(0, 1);
     10                    $scope.users = users;
     11                });
     12            };
     13
     14            $scope.updateInterval = $interval(getUsers, $scope.interval);
     15            var cancelInterval = $scope.$on('$locationChangeSuccess', function () {
     16                $interval.cancel($scope.updateInterval);
     17                cancelInterval();
     18            });
     19            getUsers(); // init page
    620        }]
    721    );
  • branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Statistics/3.3/statistics.js

    r12477 r12516  
    22(function () {
    33    var plugin = appStatisticsPlugin;
    4     plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap'];
     4    plugin.dependencies = ['ngResource', 'ui.knob', 'ui.bootstrap', 'ngFitText'];
    55    plugin.files = [
     6        'WebApp/statistics.css',
    67        'WebApp/services/statisticsService.js',
     8        'WebApp/services/jobService.js',
     9        'WebApp/services/taskService.js',
     10        'WebApp/services/userService.js',
     11        'WebApp/services/clientService.js',
    712        'WebApp/jobs/jobsCtrl.js',
     13        'WebApp/jobs/details/jobDetailsCtrl.js',
     14        'WebApp/jobs/details/jobTaskDetailsDialogCtrl.js',
    815        'WebApp/clients/clientsCtrl.js',
     16        'WebApp/clients/details/clientDetailsCtrl.js',
     17        'WebApp/clients/details/clientTaskDetailsDialogCtrl.js',
    918        'WebApp/users/usersCtrl.js',
     19        'WebApp/users/details/userDetailsCtrl.js'
    1020    ];
    1121    plugin.view = 'WebApp/jobs/jobs.cshtml';
     
    1323    plugin.routes = [
    1424        new Route('jobs', 'WebApp/jobs/jobs.cshtml', 'app.statistics.jobsCtrl'),
     25        new Route('jobs/:id', 'WebApp/jobs/details/jobDetails.cshtml', 'app.statistics.jobDetailsCtrl'),
    1526        new Route('clients', 'WebApp/clients/clients.cshtml', 'app.statistics.clientsCtrl'),
    16         new Route('users', 'WebApp/users/users.cshtml', 'app.statistics.usersCtrl')
     27        new Route('clients/:id', 'WebApp/clients/details/clientDetails.cshtml', 'app.statistics.clientDetailsCtrl'),
     28        new Route('users', 'WebApp/users/users.cshtml', 'app.statistics.usersCtrl'),
     29        new Route('users/:id', 'WebApp/users/details/userDetails.cshtml', 'app.statistics.userDetailsCtrl')
    1730    ];
    1831    var menu = app.getMenu();
Note: See TracChangeset for help on using the changeset viewer.