Esempio n. 1
0
 private void AppList_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (AppList.SelectedItems.Count > 0)
     {
         CurrentApp = AppList.SelectedItems[0] as CodePushApp;
         if (all_deployments.Count > 0 && all_deployments.ContainsKey(CurrentApp))
         {
             //var selected_app = all_apps[selected_item];
             DeploymentList.ItemsSource = all_deployments[CurrentApp];
         }
     }
 }
Esempio n. 2
0
        private async Task <List <Deployment> > GetDeploymentsAsync(CodePushApp app)
        {
            UpdateStatus("Get all deployment for App --> " + app.display_name);
            var output = await Http.GetDeploymentsAsync(app.owner.name, app.name);

            if (output == null)
            {
                UpdateStatus(string.Format("Cannot get any deployment for the app {0}", app.name));
                return(null);
            }
            all_deployments[app] = output;

            return(output);
        }
Esempio n. 3
0
        private async Task <List <Release> > GetReleaseListAsync(CodePushApp app, Deployment deployment)
        {
            UpdateStatus("Get all releases for deployment --> " + deployment.name);
            var releaseList = await Http.GetReleasesAsync(app.owner.name, app.name, deployment.name);

            if (releaseList == null)
            {
                UpdateStatus("Failed to get any releases for deployment: " + deployment.name);
                return(null);
            }
            releaseList = releaseList.OrderByDescending(item => item.upload_time).ToList();
            all_releases[deployment] = releaseList;


            return(releaseList);
        }
Esempio n. 4
0
        private async Task <List <ReleaseMetric> > GetReleaseMetricAsync(CodePushApp app, Deployment deployment)
        {
            UpdateStatus("Get all releases metrics for deployment --> " + deployment.name);
            var metricList = await Http.GetReleaseMetricAsync(app.owner.name, app.name, deployment.name);

            if (metricList == null)
            {
                UpdateStatus(string.Format("Cannot get any release metric for the deployment {0}", deployment.name));
                return(null);
            }
            all_release_metrics[deployment] = metricList;

            if (metricList == null)
            {
                UpdateStatus(string.Format("Cannot get any release metric for the deployment {0}", deployment.name));
            }

            RefreshReleaseMetrics(deployment, all_releases[deployment]);

            return(metricList);
        }