Locate the Macro Library
- Navigate to Project Administration → Wiki Pages
- Open the Global Pages folder (not space-specific)
- Find
nextedy_solutions.vm — this is the shared macro library
- Click Edit to open the Velocity editor
The nextedy_solutions.vm file is imported by all space dashboards and role dashboards. Changes affect the entire solution. Test modifications on a development project first.
Common Macro Customizations
Modify KPI Card Styling
The #nxKpiCard macro renders statistics cards on dashboards. To change colors or layout:
#macro(nxKpiCard $title $value $color)
<div class="nx-kpi-card" style="border-left: 4px solid $color;">
<div class="nx-kpi-value" style="color: $color;">$value</div>
<div class="nx-kpi-title">$title</div>
</div>
#end
Customization example: Change border thickness to 6px, add background gradient:
#macro(nxKpiCard $title $value $color)
<div class="nx-kpi-card" style="border-left: 6px solid $color; background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);">
<div class="nx-kpi-value" style="color: $color; font-weight: 700;">$value</div>
<div class="nx-kpi-title" style="text-transform: uppercase; letter-spacing: 0.5px;">$title</div>
</div>
#end
Adjust Coverage Bar Thresholds
The #nxCoverageBar macro displays traceability coverage with color-coded thresholds. Default logic:
#macro(nxCoverageBar $percentage)
#if($percentage >= 80)
#set($barColor = "#4caf50") ## Green
#elseif($percentage >= 50)
#set($barColor = "#ff9800") ## Orange
#else
#set($barColor = "#f44336") ## Red
#end
## ... render logic
#end
Customization example: Stricter thresholds (90% green, 70% orange):
#macro(nxCoverageBar $percentage)
#if($percentage >= 90)
#set($barColor = "#4caf50")
#elseif($percentage >= 70)
#set($barColor = "#ff9800")
#else
#set($barColor = "#f44336")
#end
## ... render logic
#end
Add Custom Icons to Link Cards
The #nxLinkCard macro renders navigation cards. To add Font Awesome or Material Design icons:
#macro(nxLinkCard $title $description $url $iconClass)
<div class="nx-link-card">
<i class="$iconClass nx-card-icon"></i>
<h3>$title</h3>
<p>$description</p>
<a href="$url" target="_top">View →</a>
</div>
#end
Usage in dashboard page:
#nxLinkCard("HARA Report" "ISO 26262 Hazard Analysis" "/polarion/#/project/TestAuto2/wiki/HARA" "material-icons md-warning")
Customize Risk Matrix Colors
The #nxRiskMatrix macro renders ASIL or Action Priority heat maps. To change ASIL color scheme:
#macro(getAsilColor $asil)
#if($asil == "QM")
#set($color = "#9e9e9e")
#elseif($asil == "A")
#set($color = "#ffeb3b")
#elseif($asil == "B")
#set($color = "#ff9800")
#elseif($asil == "C")
#set($color = "#ff5722")
#elseif($asil == "D")
#set($color = "#c62828")
#end
$color
#end
A customer wanted darker ASIL D cells for better print contrast. Changed #c62828 (red 800) to #b71c1c (red 900) and added color: #ffffff; font-weight: bold; to text styling for cells with ASIL D.
Testing Your Changes
- Save the
nextedy_solutions.vm file
- Open any dashboard that uses the modified macro (e.g., Home Dashboard, Requirements Space)
- Hard refresh your browser:
Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac)
- Verify the visual changes appear correctly
Polarion caches Velocity scripts aggressively. If changes don’t appear after refresh, restart the Polarion server or append ?_=${.now?long} to the page URL to force cache bypass.
Common Macro Reference
| Macro | Purpose | Parameters |
|---|
#nxInit() | Initialize Nextedy context | None |
#nxCommonStyles() | Inject base CSS | None |
#nxSpaceBanner($level $title $desc $color1 $color2) | Space header | Level (1-3), title, description, primary color, secondary color |
#nxKpiCard($title $value $color) | KPI statistic card | Title, numeric value, accent color |
#nxStatCount($wiType) | Count work items | Work item type ID |
#nxDocCountInSpace($spaceName) | Count documents | Space name |
#nxLinkCoverage($fromType $linkRole $toType) | Traceability % | Source type, link role, target type |
#nxSectionHeader($title) | Section divider | Section title |
#nxSpaceFooter() | Space page footer | None |
ASCII Art: Macro Evaluation Flow
Dashboard Page (.xml)
|
v
#import('nextedy_solutions.vm') <-- Shared Library
|
v
#nxInit() <-- Initialize variables, context
|
v
#nxKpiCard("Hazards" 18 "#c62828") <-- Macro Call
| (parameters)
v
+-----------------------------------+
| Macro Definition in Library |
| #macro(nxKpiCard $title $value ..)|
| <div class="nx-kpi-card"> | <-- HTML/CSS Generation
| $value | <-- Variable Substitution
| </div> |
+-----------------------------------+
|
v
Rendered HTML Sent to Browser
Verification
After customizing macros, you should see:
- KPI cards reflect your new styling (border, colors, fonts)
- Coverage bars use updated thresholds for color transitions
- Link cards display custom icons if you added icon parameters
- Risk matrices show modified ASIL/Action Priority color schemes
All dashboards importing nextedy_solutions.vm will inherit the changes immediately after cache refresh.
See Also