<commit_before>
var wfStore = Ext.create('Ext.data.ArrayStore', {
    fields: [
       {name: 'name'},
       {name: 'status'},
       {name: 'date', type: 'date', dateFormat: 'Y-m-d'},
       {name: 'date2'}
    ],
    sortOnLoad: true, 
    sorters: { property: 'date2', direction : 'DESC' },
    //data: wfList
    proxy: {
	         type: 'ajax',
	          url: getWorkflowListURL,
	          reader: {
		             root: 'list'
		          }
	},
	autoLoad: true
});

wfStore.load(function() {
		console.log(arguments);
});

var wfGrid = Ext.create('Ext.grid.Panel', {
    store: wfStore,
    id: 'wfGrid',
    columns: [
        {
            text     : 'Name',
            flex     : 1,
            sortable : true,
            dataIndex: 'name'
        },
        {
            text     : 'Status',
            width    : 75,
            sortable : true,
            renderer : statusRenderer,
            dataIndex: 'status'
        },
        {
            text     : 'Date',
            width    : 90,
            sortable : true,
            renderer : Ext.util.Format.dateRenderer('d - m - Y'),
            dataIndex: 'date'
        },
        {
            xtype: 'actioncolumn',
            width: 50,
            items: [
            {
                icon   : localResourcesPath+'/img/download-icon.png', 
                tooltip: 'Download results',
                handler: function(grid, rowIndex, colIndex) {
                    var rec = wfStore.getAt(rowIndex);
                    alert("Download results " + rec.get('name'));
                }
            },
            {
                icon   : localResourcesPath+'/img/delete-icon.png',
                tooltip: 'Delete instance',
                handler: function(grid, rowIndex, colIndex) {
                    var rec = wfStore.getAt(rowIndex);
                    Ext.Msg.confirm('Alert!', 'Are you sure that you want to delete the workflow '+rec.get('name')+"?", 
      	                  function(btn) {
      	                  	if(btn === 'yes')
      	                  	{	
	      	                  	Ext.Ajax.request({
	      	      	    			url: deleteWorkflowURL,
	      	      	    			params: {
	      	      	    				"workflowId": rec.get('name')
	      	      	    			},
	      	      	    			success: function(response){
	      	      	    				wfStore.load();
	      	      	    			},
	      	      	    			failure: function(response) {
	      	      	    				Ext.Msg.alert("Error", "Delete failed!");
	      	      	                }
	      	                    });
      	                  	}
      	            });
                }
            }
            ]
        }
    ]
});<commit_msg>minor<commit_after>
var wfStore = Ext.create('Ext.data.ArrayStore', {
    fields: [
       {name: 'name'},
       {name: 'status'},
       {name: 'date', type: 'date', dateFormat: 'Y-m-d'},
       {name: 'date2'}
    ],
    sortOnLoad: true, 
    sorters: { property: 'date2', direction : 'DESC' },
    //data: wfList
    proxy: {
	         type: 'ajax',
	          url: getWorkflowListURL,
	          reader: {
		             root: 'list'
		          }
	},
	autoLoad: true
});

wfStore.load(function() {
		console.log(arguments);
});

var wfGrid = Ext.create('Ext.grid.Panel', {
    store: wfStore,
    id: 'wfGrid',
    columns: [
        {
            text     : 'Name',
            flex     : 1,
            sortable : true,
            dataIndex: 'name'
        },
        {
            text     : 'Status',
            width    : 75,
            sortable : true,
            renderer : statusRenderer,
            dataIndex: 'status'
        },
        {
            text     : 'Date',
            width    : 90,
            sortable : true,
            renderer : Ext.util.Format.dateRenderer('d - m - Y'),
            dataIndex: 'date'
        },
        {
            xtype: 'actioncolumn',
            width: 50,
            items: [
            {
                icon   : localResourcesPath+'/img/download-icon.png', 
                tooltip: 'Download results',
                handler: function(grid, rowIndex, colIndex) {
                    var rec = wfStore.getAt(rowIndex);
                    alert("Download results " + rec.get('name'));
                }
            },
            {
                icon   : localResourcesPath+'/img/delete-icon.png',
                tooltip: 'Delete instance',
                handler: function(grid, rowIndex, colIndex) {
                    var rec = wfStore.getAt(rowIndex);
                    Ext.Msg.confirm('Warning', 'Are you sure that you want to delete '+rec.get('name')+"?", 
      	                  function(btn) {
      	                  	if(btn === 'yes')
      	                  	{	
	      	                  	Ext.Ajax.request({
	      	      	    			url: deleteWorkflowURL,
	      	      	    			params: {
	      	      	    				"workflowId": rec.get('name')
	      	      	    			},
	      	      	    			success: function(response){
	      	      	    				wfStore.load();
	      	      	    			},
	      	      	    			failure: function(response) {
	      	      	    				Ext.Msg.alert("Error", "Delete failed!");
	      	      	                }
	      	                    });
      	                  	}
      	            });
                }
            }
            ]
        }
    ]
});
{'fraction_non_alphanumeric': 0.12364789257739649, 'fraction_numerical': 0.0033569563595673255, 'mean_word_length': 0.9899814471243042, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6821101', 'n_tokens_mistral': 1648, 'n_tokens_neox': 1509, 'n_words': 272}