add card example
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Aaron Riedel 2023-03-13 12:43:59 +01:00
parent 4760c0a613
commit 81e60e628f
Signed by: aaron
GPG key ID: 643004654D40D577
2 changed files with 155 additions and 0 deletions

9
card.data.json Normal file
View file

@ -0,0 +1,9 @@
{
"Issues": {
"critical": 3,
"high": 2,
"medium": 0,
"low": 43
},
"path": "test/test"
}

146
card.json Normal file
View file

@ -0,0 +1,146 @@
{
"type": "AdaptiveCard",
"body": [
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"type": "Image",
"url": "https://raw.githubusercontent.com/ansible/logos/main/vscode-ansible.png",
"size": "Small"
}
],
"width": "auto"
},
{
"type": "Column",
"items": [
{
"type": "TextBlock",
"text": "ansible-lint",
"wrap": true,
"size": "Small",
"weight": "Bolder",
"isSubtle": false,
"spacing": "Small"
},
{
"type": "TextBlock",
"text": "Repo: ${$root.path}",
"wrap": true,
"size": "Small",
"weight": "Lighter",
"isSubtle": true,
"spacing": "Small"
}
],
"width": "stretch"
}
],
"style": "default"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"separator": true,
"width": "auto",
"items": [
{
"type": "TextBlock",
"size": "Large",
"$data": "${$root.Issues.critical}",
"text": "${formatNumber($root.Issues.critical, 0)}",
"wrap": true,
"horizontalAlignment": "Center",
"spacing": "None",
"color": "Attention"
},
{
"type": "TextBlock",
"size": "Small",
"text": "Critical Severity"
}
]
},
{
"type": "Column",
"width": "auto",
"separator": true,
"spacing": "Medium",
"items": [
{
"type": "TextBlock",
"size": "Large",
"$data": "${$root.Issues.high}",
"text": "${formatNumber($root.Issues.high, 0)}",
"wrap": true,
"horizontalAlignment": "Center",
"spacing": "None",
"color": "Warning"
},
{
"type": "TextBlock",
"size": "Small",
"text": "High Severity"
}
]
},
{
"type": "Column",
"width": "auto",
"separator": true,
"spacing": "Medium",
"items": [
{
"type": "TextBlock",
"size": "Large",
"$data": "${$root.Issues.medium}",
"text": "${formatNumber($root.Issues.medium, 0)}",
"wrap": true,
"horizontalAlignment": "Center",
"spacing": "None",
"color": "Accent"
},
{
"type": "TextBlock",
"size": "Small",
"text": "Medium Severity"
}
]
},
{
"type": "Column",
"width": "auto",
"separator": true,
"spacing": "Medium",
"items": [
{
"type": "TextBlock",
"size": "Large",
"$data": "${$root.Issues.low}",
"text": "${formatNumber($root.Issues.low, 0)}",
"wrap": true,
"horizontalAlignment": "Center",
"spacing": "None",
"color": "Good"
},
{
"type": "TextBlock",
"size": "Small",
"text": "Low Severity"
}
]
}
],
"style": "default",
"separator": true
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5"
}