private void writeOptions(DeploymentPlan plan) { wrapInSection("Options","Options used at runtime", div => { var table = new TableTag(); table.AddClass("table"); table.AddProperty("Written at", DateTime.Now.ToLongTimeString()); table.AddProperty("Profile", plan.Options.ProfileName); table.AddBodyRow(tr => { tr.Add("th", th => { th.Text("Recipes").Append(new HtmlTag("small").Text(" (in order)")); }); tr.Add("td", td => { td.Text(plan.Recipes.Select(x => x.Name).Join(" > ")); }); }); table.AddProperty("Hosts", plan.Hosts.Select(x => x.Name).OrderBy(x => x).Join(", ")); table.AddProperty("Bottles", plan.Hosts.SelectMany(host => host.BottleReferences).Select(bottle => bottle.Name). Distinct().OrderBy(x => x).Join(", ")); div.Append(table); }); }
private void writeOptions(DeploymentPlan plan) { wrapInCollapsable("Options", div => { var table = new TableTag(); table.Id("properties"); table.AddProperty("Written at", DateTime.Now.ToLongTimeString()); table.AddProperty("Profile", plan.Options.ProfileName + " at " + plan.Options.ProfileFileName); // TODO -- add file name table.AddProperty("Recipes", plan.Recipes.Select(x => x.Name).OrderBy(x => x).Join(", ")); table.AddProperty("Hosts", plan.Hosts.Select(x => x.Name).OrderBy(x => x).Join(", ")); table.AddProperty("Bottles", plan.Hosts.SelectMany(host => host.BottleReferences).Select(bottle => bottle.Name). Distinct().OrderBy(x => x).Join(", ")); div.Append(table); }); }