Example #1
0
        private ActionResult GraphViz(string url)
        {
            string workPackageResponse = null;

            try
            {
                using (HttpClient client = new HttpClient())
                {
                    workPackageResponse = client.GetStringAsync(url).Result;
                }
            }
            catch
            {
                workPackageResponse = string.Empty;
            }

            GraphVizViewModel viewmodel = new GraphVizViewModel();

            if (!workPackageResponse.IsNullOrEmpty())
            {
                viewmodel.DotString = ConvertRDFToDotString(workPackageResponse);
            }
            else
            {
                viewmodel.DotString = string.Empty;
            }
            return(View("GraphViz", viewmodel));
        }
Example #2
0
        public ActionResult GraphViz(int id)
        {
            GraphVizViewModel viewmodel = new GraphVizViewModel();

            viewmodel.DotString = GiveMeDotString(id, showLegend: true);

            return(View(viewmodel));
        }
Example #3
0
        public ActionResult GraphViz()
        {
            GraphVizViewModel viewmodel = new GraphVizViewModel();

            if (TempData["StringFromRedirect"] != null)
            {
                string q = TempData["StringFromRedirect"].ToString();
                if (q.StartsWith("digraph"))
                {
                    viewmodel.DotString = q;
                }
                else
                {
                    viewmodel.DotString = string.Empty;
                }

                return(View(viewmodel));
            }
            else
            {
                return(RedirectToAction("Index"));
            }
        }