<commit_before>function(args) {
/*
is_app(true)
component_type("VB")
display_name("Kubernetes control")
description("This will return the Kubernetes control")
base_component_id("kubernetes_control")
load_once_from_file(true)
visibility("PRIVATE")
read_only(true)
properties(
    [
        {
            id:         "width",
            name:       "Width",
            default:    80,
            type:       "Number"
        }
        ,
        {
            id:         "height",
            name:       "Height",
            default:    80,
            type:       "Number"
        }
        ,
        {
            id:         "port",
            name:       "Port",
            default:    1234,
            type:       "Number"
        }
        ,
        {
            id:      "host",
            name:    "Kubernetes Admin Host",
            default: "http://kubernetes.com",
            type:    "String"
            ,
            help:       `<div><b>Kubernetes Master Host</b>
                              <br/>
                            This is the URL for the Kubernetes master server.
                         </div>`
        }
        ,
        {
            id:     "background_color",
            name:   "Background color",
            type:   "String"
        }
        ,
        {
            id:         "is_container",
            name:       "Is Container?",
            type:       "Boolean",
            default:    false,
            hidden:     true
        }
        ,
        {
            id:         "isKubernetesAvailable",
            name:       "Is Kubernetes Available?",
            type:       "Select",
            default:    "False",
            values:     [
                            {display: "True",   value: "True"},
                            {display: "False",  value: "False"}
                        ]
        }
        ,

        {
            id:         "has_details_ui",
            name:       "Has details UI?",
            type:       "Boolean",
            default:    true,
            hidden:     true
        }
        ,
        {
            id:      "k8sAuthenticationToken",
            name:    "K8s Authentication Token",
            default: "78643278346874236846873248",
            type:    "String"
            ,
            help:       `<div><b>Kubernetes Bearer token</b>
                              <br/>
                            From your command line, when logged in to your OpenShift account:<br />
                            APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
                            <br />
                            TOKEN=$(kubectl get secret $(kubectl get serviceaccount deployer -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode )
                         </div>`

        }
        ,
        {
            id:      "k8sProjectName",
            name:    "K8s Project",
            default: "",
            type:    "String"
        }
        ,<commit_msg>Updated doc for the Authentication token for k8s component<commit_after>function(args) {
/*
is_app(true)
component_type("VB")
display_name("Kubernetes control")
description("This will return the Kubernetes control")
base_component_id("kubernetes_control")
load_once_from_file(true)
visibility("PRIVATE")
read_only(true)
properties(
    [
        {
            id:         "width",
            name:       "Width",
            default:    80,
            type:       "Number"
        }
        ,
        {
            id:         "height",
            name:       "Height",
            default:    80,
            type:       "Number"
        }
        ,
        {
            id:         "port",
            name:       "Port",
            default:    1234,
            type:       "Number"
        }
        ,
        {
            id:      "host",
            name:    "Kubernetes Admin Host",
            default: "http://kubernetes.com",
            type:    "String"
            ,
            help:       `<div><b>Kubernetes Master Host</b>
                              <br/>
                            This is the URL for the Kubernetes master server.
                         </div>`
        }
        ,
        {
            id:     "background_color",
            name:   "Background color",
            type:   "String"
        }
        ,
        {
            id:         "is_container",
            name:       "Is Container?",
            type:       "Boolean",
            default:    false,
            hidden:     true
        }
        ,
        {
            id:         "isKubernetesAvailable",
            name:       "Is Kubernetes Available?",
            type:       "Select",
            default:    "False",
            values:     [
                            {display: "True",   value: "True"},
                            {display: "False",  value: "False"}
                        ]
        }
        ,

        {
            id:         "has_details_ui",
            name:       "Has details UI?",
            type:       "Boolean",
            default:    true,
            hidden:     true
        }
        ,
        {
            id:      "k8sAuthenticationToken",
            name:    "K8s Authentication Token",
            default: "78643278346874236846873248",
            type:    "String"
            ,
            help:       `<div><b>Kubernetes Bearer token</b>
                              <br/><br/>
                            From your command line, when logged in to your OpenShift/Kubernetes cluster:<br />
                            <div style="font-family: monospace; ">
                                <br />
                                APISERVER=$(kubectl config view --minify -o jsonpath='{.clusters[0].cluster.server}')
                                <br /><br />
                                TOKEN=$(kubectl get secret $(kubectl get serviceaccount deployer -o jsonpath='{.secrets[0].name}') -o jsonpath='{.data.token}' | base64 --decode )
                                <br /><br />
                                echo $TOKEN
                                <br /><br />
                            </div>
                            If the result is empty then you need to ask your system administrator for rights to do this.  Paste the token into
                            the "K8s Authentication Token" field. Note that on OpenShift you can replace "kubectl" with the "oc" command.
                         </div>`

        }
        ,
        {
            id:      "k8sProjectName",
            name:    "K8s Project",
            default: "",
            type:    "String"
        }
        ,
{'fraction_non_alphanumeric': 0.10302668853436708, 'fraction_numerical': 0.012822424332786641, 'mean_word_length': 0.9320276497695853, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7383187', 'n_tokens_mistral': 1771, 'n_tokens_neox': 1676, 'n_words': 397}