Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Feature Added Percentage memory in widget #2335

Merged
merged 16 commits into from
Mar 19, 2024
Merged
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
327 changes: 175 additions & 152 deletions extensions/CoreWidgetProvider/Widgets/Templates/SystemMemoryTemplate.json
Original file line number Diff line number Diff line change
@@ -1,152 +1,175 @@
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"$when": "${errorMessage != null}",
"items": [
{
"type": "TextBlock",
"text": "${errorMessage}",
"wrap": true,
"size": "small"
}
],
"style": "warning"
},
{
"type": "Container",
"$when": "${errorMessage == null}",
"items": [
{
"type": "Image",
"url": "${memGraphUrl}",
"height": "${chartHeight}",
"width": "${chartWidth}",
"horizontalAlignment": "center"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/UsedMemory%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${usedMem}",
"type": "TextBlock",
"size": "large",
"weight": "bolder"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/AllMemory%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${allMem}",
"type": "TextBlock",
"size": "large",
"weight": "bolder",
"horizontalAlignment": "right"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/Committed%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${committedMem}/${committedLimitMem}",
"type": "TextBlock",
"size": "medium"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/Cached%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${cachedMem}",
"type": "TextBlock",
"size": "medium",
"horizontalAlignment": "right"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/PagedPool%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${pagedPoolMem}",
"type": "TextBlock",
"size": "medium"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/NonPagedPool%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${nonPagedPoolMem}",
"type": "TextBlock",
"size": "medium",
"horizontalAlignment": "right"
}
]
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5"
}
{
"type": "AdaptiveCard",
"body": [
{
"type": "Container",
"$when": "${errorMessage != null}",
"items": [
{
"type": "TextBlock",
"text": "${errorMessage}",
"wrap": true,
"size": "small"
}
],
"style": "warning"
},
{
"type": "Container",
"$when": "${errorMessage == null}",
"items": [
{
"type": "Image",
"url": "${memGraphUrl}",
"height": "${chartHeight}",
"width": "${chartWidth}",
"horizontalAlignment": "center"
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/UsedMemory%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${usedMem}",
"type": "TextBlock",
"size": "large",
"weight": "bolder"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/AllMemory%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${allMem}",
"type": "TextBlock",
"size": "large",
"weight": "bolder",
"horizontalAlignment": "right"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/Committed%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${committedMem}/${committedLimitMem}",
"type": "TextBlock",
"size": "medium"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/Cached%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${cachedMem}",
"type": "TextBlock",
"size": "medium",
"horizontalAlignment": "right"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/PagedPool%",
"type": "TextBlock",
"size": "small",
"isSubtle": true
},
{
"text": "${pagedPoolMem}",
"type": "TextBlock",
"size": "medium"
}
]
},
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/NonPagedPool%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${nonPagedPoolMem}",
"type": "TextBlock",
"size": "medium",
"horizontalAlignment": "right"
}
]
}
]
},
{
"type": "ColumnSet",
"columns": [
{
"type": "Column",
"items": [
{
"text": "%Memory_Widget_Template/MemoryUsage%",
"type": "TextBlock",
"size": "small",
"isSubtle": true,
"horizontalAlignment": "right"
},
{
"text": "${memUsage}",
"type": "TextBlock",
"size": "medium",
"horizontalAlignment": "right"
}
]
}
]
}
]
}
],
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"version": "1.5"
}