apiVersion: v1
kind: ConfigMap
metadata:
  name: kappnav.status-mapping.liberty-sa-app
  namespace: kappnav
data:
  algorithm: "function getStatus(status) { 

    var json= JSON.parse(status); 

    var statusText;
    if ( json.connection == 'ok' ) 
      statusText='Normal';
    else
      statusText='Problem';

    var statusFlyover = 'connection: ' + json.connection; 
    
    //var nlsJSON= [ 'status.flyover.openliberty', json.connection ]; 

    var statusJSON= { 'value': statusText, 'flyover': statusFlyover };

    return JSON.stringify(statusJSON); 
}"  