MDL-57791 insights: Templates examples

This commit is contained in:
David Monllao 2017-06-14 12:31:58 +02:00
parent 27ae9af4ba
commit acb14d08f6
4 changed files with 50 additions and 0 deletions

View File

@ -30,6 +30,20 @@
Example context (json):
{
"models": [
{
"target": "Prevent devs at risk",
"enabled": 1,
"indicators": [
"Indicator 1",
"Indicator 2",
"Indicator 3",
"Indicator 4"
],
"timesplitting": "Quarters",
"noinsights": "No insights available yet"
}
]
}
}}

View File

@ -30,6 +30,10 @@
Example context (json):
{
"samplelink": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"predictionstyle": "alert alert-success",
"predictiondisplayvalue": "This dev will understand it"
}
}}
<div class="card">

View File

@ -27,6 +27,25 @@
Context variables required for this template:
* none
Example context (json):
{
"samplelink": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"predictionstyle": "alert alert-success",
"predictiondisplayvalue": "This dev will success",
"calculations": [
{
"style": "alert alert-success",
"name": "Indicator 1",
"displayvalue": "yes"
}, {
"style": "alert alert-warning",
"name": "Indicator 2",
"displayvalue": "20%"
}
]
}
}}
<h2>{{#str}}prediction, report_insights{{/str}}</h2>

View File

@ -30,6 +30,19 @@
Example context (json):
{
"insights": [
{
"samplelink": "<a href=\"#\">Link</a>",
"sampledescription": "Sample description",
"predictionstyle": "alert alert-success",
"predictiondisplayvalue": "This dev will understand it"
}, {
"samplelink": "<a href=\"#\">Any renderable</a>",
"sampledescription": "Another sample description",
"predictionstyle": "alert alert-danger",
"predictiondisplayvalue": "This dev will not understand it"
}
]
}
}}