Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 34 additions & 24 deletions examples/BlazorServerApp/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,33 +6,43 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"BrowserEnhancement": {
"EnabledFor": [
{
"Name": "Browser",
"Parameters": {
"AllowedBrowsers": [ "Edge" ]
}
"feature_management": {
"feature_flags": [
{
"id": "BrowserEnhancement",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Browser",
"parameters": {
"AllowedBrowsers": [ "Edge" ]
}
}
]
}
]
},
"Beta": {
"EnabledFor": [
{
"Name": "Targeting",
"Parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
},
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Targeting",
"parameters": {
"Audience": {
"DefaultRolloutPercentage": 50,
"Exclusion": {
"Groups": [
"Guests"
]
}
}
}
}
}
]
}
]
}
}
]
}
}
26 changes: 16 additions & 10 deletions examples/ConsoleApp/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
{
"FeatureManagement": {
"Beta": {
"EnabledFor": [
{
"Name": "AccountId",
"Parameters": {
"AllowedAccounts": [ "abcdefghijklmnopqrstuvwxyz" ]
}
"feature_management": {
"feature_flags": [
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "AccountId",
"parameters": {
"AllowedAccounts": [ "abcdefghijklmnopqrstuvwxyz" ]
}
}
]
}
]
}
}
]
}
}
113 changes: 56 additions & 57 deletions examples/EvaluationDataToApplicationInsights/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,62 +1,61 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ApplicationInsights": {
"ConnectionString": "<connection-string>"
},
"FeatureManagement": {
"ImageRating": {
"Telemetry": {
"Enabled": true,
"Metadata": {
"Label": "A Label",
"Etag": "An etag",
"Tags.A": "Tag A value"
}
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ApplicationInsights": {
"ConnectionString": "<connection-string>"
},
"feature_management": {
"feature_flags": [
{
"id": "ImageRating",
"enabled": true,
"telemetry": {
"enabled": true,
"metadata": {
"Label": "A Label",
"Etag": "An etag",
"Tags.A": "Tag A value"
}
},
"variants": [
{
"name": "BlackAndWhite",
"configuration_value": "https://cdn.pixabay.com/photo/2017/09/28/09/26/dinosaur-2794840_1280.png"
},
{
"name": "WithColor",
"configuration_value": "https://cdn.pixabay.com/photo/2012/04/02/15/18/stegosaurus-24752_1280.png"
},
{
"name": "HighQuality",
"configuration_value": "https://cdn.pixabay.com/photo/2019/02/01/14/24/landscape-3969074_1280.jpg"
}
],
"allocation": {
"percentile": [
{
"variant": "BlackAndWhite",
"from": 0,
"to": 33
},
"Variants": [
{
"Name": "BlackAndWhite",
"ConfigurationValue": "https://cdn.pixabay.com/photo/2017/09/28/09/26/dinosaur-2794840_1280.png"
},
{
"Name": "WithColor",
"ConfigurationValue": "https://cdn.pixabay.com/photo/2012/04/02/15/18/stegosaurus-24752_1280.png"
},
{
"Name": "HighQuality",
"ConfigurationValue": "https://cdn.pixabay.com/photo/2019/02/01/14/24/landscape-3969074_1280.jpg"
}
],
"Allocation": {
"Percentile": [
{
"Variant": "BlackAndWhite",
"From": 0,
"To": 33
},
{
"Variant": "WithColor",
"From": 33,
"To": 66
},
{
"Variant": "HighQuality",
"From": 66,
"To": 100
}
]
{
"variant": "WithColor",
"from": 33,
"to": 66
},
"EnabledFor": [
{
"Name": "AlwaysOn"
}
]
{
"variant": "HighQuality",
"from": 66,
"to": 100
}
]
}
}
}
]
}
}
128 changes: 74 additions & 54 deletions examples/FeatureFlagDemo/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,65 +7,85 @@
"AllowedHosts": "*",

// Define feature flags in config file
"FeatureManagement": {

"Home": true,
"Beta": {
"EnabledFor": [
{
"Name": "Targeting",
"Parameters": { // This json object maps to a strongly typed configuration class
"Audience": {
"Users": [
"Jeff",
"Alicia"
],
"Groups": [
{
"Name": "Ring0",
"RolloutPercentage": 80
},
{
"Name": "Ring1",
"RolloutPercentage": 50
"feature_management": {
"feature_flags": [
{
"id": "Home",
"enabled": true
},
{
"id": "Beta",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Targeting",
"parameters": {
"Audience": {
"Users": [
"Jeff",
"Alicia"
],
"Groups": [
{
"Name": "Ring0",
"RolloutPercentage": 80
},
{
"Name": "Ring1",
"RolloutPercentage": 50
}
],
"DefaultRolloutPercentage": 20
}
],
"DefaultRolloutPercentage": 20
}
}
}
]
}
]
},
"CustomViewData": {
"EnabledFor": [
{
"Name": "Browser",
"Parameters": {
"AllowedBrowsers": [ "Chrome", "Edge" ]
}
},
{
"id": "CustomViewData",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Browser",
"parameters": {
"AllowedBrowsers": [ "Chrome", "Edge" ]
}
}
]
}
]
},
"ContentEnhancement": {
"EnabledFor": [
{
"Name": "TimeWindow",
"Parameters": {
"Start": "Wed, 01 May 2019 13:59:59 GMT",
"End": "Mon, 01 July 2019 00:00:00 GMT"
}
},
{
"id": "ContentEnhancement",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.TimeWindow",
"parameters": {
"Start": "Wed, 01 May 2019 13:59:59 GMT",
"End": "Mon, 01 Jul 2019 00:00:00 GMT"
}
}
]
}
]
},
"EnhancedPipeline": {
"EnabledFor": [
{
"Name": "Microsoft.Percentage",
"Parameters": {
"Value": 50
}
},
{
"id": "EnhancedPipeline",
"enabled": true,
"conditions": {
"client_filters": [
{
"name": "Microsoft.Percentage",
"parameters": {
"Value": 50
}
}
]
}
]
}
}
]
}
}
9 changes: 7 additions & 2 deletions examples/RazorPages/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@
}
},
"AllowedHosts": "*",
"FeatureManagement": {
"Home": true
"feature_management": {
"feature_flags": [
{
"id": "Home",
"enabled": true
}
]
}
}
Loading