<commit_before>Ext.namespace("OpenNMS.ux");
OpenNMS.ux.ComboFilterBox = Ext.extend(Ext.form.ComboBox,{
	recordTag:"node",
	recordMap:[
			    {name:"name", mapping:"label"},
	],
	url:'rest/nodes',
    displayField:'title',
    typeAhead: false,
    loadingText: 'Searching...',
    width: "100%",
    pageSize:10,
    hideTrigger:false,
    itemSelector: 'div.o-dropdown',
    fieldClass:"o-dropdown",
   
    resultTpl:new Ext.XTemplate(
        '<tpl for="."><div class="o-dropdown">',
            '{name}',
        '</div></tpl>'
    ),
	
	initComponent:function(){
		var ds = new Ext.data.Store({
	        proxy: new Ext.data.HttpProxy({
	            url: this.url,
	            method:'GET'
	        }),
	        baseParams:{
	        	comparator:"contains"
	        },
	        reader: new Ext.data.XmlReader({ record:this.recordTag, totalRecords:"@totalCount" }, this.recordMap)
	    });
		
		Ext.apply(this, {
			store: ds,
			tpl: this.resultTpl	
		})
	    

		OpenNMS.ux.ComboFilterBox.superclass.initComponent.apply(this, arguments);
	}
	
});

Ext.reg('o-filtercombobox', OpenNMS.ux.ComboFilterBox);<commit_msg>now when there aren't any nodes the empty text for the combobox states that there aren't any nodes t be graphed<commit_after>Ext.namespace("OpenNMS.ux");
OpenNMS.ux.ComboFilterBox = Ext.extend(Ext.form.ComboBox,{
	recordTag:"node",
	recordMap:[
			    {name:"name", mapping:"label"},
	],
	url:'rest/nodes',
    displayField:'title',
    typeAhead: false,
    loadingText: 'Searching...',
    width: "100%",
    pageSize:10,
    hideTrigger:false,
    itemSelector: 'div.o-dropdown',
    fieldClass:"o-dropdown",
   
    resultTpl:new Ext.XTemplate(
        '<tpl for="."><div class="o-dropdown">',
            '{name}',
        '</div></tpl>'
    ),
	
	initComponent:function(){
		var ds = new Ext.data.Store({
	        proxy: new Ext.data.HttpProxy({
	            url: this.url,
	            method:'GET'
	        }),
	        baseParams:{
	        	comparator:"contains"
	        },
	        reader: new Ext.data.XmlReader({ record:this.recordTag, totalRecords:"@totalCount" }, this.recordMap),
	        listeners:{
	          	'load':{
					scope:this,
					fn:function(store, record, options){
	        			if(store.getTotalCount() == 0){
	        				this.emptyText = "-- No Nodes Available --";
	        			}else{
	        				this.emptyText = "-- Choose A Node --";
	        			}
					}
	          	}
	        }
	    });
		
		Ext.apply(this, {
			store: ds,
			tpl: this.resultTpl	
		})
	    

		OpenNMS.ux.ComboFilterBox.superclass.initComponent.apply(this, arguments);
	}
	
});

Ext.reg('o-filtercombobox', OpenNMS.ux.ComboFilterBox);
{'fraction_non_alphanumeric': 0.16103603603603603, 'fraction_numerical': 0.004129129129129129, 'mean_word_length': 2.3691529709228822, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '827382', 'n_tokens_mistral': 958, 'n_tokens_neox': 880, 'n_words': 146}