remove dupe dotnet voting and result apps (#277)

This commit is contained in:
Bret Fisher
2022-12-16 22:37:25 -05:00
committed by GitHub
parent 07376881e7
commit f1445f43b1
41 changed files with 0 additions and 4584 deletions

View File

@@ -1,18 +0,0 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": true,
"sourceMaps": false,
"outDir": null,
"localRoot": "${workspaceRoot}",
"remoteRoot": "/app",
"timeout": 10000
}
]
}

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 as builder
WORKDIR /Result
COPY Result/Result.csproj .
RUN dotnet restore
COPY /Result .
RUN dotnet publish -c Release -o /out Result.csproj
# app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-sac2016
WORKDIR /app
ENTRYPOINT ["dotnet", "Result.dll"]
COPY --from=builder /out .

View File

@@ -1,16 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as builder
WORKDIR /Result
COPY Result/Result.csproj .
RUN dotnet restore
COPY /Result .
RUN dotnet publish -c Release -o /out Result.csproj
# app image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
ENTRYPOINT ["dotnet", "Result.dll"]
COPY --from=builder /out .

View File

@@ -1,9 +0,0 @@
using Result.Models;
namespace Result.Data
{
public interface IResultData
{
ResultsModel GetResults();
}
}

View File

@@ -1,40 +0,0 @@
using System.Linq;
using Dapper;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using MySql.Data.MySqlClient;
using Result.Models;
namespace Result.Data
{
public class MySqlResultData : IResultData
{
private readonly string _connectionString;
private readonly ILogger _logger;
public MySqlResultData(IConfiguration config, ILogger<MySqlResultData> logger)
{
_connectionString = config.GetConnectionString("ResultData");
_logger = logger;
}
public ResultsModel GetResults()
{
var model = new ResultsModel();
using (var connection = new MySqlConnection(_connectionString))
{
var results = connection.Query("SELECT vote, COUNT(id) AS count FROM votes GROUP BY vote ORDER BY vote");
if (results.Any(x => x.vote == "a"))
{
model.OptionA = (int) results.First(x => x.vote == "a").count;
}
if (results.Any(x => x.vote == "b"))
{
model.OptionB = (int) results.First(x => x.vote == "b").count;
}
model.VoteCount = model.OptionA + model.OptionB;
}
return model;
}
}
}

View File

@@ -1,9 +0,0 @@
using Microsoft.AspNetCore.SignalR;
namespace Result.Hubs
{
public class ResultsHub : Hub
{
//no public methods, only used for push from PublishRTesultsTimer
}
}

View File

@@ -1,11 +0,0 @@
namespace Result.Models
{
public class ResultsModel
{
public int OptionA { get; set; }
public int OptionB { get; set; }
public int VoteCount { get; set; }
}
}

View File

@@ -1,45 +0,0 @@
@page
@model Result.Pages.IndexModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>@Model.OptionA vs @Model.OptionB -- Result</title>
<base href="/index.html">
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<meta name="keywords" content="docker-compose, docker, stack">
<meta name="author" content="Docker">
<link rel='stylesheet' href='~/css/site.css' />
</head>
<body>
<div id="background-stats">
<div id="background-stats-1">
</div>
<!--
-->
<div id="background-stats-2">
</div>
</div>
<div id="content-container">
<div id="content-container-center">
<div id="choice">
<div class="choice resulta">
<div class="label">@Model.OptionA</div>
<div class="stat" id="optionA">50%</div>
</div>
<div class="divider"></div>
<div class="choice resultb">
<div class="label">@Model.OptionB</div>
<div class="stat" id="optionB">50%</div>
</div>
</div>
</div>
</div>
<div id="result">
<span id="totalVotes">No votes yet</span>
</div>
<script src="~/lib/signalr/dist/browser/signalr.min.js"></script>
<script src="~/js/results.js"></script>
</body>
</html>

View File

@@ -1,33 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Configuration;
namespace Result.Pages
{
public class IndexModel : PageModel
{
private string _optionA;
private string _optionB;
protected readonly IConfiguration _configuration;
public string OptionA { get; private set; }
public string OptionB { get; private set; }
public IndexModel(IConfiguration configuration)
{
_configuration = configuration;
_optionA = _configuration.GetValue<string>("Voting:OptionA");
_optionB = _configuration.GetValue<string>("Voting:OptionB");
}
public void OnGet()
{
OptionA = _optionA;
OptionB = _optionB;
}
}
}

View File

@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Result
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

View File

@@ -1,27 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:56785",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Result": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}

View File

@@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dapper" Version="1.50.5" />
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="MySql.Data" Version="8.0.12" />
</ItemGroup>
</Project>

View File

@@ -1,52 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Result.Data;
using Result.Hubs;
using Result.Timers;
namespace Result
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
services.AddSignalR();
services.AddTransient<IResultData, MySqlResultData>()
.AddSingleton<PublishResultsTimer>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
app.UseStaticFiles();
app.UseSignalR(routes =>
{
routes.MapHub<ResultsHub>("/resultsHub");
});
app.UseMvc();
var timer = app.ApplicationServices.GetService<PublishResultsTimer>();
timer.Start();
}
}
}

View File

@@ -1,41 +0,0 @@
using System.Timers;
using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Configuration;
using Result.Data;
using Result.Hubs;
namespace Result.Timers
{
public class PublishResultsTimer
{
private readonly IHubContext<ResultsHub> _hubContext;
private readonly IResultData _resultData;
private readonly Timer _timer;
public PublishResultsTimer(IHubContext<ResultsHub> hubContext, IResultData resultData, IConfiguration configuration)
{
_hubContext = hubContext;
_resultData = resultData;
var publishMilliseconds = configuration.GetValue<int>("ResultsTimer:PublishMilliseconds");
_timer = new Timer(publishMilliseconds)
{
Enabled = false
};
_timer.Elapsed += PublishResults;
}
public void Start()
{
if (!_timer.Enabled)
{
_timer.Start();
}
}
private void PublishResults(object sender, ElapsedEventArgs e)
{
var model = _resultData.GetResults();
_hubContext.Clients.All.SendAsync("UpdateResults", model);
}
}
}

View File

@@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

View File

@@ -1,18 +0,0 @@
{
"Voting": {
"OptionA": "Cats",
"OptionB": "Dogs"
},
"ResultsTimer": {
"PublishMilliseconds": 2500
},
"ConnectionStrings": {
"ResultData": "Server=mysql;Port=4000;Database=votes;User=root;SslMode=None"
},
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@@ -1,14 +0,0 @@
{
"version": "1.0",
"defaultProvider": "unpkg",
"libraries": [
{
"library": "@aspnet/signalr@1.0.3",
"destination": "wwwroot/lib/signalr/",
"files": [
"dist/browser/signalr.js",
"dist/browser/signalr.min.js"
]
}
]
}

View File

@@ -1,121 +0,0 @@
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,600);
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
height: 100%;
font-family: 'Open Sans';
}
body {
opacity: 0;
transition: all 1s linear;
}
.divider {
height: 150px;
width: 2px;
background-color: #C0C9CE;
position: relative;
top: 50%;
float: left;
transform: translateY(-50%);
}
#background-stats-1 {
background-color: #2196f3;
}
#background-stats-2 {
background-color: #00cbca;
}
#content-container {
z-index: 2;
position: relative;
margin: 0 auto;
display: table;
padding: 10px;
max-width: 940px;
height: 100%;
}
#content-container-center {
display: table-cell;
text-align: center;
vertical-align: middle;
}
#result {
z-index: 3;
position: absolute;
bottom: 40px;
right: 20px;
color: #fff;
opacity: 0.5;
font-size: 45px;
font-weight: 600;
}
#choice {
transition: all 300ms linear;
line-height: 1.3em;
background: #fff;
box-shadow: 10px 0 0 #fff, -10px 0 0 #fff;
vertical-align: middle;
font-size: 40px;
font-weight: 600;
width: 450px;
height: 200px;
}
#choice a {
text-decoration: none;
}
#choice a:hover, #choice a:focus {
outline: 0;
text-decoration: underline;
}
#choice .choice {
width: 49%;
position: relative;
top: 50%;
transform: translateY(-50%);
text-align: left;
padding-left: 50px;
}
#choice .choice .label {
text-transform: uppercase;
}
#choice .choice.resultb {
color: #00cbca;
float: right;
}
#choice .choice.resulta {
color: #2196f3;
float: left;
}
#background-stats {
z-index: 1;
height: 100%;
width: 100%;
position: absolute;
}
#background-stats div {
transition: width 400ms ease-in-out;
display: inline-block;
margin-bottom: -4px;
width: 50%;
height: 100%;
}

View File

@@ -1 +0,0 @@
body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}

View File

@@ -1,41 +0,0 @@
"use strict";
var connection = new signalR.HubConnectionBuilder().withUrl("/resultsHub").build();
connection.on("UpdateResults", function (results) {
document.body.style.opacity=1;
var a = parseInt(results.optionA || 0);
var b = parseInt(results.optionB || 0);
var percentages = getPercentages(a, b);
document.getElementById("optionA").innerText = percentages.a + "%";
document.getElementById("optionB").innerText = percentages.b + "%";
var totalVotes = 'No votes yet';
if (results.voteCount > 0) {
totalVotes = results.voteCount + (results.voteCount > 1 ? " votes" : " vote");
}
document.getElementById("totalVotes").innerText = totalVotes;
var bg1 = document.getElementById('background-stats-1');
var bg2 = document.getElementById('background-stats-2');
bg1.style.width = (percentages.a-0.2) + "%";
bg2.style.width = (percentages.b-0.2) + "%";
});
connection.start().catch(function (err) {
return console.error(err.toString());
});
function getPercentages(a, b) {
var result = {};
if (a + b > 0) {
result.a = Math.round(a / (a + b) * 100);
result.b = 100 - result.a;
} else {
result.a = result.b = 50;
}
return result;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1,16 +0,0 @@
FROM microsoft/dotnet:2.1-sdk-nanoserver-sac2016 as builder
WORKDIR /Vote
COPY Vote/Vote.csproj .
RUN dotnet restore
COPY /Vote .
RUN dotnet publish -c Release -o /out Vote.csproj
# app image
FROM microsoft/dotnet:2.1-aspnetcore-runtime-nanoserver-sac2016
WORKDIR /app
ENTRYPOINT ["dotnet", "Vote.dll"]
COPY --from=builder /out .

View File

@@ -1,16 +0,0 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as builder
WORKDIR /Vote
COPY Vote/Vote.csproj .
RUN dotnet restore
COPY /Vote .
RUN dotnet publish -c Release -o /out Vote.csproj
# app image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1
WORKDIR /app
ENTRYPOINT ["dotnet", "Vote.dll"]
COPY --from=builder /out .

View File

@@ -1,12 +0,0 @@
using NATS.Client;
using Vote.Messaging.Messages;
namespace Vote.Messaging
{
public interface IMessageQueue
{
IConnection CreateConnection();
void Publish<TMessage>(TMessage message) where TMessage : Message;
}
}

View File

@@ -1,23 +0,0 @@
using Newtonsoft.Json;
using Vote.Messaging.Messages;
using System.Text;
namespace Vote.Messaging
{
public class MessageHelper
{
public static byte[] ToData<TMessage>(TMessage message)
where TMessage : Message
{
var json = JsonConvert.SerializeObject(message);
return Encoding.Unicode.GetBytes(json);
}
public static TMessage FromData<TMessage>(byte[] data)
where TMessage : Message
{
var json = Encoding.Unicode.GetString(data);
return (TMessage)JsonConvert.DeserializeObject<TMessage>(json);
}
}
}

View File

@@ -1,35 +0,0 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using NATS.Client;
using Vote.Messaging.Messages;
namespace Vote.Messaging
{
public class MessageQueue : IMessageQueue
{
protected readonly IConfiguration _configuration;
protected readonly ILogger _logger;
public MessageQueue(IConfiguration configuration, ILogger<MessageQueue> logger)
{
_configuration = configuration;
_logger = logger;
}
public void Publish<TMessage>(TMessage message)
where TMessage : Message
{
using (var connection = CreateConnection())
{
var data = MessageHelper.ToData(message);
connection.Publish(message.Subject, data);
}
}
public IConnection CreateConnection()
{
var url = _configuration.GetValue<string>("MessageQueue:Url");
return new ConnectionFactory().CreateConnection(url);
}
}
}

View File

@@ -1,15 +0,0 @@
using System;
namespace Vote.Messaging.Messages
{
public class VoteCastEvent : Message
{
public override string Subject { get { return MessageSubject; } }
public string VoterId {get; set;}
public string Vote {get; set; }
public static string MessageSubject = "events.vote.votecast";
}
}

View File

@@ -1,16 +0,0 @@
using System;
namespace Vote.Messaging.Messages
{
public abstract class Message
{
public string CorrelationId { get; set; }
public abstract string Subject { get; }
public Message()
{
CorrelationId = Guid.NewGuid().ToString();
}
}
}

View File

@@ -1,50 +0,0 @@
@page
@model Vote.Pages.IndexModel
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>@Model.OptionA vs @Model.OptionB!</title>
<base href="/index.html">
<meta name="viewport" content="width=device-width, initial-scale = 1.0">
<meta name="keywords" content="docker-compose, docker, stack">
<meta name="author" content="Docker DevRel team">
<link rel="stylesheet" href="~/css/site.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
</head>
<body>
<div id="content-container">
<div id="content-container-center">
<h3>@Model.OptionA vs @Model.OptionB!</h3>
<form method="POST" id="choice" name='form'>
<button id="a" type="submit" name="vote" class="a" value="a">@Model.OptionA</button>
<button id="b" type="submit" name="vote" class="b" value="b">@Model.OptionB</button>
</form>
<div id="tip">
(Tip: you can change your vote)
</div>
<div id="hostname">
Processed by container ID @System.Environment.MachineName
</div>
</div>
</div>
<script src="~/js/jquery-1.11.1-min.js" type="text/javascript"></script>
@*<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.js"></script>*@
<script>
var vote = "@Model.Vote";
if(vote == "a"){
$(".a").prop('disabled', true);
$(".a").html('@Model.OptionA <i class="fa fa-check-circle"></i>');
$(".b").css('opacity','0.5');
}
if(vote == "b"){
$(".b").prop('disabled', true);
$(".b").html('@Model.OptionB <i class="fa fa-check-circle"></i>');
$(".a").css('opacity','0.5');
}
</script>
</body>
</html>

View File

@@ -1,75 +0,0 @@
using System;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
using Vote.Messaging;
using Vote.Messaging.Messages;
namespace Vote.Pages
{
public class IndexModel : PageModel
{
private string _optionA;
private string _optionB;
protected readonly IMessageQueue _messageQueue;
protected readonly IConfiguration _configuration;
protected readonly ILogger _logger;
public IndexModel(IMessageQueue messageQueue, IConfiguration configuration, ILogger<IndexModel> logger)
{
_messageQueue = messageQueue;
_configuration = configuration;
_logger = logger;
_optionA = _configuration.GetValue<string>("Voting:OptionA");
_optionB = _configuration.GetValue<string>("Voting:OptionB");
}
public string OptionA { get; private set; }
public string OptionB { get; private set; }
[BindProperty]
public string Vote { get; private set; }
private string _voterId
{
get { return TempData.Peek("VoterId") as string; }
set { TempData["VoterId"] = value; }
}
public void OnGet()
{
OptionA = _optionA;
OptionB = _optionB;
}
public IActionResult OnPost(string vote)
{
Vote = vote;
OptionA = _optionA;
OptionB = _optionB;
if (_configuration.GetValue<bool>("MessageQueue:Enabled"))
{
PublishVote(vote);
}
return Page();
}
private void PublishVote(string vote)
{
if (string.IsNullOrEmpty(_voterId))
{
_voterId = Guid.NewGuid().ToString();
}
var message = new VoteCastEvent
{
VoterId = _voterId,
Vote = vote
};
_messageQueue.Publish(message);
}
}
}

View File

@@ -1,24 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace Vote
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

View File

@@ -1,27 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:6116",
"sslPort": 44316
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Vote": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@@ -1,45 +0,0 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Vote.Messaging;
namespace Vote
{
public class Startup
{
public Startup(IConfiguration configuration)
{
Configuration = configuration;
}
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddMvc()
.SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
.AddRazorPagesOptions(options =>
{
options.Conventions.ConfigureFilter(new IgnoreAntiforgeryTokenAttribute());
});
services.AddTransient<IMessageQueue, MessageQueue>();
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
else
{
app.UseExceptionHandler("/Error");
}
app.UseStaticFiles();
app.UseMvc();
}
}
}

View File

@@ -1,12 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="NATS.Client" Version="0.8.1" />
</ItemGroup>
</Project>

View File

@@ -1,25 +0,0 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2042
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Vote", "Vote.csproj", "{DA159FEC-BE4D-4704-ACB2-E03FFA6F2D3B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{DA159FEC-BE4D-4704-ACB2-E03FFA6F2D3B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DA159FEC-BE4D-4704-ACB2-E03FFA6F2D3B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DA159FEC-BE4D-4704-ACB2-E03FFA6F2D3B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DA159FEC-BE4D-4704-ACB2-E03FFA6F2D3B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BEABFEFC-9957-41E3-96A1-7F501F69411D}
EndGlobalSection
EndGlobal

View File

@@ -1,12 +0,0 @@
{
"MessageQueue": {
"Enabled": false
},
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

View File

@@ -1,16 +0,0 @@
{
"Voting": {
"OptionA": "Cats",
"OptionB": "Dogs"
},
"MessageQueue": {
"Enabled": true,
"Url": "nats://message-queue:4222"
},
"Logging": {
"LogLevel": {
"Default": "Information"
}
},
"AllowedHosts": "*"
}

View File

@@ -1,135 +0,0 @@
@import url(//fonts.googleapis.com/css?family=Open+Sans:400,700,600);
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
background-color: #F7F8F9;
height: 100vh;
font-family: 'Open Sans';
}
button {
border-radius: 0;
width: 100%;
height: 50%;
}
button[type="submit"] {
-webkit-appearance: none;
-webkit-border-radius: 0;
}
button i {
float: right;
padding-right: 30px;
margin-top: 3px;
}
button.a {
background-color: #1aaaf8;
}
button.b {
background-color: #00cbca;
}
#tip {
text-align: left;
color: #c0c9ce;
font-size: 14px;
}
#hostname {
position: absolute;
bottom: 100px;
right: 0;
left: 0;
color: #8f9ea8;
font-size: 24px;
}
#content-container {
z-index: 2;
position: relative;
margin: 0 auto;
display: table;
padding: 10px;
max-width: 940px;
height: 100%;
}
#content-container-center {
display: table-cell;
text-align: center;
}
#content-container-center h3 {
color: #254356;
}
#choice {
transition: all 300ms linear;
line-height: 1.3em;
display: inline;
vertical-align: middle;
font-size: 3em;
}
#choice a {
text-decoration: none;
}
#choice a:hover, #choice a:focus {
outline: 0;
text-decoration: underline;
}
#choice button {
display: block;
height: 80px;
width: 330px;
border: none;
color: white;
text-transform: uppercase;
font-size: 18px;
font-weight: 700;
margin-top: 10px;
margin-bottom: 10px;
text-align: left;
padding-left: 50px;
}
#choice button.a:hover {
background-color: #1488c6;
}
#choice button.b:hover {
background-color: #00a2a1;
}
#choice button.a:focus {
background-color: #1488c6;
}
#choice button.b:focus {
background-color: #00a2a1;
}
#background-stats {
z-index: 1;
height: 100%;
width: 100%;
position: absolute;
}
#background-stats div {
transition: width 400ms ease-in-out;
display: inline-block;
margin-bottom: -4px;
width: 50%;
height: 100%;
}

View File

@@ -1 +0,0 @@
body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}}

File diff suppressed because one or more lines are too long