Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge vnext #1

Open
wants to merge 20 commits into
base: vnext
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/azure-static-web-apps-witty-sand-05efbb40f.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Azure Static Web Apps CI/CD

on:
push:
branches:
- dev-v3
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- dev-v3

jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Build And Deploy
id: builddeploy
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WITTY_SAND_05EFBB40F }}
repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments)
action: "upload"
###### Repository/Build Configurations - These values can be configured to match your app requirements. ######
# For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig
app_location: "src/app/TinyBlazorAdmin" # App source code path
api_location: "src/api/shortenerTools" # Api source code path - optional
output_location: "wwwroot" # Built app content directory - optional
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
- name: Close Pull Request
id: closepullrequest
uses: Azure/static-web-apps-deploy@v1
with:
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_WITTY_SAND_05EFBB40F }}
action: "close"
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,5 @@ __pycache__/
**/appsettings.[Dd]evelopment.json


src/adminTools/adminBlazorWebsite/appsettings.Development.json

src/adminTools/adminBlazorWebsite/src/appsettings.Development.json

#Igniore VSCode User Setting
**/.vscode/settings.json
7 changes: 0 additions & 7 deletions .vscode/launch.json

This file was deleted.

4 changes: 4 additions & 0 deletions AzUrlShortener.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/UserDictionary/Words/=appsettings/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mins/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=shortener/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Features:
- Create Edit and Delete short URL.
- Redirect different destination base on schedules
- Keep Statistics of your clicks.
- Click statistics by country
- Budget-friendly and 100% open-source.
- Secure by Azure Active Directory AAD (Microsoft Identity)
- Simple step by step deployment
Expand All @@ -37,9 +38,6 @@ If you want to **Update** or **Upgrade**, please refer to [this page](https://gi

## How To Use It

There are many different ways to manage your Short Urls, from a direct HTTP call to a fancy website.
[See the complete list of admin frontends here](src/adminTools/README.md), with the instructions to deploy and use them.

There is also a video that does a quick tour of the project.

[![YouTube thumbnail of the Az URL Shortener quick tour video](https://img.youtube.com/vi/fzXy2D77WMM/hqdefault.jpg)](https://youtu.be/fzXy2D77WMM)
Expand Down Expand Up @@ -82,7 +80,6 @@ If you find a bug or would like to add a feature, check out those resources:

Check out our [Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing](CONTRIBUTING.md) docs. This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

There is also instructions or [guidance](src/adminTools/README.md#how-to-add-a-new-frontend) if you would like to create a new one and collaborate to this project.


## Contributors ✨
Expand Down
85 changes: 47 additions & 38 deletions deployment/azureDeploy.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
}
},
"frontend": {
"type": "string",
"allowedValues": [
"none",
"adminBlazorWebsite"
],
"defaultValue": "adminBlazorWebsite",
"metadata": {
"type": "string",
"allowedValues": [
"none",
"adminBlazorWebsite"
],
"defaultValue": "adminBlazorWebsite",
"metadata": {
"description": "Select the frontend that will be deploy. Select 'none', if you don't want any. Frontend available: adminBlazorWebsite, none. "
}
},
Expand All @@ -27,6 +27,13 @@
"description": "Default URL use when the key pass by the user is not found."
}
},
"ipLocationServiceUrl": {
"defaultValue": "",
"type": "string",
"metadata": {
"description": "Default URL for the ip location service."
}
},
"GitHubURL": {
"type": "string",
"defaultValue": "https://github.com/fboucher/AzUrlShortener.git",
Expand All @@ -41,50 +48,48 @@
"description": "Name of the branch to use when deploying (Default = main)."
}
},
"ExpireOn":{
"type":"string",
"defaultValue":"[utcNow('yyyy-MM-dd')]",
"ExpireOn": {
"type": "string",
"defaultValue": "[utcNow('yyyy-MM-dd')]",
"metadata": {
"description": "Just a text value (format: yyyy-MM-dd) that express when it is safe to delete these resources"
}
},
"OwnerName":{
"type":"string",
"OwnerName": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "Owner of this deployment, person to contact for question."
}
},
"frontend-AdminEMail": {
"type": "string",
"defaultValue": "",
"metadata": {
"type": "string",
"defaultValue": "",
"metadata": {
"description": "(Required only if frontend = adminBlazorWebsite) The EMail use to connect into the admin Blazor Website."
}
},
"frontend-AdminPassword": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"type": "securestring",
"defaultValue": "",
"metadata": {
"description": "(Required only if frontend = adminBlazorWebsite) Password use to connect into the admin Blazor Website. It MOST have: an uppercase character,a lowercase character, a digit, a non-alphanumeric character, must be at least six (6) characters long."
}
}
},
"variables":{
"variables": {
"suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]",
"funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]",
"funcStorageAccountName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), variables('suffix'), 'stg'))]",
"funcHhostingPlanName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), variables('suffix'), 'plan')]",
"insightsAppName":"[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), variables('suffix'), '-meta')]",
"insightsAppName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), variables('suffix'), '-meta')]",
"functionProjectFolder": "src/shortenerTools",
"UrlsStorageAccountName": "[concat('urldata', variables('suffix'), 'stg')]",
"frontendInfo": {
"adminBlazorWebsite": {
"armTemplateUrl": "[concat('https://raw.githubusercontent.com/FBoucher/AzUrlShortener/', parameters('GitHubBranch'), '/src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.json')]"
}
"adminBlazorWebsite": {
"armTemplateUrl": "[concat('https://raw.githubusercontent.com/FBoucher/AzUrlShortener/', parameters('GitHubBranch'), '/src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.json')]"
}
}


},
"resources": [
{
Expand Down Expand Up @@ -150,20 +155,24 @@
{
"name": "defaultRedirectUrl",
"value": "[parameters('defaultRedirectUrl')]"
},
{
"name": "IpLocationService:Url",
"value": "[parameters('ipLocationServiceUrl')]"
}
]
},
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', variables('funcHhostingPlanName'))]",
"serverFarmId": "[resourceId('Microsoft.Web/serverfarms/', variables('funcHhostingPlanName'))]",
"hostingEnvironment": "",
"clientAffinityEnabled": true
},
"resources": [
{
"apiVersion": "2018-11-01",
"type":"sourcecontrols",
"type": "sourcecontrols",
"name": "web",
"dependsOn": [
"[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"
"[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"
],
"properties": {
"repoUrl": "[parameters('GitHubURL')]",
Expand Down Expand Up @@ -254,36 +263,36 @@
},
"parameters": {
"basename": {
"value" : "[concat('adm', parameters('baseName'))]"
"value": "[concat('adm', parameters('baseName'))]"
},
"AdminEMail": {
"value" : "[parameters('frontend-AdminEMail')]"
"value": "[parameters('frontend-AdminEMail')]"
},
"AdminPassword": {
"value" : "[parameters('frontend-AdminPassword')]"
"value": "[parameters('frontend-AdminPassword')]"
},
"AzureFunctionUrl": {
"value" : "[concat('https://', reference(resourceId('Microsoft.Web/sites/', variables('funcAppName')), '2018-02-01').hostNames[0])]"
"value": "[concat('https://', reference(resourceId('Microsoft.Web/sites/', variables('funcAppName')), '2018-02-01').hostNames[0])]"
},
"SecurityCode": {
"value" : "[listkeys(concat(resourceId('Microsoft.Web/sites/', variables('funcAppName')), '/host/default/'),'2016-08-01').functionKeys.default]"
"value": "[listkeys(concat(resourceId('Microsoft.Web/sites/', variables('funcAppName')), '/host/default/'),'2016-08-01').functionKeys.default]"
},
"GitHubURL": {
"value" : "[parameters('GitHubURL')]"
"value": "[parameters('GitHubURL')]"
},
"GitHubBranch": {
"value" : "[parameters('GitHubBranch')]"
"value": "[parameters('GitHubBranch')]"
},
"ExpireOn": {
"value" : "[parameters('ExpireOn')]"
"value": "[parameters('ExpireOn')]"
},
"OwnerName": {
"value" : "[parameters('OwnerName')]"
"value": "[parameters('OwnerName')]"
}

}
}
}
],
"outputs":{}
"outputs": {}
}
27 changes: 15 additions & 12 deletions deployment/azureDeploy.params.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@
"baseName": {
"value": "AzUrlShortTools"
},
"OwnerName": {
"value": "Frank"
},
"GitHubBranch": {
"value": "feature/deploy-it-all"
},
"OwnerName": {
"value": "Frank"
},
"GitHubBranch": {
"value": "feature/deploy-it-all"
},
"defaultRedirectUrl": {
"value": "https://azure.com"
},
"ipLocationServiceUrl": {
"value": "https://freegeoip.app/"
},
"frontend": {
"value": "adminBlazorWebsite"
},
"frontend-AdminEMail": {
"value": "[email protected]"
},
"frontend-AdminPassword": {
"value": "Supernewt42!"
}
"frontend-AdminEMail": {
"value": "[email protected]"
},
"frontend-AdminPassword": {
"value": "Supernewt42!"
}
}
}
2 changes: 1 addition & 1 deletion deployment/debug.azcli
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ az group deployment create -g c5mShortDemo -n cloud5minsv1 --template-file "dep

#debug adminBlazorWebsite

az group deployment validate -g c5mShortDemo --template-file "src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.json" --parameters "src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.params.json" --verbose
#az group deployment validate -g c5mShortDemo --template-file "src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.json" --parameters "src/adminTools/adminBlazorWebsite/deployment/adminBlazorWebsite-deployAzure.params.json" --verbose


az group deployment create -g c5mShortDemo -n cloud5minsv1 --template-file "deployment/azureDeploy.json" --parameters "deployment/azureDeploy.params.json" --verbose
Expand Down
62 changes: 0 additions & 62 deletions src/adminTools/PowerAutomateFlow/README.md

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading