public async Task <ActionResult> UpdateWorker(int id) { var pools = await PoolReader.GetPools(); var worker = await PoolWorkerReader.AdminGetWorker(User.Identity.GetUserId(), id); var poolconnection = await PoolReader.GetPoolConnection(worker.AlgoType); return(View("UpdateWorkerModal", new AdminPoolWorkerUpdateModel { Id = id, Name = worker.Name, AlgoType = worker.AlgoType, IsAutoSwitch = worker.IsAutoSwitch, Password = worker.Password, TargetDifficulty = worker.TargetDifficulty, DefaultDiff = poolconnection.DefaultDiff, FixedDiffSummary = poolconnection.FixedDiffSummary, VarDiffHighSummary = poolconnection.VarDiffHighSummary, VarDiffLowSummary = poolconnection.VarDiffLowSummary, VarDiffMediumSummary = poolconnection.VarDiffMediumSummary, DifficultyOption = PoolExtensions.TargetDifficultyToOption(worker.TargetDifficulty), TargetPool = worker.TargetPool, Pools = pools.Where(x => x.AlgoType == worker.AlgoType).OrderBy(x => x.Symbol).ToList() })); }
public async Task <ActionResult> UpdateWorkerPool(int id) { var pools = await PoolReader.GetPools(); var worker = await PoolWorkerReader.GetWorker(User.Identity.GetUserId(), id); return(View("UpdateWorkerPoolModal", new PoolWorkerUpdatePoolModel { Id = id, Name = worker.Name, AlgoType = worker.AlgoType, TargetPool = worker.TargetPool, Pools = pools.Where(x => x.AlgoType == worker.AlgoType && (x.Status == PoolStatus.OK || x.Status == PoolStatus.Expiring)).OrderBy(x => x.Symbol).ToList() })); }
public async Task <ActionResult> ChangeUserPool(int poolId) { var pool = await PoolReader.GetPool(poolId); var workers = await PoolWorkerReader.GetWorkers(User.Identity.GetUserId(), pool.AlgoType); if (workers.IsNullOrEmpty()) { return(ViewMessageModal(new ViewMessageModel(ViewMessageType.Warning, "No Workers Configured", "You do not have any workers configured, please create a worker in your accounts 'Miners' section"))); } return(View("ChangePoolModal", new ChangePoolModel { PoolId = pool.Id, PoolName = pool.Name, PoolSymbol = pool.Symbol, AlgoType = pool.AlgoType, Workers = workers, AllWorkers = true, SelectedWorkers = new List <int>() })); }
public async Task <ActionResult> GetMiners(DataTablesModel param) { return(DataTable(await PoolWorkerReader.GetWorkers(User.Identity.GetUserId(), param))); }
public async Task <ActionResult> GetWorkers(DataTablesModel model) { return(DataTable(await PoolWorkerReader.AdminGetWorkers(User.Identity.GetUserId(), model))); }
public async Task <ActionResult> GetWorkers(DataTablesModel param, int poolId) { return(DataTable(await PoolWorkerReader.GetWorkers(poolId, param))); }