public ActionResult Future() { var dashboardModel = new DashboardModel(); var list = _service.GetTags() .Select(x => new SelectListItem { Text = x, Value = x }) .ToList(); dashboardModel.Tags = new SelectList(list, "Value", "Text", null); return View(dashboardModel); }
public IActionResult Dashboard() { messageHelper.AppendMessagesFromSession(messages, HttpContext); if (HttpContext.User.Identity.IsAuthenticated) { User user = securityHelper.GetUserFromIdentity(HttpContext.User.Identity as ClaimsIdentity); DashboardModel dashboardModel = dashboardHelper.BuildDashboardModel(user, messages); return(View(dashboardModel)); } else { return(RedirectToAction("Index")); } }
public ActionResult Node(string cluster, string node, DashboardModel.Popups popup = DashboardModel.Popups.None, bool ajax = false) { var cn = GetNode(cluster, node); var vd = new DashboardModel { Clusters = ElasticCluster.AllClusters, Refresh = true, View = DashboardModel.Views.Node, Current = cn, Popup = popup }; return(View(ajax ? "Node" : "Dashboard", vd)); }
public IActionResult Index(string email = null, string id = null, string name = null) { var updatedSettings = _globalAppSettings; SamplesTreeViewModel model = null; ViewBag.UserId = 1; ViewBag.DraftId = string.IsNullOrEmpty(id) ? "" : id; if (email != null) { var adminToken = new DashboardModel().GetToken(); var userDetails = new UserManagement().IsUserExist(email, adminToken.AccessToken); if (userDetails != null) { updatedSettings = _tenantModel.GetUpdateSchema(_globalAppSettings, userDetails.Email); updatedSettings.UserDetails = userDetails; ViewBag.UserDisplayName = userDetails.DisplayName; ViewBag.UserId = userDetails.UserId; ViewBag.DatasourceName = email.Split('@')[0];// + "_efilecabinet"; } else { return(View("Error")); } } else { updatedSettings = _tenantModel.GetUpdateSchema(_globalAppSettings); ViewBag.DatasourceName = _globalAppSettings.EmbedDetails.Email.Split('@')[0]; var adminToken = new DashboardModel().GetToken(); ServerUser userDetails = new UserManagement().IsUserExist(_globalAppSettings.EmbedDetails.Email, adminToken.AccessToken); ViewBag.UserId = userDetails.UserId; } var categories = new DashboardModel().GetCategories(email); ViewBag.Category = categories != null && categories.Count > 0 ? categories.FirstOrDefault() : null; ViewBag.GlobalAppSettings = updatedSettings; if (id != null && name != null) { ViewBag.DashboardName = name; } ViewBag.ParentName = ""; ViewBag.Name = ""; if (model != null) { return(View(model)); } return(View()); }
//string apiKey = "HKNIeFFUSCIfca2F5B2GA56UqLkBIIYJ7o01JNerIJz6XT8s1k0Mqg2c2PXdn842"; //string secretKey = "ynM4OWcqRitNkmcs0gOaU1X5Z4jcxkhSgpzc0G3bGYrzCBsfoaP2xg9I9tgyY5Gu"; public ActionResult Index() { DashboardModel model = new DashboardModel(); var response = MCAPI.Get <JObject>("ticker/?limit=6"); var tickers = MCAPI.GetData(response); model.tickersList = tickers; var symbols = MCAPI.Get <Symbols>("listings/"); Session["TotalCurrency"] = symbols.metadata.num_cryptocurrencies; model.SymbolsList = symbols; return(View(model)); }
public ActionResult Dashboard() { DashboardModel dm = new DashboardModel(); dm.BitCoin = 0.96484; dm.Balance = 1235.39; dm.BankAccount = "*****@*****.**"; dm.BitCoinAccount = "1CMor92rGgkYfmExYGpGMryV3nZe12En1T"; dm.MiningSpeed = 23578; //khash/s dm.PoolSpeed = 23444233; //khash/s dm.Workers = 23; return(View(dm)); }
public async Task <ActionResult> Connections(string node) { var i = SQLInstance.Get(node); var vd = new DashboardModel { View = SQLViews.Connections, CurrentInstance = i, Cache = i?.Connections, Connections = i == null ? null : await i.Connections.GetData().ConfigureAwait(false) }; return(View(vd)); }
// GET: Dashboard public ActionResult Index() { if (Session["userName"] != null) { DAL.DAL dal = new DAL.DAL(); DashboardModel dc = dal.GetDashboardData(); return(View(dc)); } else { return(RedirectToAction("Index", "Login")); } }
public ActionResult Instance(string node) { var i = SQLInstance.Get(node); var vd = new DashboardModel { View = SQLViews.Instance, StandaloneInstances = SQLInstance.AllStandalone, Refresh = node.HasValue() ? 10 : 5, CurrentInstance = i }; return(View("Instance", vd)); }
/// <summary> /// Prepare dashboard model /// </summary> /// <param name="model">Dashboard model</param> /// <returns>Dashboard model</returns> public virtual DashboardModel PrepareDashboardModel(DashboardModel model) { if (model == null) { throw new ArgumentNullException(nameof(model)); } model.IsLoggedInAsVendor = _workContext.CurrentVendor != null; //prepare nested search models _commonModelFactory.PreparePopularSearchTermSearchModel(model.PopularSearchTerms); return(model); }
public async Task <IActionResult> Dashboard() { var featuredMealsTask = _mealsService.GetFeaturedMeals(); var mealPlansTask = _mealsService.GetDashboardMealPlans(); await Task.WhenAll(featuredMealsTask, mealPlansTask); DashboardModel vm = new DashboardModel() { FeaturedMeals = featuredMealsTask.Result, MealPlans = mealPlansTask.Result }; return(PartialView(vm)); }
public ActionResult Top(string node, SQLInstance.TopSearchOptions options, bool?detailed = false) { options.SetDefaults(); var vd = new DashboardModel { View = DashboardModel.Views.Top, Detailed = detailed.GetValueOrDefault(), CurrentInstance = SQLInstance.Get(node), TopSearchOptions = options }; return(View("Dashboard", vd)); }
public IActionResult Index() { DashboardModel dashboard = new DashboardModel(HttpContextAccessor); bool flag = dashboard.validUserSession(); if (flag) { return(View()); } else { return(RedirectToAction("Index", "Home")); } }
public ActionResult Index() { var model = new DashboardModel(); model.IsLoggedInAsVendor = _workContext.CurrentVendor != null; if (string.IsNullOrEmpty(_googleAnalyticsSettings.gaprivateKey) || string.IsNullOrEmpty(_googleAnalyticsSettings.gaserviceAccountEmail) || string.IsNullOrEmpty(_googleAnalyticsSettings.gaviewID)) { model.HideReportGA = true; } return(View(model)); }
public DashboardModel BuildFakeModel() { LastChanged = DateTime.UtcNow; var model = new DashboardModel { Stats = new Dictionary <string, decimal> { { "T_UkVisitors", 30 }, //-api { "T_Registration", 5 }, { "T_Application", 3 }, { "T_Approved", 2 }, { "T_LoansOut", 10000 }, { "T_Repayments", 12000 }, { "M_UkVisitors", 500 }, //-api { "M_Registration", 50 }, { "M_Application", 10 }, { "M_Approved", 5 }, { "M_LoansOut", 283600 }, { "M_Repayments", 55000 }, { "T_UkVisitorsEverline", 20 }, //-api { "T_RegistrationEverline", 4 }, { "T_ApplicationEverline", 1 }, { "T_ApprovedEverline", 1 }, { "T_LoansOutEverline", 4000 }, { "T_RepaymentsEverline", 5000 }, { "M_UkVisitorsEverline", 400 }, //-api { "M_RegistrationEverline", 10 }, { "M_ApplicationEverline", 4 }, { "M_ApprovedEverline", 3 }, { "M_LoansOutEverline", 183600 }, { "M_RepaymentsEverline", 15000 }, { "M_AvgLoanSize", 5000 }, { "M_AvgDailyLoans", 57720 }, { "M_AvgInterest", 0.0423M }, //{"G_AvgDailyLoans", 5000},// //{"G_DefaultRate", 0.038M},// { "G_TotalLoans", 12500000 }, // { "G_BookSize", 5600000 }, // { "G_AvgInterest", 0.023M }, // //{"G_AvgLoanSize", 10000},// //{"G_AvgNewLoan", 12000}// } }; return(model); }
// GET: Dashboard public ActionResult Index() { var dashboardModel = new DashboardModel(); var expiryDate = DateTime.Now.AddDays(DataContext.ExpiringPolicyDays); var expiringPolicies = Uow.Policies.GetAll() .Where(p => p.ExpiryDate <= expiryDate && p.Status.Name == "Active") .ProjectTo <ExpiringPoliciesModel>() .ToList(); foreach (var item in expiringPolicies) { if (item.IsOrganization) { item.ClientName = item.OrganizationName; } } dashboardModel.ExpiringPolicies = expiringPolicies; var outstandingInvoices = Uow.Invoices.GetAll() .Where(i => i.Status.Name.ToLower() == "unpaid") .ProjectTo <OutstandingInvoicesModel>() .ToList(); foreach (var item in outstandingInvoices) { if (item.IsOrganization) { item.ClientName = item.OrganizationName; } } dashboardModel.OutstandingInvoices = outstandingInvoices; var soas = Uow.Soas.GetAll() .Where(s => s.Status.Name.ToLower() == "unpaid") .ProjectTo <SoaModel>() .ToList(); foreach (var item in soas) { if (item.IsOrganization) { item.ClientName = item.OrganizationName; } } dashboardModel.Soas = soas; return(View(dashboardModel)); }
public async Task <ActionResult> Index() { var model = new DashboardModel(); var filters = new List <Infrastructure.Models.FilterInfo> { new Infrastructure.Models.FilterInfo() { ColumnName = "status", FilterType = FilterType.Status, FilterValue = "Running" } }; var query = new DeviceListQuery() { Skip = 0, Take = MaxDevicesToDisplayOnDashboard, SortColumn = "DeviceID", Filters = filters }; DeviceListQueryResult queryResult = await _deviceLogic.GetDevices(query); if ((queryResult != null) && (queryResult.Results != null)) { foreach (DeviceModel devInfo in queryResult.Results) { string deviceId; try { deviceId = devInfo.DeviceProperties.DeviceID; } catch (DeviceRequiredPropertyNotFoundException) { continue; } model.DeviceIdsForDropdown.Add(new StringPair(deviceId, deviceId)); } } // Set key to empty if passed value 0 from arm template string key = _configProvider.GetConfigurationSettingValue("MapApiQueryKey"); model.MapApiQueryKey = key.Equals("0") ? string.Empty : key; return(View(model)); }
public ActionResult Instance(string node, bool ajax = false) { var instance = RedisInstance.GetInstance(node); var vd = new DashboardModel { Instances = RedisInstance.AllInstances, CurrentInstance = instance, View = DashboardModel.Views.Instance, CurrentRedisServer = node, Refresh = true }; return(View(ajax ? "Instance" : "Dashboard", vd)); }
// GET: Dashboard public ActionResult Dashboard() { DashboardModel objdashboardModel = new DashboardModel(); CustomResponse response = APICalls.Get("UserDashboardAPI/Get?userid=" + User.Identity.GetUserId() + "&pageno=0"); if (response.Status == CustomResponseStatus.Successful) { JavaScriptSerializer serializer1 = new JavaScriptSerializer(); serializer1.MaxJsonLength = 1000000000; var projects = response.Response.ToString(); UserDashboardDTO dbinfo = serializer1.Deserialize <UserDashboardDTO>(projects); return(View(dbinfo)); } return(View()); }
public async Task <IActionResult> Index() { var model = new DashboardModel { IsLoggedInAsVendor = _workContext.CurrentVendor != null && !await _groupService.IsStaff(_workContext.CurrentCustomer) }; if (string.IsNullOrEmpty(_googleAnalyticsSettings.gaprivateKey) || string.IsNullOrEmpty(_googleAnalyticsSettings.gaserviceAccountEmail) || string.IsNullOrEmpty(_googleAnalyticsSettings.gaviewID)) { model.HideReportGA = true; } return(View(model)); }
public MainWindow() { try { InitializeComponent(); magazine = new MagazineModel(_connection); dashboard = new DashboardModel(_connection); ReloadMagazineGrid(); } catch { ///TODO: to be implemented MessageBox.Show("Errore nel caricamento della pagina"); } }
public async Task <IActionResult> Dashboard(DashboardModel model) { if (ModelState.IsValid) { await CreateAndSendMessage(new Message { MessageContent = model.Message, DateSent = DateTime.UtcNow }); } model.SubscriberCount = _context.Subscribers.Count(); model.LastMessages = _context.Messages.OrderByDescending(m => m.DateSent).Take(10).ToList(); model.Message = ""; return(View(model)); }
public IActionResult Manage(DashboardModel parDashboard, string typeAction) { DashboardModel dashboard = new DashboardModel(HttpContextAccessor); bool flag = dashboard.validUserSession(); if (flag) { TempData["typeAction"] = typeAction; return(View()); } else { return(RedirectToAction("Index", "Home")); } }
public IActionResult UpdateDashboard() { if (!string.IsNullOrEmpty(this.distributedCache.GetString("DashboardData"))) { DashboardModel dashboardModel = JsonConvert.DeserializeObject <DashboardModel>(this.distributedCache.GetString("DashboardData")); this.ViewBag.History = new[] { dashboardModel.StratisNode.History, dashboardModel.SidechainNode.History }; this.ViewBag.StratisTicker = dashboardModel.StratisNode.CoinTicker; this.ViewBag.SidechainTicker = dashboardModel.SidechainNode.CoinTicker; return(PartialView("Dashboard", dashboardModel)); } return(NoContent()); }
// GET: Admin/Dashboard public ActionResult Index() { DashboardModel model = new DashboardModel(); model.numberOfAccounts = db.TaiKhoans.Count(); model.numberOfCategories = db.DanhMucs.Count(); model.numberOfClasses = db.LopHocs.Count(); model.numberOfPosts = db.BaiViets.Count(); model.numberOfSemesters = db.KyHocs.Count(); model.numberOfStudents = db.HocSinhs.Count(); model.numberOfTeachers = db.GiaoViens.Count(); model.numberOfSubjects = db.MonHocs.Count(); return(View(model)); }
public ActionResult Index() { var viewModel = new DashboardModel { LowStockColours = _viewFactory.CreateView <Filter <IEnumerable <ProductViewModel> >, IEnumerable <ProductViewModel> >( new ByTypeWithStockBelow(ProductType.Colour, 5)), NoStockColours = _viewFactory.CreateView <Filter <IEnumerable <ProductViewModel> >, IEnumerable <ProductViewModel> >( new ByTypeWithNoStock(ProductType.Colour)) }; return(View(viewModel)); }
public async Task <IActionResult> Index() { var model = new DashboardModel(); model.TotalVehicles = await _vehicleMasterService.GetVehiclesStockAsync(); model.AvaillableVehicles = await _vehicleMasterService.GetAvaillableVehiclesStockAsync(); model.AllotedVehicles = await _vehicleMasterService.GetAllotedVehiclesStockAsync(); model.DelievredVehicles = 0; model.ShowroomVehicles = await _showroomVehiclesService.GetShowroomVehiclesStockAsync(); return(View(model)); }
public IActionResult Index() { DashboardModel model = GenerateDashboardData(); return(View(model)); //var user = string.Empty; //user = _userManager.GetUserName(User); //string hart = string.Empty; //if(user == "hart17") //{ // hart = Test(); //} //return View((object)hart); }
public ActionResult Instance(string node) { var instance = RedisInstance.GetInstance(node); var vd = new DashboardModel { Instances = RedisInstance.AllInstances, CurrentInstance = instance, View = RedisViews.Instance, CurrentRedisServer = node, Refresh = true }; return(View(vd)); }
public ActionResult DrawEventsChart(int month, int year) { if (month == 0 && year == 0) { throw new Exception("Invalid Month And Year Selected!"); } ModelState.Clear(); var model = new DashboardModel(); model.Events_SelectedMonth = month; model.Events_SelectedYear = year; prepareEvents(model); return(PartialView("~/Areas/Admin/Views/Charts/_Events.cshtml", model)); }
public ActionResult Index() { string username = Membership.GetUser().UserName; List <Guid> apps = UserHelper.GetAppsIdsForUser(username); LogsSearchSettings logSearch = new LogsSearchSettings() { Applications = apps, PageNumber = 1, PageSize = 10 }; IPagedList <LogEntity> lastestLog = RepositoryContext.Current.Logs.SeachLog(logSearch); DashboardModel dm = new DashboardModel(); dm.ErrorCount = RepositoryContext.Current.Logs.CountByLevel(StandardLogLevels.ERROR); dm.InfoCount = RepositoryContext.Current.Logs.CountByLevel(StandardLogLevels.ERROR); dm.LogCount = RepositoryContext.Current.Logs.CountByLevel(StandardLogLevels.ALL_LEVELS); dm.WarnCount = RepositoryContext.Current.Logs.CountByLevel(StandardLogLevels.WARNING); dm.LastTen = ConversionHelper.ConvertLogEntityToMessage(lastestLog.ToList()); dm.QueueLoad = LogQueue.Current.QueueLoad; dm.AppLastTen = new List <MessagesListModel>(); IPagedList <LogEntity> logOfCurrentApp; foreach (ApplicationEntity app in UserHelper.GetAppsForUser(username)) { logSearch = new LogsSearchSettings() { PageNumber = 1, PageSize = 10 }; logSearch.Applications.Add(app.IdApplication); logOfCurrentApp = RepositoryContext.Current.Logs.SeachLog(logSearch); MessagesListModel list = new MessagesListModel(); list.ApplicationName = app.ApplicationName; list.IdApplication = app.IdApplication; list.Messages = ConversionHelper.ConvertLogEntityToMessage(logOfCurrentApp.ToList()); dm.AppLastTen.Add(list); } return(View(dm)); }
public void SetUp() { runtime = FubuApplication.DefaultPolicies().StructureMap().Bootstrap(); model = runtime.Factory.Get<FubuDiagnosticsEndpoint>().get__fubu(); }
public ActionResult Index() { var model = new DashboardModel(); return View(model); }
public ActionResult Index() { var dashboardModel = new DashboardModel(); var list = _service.GetTags() .Select(x => new SelectListItem { Text = x, Value = x }) .ToList(); dashboardModel.TotalActual = Math.Round(_service.GetStories().Sum(x => x.Actual),2); dashboardModel.OtherStuffOverheadPercentage = _overhead; dashboardModel.Phase1DaysOutstanding = _service.GetStories().Where(x => x.Priority == 1 && x.Status == "Ready To Work on").Sum(y => y.Estimate) + (_service.GetStories().Where(x => x.Priority == 1 && x.Status == "Working").Sum(y => y.Estimate) * (decimal)0.5); dashboardModel.TotalCompleteEstimateValue = Math.Round(_service.GetStories().Where(y => y.Status=="Complete").Sum(x => x.Estimate), 2); dashboardModel.TotalCompleteActualValue = Math.Round(_service.GetStories().Where(y => y.Status == "Complete").Sum(x => x.Actual), 2); return View(dashboardModel); }
public ActionResult Dashboard(string id) { var dashboardModel = new DashboardModel(_sessionUser.GetKandidat()); if (id == "registrierungErfolgreich") dashboardModel.ZeigeRegistrierungErfolgreich = true; if (id == "anmeldungErfolgreich") dashboardModel.Message = new SuccessMessage("Danke, Sie haben alle erforderlichen Daten für die Anmeldung eingegeben. Wir werden Sie bald nach Bewerbungsschluss per Email benachrichtigen, ob Sie zum Auswahlgespräch zugelassen sind. <br><br>" + "Спасибо, вы задали все неодходимые данные для регистрации. Вскоре после окончания срока подачи заявлений мы сообщим вам, по емайлу допущены ли вы к участию в первом собеседовании."); if (id == "passwortGeaendert") dashboardModel.Message = new SuccessMessage("Sie haben Ihr Passwort erfolgreich geändert. | " + "Вы успешно изменили пароль"); return View(dashboardModel); }
public PartialViewResult ShowLatestStories() { var dashboardModel = new DashboardModel(); dashboardModel.LatestStories = _service.GetStories().OrderByDescending(x => x.Id).Take(5).ToList(); return PartialView("_latestStories", dashboardModel); }
public ActionResult ShowEstimates(string tagFilter = "") { var dashboardModel = new DashboardModel(); dashboardModel.TotalEstimate = _service.GetTotalEstimateForProject(0, tagFilter); dashboardModel.EstimateByPriority = new List<KeyValuePair<string, string>>(); dashboardModel.CompletenessByPriority = new List<Completeness>(); foreach (var p in _service.GetPrioritiesForProject()) { dashboardModel.EstimateByPriority.Add(new KeyValuePair<string, string>(p, _service.GetTotalEstimateForProject(int.Parse(p), tagFilter).ToString())); } foreach (var p in _service.GetPrioritiesForProject()) { dashboardModel.CompletenessByPriority.Add(new Completeness{ Label = p, Complete = Math.Round(_service.GetCompletenessForProject("Complete", int.Parse(p), tagFilter), 2), Working = Math.Round(_service.GetCompletenessForProject("Working", int.Parse(p), tagFilter), 2) }); } return PartialView("_estimates", dashboardModel); }
public PartialViewResult ShowCurrentWork() { var dashboardModel = new DashboardModel(); dashboardModel.StoriesBeingWorkedOn = _service.GetStories().Where(x => x.Status == "Working").ToList(); return PartialView("_currentWork", dashboardModel); }