Skip to content

Commit a2a9cd2

Browse files
Adding new Tiles to the Dashboard
1 parent 3e75778 commit a2a9cd2

File tree

1 file changed

+113
-7
lines changed

1 file changed

+113
-7
lines changed

samples/features/azure-arc/dashboard/SQL Server Instances.json

Lines changed: 113 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"position": {
6161
"x": 3,
6262
"y": 0,
63-
"colSpan": 7,
63+
"colSpan": 6,
6464
"rowSpan": 5
6565
},
6666
"metadata": {
@@ -111,7 +111,7 @@
111111
},
112112
"2": {
113113
"position": {
114-
"x": 10,
114+
"x": 9,
115115
"y": 0,
116116
"colSpan": 3,
117117
"rowSpan": 5
@@ -163,7 +163,7 @@
163163
},
164164
"3": {
165165
"position": {
166-
"x": 13,
166+
"x": 12,
167167
"y": 0,
168168
"colSpan": 7,
169169
"rowSpan": 5
@@ -218,7 +218,7 @@
218218
"position": {
219219
"x": 0,
220220
"y": 5,
221-
"colSpan": 20,
221+
"colSpan": 19,
222222
"rowSpan": 4
223223
},
224224
"metadata": {
@@ -323,7 +323,7 @@
323323
"position": {
324324
"x": 6,
325325
"y": 9,
326-
"colSpan": 8,
326+
"colSpan": 7,
327327
"rowSpan": 6
328328
},
329329
"metadata": {
@@ -374,7 +374,7 @@
374374
},
375375
"7": {
376376
"position": {
377-
"x": 14,
377+
"x": 13,
378378
"y": 9,
379379
"colSpan": 6,
380380
"rowSpan": 6
@@ -535,7 +535,7 @@
535535
"position": {
536536
"x": 12,
537537
"y": 15,
538-
"colSpan": 8,
538+
"colSpan": 7,
539539
"rowSpan": 6
540540
},
541541
"metadata": {
@@ -583,6 +583,112 @@
583583
"subtitle": ""
584584
}
585585
}
586+
},
587+
"11": {
588+
"position": {
589+
"x": 0,
590+
"y": 21,
591+
"colSpan": 6,
592+
"rowSpan": 5
593+
},
594+
"metadata": {
595+
"inputs": [
596+
{
597+
"name": "isShared",
598+
"isOptional": true
599+
},
600+
{
601+
"name": "queryId",
602+
"isOptional": true
603+
},
604+
{
605+
"name": "formatResults",
606+
"isOptional": true
607+
},
608+
{
609+
"name": "partTitle",
610+
"value": "Query 1",
611+
"isOptional": true
612+
},
613+
{
614+
"name": "query",
615+
"value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n| where name != \"tempdb\"\n| extend prop_db=parse_xml(properties) \n| extend prop_db_recoveryMode = prop_db.recoveryMode\n| extend prop_db_databaseCreationDate = todatetime(prop_db.databaseCreationDate)\n| extend prop_db_backupInformation = prop_db.backupInformation\n| extend prop_db_backupInformation_lastFullBackup = todatetime(prop_db.backupInformation.lastFullBackup)\n| extend calc_lastBackupAgeDays = iff(isnull(prop_db_backupInformation_lastFullBackup),\n datetime_diff('Day',now(),prop_db_databaseCreationDate),\n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup)\n )\n| extend Backup_1day = iif( calc_lastBackupAgeDays <=1 , 1 , 0)\n| extend Backup_7day = iif( calc_lastBackupAgeDays >1 and calc_lastBackupAgeDays <=7 , 1 , 0)\n| extend Backup_over7day = iif( calc_lastBackupAgeDays >7 , 1 , 0)\n| extend Backup_desc = case(\n isnull(prop_db_backupInformation_lastFullBackup), \"no backups at all\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 1, \"1 day\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 7, \"7 days\", \n datetime_diff('Day',now(),prop_db_backupInformation_lastFullBackup) <= 30, \"1 Month\", \n \"older than a month\")\n| project database_name = name, RecoveryModel = prop_db_recoveryMode, Last_Full_Backup = prop_db_backupInformation_lastFullBackup , Backup_Age_Days = calc_lastBackupAgeDays ,Backup_1day ,Backup_7day ,Backup_over7day, Backup_desc\n| summarize Count=count() by Backup_desc",
616+
"isOptional": true
617+
},
618+
{
619+
"name": "queryScope",
620+
"value": {
621+
"scope": 0,
622+
"values": []
623+
},
624+
"isOptional": true
625+
},
626+
{
627+
"name": "chartType",
628+
"value": 2,
629+
"isOptional": true
630+
}
631+
],
632+
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
633+
"settings": {},
634+
"partHeader": {
635+
"title": "SQL Server Backups Intervals",
636+
"subtitle": ""
637+
}
638+
}
639+
},
640+
"12": {
641+
"position": {
642+
"x": 6,
643+
"y": 21,
644+
"colSpan": 6,
645+
"rowSpan": 5
646+
},
647+
"metadata": {
648+
"inputs": [
649+
{
650+
"name": "isShared",
651+
"isOptional": true
652+
},
653+
{
654+
"name": "queryId",
655+
"isOptional": true
656+
},
657+
{
658+
"name": "formatResults",
659+
"isOptional": true
660+
},
661+
{
662+
"name": "partTitle",
663+
"value": "Query 1",
664+
"isOptional": true
665+
},
666+
{
667+
"name": "query",
668+
"value": "resources\n| where type == \"microsoft.azurearcdata/sqlserverinstances/databases\"\n| where name != \"tempdb\"\n| where name != \"model\"\n| where name != \"master\"\n| where name != \"msdb\"\n| extend prop_db=parse_xml(properties) \n| extend Recovery_Model = prop_db.recoveryMode\n| summarize Count = count() by tostring(Recovery_Model)",
669+
"isOptional": true
670+
},
671+
{
672+
"name": "chartType",
673+
"value": 2,
674+
"isOptional": true
675+
},
676+
{
677+
"name": "queryScope",
678+
"value": {
679+
"scope": 0,
680+
"values": []
681+
},
682+
"isOptional": true
683+
}
684+
],
685+
"type": "Extension/HubsExtension/PartType/ArgQueryChartTile",
686+
"settings": {},
687+
"partHeader": {
688+
"title": "SQL Server Recovery Mode",
689+
"subtitle": ""
690+
}
691+
}
586692
}
587693
}
588694
}

0 commit comments

Comments
 (0)