Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/HomeController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/HomeController.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/HomeController.cs	(revision 13862)
@@ -20,10 +20,12 @@
 #endregion
 
-using HeuristicLab.Clients.Hive.WebJobManager.Services;
+
 using Microsoft.AspNetCore.Mvc;
 using System.ServiceModel.Security;
 using System;
+using Microsoft.AspNetCore.Http;
+using HeuristicLab.Clients.Hive.WebJobManager.Services;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
-using Microsoft.AspNetCore.Http;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 
 namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
@@ -100,5 +102,5 @@
                     {
                         ViewBag.Title = "Login succesful";
-                        weblog.newLoginOKBOnly(model,q);
+                        weblog.newLoginOKBOnly(model,q, password);
                         HttpContext.Session.SetString("UserId", model.userId.ToString());
                         return RedirectToAction("Index", "Query");
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/JobController.cs	(revision 13862)
@@ -20,20 +20,19 @@
 #endregion
 
+using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
+using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
+using HeuristicLab.Common;
+using HeuristicLab.Optimization;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.Http;
 using Microsoft.AspNetCore.Mvc;
-using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using Microsoft.Net.Http.Headers;
 using System;
 using System.Collections.Generic;
+using System.IO;
 using System.Linq;
+using System.Threading;
 using System.Threading.Tasks;
-using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
-using Microsoft.AspNetCore.Http;
-
-using System.IO;
-using Microsoft.Net.Http.Headers;
-using Microsoft.AspNetCore.Hosting;
-using HeuristicLab.Common;
-using HeuristicLab.Optimization;
-using System.Threading;
-
 
 namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/OkbManagementController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/OkbManagementController.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/OkbManagementController.cs	(revision 13862)
@@ -0,0 +1,49 @@
+﻿using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
+using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
+{
+    public class OkbManagementController: Controller
+    {
+        private OkbManagementVM vm;
+        private WebLoginService weblog;
+        private Guid userId;
+        
+        private bool init()
+        {
+            var u = HttpContext.Session.GetString("UserId");
+            weblog = WebLoginService.Instance;
+            if (u == null || u == "" || Guid.Parse(u) == Guid.Empty)
+            {
+                return false;
+            }
+            else
+            {
+                userId = Guid.Parse(u);
+                vm = new OkbManagementVM(weblog.getCurrentUser(userId), weblog.getOkbAdminClient(userId));
+                if(vm.client != null)
+                    return true;
+            }
+            return false;
+        }
+
+        public IActionResult Index()
+        {
+
+            if (init())
+            {
+                ViewBag.SessionId = HttpContext.Session.GetString("UserId");
+                ViewBag.Title = "OKB Management";
+                return View("Index", vm);
+            }
+            else
+            {
+                return RedirectToAction("Index", "Query");
+            }
+        }
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/QueryController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/QueryController.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/QueryController.cs	(revision 13862)
@@ -21,4 +21,5 @@
 
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
 using Microsoft.AspNetCore.Http;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/ResourceController.cs	(revision 13862)
@@ -20,7 +20,7 @@
 #endregion
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Models;
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using Microsoft.AspNetCore.Hosting;
 using Microsoft.AspNetCore.Http;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Controllers/UserController.cs	(revision 13862)
@@ -20,6 +20,6 @@
 #endregion
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels.User;
 using Microsoft.AspNetCore.Hosting;
@@ -27,9 +27,4 @@
 using Microsoft.AspNetCore.Mvc;
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Net.Mail;
-using System.ServiceModel.Security;
-using System.Threading.Tasks;
 
 namespace HeuristicLab.Clients.Hive.WebJobManager.Controllers
@@ -191,5 +186,8 @@
                     accessClient.addMember(user, group);
                 }
-                return RedirectToAction("SelectUser", new { id = uid.ToString() });
+                if (uid != Guid.Empty && uid == weblog.getCurrentUser(userId).currentUser.Id)
+                    return RedirectToAction("Index", "Home");//Logout if current user
+                else
+                    return RedirectToAction("SelectUser", new { id = uid.ToString() });
             }
             else
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/CalendarHub.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/CalendarHub.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/CalendarHub.cs	(revision 13862)
@@ -21,6 +21,6 @@
 
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels.User;
 using Microsoft.AspNetCore.SignalR;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/OkbManagerHub.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/OkbManagerHub.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/OkbManagerHub.cs	(revision 13862)
@@ -0,0 +1,34 @@
+﻿using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
+using Microsoft.AspNetCore.SignalR;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Hubs
+{
+    public class OkbManagerHub : Hub
+    {
+        private WebLoginService weblog;
+        private Guid userId;
+        private OkbAdministrationWebClient adminclient;
+        /// <summary>
+        /// Loads up the services for the client (Instance is only created upon a call from a client)
+        /// </summary>
+        private void loader()
+        {
+            weblog = WebLoginService.Instance;
+            string uid = Context.QueryString["userid"];
+            if (uid == null || uid == "" || Guid.Parse(uid) == Guid.Empty)
+            {
+                userId = Guid.Empty;
+            }
+            else
+            {
+                userId = Guid.Parse(uid);
+                adminclient = weblog.getOkbAdminClient(userId);
+            }
+        }
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/QueryHub.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/QueryHub.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/QueryHub.cs	(revision 13862)
@@ -21,4 +21,5 @@
 
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.OKB.Query;
 using Microsoft.AspNetCore.SignalR;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/UserInfoHub.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/UserInfoHub.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Hubs/UserInfoHub.cs	(revision 13862)
@@ -21,7 +21,7 @@
 
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Controllers;
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels.User;
 using Microsoft.AspNetCore.SignalR;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/HiveWebUser.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/HiveWebUser.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Models/HiveWebUser.cs	(revision 13862)
@@ -48,5 +48,5 @@
         public HiveWebUser updateUserInfo()
         {
-            
+
             try
             {
@@ -57,17 +57,22 @@
                 access.RefreshUserGroups();
                 access.RefreshRoles();
-            
+
                 currentUser = access.Users.Find(x => x.UserName == username);
                 subscribedGroups = access.CallAccessService(x => x.GetUserGroupsOfUser(currentUser.Id));
                 accessRoles = access.CallAccessService(x => x.GetRolesOfCurrentUser());
             }
-            catch(SecurityAccessDeniedException e)
+            catch (Exception e)
             {
-                currentUser = new User();
-                currentUser.FullName = username;
-                subscribedGroups = new List<UserGroup>();
-                accessRoles = new List<Role>();
+                if (e is SecurityAccessDeniedException || e is NullReferenceException)
+                {
+                    currentUser = new User();
+                    currentUser.FullName = username;
+                    subscribedGroups = new List<UserGroup>();
+                    accessRoles = new List<Role>();
+                }
+                else
+                    throw e;
             }
-            
+
             return this;
 
@@ -75,5 +80,5 @@
         public bool HasUserAdminAccess()
         {
-            if(accessRoles.Find(x => x.Name == "AccessService Administrator") != null)
+            if (accessRoles.Find(x => x.Name == "AccessService Administrator") != null || weblog.getAccessAdminClient(webIdToken) != null)
             {
                 return true;
@@ -83,6 +88,6 @@
         public bool hasResourceAdminAccess()
         {
-            if(accessRoles.Find(x =>x.Name == "Hive Administrator" ) != null
-                && accessRoles.Find(x => x.Name == "AccessService Administrator") != null)
+            if ((accessRoles.Find(x => x.Name == "Hive Administrator") != null
+                && accessRoles.Find(x => x.Name == "AccessService Administrator") != null))
             {
                 return true;
@@ -92,5 +97,19 @@
         public bool hasOKBAccess()
         {
-            if (OKBOnly || accessRoles.Find(x => x.Name == "OKB User") != null || accessRoles.Find(x => x.Name == "OKB Administrator") != null)
+            if (OKBOnly || accessRoles.Find(x => x.Name == "OKB User") != null || accessRoles.Find(x => x.Name == "OKB Administrator") != null
+                || weblog.getQueryClient(webIdToken) != null)
+            {
+                return true;
+            }
+            return false;
+        }
+        public bool hasOKBAdminAccess()
+        {
+            if (OKBOnly)
+            {
+                if (weblog.getOkbAdminClient(webIdToken) != null)
+                    return true;
+            }
+            else if (accessRoles.Find(x => x.Name == "OKB Administrator") != null || weblog.getOkbAdminClient(webIdToken) != null)
             {
                 return true;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Hubs/OkbManagerHubber.js
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Hubs/OkbManagerHubber.js	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Scripts/Hubs/OkbManagerHubber.js	(revision 13862)
@@ -0,0 +1,86 @@
+﻿/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+angular.module('wjmokbmanager', ['ngDialog']).
+controller('okbmanangerCtrl', function ($rootScope, $scope, ngDialog, $timeout, $filter) {
+    var vm = $scope;
+    var hubber = $.connection.okbManagerHub;
+    vm.currentData = {'name' : '', 'data' : null}
+
+    vm.init = function () {
+
+        var uid = document.getElementById("userId").innerHTML;
+        $.connection.hub.qs = { 'userid': uid };
+        //Connection string set to identify the unique session ID for the user
+        $.connection.hub.start().done(function () {
+           // hubber.server.requestInfo();//initial data request
+        });
+        hubber.client.processData = function (filters) {
+
+        };
+
+    }
+
+     vm.initData=  function(coll, name) {
+        switch (name) {
+            case "platforms":
+                vm.platforms = {'selected' : null, 'arr' : coll}
+                break;
+            case "algoclass":
+                vm.algoclass = { 'selected': null, 'arr': coll }
+                break;
+            case "algos":
+                vm.algos = { 'selected': null, 'arr': coll }
+                break;
+            case "probclass":
+                vm.probclass = { 'selected': null, 'arr': coll }
+                break;
+            case "problems":
+                vm.problems = { 'selected': null, 'arr': coll }
+                break;
+
+        }
+
+     }
+     vm.selectDataCat = function (name) {
+         switch (name) {
+             case "platforms":
+                 vm.currentData.name = "Platforms";
+                 vm.currentData.data = vm.platforms;
+                 break;
+             case "algoclass":
+                 vm.currentData.name = "Algorithm classes";
+                 vm.currentData.data = vm.algoclass;
+                 break;
+             case "algos":
+                 vm.currentData.name = "Algorithms";
+                 vm.currentData.data = vm.algos;
+                 break;
+             case "probclass":
+                 vm.currentData.name = "Problem classes";
+                 vm.currentData.data = vm.probclass;
+                 break;
+             case "problems":
+                 vm.currentData.name = "Problems";
+                 vm.currentData.data = vm.problems;
+                 break;
+
+         }
+     }
+});
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/AccessAdministrationClient.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/AccessAdministrationClient.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/AccessAdministrationClient.cs	(revision 13862)
@@ -26,9 +26,9 @@
 using System.ServiceModel;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
-using HeuristicLab.Clients.Hive.WebJobManager.Services;
 using System.Collections.Generic;
 using System.ServiceModel.Security;
-
-namespace HeuristicLab.Clients.Access.Administration
+using HeuristicLab.Clients.Access;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
 {
     /// <summary>
@@ -485,4 +485,21 @@
         }
         #endregion
+
+        internal bool CheckLogin()
+        {
+            try
+            {
+                this.RefreshUsers();
+                return true;
+            }
+            catch (SecurityAccessDeniedException e)
+            {
+                return false;
+            }
+            catch (MessageSecurityException e)
+            {
+                return false;
+            }
+        }
     }
 }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveAdminClientWeb.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveAdminClientWeb.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveAdminClientWeb.cs	(revision 13862)
@@ -25,6 +25,7 @@
 using HeuristicLab.Core;
 using HeuristicLab.Clients.Hive.WebJobManager.Services;
-
-namespace HeuristicLab.Clients.Hive
+using System.ServiceModel.Security;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
 {
     [Item("Hive Administrator", "Hive Administrator")]
@@ -99,7 +100,7 @@
                 });
             }
-            catch
-            {
-                throw;
+            catch(Exception e)
+            {
+                throw e;
             }
             finally
@@ -200,4 +201,21 @@
             }
         }
+
+        internal bool CheckLogin()
+        {
+            try
+            {
+                this.Refresh();
+                return true;
+            }
+            catch (MessageSecurityException e)
+            {
+                return false;
+            }
+            catch(SecurityAccessDeniedException e)
+            {
+                return false;
+            }
+        }
     }
 }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveClientWeb.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveClientWeb.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveClientWeb.cs	(revision 13862)
@@ -33,10 +33,7 @@
 using HeuristicLab.PluginInfrastructure;
 using TS = System.Threading.Tasks;
-using HeuristicLab.Clients.Hive.WebJobManager.Services;
-using HeuristicLab.Clients.Common.Properties;
 using Microsoft.AspNetCore.Hosting;
-using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
-
-namespace HeuristicLab.Clients.Hive.WebJobManager
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
 {
     /// <summary>
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveServiceLocatorWeb.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveServiceLocatorWeb.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/HiveServiceLocatorWeb.cs	(revision 13862)
@@ -11,5 +11,5 @@
 using System.Threading.Tasks;
 
-namespace HeuristicLab.Clients.Hive.WebJobManager.Services
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
 {
     /// <summary>
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/OkbAdministrationWebClient.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/OkbAdministrationWebClient.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/OkbAdministrationWebClient.cs	(revision 13862)
@@ -0,0 +1,358 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Clients.Common;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using System.ServiceModel;
+using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
+using System.ServiceModel.Security;
+using HeuristicLab.Clients.OKB.Administration;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
+{
+    [Item("OkbAdministrationWebClient", "OKB administration web client.")]
+    public sealed class OkbAdministrationWebClient : IContent
+    {
+
+
+
+        private string log;
+        private string pass;
+
+        private AdministrationServiceClient client;
+        public Guid UserId { get; set; }
+        public OkbAdministrationWebClient(Guid u) : this()
+        {
+            UserId = u;
+            client = null;
+            log = WebLoginService.Instance.getServiceLocator(UserId).Username;
+            pass = WebLoginService.Instance.getServiceLocator(UserId).Password;
+        }
+        public OkbAdministrationWebClient(LoginViewModel log, string pass) : this()
+        {
+            client = null;
+            this.UserId = log.userId;
+            this.log = log.loginName;
+            this.pass = pass;
+
+        }
+
+
+        #region Properties
+        private ItemCollection<Platform> platforms;
+        public ItemCollection<Platform> Platforms
+        {
+            get { return platforms; }
+        }
+        private ItemCollection<AlgorithmClass> algorithmClasses;
+        public ItemCollection<AlgorithmClass> AlgorithmClasses
+        {
+            get { return algorithmClasses; }
+        }
+        private ItemCollection<Algorithm> algorithms;
+        public ItemCollection<Algorithm> Algorithms
+        {
+            get { return algorithms; }
+        }
+        private ItemCollection<ProblemClass> problemClasses;
+        public ItemCollection<ProblemClass> ProblemClasses
+        {
+            get { return problemClasses; }
+        }
+        private ItemCollection<Problem> problems;
+        public ItemCollection<Problem> Problems
+        {
+            get { return problems; }
+        }
+        #endregion
+
+        public OkbAdministrationWebClient() { }
+
+        #region Refresh
+        public void Refresh()
+        {
+            OnRefreshing();
+
+            platforms = new OKBItemCollection<Platform>();
+            algorithmClasses = new OKBItemCollection<AlgorithmClass>();
+            algorithms = new OKBItemCollection<Algorithm>();
+            problemClasses = new OKBItemCollection<ProblemClass>();
+            problems = new OKBItemCollection<Problem>();
+
+            try
+            {
+                platforms.AddRange(CallAdministrationService<List<Platform>>(s => s.GetPlatforms()).OrderBy(x => x.Name));
+                algorithmClasses.AddRange(CallAdministrationService<List<AlgorithmClass>>(s => s.GetAlgorithmClasses()).OrderBy(x => x.Name));
+                algorithms.AddRange(CallAdministrationService<List<Algorithm>>(s => s.GetAlgorithms()).OrderBy(x => x.Name));
+                problemClasses.AddRange(CallAdministrationService<List<ProblemClass>>(s => s.GetProblemClasses()).OrderBy(x => x.Name));
+                problems.AddRange(CallAdministrationService<List<Problem>>(s => s.GetProblems()).OrderBy(x => x.Name));
+            }
+            finally
+            {
+                OnRefreshed();
+            }
+        }
+        public void RefreshAsync(Action<Exception> exceptionCallback)
+        {
+            var call = new Func<Exception>(delegate ()
+            {
+                try
+                {
+                    Refresh();
+                }
+                catch (Exception ex)
+                {
+                    return ex;
+                }
+                return null;
+            });
+            call.BeginInvoke(delegate (IAsyncResult result)
+            {
+                Exception ex = call.EndInvoke(result);
+                if (ex != null) exceptionCallback(ex);
+            }, null);
+        }
+        #endregion
+
+        #region Store
+        public void Store(IOKBItem item)
+        {
+            if (item.Id == 0)
+            {
+                if (item is Platform)
+                    item.Id = CallAdministrationService<long>(s => s.AddPlatform((Platform)item));
+                else if (item is AlgorithmClass)
+                    item.Id = CallAdministrationService<long>(s => s.AddAlgorithmClass((AlgorithmClass)item));
+                else if (item is Algorithm)
+                    item.Id = CallAdministrationService<long>(s => s.AddAlgorithm((Algorithm)item));
+                else if (item is ProblemClass)
+                    item.Id = CallAdministrationService<long>(s => s.AddProblemClass((ProblemClass)item));
+                else if (item is Problem)
+                    item.Id = CallAdministrationService<long>(s => s.AddProblem((Problem)item));
+            }
+            else
+            {
+                if (item is Platform)
+                    CallAdministrationService(s => s.UpdatePlatform((Platform)item));
+                else if (item is AlgorithmClass)
+                    CallAdministrationService(s => s.UpdateAlgorithmClass((AlgorithmClass)item));
+                else if (item is Algorithm)
+                    CallAdministrationService(s => s.UpdateAlgorithm((Algorithm)item));
+                else if (item is ProblemClass)
+                    CallAdministrationService(s => s.UpdateProblemClass((ProblemClass)item));
+                else if (item is Problem)
+                    CallAdministrationService(s => s.UpdateProblem((Problem)item));
+            }
+        }
+        #endregion
+
+        #region Delete
+        public  void Delete(IOKBItem item)
+        {
+            if (item is Platform)
+                CallAdministrationService(s => s.DeletePlatform(item.Id));
+            else if (item is AlgorithmClass)
+                CallAdministrationService(s => s.DeleteAlgorithmClass(item.Id));
+            else if (item is Algorithm)
+                CallAdministrationService(s => s.DeleteAlgorithm(item.Id));
+            else if (item is ProblemClass)
+                CallAdministrationService(s => s.DeleteProblemClass(item.Id));
+            else if (item is Problem)
+                CallAdministrationService(s => s.DeleteProblem(item.Id));
+            item.Id = 0;
+        }
+        #endregion
+
+        #region Algorithm Methods
+        public  List<Guid> GetAlgorithmUsers(long algorithmId)
+        {
+            return CallAdministrationService<List<Guid>>(s => s.GetAlgorithmUsers(algorithmId));
+        }
+        public  void UpdateAlgorithmUsers(long algorithmId, List<Guid> users)
+        {
+            CallAdministrationService(s => s.UpdateAlgorithmUsers(algorithmId, users));
+        }
+        public  byte[] GetAlgorithmData(long algorithmId)
+        {
+            return CallAdministrationService<byte[]>(s => s.GetAlgorithmData(algorithmId));
+        }
+        public  void UpdateAlgorithmData(long algorithmId, byte[] algorithmData)
+        {
+            CallAdministrationService(s => s.UpdateAlgorithmData(algorithmId, algorithmData));
+        }
+        #endregion
+
+        #region Problem Methods
+        public  List<Guid> GetProblemUsers(long problemId)
+        {
+            return CallAdministrationService<List<Guid>>(s => s.GetProblemUsers(problemId));
+        }
+        public  void UpdateProblemUsers(long problemId, List<Guid> users)
+        {
+            CallAdministrationService(s => s.UpdateProblemUsers(problemId, users));
+        }
+        public  byte[] GetProblemData(long problemId)
+        {
+            return CallAdministrationService<byte[]>(s => s.GetProblemData(problemId));
+        }
+        public  void UpdateProblemData(long problemId, byte[] problemData)
+        {
+            CallAdministrationService(s => s.UpdateProblemData(problemId, problemData));
+        }
+        #endregion
+
+        #region Events
+        public event EventHandler Refreshing;
+        private void OnRefreshing()
+        {
+            EventHandler handler = Refreshing;
+            if (handler != null) handler(this, EventArgs.Empty);
+        }
+        public event EventHandler Refreshed;
+        private void OnRefreshed()
+        {
+            var handler = Refreshed;
+            if (handler != null) handler(this, EventArgs.Empty);
+        }
+        #endregion
+
+        #region Helpers
+        private void CallAdministrationService(Action<IAdministrationService> call)
+        {
+            if (client == null || client.State == CommunicationState.Closed || client.State == CommunicationState.Faulted)
+            {
+                client = createServiceClient();
+            }
+            try
+            {
+                call(client);
+            }
+            finally
+            {
+                try
+                {
+                    client.Close();
+                }
+                catch (Exception)
+                {
+                    client.Abort();
+                }
+            }
+        }
+        private T CallAdministrationService<T>(Func<IAdministrationService, T> call)
+        {
+            if (client == null || client.State == CommunicationState.Closed || client.State == CommunicationState.Faulted)
+            {
+                client = createServiceClient();
+            }
+            try
+            {
+                return call(client);
+            }
+            finally
+            {
+                try
+                {
+                    client.Close();
+                }
+                catch (Exception)
+                {
+                    client.Abort();
+                }
+            }
+        }
+        #endregion
+
+        #region Binding
+        private AdministrationServiceClient createServiceClient()
+        {
+            WSHttpBinding binding = new WSHttpBinding();
+            
+
+            binding.Name = "wsHttpBinding_IAdministrationService";
+            binding.CloseTimeout = TimeSpan.FromMinutes(1);
+            binding.OpenTimeout = TimeSpan.FromMinutes(1);
+            binding.ReceiveTimeout = TimeSpan.FromMinutes(10);
+            binding.SendTimeout = TimeSpan.FromMinutes(1);
+            binding.BypassProxyOnLocal = false;
+            binding.TransactionFlow = false;
+
+            binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
+            binding.MaxBufferPoolSize = 524288;
+            binding.MaxReceivedMessageSize = 200000000;
+            binding.MessageEncoding = WSMessageEncoding.Text;
+
+            binding.TextEncoding = System.Text.Encoding.UTF8;
+            binding.UseDefaultWebProxy = true;
+            // binding.TransferMode = TransferMode.Buffered;
+            binding.AllowCookies = false;
+
+            binding.ReaderQuotas.MaxDepth = 32;
+            binding.ReaderQuotas.MaxStringContentLength = 8192;
+            binding.ReaderQuotas.MaxArrayLength = 200000000;
+            binding.ReaderQuotas.MaxBytesPerRead = 4096;
+            binding.ReaderQuotas.MaxNameTableCharCount = 16384;
+
+            binding.ReliableSession.Ordered = true;
+            binding.ReliableSession.InactivityTimeout = TimeSpan.Parse("00:10:00");
+            binding.ReliableSession.Enabled = false;
+
+
+            binding.Security.Mode = SecurityMode.Message;
+            binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
+            binding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;
+            // binding.Security.Message.NegotiateServiceCredential = true;
+
+
+            EndpointAddress end = new EndpointAddress("http://services.heuristiclab.com/OKB-3.3/AdministrationService.svc");
+
+            AdministrationServiceClient client = new AdministrationServiceClient(binding, end);
+            client.ClientCredentials.UserName.UserName = log;
+            client.ClientCredentials.UserName.Password = pass;
+            client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
+
+            return client;
+        }
+
+        internal bool CheckLogin()
+        {
+            try
+            {
+                this.Refresh();
+                return true;
+            }
+            catch (MessageSecurityException e )
+            {
+                return false;
+            }
+            catch (SecurityAccessDeniedException ex)
+            {
+                return false;
+            }
+        }
+        #endregion
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/QueryWebClient.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/QueryWebClient.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/Imports/QueryWebClient.cs	(revision 13862)
@@ -0,0 +1,313 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using HeuristicLab.Clients.Common;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Persistence.Default.Xml;
+using System.ServiceModel;
+using HeuristicLab.Clients.Hive.WebJobManager.Services;
+using HeuristicLab.Clients.OKB.Query;
+using System.ServiceModel.Security;
+using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services.Imports
+{
+    [Item("QueryWebClient", "OKB query client.")]
+    public sealed class QueryWebClient : IContent
+    {
+        private string log;
+        private string pass;
+
+        private QueryServiceClient client; 
+        public Guid UserId { get; set; }
+        public QueryWebClient(Guid u) : this()
+        {
+            UserId = u;
+            client = null;
+            log = WebLoginService.Instance.getServiceLocator(UserId).Username;
+            pass = WebLoginService.Instance.getServiceLocator(UserId).Password;
+        }
+        public QueryWebClient(LoginViewModel log, string pass): this()
+        {
+            client = null;
+            this.UserId = log.userId;
+            this.log = log.loginName;
+            this.pass = pass;
+            
+        }
+        #region Properties
+        private List<Filter> filters;
+        public IEnumerable<Filter> Filters
+        {
+            get { return filters; }
+        }
+        private List<ValueName> valueNames;
+        public IEnumerable<ValueName> ValueNames
+        {
+            get { return valueNames; }
+        }
+        #endregion
+
+        private QueryWebClient()
+        {
+            filters = new List<Filter>();
+            valueNames = new List<ValueName>();
+        }
+
+        #region Refresh
+        public void Refresh()
+        {
+            OnRefreshing();
+            filters = new List<Filter>();
+            valueNames = new List<ValueName>();
+            try
+            {
+                filters.AddRange(CallQueryService<List<Filter>>(s => s.GetFilters()));
+                valueNames.AddRange(CallQueryService<List<ValueName>>(s => s.GetValueNames()));
+            }
+            finally
+            {
+                OnRefreshed();
+            }
+        }
+        public void RefreshAsync(Action<Exception> exceptionCallback)
+        {
+            var call = new Func<Exception>(delegate ()
+            {
+                try
+                {
+                    Refresh();
+                }
+                catch (Exception ex)
+                {
+                    return ex;
+                }
+                return null;
+            });
+            call.BeginInvoke(delegate (IAsyncResult result)
+            {
+                Exception ex = call.EndInvoke(result);
+                if (ex != null) exceptionCallback(ex);
+            }, null);
+        }
+        #endregion
+
+        #region Query Methods
+        public long GetNumberOfRuns(Filter filter)
+        {
+            return CallQueryService<long>(x => x.GetNumberOfRuns(filter));
+        }
+        public IEnumerable<long> GetRunIds(Filter filter)
+        {
+            return CallQueryService<IEnumerable<long>>(x => x.GetRunIds(filter));
+        }
+        public IEnumerable<Run> GetRuns(IEnumerable<long> ids, bool includeBinaryValues)
+        {
+            return CallQueryService<IEnumerable<Run>>(s => s.GetRuns(ids.ToList(), includeBinaryValues));
+        }
+        public IEnumerable<Run> GetRunsWithValues(IEnumerable<long> ids, bool includeBinaryValues, IEnumerable<ValueName> vn)
+        {
+            return CallQueryService<IEnumerable<Run>>(s => s.GetRunsWithValues(ids.ToList(), includeBinaryValues, vn.ToList()));
+        }
+        #endregion
+
+        #region OKB-Item Conversion
+        public Optimization.IRun ConvertToOptimizationRun(Run run)
+        {
+            Optimization.Run optRun = new Optimization.Run();
+            foreach (Value value in run.ParameterValues)
+                optRun.Parameters.Add(value.Name, ConvertToItem(value));
+            foreach (Value value in run.ResultValues)
+                optRun.Results.Add(value.Name, ConvertToItem(value));
+            return optRun;
+        }
+
+        public IItem ConvertToItem(Value value)
+        {
+            if (value is BinaryValue)
+            {
+                IItem item = null;
+                var binaryValue = (BinaryValue)value;
+                if (binaryValue.Value != null)
+                {
+                    using (var stream = new MemoryStream(binaryValue.Value))
+                    {
+                        try
+                        {
+                            item = XmlParser.Deserialize<IItem>(stream);
+                        }
+                        catch (Exception) { }
+                        stream.Close();
+                    }
+                }
+                return item ?? new Data.StringValue(value.DataType.Name);
+            }
+            else if (value is BoolValue)
+            {
+                return new Data.BoolValue(((BoolValue)value).Value);
+            }
+            else if (value is FloatValue)
+            {
+                return new Data.DoubleValue(((FloatValue)value).Value);
+            }
+            else if (value is PercentValue)
+            {
+                return new Data.PercentValue(((PercentValue)value).Value);
+            }
+            else if (value is DoubleValue)
+            {
+                return new Data.DoubleValue(((DoubleValue)value).Value);
+            }
+            else if (value is IntValue)
+            {
+                return new Data.IntValue((int)((IntValue)value).Value);
+            }
+            else if (value is LongValue)
+            {
+                return new Data.IntValue((int)((LongValue)value).Value);
+            }
+            else if (value is StringValue)
+            {
+                return new Data.StringValue(((StringValue)value).Value);
+            }
+            else if (value is TimeSpanValue)
+            {
+                return new Data.TimeSpanValue(TimeSpan.FromSeconds((long)((TimeSpanValue)value).Value));
+            }
+            return null;
+        }
+        #endregion
+
+        #region Events
+        public event EventHandler Refreshing;
+        private void OnRefreshing()
+        {
+            EventHandler handler = Refreshing;
+            if (handler != null) handler(this, EventArgs.Empty);
+        }
+        public event EventHandler Refreshed;
+        private void OnRefreshed()
+        {
+            EventHandler handler = Refreshed;
+            if (handler != null) handler(this, EventArgs.Empty);
+        }
+        #endregion
+
+        #region Helpers
+        private T CallQueryService<T>(Func<IQueryService, T> call)
+        {
+
+            if (client == null || client.State == CommunicationState.Closed || client.State == CommunicationState.Faulted)
+            {
+            client = createServiceClient();
+            }
+
+            try
+            {
+                return call(client);
+            }
+            finally
+            {
+                try
+                {
+                    client.Close();
+                }
+                catch (Exception)
+                {
+                    client.Abort();
+                }
+            }
+        }
+
+        private QueryServiceClient createServiceClient()
+        {
+            WSHttpBinding binding = new WSHttpBinding();
+            // I think most (or all) of these are defaults--I just copied them from app.config:
+
+            binding.Name = "wsHttpBinding_IQueryService";
+            binding.CloseTimeout = TimeSpan.FromMinutes(1);
+            binding.OpenTimeout = TimeSpan.FromMinutes(1);
+            binding.ReceiveTimeout = TimeSpan.FromMinutes(10);
+            binding.SendTimeout = TimeSpan.FromMinutes(1);
+            binding.BypassProxyOnLocal = false;
+            binding.TransactionFlow = false;
+
+            binding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
+            binding.MaxBufferPoolSize = 524288;
+            binding.MaxReceivedMessageSize = 200000000;
+            binding.MessageEncoding = WSMessageEncoding.Text;
+
+            binding.TextEncoding = System.Text.Encoding.UTF8;
+            binding.UseDefaultWebProxy = true;
+            // binding.TransferMode = TransferMode.Buffered;
+            binding.AllowCookies = false;
+
+            binding.ReaderQuotas.MaxDepth = 32;
+            binding.ReaderQuotas.MaxStringContentLength = 8192;
+            binding.ReaderQuotas.MaxArrayLength = 200000000;
+            binding.ReaderQuotas.MaxBytesPerRead = 4096;
+            binding.ReaderQuotas.MaxNameTableCharCount = 16384;
+
+            binding.ReliableSession.Ordered = true;
+            binding.ReliableSession.InactivityTimeout = TimeSpan.Parse("00:10:00");
+            binding.ReliableSession.Enabled = false;
+
+
+            binding.Security.Mode = SecurityMode.Message;
+            binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
+            binding.Security.Message.AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Default;
+           // binding.Security.Message.NegotiateServiceCredential = true;
+
+
+            EndpointAddress end = new EndpointAddress("http://services.heuristiclab.com/OKB-3.3/QueryService.svc");
+
+            QueryServiceClient client = new QueryServiceClient(binding, end);
+            client.ClientCredentials.UserName.UserName = log;
+            client.ClientCredentials.UserName.Password = pass;
+            client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
+
+            return client;
+        }
+
+        internal bool CheckLogin()
+        {
+            try
+            {
+                this.Refresh();
+                return true;
+            }
+            catch (MessageSecurityException e)
+            {
+                return false;
+            }
+            catch (SecurityAccessDeniedException e)
+            {
+                return false;
+            }
+        }
+        #endregion
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/JSONResolvers/JsonTaskResolver.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/JSONResolvers/JsonTaskResolver.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/JSONResolvers/JsonTaskResolver.cs	(revision 13862)
@@ -0,0 +1,60 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
+using System.Reflection;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.Services
+{
+    /// <summary>
+    /// Throws some properties out to save on bandwidth space while refreshing 
+    /// the selected job
+    /// </summary>
+    public class JsonTaskResolver : DefaultContractResolver
+    {
+        protected override JsonProperty CreateProperty(MemberInfo member,
+                                            MemberSerialization memberSerialization)
+        {
+            JsonProperty property = base.CreateProperty(member, memberSerialization);
+            if (property.PropertyName == "ItemImage" ||
+                property.PropertyName == "Parameters" ||
+                property.PropertyName == "OperatorGraph" ||
+                property.PropertyName == "DistanceMatrix" ||
+                property.PropertyName == "Operators" ||
+                property.PropertyName == "Engine" ||
+                property.PropertyName == "ActualValue" ||
+                property.PropertyName == "CurrentScope" ||
+                property.PropertyName == "Problems" ||
+                property.PropertyName == "Random" ||
+                property.PropertyName == "Optimizer" ||
+                property.PropertyName == "Optimizers" ||
+                property.PropertyName == "Problem" ||
+                property.PropertyName == "NestedOptimizers")
+            {
+                property.ShouldSerialize = instanceOfProblematic => false;
+            }
+
+            return property;
+        }
+    }
+
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/WebLoginService.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/WebLoginService.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Services/WebLoginService.cs	(revision 13862)
@@ -21,6 +21,6 @@
 
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Models;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
 using System;
@@ -48,4 +48,5 @@
         private List<HiveWebUser> loggedinUsers;
         private List<QueryWebClient> queryclients;
+        private List<OkbAdministrationWebClient> okbmanclients;
         /// <summary>
         /// Service instance that keeps all the information per user seperated. Data is in  different lists so 
@@ -77,5 +78,6 @@
             adminclients = new List<HiveAdminClientWeb>();
             loggedinUsers = new List<HiveWebUser>();
-            queryclients = new List<QueryWebClient>(); 
+            queryclients = new List<QueryWebClient>();
+            okbmanclients = new List<OkbAdministrationWebClient>();
         }
         /// <summary>
@@ -94,13 +96,23 @@
             loggedIn.Add(log);
             locators.Add(loc);
+            
             webclients.Add(new HiveClientWeb(loc, log.userId));
             fileopeners.Add(new FileOpeningService(log.userId));
             jobopeners.Add(new FileOpeningService(log.userId));
-            accessclients.Add(new AccessAdministrationClient(log.userId));
-            adminclients.Add(new HiveAdminClientWeb(log.userId));
+            var acc = new AccessAdministrationClient(log.userId);
+            if(acc.CheckLogin())
+                accessclients.Add(acc);
             loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName, false).updateUserInfo());
-            queryclients.Add(new QueryWebClient(log.userId));
-        }
-        public void newLoginOKBOnly(LoginViewModel log, QueryWebClient qwc)
+            var ad = new HiveAdminClientWeb(log.userId);
+            if(ad.CheckLogin())
+                adminclients.Add(ad);  
+            var qu = new QueryWebClient(log.userId);
+            if(qu.CheckLogin())
+                queryclients.Add(qu);
+            var okb = new OkbAdministrationWebClient(log.userId);
+            if (okb.CheckLogin())
+                okbmanclients.Add(okb);
+        }
+        public void newLoginOKBOnly(LoginViewModel log, QueryWebClient qwc, string pass)
         {
             destroyPossiblePreviousSessions(log.loginName);
@@ -113,4 +125,7 @@
             queryclients.Add(qwc);
             loggedinUsers.Add(new HiveWebUser(log.userId, log.loginName, true).updateUserInfo());
+            var okb = new OkbAdministrationWebClient(log, pass);
+            if (okb.CheckLogin())
+                okbmanclients.Add(okb);
             
         }
@@ -194,4 +209,9 @@
         {
             return loggedinUsers.Find(x => x.webIdToken == id);
+        }
+
+        public OkbAdministrationWebClient getOkbAdminClient(Guid id)
+        {
+            return okbmanclients.Find(x => x.UserId == id);
         }
         /// <summary>
@@ -209,4 +229,5 @@
             adminclients.RemoveAll(x => x.userId == id);
             queryclients.RemoveAll(x => x.UserId == id);
+            okbmanclients.RemoveAll(x => x.UserId == id);
             loggedIn.RemoveAll(x => x.userId == id);
             loggedinUsers.RemoveAll(x => x.webIdToken == id);
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Startup.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Startup.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Startup.cs	(revision 13862)
@@ -32,4 +32,5 @@
 using System.Linq;
 using Microsoft.CodeAnalysis;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 
 namespace HeuristicLab.Clients.Hive.WebJobManager
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/FileOpeningViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/FileOpeningViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/FileOpeningViewModel.cs	(revision 13862)
@@ -30,5 +30,5 @@
     /// Opening files
     /// </summary>
-    public class FileOpeningViewModel
+    public class FileOpeningViewModel :MasterVM
     {
         public OptimizerHiveTask SelectedTask { get; set; }
@@ -37,11 +37,7 @@
         public Experiment SelectedExperiment { get; set; }
         public BatchRun SelectedBatchRun { get; set; }
-        public string message { get; set; }
-        public HiveWebUser currentUser { get; set; }
 
-        public FileOpeningViewModel(HiveWebUser hwu)
-        {
-            currentUser = hwu;
-        }
+        public FileOpeningViewModel(HiveWebUser hwu) : base(hwu)
+        { }
     }
 }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/JobViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/JobViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/JobViewModel.cs	(revision 13862)
@@ -30,7 +30,6 @@
     /// Keeps list of loaded jobs
     /// </summary>
-    public class JobViewModel
+    public class JobViewModel : MasterVM
     {
-        public HiveWebUser currentUser { get; set; }
         public List<RefreshableJob> userJobs { get; set; }
 
@@ -38,6 +37,5 @@
 
         public List<HiveTask> selectedHiveTasks { get; set; }
-        public string message { get; set; }
-        public JobViewModel(HiveWebUser hwu)
+        public JobViewModel(HiveWebUser hwu) : base(hwu)
         {
             userJobs = null;
@@ -45,5 +43,4 @@
             selectedHiveTasks = new List<HiveTask>();
             message = "";
-            currentUser = hwu;
         }
     }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/UploadedJobViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/UploadedJobViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/Jobs/UploadedJobViewModel.cs	(revision 13862)
@@ -11,7 +11,7 @@
     /// Used to show data of uploaded files
     /// </summary>
-    public class UploadedJobViewModel
+    public class UploadedJobViewModel : MasterVM
     {
-        public UploadedJobViewModel(HiveWebUser hwu)
+        public UploadedJobViewModel(HiveWebUser hwu) : base(hwu)
         {
             FullDatePaths = new List<string>();
@@ -20,5 +20,4 @@
             DisplayFilesPaths = new List<string>();
             SelectedIndex = -1;
-            currentUser = hwu;
         }
         public void clear()
@@ -35,6 +34,4 @@
         public List<string> DisplayFilesPaths { get; set; }
         public int SelectedIndex { get; set; }
-        public string message { get; set; }
-        public HiveWebUser currentUser { get; set; }
         
     }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/LoginViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/LoginViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/LoginViewModel.cs	(revision 13862)
@@ -28,5 +28,5 @@
     /// Used for login
     /// </summary>
-    public class LoginViewModel
+    public class LoginViewModel // NOT MASTERVM => Starts the user login 
     {
         /// <summary>
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/MasterVM.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/MasterVM.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/MasterVM.cs	(revision 13862)
@@ -0,0 +1,18 @@
+﻿using HeuristicLab.Clients.Hive.WebJobManager.Models;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
+{
+    public abstract class MasterVM
+    {
+        public HiveWebUser User { get; set; }
+        public string message { get; set; }
+        public MasterVM(HiveWebUser hwu)
+        {
+            User = hwu;
+        }
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/NavbarViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/NavbarViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/NavbarViewModel.cs	(revision 13862)
@@ -24,14 +24,12 @@
 namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
 {
-    public class NavbarViewModel
+    public class NavbarViewModel : MasterVM
     {
 
         public string Active { get; set; }
-        public HiveWebUser User { get; set; }
 
-        public NavbarViewModel(string ac, HiveWebUser hwu )
+        public NavbarViewModel(string ac, HiveWebUser hwu ) : base(hwu)
         {
             Active = ac;
-            User = hwu;
         }
     }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/OkbManagementVM.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/OkbManagementVM.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/OkbManagementVM.cs	(revision 13862)
@@ -0,0 +1,18 @@
+﻿using HeuristicLab.Clients.Hive.WebJobManager.Models;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
+{
+    public class OkbManagementVM : MasterVM
+    {
+        public OkbAdministrationWebClient client { get; set; }
+        public OkbManagementVM(HiveWebUser hwu, OkbAdministrationWebClient cl) : base(hwu)
+        {
+            client = cl;
+        }
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/QueryVM.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/QueryVM.cs	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/OKB/QueryVM.cs	(revision 13862)
@@ -0,0 +1,33 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+
+using HeuristicLab.Clients.Hive.WebJobManager.Models;
+
+namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
+{
+    public class QueryVM : MasterVM
+    {
+        public QueryVM(HiveWebUser hwu) : base(hwu)
+        {
+        }
+    }
+}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/QueryVM.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/QueryVM.cs	(revision 13861)
+++ 	(revision )
@@ -1,36 +1,0 @@
-﻿#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
- *
- * This file is part of HeuristicLab.
- *
- * HeuristicLab is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * HeuristicLab is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
- */
-#endregion
-
-
-using HeuristicLab.Clients.Hive.WebJobManager.Models;
-
-namespace HeuristicLab.Clients.Hive.WebJobManager.ViewModels
-{
-    public class QueryVM
-    {
-        public HiveWebUser User { get; set; }
-        public string message { get; set; }
-        public QueryVM( HiveWebUser hwu)
-        {
-            User = hwu;
-        }
-    }
-}
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/User/UserViewModel.cs
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/User/UserViewModel.cs	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/ViewModels/User/UserViewModel.cs	(revision 13862)
@@ -20,6 +20,6 @@
 #endregion
 
-using HeuristicLab.Clients.Access.Administration;
 using HeuristicLab.Clients.Hive.WebJobManager.Models;
+using HeuristicLab.Clients.Hive.WebJobManager.Services.Imports;
 using System;
 using System.Collections.Generic;
@@ -31,8 +31,6 @@
     /// ViewModel containing User/Group/Role data
     /// </summary>
-    public class UserViewModel
+    public class UserViewModel : MasterVM
     {
-        public HiveWebUser currentUser { get; set; }
-        public string message { get; set; }
         public AccessAdministrationClient accessClient { get; set; }
         public List<Access.User> users { get; set; }
@@ -52,7 +50,6 @@
         /// </summary>
         /// <param name="ac">AccessAdminClient for connection</param>
-        public UserViewModel(AccessAdministrationClient ac, HiveWebUser hwu)
+        public UserViewModel(AccessAdministrationClient ac, HiveWebUser hwu) : base(hwu)
         {
-            currentUser = hwu;
             users = new List<Access.User>();
             accessClient = ac;
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Index.cshtml	(revision 13862)
@@ -8,5 +8,5 @@
 <div class="animated fadeIn">
     <!-- Main nav menu-->
-    @Html.Partial("Navbar", new NavbarViewModel("Job", Model.currentUser))
+    @Html.Partial("Navbar", new NavbarViewModel("Job", Model.User))
 
     <!-- Job menu-->
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/OpenFile.cshtml	(revision 13862)
@@ -14,5 +14,5 @@
     <div id="userId" style="display:none">@ViewBag.SessionId</div>
     <!-- Main nav menu -->
-    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.currentUser))
+    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.User))
 
     <!-- Job menu-->
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/UploaderPartial/_UploaderPartial.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/UploaderPartial/_UploaderPartial.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/UploaderPartial/_UploaderPartial.cshtml	(revision 13862)
@@ -48,5 +48,5 @@
                     <span class="input-group-addon"
                           id="basic-addon3">
-                        .../uploads/@(Model.currentUser.currentUser.UserName != null ?  Model.currentUser.currentUser.UserName : Model.currentUser.currentUser.FullName)/
+                        .../uploads/@(Model.User.currentUser.UserName != null ?  Model.User.currentUser.UserName : Model.User.currentUser.FullName)/
                     </span>
                     <input type="text"
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Uploads.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Uploads.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Job/Uploads.cshtml	(revision 13862)
@@ -5,5 +5,5 @@
 <div class="animated fadeIn">
 
-    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.currentUser))
+    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("Job", Model.User))
 
     <ul class="nav nav-pills nav-justified">
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/OkbManagement/Index.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/OkbManagement/Index.cshtml	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/OkbManagement/Index.cshtml	(revision 13862)
@@ -0,0 +1,59 @@
+﻿@using HeuristicLab.Clients.Hive.WebJobManager.ViewModels;
+@using Newtonsoft.Json;
+@model OkbManagementVM
+<div id="userId" style="display:none">@ViewBag.SessionId</div>
+<script src="~/js/hubs/okbmanagerhubber.js"></script>
+<div ng-app="wjmokbmanager" ng-controller="okbmanangerCtrl" id="controllerdiv" class="animated fadeIn">
+
+
+    @Html.Partial("Navbar", new NavbarViewModel("OKBAdmin", Model.User))
+
+    @Html.Partial("_ErrorMessage", Model.message)
+
+    <ul class="nav nav-pills nav-justified">
+
+        <li role="presentation"
+            ng-class="{active: currentData.name === 'Platforms'}">
+                <a ng-click="selectDataCat('platforms')" href="">
+                    Platforms
+                </a>
+        </li>
+        <li role="presentation"
+            ng-class="{active: currentData.name === 'Algorithm classes'}">
+            <a ng-click="selectDataCat('algoclass')" href="">
+                Algorithm classes
+            </a>
+        </li>
+        <li role="presentation"
+            ng-class="{active: currentData.name === 'Algorithms'}">
+            <a ng-click="selectDataCat('algos')" href="">
+                Algorithms
+            </a>
+        </li>
+        <li role="presentation"
+            ng-class="{active: currentData.name === 'Problem classes'}">
+            <a ng-click="selectDataCat('probclass')" href="">
+                Problem classes
+            </a>
+        </li>
+        <li role="presentation"
+            ng-class="{active: currentData.name === 'Problems'}">
+            <a ng-click="selectDataCat('problems')" href="">
+                PlatformsProblems
+            </a>
+        </li>
+
+    </ul>
+
+    <script type="text/javascript">
+        window.onload = function (){
+            var vm = angular.element(document.getElementById('controllerdiv')).scope();
+            console.log(vm);
+            vm.initData(@Html.Raw(JsonConvert.SerializeObject(Model.client.Platforms)), "platforms");
+            vm.initData(@Html.Raw(JsonConvert.SerializeObject(Model.client.AlgorithmClasses)), "algoclass");
+            vm.initData(@Html.Raw(JsonConvert.SerializeObject(Model.client.ProblemClasses)), "probclass");
+            vm.initData(@Html.Raw(JsonConvert.SerializeObject(Model.client.Algorithms)), "algos");
+            vm.initData(@Html.Raw(JsonConvert.SerializeObject(Model.client.Problems)), "problems");
+        }
+    </script>
+</div>
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Shared/Navbar.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Shared/Navbar.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Shared/Navbar.cshtml	(revision 13862)
@@ -77,4 +77,22 @@
     </li>
     <li role="presentation"
+        class="@(Model.Active == "OKBAdmin" ? "active" : "")
+        @(Model.User.hasOKBAdminAccess() == false ? "disabled" : "")
+        ">
+        @if ( Model.User.hasOKBAdminAccess())
+            {
+            <a asp-controller="OkbManagement"
+               asp-action="Index"
+               accesskey="q">
+                OKB management
+            </a>
+        }
+        else
+        {
+            <a>OKB management</a>
+        }
+
+    </li>
+    <li role="presentation"
         class="pull-right ">
         
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Groups.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Groups.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Groups.cshtml	(revision 13862)
@@ -5,5 +5,5 @@
 <div class="animated fadeIn">
 
-    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.currentUser))
+    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.User))
 
     <ul class="nav nav-pills nav-justified">
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Index.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Index.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Index.cshtml	(revision 13862)
@@ -4,5 +4,5 @@
 <div class="animated fadeIn">
 
-    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.currentUser))
+    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.User))
 
     <ul class="nav nav-pills nav-justified">
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Roles.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Roles.cshtml	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/User/Roles.cshtml	(revision 13862)
@@ -5,5 +5,5 @@
 <div class="animated fadeIn">
 
-    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.currentUser))
+    @Html.Partial("Navbar", new HeuristicLab.Clients.Hive.WebJobManager.ViewModels.NavbarViewModel("User", Model.User))
 
     <ul class="nav nav-pills nav-justified">
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/gruntfile.js
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/gruntfile.js	(revision 13861)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/gruntfile.js	(revision 13862)
@@ -57,5 +57,6 @@
                 files:{
                     'wwwroot/js/hubs/calendarhubber.js': 'Scripts/Hubs/CalendarHubber.js',
-                    'wwwroot/js/hubs/queryhubber.js': 'Scripts/Hubs/QueryHubber.js'
+                    'wwwroot/js/hubs/queryhubber.js': 'Scripts/Hubs/QueryHubber.js',
+                    'wwwroot/js/hubs/okbmanagerhubber.js': 'Scripts/Hubs/OkbManagerHubber.js'
                 }
             }
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/okbmanagerhubber.js
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/okbmanagerhubber.js	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/okbmanagerhubber.js	(revision 13862)
@@ -0,0 +1,86 @@
+﻿/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+angular.module('wjmokbmanager', ['ngDialog']).
+controller('okbmanangerCtrl', function ($rootScope, $scope, ngDialog, $timeout, $filter) {
+    var vm = $scope;
+    var hubber = $.connection.okbManagerHub;
+    vm.currentData = {'name' : '', 'data' : null}
+
+    vm.init = function () {
+
+        var uid = document.getElementById("userId").innerHTML;
+        $.connection.hub.qs = { 'userid': uid };
+        //Connection string set to identify the unique session ID for the user
+        $.connection.hub.start().done(function () {
+           // hubber.server.requestInfo();//initial data request
+        });
+        hubber.client.processData = function (filters) {
+
+        };
+
+    }
+
+     vm.initData=  function(coll, name) {
+        switch (name) {
+            case "platforms":
+                vm.platforms = {'selected' : null, 'arr' : coll}
+                break;
+            case "algoclass":
+                vm.algoclass = { 'selected': null, 'arr': coll }
+                break;
+            case "algos":
+                vm.algos = { 'selected': null, 'arr': coll }
+                break;
+            case "probclass":
+                vm.probclass = { 'selected': null, 'arr': coll }
+                break;
+            case "problems":
+                vm.problems = { 'selected': null, 'arr': coll }
+                break;
+
+        }
+
+     }
+     vm.selectDataCat = function (name) {
+         switch (name) {
+             case "platforms":
+                 vm.currentData.name = "Platforms";
+                 vm.currentData.data = vm.platforms;
+                 break;
+             case "algoclass":
+                 vm.currentData.name = "Algorithm classes";
+                 vm.currentData.data = vm.algoclass;
+                 break;
+             case "algos":
+                 vm.currentData.name = "Algorithms";
+                 vm.currentData.data = vm.algos;
+                 break;
+             case "probclass":
+                 vm.currentData.name = "Problem classes";
+                 vm.currentData.data = vm.probclass;
+                 break;
+             case "problems":
+                 vm.currentData.name = "Problems";
+                 vm.currentData.data = vm.problems;
+                 break;
+
+         }
+     }
+});
Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/queryhubber.js
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/queryhubber.js	(revision 13862)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/wwwroot/js/hubs/queryhubber.js	(revision 13862)
@@ -0,0 +1,151 @@
+﻿/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+
+angular.module('wjmquery', ['ngDialog', 'dndLists']).
+
+controller('queryCtrl', function ($rootScope, $scope, ngDialog, $timeout, $filter, $location, $anchorScroll) {
+    var vm = $scope;
+    var hubber = $.connection.queryHub;
+
+    vm.init = function () {
+
+        var uid = document.getElementById("userId").innerHTML;
+        $.connection.hub.qs = { 'userid': uid };
+        //Connection string set to identify the unique session ID for the user
+        $.connection.hub.start().done(function () {
+            hubber.server.requestInfo();//initial data request
+        });
+        hubber.client.processData = function (filters) {
+           // vm.values = JSON.parse(values);
+            vm.filters = JSON.parse(filters);
+            for (var i = 0; i < vm.filters.length;) {
+                vm.filters[i].Comparison = "" + vm.filters[i].Comparison;
+                if (vm.filters[i].Label === "AND" || vm.filters[i].Label === "OR")
+                    vm.filters.splice(i, 1);
+                else {
+                    vm.filters[i].type = "item";
+                    vm.filters[i].ComparisonValues = vm.comparisonModel[vm.filters[i].CompareType];
+                    i++;
+                }
+            }
+            $scope.$apply();
+        };
+        hubber.client.processResults = function (json) {
+            // vm.values = JSON.parse(values);
+            vm.sendingQuery = false;
+            var jsonresults = JSON.parse(json);
+            vm.results = [];
+            vm.resultTokens = [];
+            vm.activeResult = null;
+            for (var i = 0; i < jsonresults.length; i++) {
+                vm.results.push({ "Id": jsonresults[i] });
+            }
+            $location.hash('allresults');
+            $scope.$apply();
+        };
+        hubber.client.resultLoad = function (json) {
+            var data = JSON.parse(json);
+            var resindex = undefined;
+            for (var i = 0 ; i < vm.results.length; i++) {
+                if (vm.resultTokens[i].id === data.Id) {
+                    resindex = vm.resultTokens[i].index;
+                    vm.resultTokens.splice(i, 1);
+                    break;
+                }
+            }
+            if (resindex != undefined) {
+                vm.results[resindex] = data;
+                vm.results[resindex].CreatedDate = new Date(vm.results[resindex].CreatedDate);
+                vm.activeResult = vm.results[resindex];
+                $location.hash('result');
+                vm.loadingResult = false;
+            }
+            $scope.$apply();
+        }
+    }
+    vm.sendQuery = function () {
+        vm.sendingQuery = true;
+        vm.results = undefined;
+        hubber.server.runQuery(JSON.stringify($scope.models.dropzones.Dropzone));
+    };
+
+    vm.fetchResult = function (index) {
+        vm.loadingResult = true;
+        if(vm.results[index].CreatedDate != undefined){
+            vm.activeResult = vm.results[index];
+            $location.hash('result');
+            vm.loadingResult = false;
+        }
+        else{
+            vm.resultTokens.push({ "index": index, "id": vm.results[index].Id });
+            hubber.server.fetchResult(vm.results[index].Id);
+        }
+
+    };
+    $scope.models = {
+        selected: null,
+        templates: [
+            { type: "container", name: "AND", color: "#FF5500", columns: [[]] },
+            { type: "container", name: "OR",color: "#3a87ad" , columns: [[]] }
+        ],
+        dropzones: {
+            "Dropzone": [
+               {
+                   "type": "container",
+                   "name": "AND",
+                   "color": "#FF5500",
+                   "columns": [
+                      []
+                   ]
+               }
+               
+            ]
+        }
+    };
+
+    $scope.comparisonModel = {
+        "HeuristicLab.Clients.OKB.Query.StringComparison": [
+            {value: 0, text: "="},
+            {value: 1, text: "<>"},
+            {value: 2, text: "Contains"},
+            {value: 3, text: "Not contains"},
+            {value: 4, text: "Like"},
+            {value: 5, text: "Not like"}
+        ],
+        "HeuristicLab.Clients.OKB.Query.OrdinalComparison": [
+            {value: 0, text: "<"},
+            {value: 1, text: "<="},
+            {value: 2, text: "="},
+            {value: 3, text: ">="},
+            {value: 4, text: ">"},
+            {value: 5, text: "<>"}
+        ],
+        "HeuristicLab.Clients.OKB.Query.BooleanOperation": [
+            {value: 0, text: "AND"},
+            {value: 1, text: "OR"}
+        ],
+        "HeuristicLab.Clients.OKB.Query.EqualityComparison": [
+                {value: 0, text: "="},
+                {value: 1, text: "<>"}
+        ]
+    }
+   
+});
