11<!DOCTYPE html>
22< html lang ="en ">
33< head >
4- < meta charset ="UTF-8 "/>
4+ < meta charset ="UTF-8 " />
55 < title > Campaign Config Validator - NHS Digital</ title >
66 < script src ="https://cdn.jsdelivr.net/pyodide/v0.26.4/full/pyodide.js "> </ script >
77 < style >
@@ -216,18 +216,22 @@ <h3>Visualiser Output</h3>
216216 const jsonInput = document . getElementById ( "jsonfile" ) ;
217217 const runBtn = document . getElementById ( "run" ) ;
218218
219- function log ( text ) {
220- let cleanText = text . replace ( / & / g, "&" ) . replace ( / < / g, "<" ) . replace ( / > / g, ">" ) ;
221- // Handle ANSI Colors for Pydantic output
222- cleanText = cleanText
223- . replace ( / \x1b \[ 9 2 m / g, '<span class="ansi-green">' )
224- . replace ( / \x1b \[ 9 3 m / g, '<span class="ansi-yellow">' )
225- . replace ( / \x1b \[ 9 1 m / g, '<span class="ansi-red">' )
226- . replace ( / \x1b \[ 0 m / g, '</span>' ) ;
227-
228- output . innerHTML += cleanText + "\n" ;
229- output . scrollTop = output . scrollHeight ;
219+ function log ( text ) {
220+ let cleanText = text . replace ( / & / g, "&" ) . replace ( / < / g, "<" ) . replace ( / > / g, ">" ) ;
221+ // ANSI color replacements
222+ cleanText = cleanText
223+ . replace ( / \x1b \[ 9 2 m / g, '<span class="ansi-grey">' ) // validator/method green
224+ . replace ( / \x1b \[ 9 3 m / g, '<span class="ansi-yellow">' ) // general yellow
225+ . replace ( / \x1b \[ 3 4 m / g, '<span style="color:#005eb8;font-weight:bold">' ) // blue
226+ . replace ( / \x1b \[ 3 3 m / g, '<span class="ansi-yellow">' ) // colon yellow
227+ . replace ( / \x1b \[ 0 m / g, '</span>' ) ; // reset
228+
229+ if ( cleanText . includes ( "Valid Config" ) ) {
230+ cleanText = cleanText . replace ( / V a l i d C o n f i g / g, '<span style="font-size:2em;font-weight:bold;color:#007f3b">Valid Config</span>' ) ;
230231 }
232+ output . innerHTML += cleanText + "\n" ;
233+ output . scrollTop = output . scrollHeight ;
234+ }
231235
232236 function clearLog ( ) {
233237 output . innerHTML = "" ;
@@ -248,6 +252,8 @@ <h3>Visualiser Output</h3>
248252 "src/eligibility_signposting_api/model/campaign_config.py" ,
249253 "src/eligibility_signposting_api/config/__init__.py" ,
250254 "src/eligibility_signposting_api/config/constants.py" ,
255+ "src/rules_validation_api/decorators/__init__.py" ,
256+ "src/rules_validation_api/decorators/tracker.py" ,
251257 "src/rules_validation_api/__init__.py" ,
252258 "src/rules_validation_api/validators/__init__.py" ,
253259 "src/rules_validation_api/validators/rules_validator.py" ,
0 commit comments