Skip to content

Commit

Permalink
-- Shows loading message on results page to account for webservice delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ofiber committed May 29, 2024
1 parent 7ecb333 commit 6a46c9c
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Components/Pages/Results.razor
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,15 @@
<div class="container">
<h3>Results</h3>
<div class="resDiv">
<textarea class="results" readonly>@results</textarea>
@if(results == "")
{
<p>Loading...</p>
}
else
{
<textarea class="results" readonly>@results</textarea>
}

</div>
<button class="backBtn" @onclick="BackBtn_Click">BACK</button>
</div>
Expand Down
13 changes: 13 additions & 0 deletions Components/Pages/Results.razor.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ textarea {
font-weight: bolder;
}

p {
display: block;
font-family: CommitMono;
font-size: 1.5em;
font-weight: bold;
text-align: center;
text-transform: uppercase;
color: #333333;
margin-left: auto;
margin-right: auto;
margin-top: 25%;
}

button {
cursor: pointer;
align-self: center;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
{
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_dependencyType": "compute.appService.windows"
},
"parameters": {
"resourceGroupName": {
"type": "string",
"defaultValue": "BlazorMetar20240528213857ResourceGroup",
"metadata": {
"description": "Name of the resource group for the resource. It is recommended to put resources under same resource group for better tracking."
}
},
"resourceGroupLocation": {
"type": "string",
"defaultValue": "eastus",
"metadata": {
"description": "Location of the resource group. Resource groups could have different location than resources, however by default we use API versions from latest hybrid profile which support all locations for resource types we support."
}
},
"resourceName": {
"type": "string",
"defaultValue": "BlazorMetar",
"metadata": {
"description": "Name of the main resource to be created by this template."
}
},
"resourceLocation": {
"type": "string",
"defaultValue": "[parameters('resourceGroupLocation')]",
"metadata": {
"description": "Location of the resource. By default use resource group's location, unless the resource provider is not supported there."
}
}
},
"variables": {
"appServicePlan_name": "[concat('Plan', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
"appServicePlan_ResourceId": "[concat('/subscriptions/', subscription().subscriptionId, '/resourceGroups/', parameters('resourceGroupName'), '/providers/Microsoft.Web/serverFarms/', variables('appServicePlan_name'))]"
},
"resources": [
{
"type": "Microsoft.Resources/resourceGroups",
"name": "[parameters('resourceGroupName')]",
"location": "[parameters('resourceGroupLocation')]",
"apiVersion": "2019-10-01"
},
{
"type": "Microsoft.Resources/deployments",
"name": "[concat(parameters('resourceGroupName'), 'Deployment', uniqueString(concat(parameters('resourceName'), subscription().subscriptionId)))]",
"resourceGroup": "[parameters('resourceGroupName')]",
"apiVersion": "2019-10-01",
"dependsOn": [
"[parameters('resourceGroupName')]"
],
"properties": {
"mode": "Incremental",
"template": {
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"location": "[parameters('resourceLocation')]",
"name": "[parameters('resourceName')]",
"type": "Microsoft.Web/sites",
"apiVersion": "2015-08-01",
"tags": {
"[concat('hidden-related:', variables('appServicePlan_ResourceId'))]": "empty"
},
"dependsOn": [
"[variables('appServicePlan_ResourceId')]"
],
"kind": "app",
"properties": {
"name": "[parameters('resourceName')]",
"kind": "app",
"httpsOnly": true,
"reserved": false,
"serverFarmId": "[variables('appServicePlan_ResourceId')]",
"siteConfig": {
"metadata": [
{
"name": "CURRENT_STACK",
"value": "dotnetcore"
}
]
}
},
"identity": {
"type": "SystemAssigned"
}
},
{
"location": "[parameters('resourceLocation')]",
"name": "[variables('appServicePlan_name')]",
"type": "Microsoft.Web/serverFarms",
"apiVersion": "2015-08-01",
"sku": {
"name": "S1",
"tier": "Standard",
"family": "S",
"size": "S1"
},
"properties": {
"name": "[variables('appServicePlan_name')]"
}
}
]
}
}
}
]
}

0 comments on commit 6a46c9c

Please sign in to comment.