Exemplo n.º 1
0
        public ActionResult ServerActionPreview(string[] operations)
        {
            var ops = new List <RedisInstanceOperation>();

            if (operations != null)
            {
                foreach (var a in operations)
                {
                    ops.Add(RedisInstanceOperation.FromString(Module, a));
                }
            }
            return(PartialView("Server.Actions.Preview", ops));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> ServerActionPerform(string[] operations)
        {
            var tasks = new List <Task>();

            if (operations != null)
            {
                foreach (var a in operations)
                {
                    tasks.Add(RedisInstanceOperation.FromString(Module, a).PerformAsync());
                }
            }
            await Task.WhenAll(tasks);

            return(Json(new { success = true, result = $"{tasks.Count.Pluralize("operation")} running..." }));
        }