-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateUiDefinition.json
More file actions
127 lines (127 loc) · 8.79 KB
/
createUiDefinition.json
File metadata and controls
127 lines (127 loc) · 8.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
"$schema": "https://schema.management.azure.com/schemas/2021-09-09/uiFormDefinition.schema.json",
"view": {
"kind": "Form",
"properties": {
"title": "Arc SQL Single Pane of Glass Workbooks",
"steps": [
{
"name": "basics",
"label": "Basics",
"elements": [
{
"name": "resourceScope",
"type": "Microsoft.Common.ResourceScope"
},
{
"name": "updateDeployment",
"type": "Microsoft.Common.CheckBox",
"label": "Are you updating an existing deployment?",
"toolTip": "If you are updating an existing deployment please select this box."
}
],
"description": "Deploy the SQL Arc Single Pane of Glass Workbooks. If you are updating existing deployments please make sure you select the same subscription and resource group."
},
{
"name": "deploymentConfig",
"label": "Deployment Configuration",
"elements": [
{
"name": "newDeploymentSection",
"type": "Microsoft.Common.Section",
"label": "New Deployment",
"visible": "[equals(steps('basics').updateDeployment,false)]",
"elements": [
{
"name": "newDeployText",
"type": "Microsoft.Common.InfoBox",
"visible": true,
"options": {
"text": "Thank you for deploying the Arc Enabled SQL Workbooks. Since this is a new deployment no more information is needed! Push Next to Continue.",
"style": "None"
}
}
]
},
{
"name": "updateDeploymentSection",
"type": "Microsoft.Common.Section",
"label": "Updating Deployment",
"visible": "[equals(steps('basics').updateDeployment,true)]",
"elements": [
{
"name": "workbooksApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(steps('basics').resourceScope.subscription.id,'/resourceGroups/',steps('basics').resourceScope.resourceGroup.name,'/providers/Microsoft.Insights/workbooks?category=workbook&api-version=2021-08-01')]"
}
},
{
"name": "hiddenArcPaneOfGlassLoad",
"type": "Microsoft.Common.InfoBox",
"visible": false,
"options": {
"text": "[parse(concat('[\"',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'Arc SQL Single Pane of Glass'))).properties.displayName,' - ',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'Arc SQL Single Pane of Glass'))).name,'\"]'))]",
"style": "None"
}
},
{
"name": "errorWorkbooksNotFound",
"type": "Microsoft.Common.InfoBox",
"visible": "[less(length(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value), 2)]",
"options": {
"text": "[concat('No workbooks found in the current subscription and resource group. Please make sure the workbooks are deployed in the subscription: ', steps('basics').resourceScope.subscription.displayName, ' and resource group: ', steps('basics').resourceScope.resourceGroup.name, '.')]",
"style": "Error"
}
},
{
"name": "paneOfGlassDropDown",
"type": "Microsoft.Common.DropDown",
"label": "Current Single Pane of Glass Workbook",
"toolTip": "Your currently deployed version of the Single Pane of Glass Workbook, please select the correct deployment if the default is incorect.",
"defaultValue": "[parse(concat('[\"',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'Arc SQL Single Pane of Glass'))).properties.displayName,' - ',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'Arc SQL Single Pane of Glass'))).name,'\"]'))]",
"constraints": {
"allowedValues": "[map(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => parse(concat('{\"label\":\"',item.properties.displayName,' - ',item.name,'\",\"value\":\"',item.name,'\"}')))]",
"required": true
},
"visible": true
},
{
"name": "hiddenSqlLicenseLoad",
"type": "Microsoft.Common.InfoBox",
"visible": false,
"options": {
"text": "[parse(concat('[\"',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'SQL Licensing Summary'))).properties.displayName,' - ',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'SQL Licensing Summary'))).name,'\"]'))]",
"style": "None"
}
},
{
"name": "licenseSummaryDropDown",
"type": "Microsoft.Common.DropDown",
"label": "Current SQL Licensing Summary Workbook",
"toolTip": "Your currently deployed version of the SQL Licensing Summary Workbook, please select the correct deployment if the default is incorect.",
"defaultValue": "[parse(concat('[\"',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'SQL Licensing Summary'))).properties.displayName,' - ',first(filter(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => contains(item.properties.displayName,'SQL Licensing Summary'))).name,'\"]'))]",
"constraints": {
"allowedValues": "[map(steps('deploymentConfig').updateDeploymentSection.workbooksApi.value,(item) => parse(concat('{\"label\":\"',item.properties.displayName,' - ',item.name,'\",\"value\":\"',item.name,'\"}')))]",
"required": true
},
"visible": true
}
]
}
]
}
]
},
"outputs": {
"kind": "ResourceGroup",
"location": "[steps('basics').resourceScope.location.name]",
"resourceGroupId": "[steps('basics').resourceScope.resourceGroup.id]",
"parameters": {
"paneOfGlassGuid": "[if(equals(steps('basics').updateDeployment,true),steps('deploymentConfig').updateDeploymentSection.paneOfGlassDropDown,'newDeployment')]",
"licenseSummaryGuid": "[if(equals(steps('basics').updateDeployment,true),steps('deploymentConfig').updateDeploymentSection.licenseSummaryDropDown,'newDeployment')]"
}
}
}
}