示例#1
0
        public ActionResult Export(string id, ExportSinkModel exportSink)
        {
            var exportData = new Client.BlobImportSource
            {
                BlobUri          = exportSink.ContainerAddress + "/" + exportSink.BlobName,
                ConnectionString = exportSink.StorageConnectionString,
                IsGZiped         = exportSink.UseGZip
            };
            var jobId = BrightstarCluster.Instance.StartJob(id, JobType.Export, exportData.ToJsonString());

            return(RedirectToAction("Detail", "StoreJobs", new { storeId = id, jobId }));
        }
示例#2
0
        public ActionResult Import(string id, ImportSourceModel importSource)
        {
            var importData = new Client.BlobImportSource
            {
                BlobUri          = importSource.SourceAddress,
                ConnectionString = importSource.StorageConnectionString,
                IsGZiped         = importSource.UseGZip
            };
            var jobId = BrightstarCluster.Instance.StartJob(id, JobType.Import, importData.ToJsonString());

            return(RedirectToAction("Detail", "StoreJobs", new { storeId = id, jobId }));
        }
示例#3
0
 public ActionResult Export(string id, ExportSinkModel exportSink)
 {
     var exportData = new Client.BlobImportSource
                          {
                              BlobUri = exportSink.ContainerAddress + "/" + exportSink.BlobName,
                              ConnectionString = exportSink.StorageConnectionString,
                              IsGZiped = exportSink.UseGZip
                          };
     var jobId = BrightstarCluster.Instance.StartJob(id, JobType.Export, exportData.ToJsonString());
     return RedirectToAction("Detail", "StoreJobs", new {storeId = id, jobId});
 }
示例#4
0
 public ActionResult Import(string id, ImportSourceModel importSource)
 {
     var importData = new Client.BlobImportSource
                          {
                              BlobUri = importSource.SourceAddress,
                              ConnectionString = importSource.StorageConnectionString,
                              IsGZiped = importSource.UseGZip
                          };
     var jobId = BrightstarCluster.Instance.StartJob(id, JobType.Import, importData.ToJsonString());
     return RedirectToAction("Detail", "StoreJobs", new {storeId = id, jobId});
 }