Example #1
0
        public override async Task HandleAuthenticatedAdminRequest()
        {
            //Write table
            await WriteString(table.GenerateTable(Program.servers));

            //Write footer
            await WriteString($"<hr><b>{Program.servers.Count} listed</b> - {CreateButtonHtml("Enroll New", "/machines/enroll")}");
        }
        private async Task MakeSiteList()
        {
            //Write header
            await WriteString("<u>Sites</u> - " + CreateButtonHtml("Add Site", "add_site") + "<br><br>");

            //Write table
            await WriteString(sitesTable.GenerateTable(sitesList));

            //Write footer
            await WriteString("<hr>");
        }
        private async Task MakeVersionList()
        {
            //Write header
            await WriteString("<u>Versions</u><br><br>");

            //Write table
            await WriteString(versionsTable.GenerateTable(versionList));

            //Write footer
            await WriteString("<hr>");
        }
        private async Task MakeInstanceList()
        {
            //Write header
            await WriteString("<u>Instances</u><br><br>");

            //Write table
            await WriteString(instancesTable.GenerateTable(instanceList));

            //Write footer
            await WriteString("<hr>");
        }
        private async Task MakePackageList()
        {
            //Write header
            await WriteString("<u>Packages</u> - " + CreateButtonHtml("Add Package", "add_package") + "<br><br>");

            //Write table
            await WriteString(packagesTable.GenerateTable(packageList));

            //Write footer
            await WriteString("<hr>");
        }