<commit_before>YUI.add('ss-event-log-widget', function(Y, NAME) {

	var EventLogEntry = Y.Base.create(
		'ss-event-log-entry',
		Y.Base,
		[],
		{
			_progressBar: null,
			
			_logTypeToClassname: function(type) {
				var classname;
				
				switch (type) {
					case 'error':
					case 'warning':
						classname = type;
						break;
					default:
						classname = 'info'; 
				}
				
				return 'log-' + classname;
			},
			
			_uiSetProgress: function() {
				var progress = this.get('progress');
				
				if (progress) {
					if (!this._progressBar) {
						if (progress.total > 0) {
							this._progressBar = new Y.SherlockPhotography.ProgressBar(progress);
							this._progressBar.render(this.get('element'));
						}
					} else {
						this._progressBar.set('total', progress.total);
						this._progressBar.set('completed', progress.completed);
					}
				}
			},
			
			_uiSetMessage: function() {
				this.get('element').one('> .message').set('text', this.get('message'));
			},
			
			render: function() {
				element = Y.Node.create('<li class="' + (this.get('type') == 'error' ? 'alert-danger' : '') + '"><span class="message"></span></li>');

				this.set('element', element);

				this._uiSetMessage();
				this._uiSetProgress();
				
				return element;
			},
									
			initializer: function(cfg) {
				var self = this;
				
				this.after({
					progressChange: function(e) {
						self._uiSetProgress();
					},
					messageChange: function(e) {
						self._uiSetMessage();
					},					
					elementChange: function(e) {
						if (e.prevVal) {
							e.prevVal.replace(e.newVal);
						}
					}
				});
				
				this.render();
			}
		},
		{
			ATTRS: {
				element : {
					value: null
				},
				type: {},
				message: {},
				progress: {
					value: null
				}
			}
		}
	);
	
	var EventLogWidget = Y.Base.create(
		NAME, 
		Y.Widget, 
		[], 
		{
			_list: null,
			
			renderUI: function() {
				var contentBox = this.get("contentBox");
				
				this._list = Y.Node.create('<ul class="list-unstyled"></ul>');
				
				contentBox.append(this._list);<commit_msg>Add ability to remove progressbar<commit_after>YUI.add('ss-event-log-widget', function(Y, NAME) {

	var EventLogEntry = Y.Base.create(
		'ss-event-log-entry',
		Y.Base,
		[],
		{
			_progressBar: null,
			
			_logTypeToClassname: function(type) {
				var classname;
				
				switch (type) {
					case 'error':
					case 'warning':
						classname = type;
						break;
					default:
						classname = 'info'; 
				}
				
				return 'log-' + classname;
			},
			
			_uiSetProgress: function() {
				var progress = this.get('progress');
				
				if (progress) {
					if (!this._progressBar) {
						if (progress.total > 0) {
							this._progressBar = new Y.SherlockPhotography.ProgressBar(progress);
							this._progressBar.render(this.get('element'));
						}
					} else {
						this._progressBar.set('total', progress.total);
						this._progressBar.set('completed', progress.completed);
					}
				} else if (this._progressBar) {
					this._progressBar.destroy(true);
					this._progressBar = null;
				}
			},
			
			_uiSetMessage: function() {
				this.get('element').one('> .message').set('text', this.get('message'));
			},
			
			render: function() {
				element = Y.Node.create('<li class="' + (this.get('type') == 'error' ? 'alert-danger' : '') + '"><span class="message"></span></li>');

				this.set('element', element);

				this._uiSetMessage();
				this._uiSetProgress();
				
				return element;
			},
									
			initializer: function(cfg) {
				var self = this;
				
				this.after({
					progressChange: function(e) {
						self._uiSetProgress();
					},
					messageChange: function(e) {
						self._uiSetMessage();
					},					
					elementChange: function(e) {
						if (e.prevVal) {
							e.prevVal.replace(e.newVal);
						}
					}
				});
				
				this.render();
			}
		},
		{
			ATTRS: {
				element : {
					value: null
				},
				type: {},
				message: {},
				
				progress: {
					value: null
				}
			}
		}
	);
	
	var EventLogWidget = Y.Base.create(
		NAME, 
		Y.Widget, 
		[], 
		{
			_list: null,
			
			renderUI: function() {
				var contentBox = this.get("contentBox");
				
				this._list = Y.Node.create('<ul class="list-unstyled"></ul>');
				
				contentBox.append(this._list);
{'fraction_non_alphanumeric': 0.1669763121226196, 'fraction_numerical': 0.00046446818392940084, 'mean_word_length': 2.2069992553983617, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 19, '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': '2645805', 'n_tokens_mistral': 2078, 'n_tokens_neox': 1416, 'n_words': 237}