<commit_before>function(args) {
/*
is_app(true)
component_type("VB")
display_name("Red Hat AMQ control")
description("This will return the AMQ control")
base_component_id("rhdm_control")
load_once_from_file(true)
visibility("PRIVATE")
read_only(true)
properties(
    [
        {
            id:         "width",
            name:       "Width",
            default:    200,
            type:       "Number"
        }
        ,
        {
            id:         "height",
            name:       "Height",
            default:    200,
            type:       "Number"
        }
        ,
        {
            id:         "port",
            name:       "Port",
            default:    61613,
            type:       "Number"
        }
        ,
        {
            id:      "host",
            name:    "Host",
            default: "localhost",
            type:    "String"
        }
        ,
        {
            id:     "background_color",
            name:   "Background color",
            type:   "String"
        }
        ,



        {
            id:      "destination",
            name:    "Destination",
            type:    "String",
            default: "/queue/test"
        }
        ,


        {
            id:      "username",
            name:    "Username",
            type:    "String",
            default: "admin"
        }
        ,
        {
            id:     "password",
            name:   "Password",
            password: <PASSWORD>,
            type:   "String",
            default: "admin"
        }

        ,
        {
            id:         "testAMQ",
            name:       "test AMQ()",
            type:       "Action",
            pre_snippet:    `await `,
            snippet:    `testAMQ()`
        }


    ]
)//properties

logo_url("/driver_icons/rhdm.png")
*/

    Vue.component("rhdm_control",{

        props: ["meta", "args","design_mode","refresh", "children"]

        ,



        template:

`<div v-bind:style='"height:100%;width:100%; border: 0px;" +
    "background-color: "+    args["background_color"]  +  ";"'>

    <div v-if="design_mode && (children.length == 0)" style="margin: 10px;">
        <img src="/driver_icons/rhdm.png" width=100px></src>
        <h3 class="text-center" >Red Hat Decision Manager</h3>
        The Red Hat Decision Manager can be used to call Decision Manager  Business rules
    </div>

    <div v-bind:style='"position:relative;width:100%;height:100%;border: 0px solid gray;background-color: "+    args["background_color"]  +  ";"'>
        <div style="position:absolute;top:0px">
            <slot v-bind:refresh='refresh'>
            </slot>
        </div>
    </div>
</div>`

        ,

        data: function() {
            return {
                msg: "..."
            }
        }

        ,

        mounted: async function() {
            registerComponent(this)

            if (!this.design_mode) {

            }
        }
        ,


        methods: {

            testAMQ: async function() {
                var mm = this
                var result = await callFunction(
                    {
                        driver_name: "activemq_service",
                        method_name: "activemq_service"
                    }
                    ,
                    {
                        host: mm.args.host
                        ,
                        //brokers: mm.args.brokers
                        port: mm.args.port
                        ,
                        destination: mm.args.destination
                        ,
                        username: mm.args.username<commit_msg>Updated RH Decision Manager component<commit_after>function(args) {
/*
is_app(true)
component_type("VB")
display_name("Red Hat Decision Manager control")
description("This will return the Decision Manager control")
base_component_id("rhdm_control")
load_once_from_file(true)
visibility("PRIVATE")
read_only(true)
properties(
    [
        {
            id:         "width",
            name:       "Width",
            default:    200,
            type:       "Number"
        }
        ,
        {
            id:         "height",
            name:       "Height",
            default:    200,
            type:       "Number"
        }
        ,
        {
            id:         "port",
            name:       "Port",
            default:    61613,
            type:       "Number"
        }
        ,
        {
            id:      "host",
            name:    "Host",
            default: "localhost",
            type:    "String"
        }
        ,
        {
            id:     "background_color",
            name:   "Background color",
            type:   "String"
        }
        ,





        {
            id:      "username",
            name:    "Username",
            type:    "String",
            default: "admin"
        }
        ,
        {
            id:     "password",
            name:   "Password",
            password: <PASSWORD>,
            type:   "String",
            default: "admin"
        }

        ,
        {
            id:         "testDecisionManager",
            name:       "testDecisionManager()",
            type:       "Action",
            pre_snippet:    `await `,
            snippet:    `testDecisionManager()`
        }


    ]
)//properties

logo_url("/driver_icons/rhdm.png")
*/

    Vue.component("rhdm_control",{

        props: ["meta", "args","design_mode","refresh", "children"]

        ,



        template:

`<div v-bind:style='"height:100%;width:100%; border: 0px;" +
    "background-color: "+    args["background_color"]  +  ";"'>

    <div v-if="design_mode && (children.length == 0)" style="margin: 10px;">
        <img src="/driver_icons/rhdm.png" width=100px></src>
        <h3 class="text-center" >Red Hat Decision Manager</h3>
        The Red Hat Decision Manager can be used to call Decision Manager  Business rules
    </div>

    <div v-bind:style='"position:relative;width:100%;height:100%;border: 0px solid gray;background-color: "+    args["background_color"]  +  ";"'>
        <div style="position:absolute;top:0px">
            <slot v-bind:refresh='refresh'>
            </slot>
        </div>
    </div>
</div>`

        ,

        data: function() {
            return {
                msg: "..."
            }
        }

        ,

        mounted: async function() {
            registerComponent(this)

            if (!this.design_mode) {

            }
        }
        ,


        methods: {

            testDecisionManager: async function() {
                var mm = this
                var result = await callFunction(
                    {
                        driver_name: "rh_dm_service",
                        method_name: "rh_dm_service"
                    }
                    ,
                    {
                        host: mm.args.host
                        ,
                        //brokers: mm.args.brokers
                        port: mm.args.port
                        ,
                        username: mm.args.username
{'fraction_non_alphanumeric': 0.12093811811246115, 'fraction_numerical': 0.009607233681831025, 'mean_word_length': 1.104965804341362, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2259519', 'n_tokens_mistral': 2027, 'n_tokens_neox': 1878, 'n_words': 368}