{"size": 1646, "ext": "js", "max_stars_repo_path": "app/appserver/static/components/menucellrenderer.js", "max_stars_repo_name": "splunk/deep-learning-toolkit", "max_stars_repo_stars_event_min_datetime": "2020-10-13T05:27:59.000Z", "max_stars_repo_stars_event_max_datetime": "2021-09-23T02:56:32.000Z", "max_issues_repo_path": "app/appserver/static/components/menucellrenderer.js", "max_issues_repo_name": "splunk/deep-learning-toolkit", "max_issues_repo_issues_event_min_datetime": "2020-10-15T09:53:36.000Z", "max_issues_repo_issues_event_max_datetime": "2021-07-05T15:33:24.000Z", "max_forks_repo_path": "app/appserver/static/components/menucellrenderer.js", "max_forks_repo_name": "splunk/deep-learning-toolkit", "max_forks_repo_forks_event_min_datetime": "2020-12-04T08:51:35.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-27T09:42:20.000Z"}
{"max_stars_count": 11, "max_issues_count": 48, "max_forks_count": 4, "avg_line_length": 38.2790697674, "max_line_length": 326, "alphanum_fraction": 0.5388821385}
define([
    "underscore",
     './basecellrenderer'
], function(_,BaseCellRenderer){   
    var MenuCellRenderer = BaseCellRenderer.extend({
        initialize: function(options) {
            BaseCellRenderer.prototype.initialize.apply(this, arguments);
            this.options = options;
        },
        canRender: function(cellData) {
            return cellData.field.toLowerCase() === '...';
        },
        setup: function($td, cellData) {
            //$td.addClass("ConditionalExtras");
        },
        teardown: function($td, cellData) {
            //$td.removeClass("ConditionalExtras");
        },
        filterStats:function(data){
            if (!data || data == "undefined")
                return 'empty';

            var status = JSON.stringify(data);
            if (status.indexOf("deployed")>-1){
                return 'deployed';
            }
            if (status.indexOf("error")>-1){
                return 'error';
            }
            if (typeof(data)!='object')
                return data;

            return data[0];
        },
        render: function($td, cellData) {
            $td.attr("width","10");
            $td.append(_.template(this.templateMenuContainer)(this._targetModel(arguments,cellData)));
        },
        templateMenuContainer : '<div class="menu-container"><i class="caret menu-click" data-type="<%-type%>" data-entityname="<%-entityname%>" data-method="<%-method%>" data-environment="<%-environment%>" data-status="<%-status%>" data-runtime="<%-runtime%>" data-connector="<%-connector%>" data-url="<%-url%>" ></i></div>',
      
    });
    return MenuCellRenderer;
});