<commit_before>log.info('Start of scriptqq!');
asset.manager = function(ctx) {
    return {
        create: function(options) {
            this._super.create(options);
            log.info('Create called!');
        },
        search: function(query, paging) {
            return this._super.search.call(this, query, paging);
        }
    };
};
asset.server = function(ctx) {
    var type = ctx.type;
    return {
        onUserLoggedIn: function() {},
        endpoints: {
            apis: [{
                url: 'asset',
                path: 'asset.jag'
            }, {
                url: 'assets',
                path: 'assets.jag'
            }],
            pages: [{
                title: 'Asset: ' + type,
                url: 'asset',
                path: 'asset.jag'
            }, {
                title: 'Assets ' + type,
                url: 'assets',
                path: 'assets.jag'
            }, {
                title: 'Create ' + type,
                url: 'create',
                path: 'create.jag'
            }, {
                title: 'Update ' + type,
                url: 'update',
                path: 'update.jag'
            }, {
                title: 'Details ' + type,
                url: 'details',
                path: 'details.jag'
            }, {
                title: 'List ' + type,
                url: 'list',
                path: 'list.jag'
            }, {
                title: 'Lifecycle',
                url: 'lifecycle',
                path: 'lifecycle.jag'
            }]
        }
    };
};
asset.configure = function() {
    return {
        table: {
            overview: {
                fields: {
                    name: {
                        name: {
                            name: 'name',
                            label: 'Name'
                        },
                        required: false,
                        validation: function() {}
                    },
                    version: {
                        name: {
                            label: 'Super Version'
                        }
                    }
                }
            }
        },
        meta: {
            lifecycle: {
                name: 'SimpleLifecycle',
                commentRequired: true
            },
            ui: {
                icon: 'icon-cog'
            }
        }
    };
};
asset.renderer = function(ctx) {
    var buildListLeftNav = function(page, util) {
        var log = new Log();
        return [{
            name: 'Add ',
            iconClass: 'icon-plus-sign-alt',
            url: util.buildUrl('create')
        }, {
            name: 'Statistics',
            iconClass: 'icon-dashboard',
            url: util.buildUrl('stats')
        }];
    };
    var buildDefaultLeftNav = function(page, util) {
        return [{
            name: 'Overview',
            iconClass: 'icon-list-alt',
            url: util.buildUrl('details')
        }, {
            name: 'Edit',
            iconClass: 'icon-edit',
            url: util.buildUrl('update')
        }, {
            name: 'Life Cycle',
            iconClass: 'icon-retweet',
            url: util.buildUrl('lifecycle')
        }];
    };
    var isActivatedAsset = function(assetType) {
        var activatedAssets = ctx.tenantConfigs.assets;
        return true;
        if (!activatedAssets) {
            throw 'Unable to load all activated assets for current tenant: ' + ctx.tenatId + '.Make sure that the assets property is present in the tenant config';
        }
        for (var index in activatedAssets) {
            if (activatedAssets[index] == assetType) {
                return true;
            }
        }
        return false;
    };
    return {
        create: function(page) {},
        update: function(page) {},
        list: function(page) {},
        details: function(page) {
            
        },
        lifecycle: function(page) {},
        leftNav: function(page) {
            switch (page.meta.pageName) {
                case 'list':
                    page.leftNav = buildListLeftNav(page, this);
                    break;
                default:<commit_msg>Leftnav links are rendered with asset id<commit_after>log.info('Start of scriptqq!');
asset.manager = function(ctx) {
    return {
        create: function(options) {
            this._super.create(options);
            log.info('Create called!');
        },
        search: function(query, paging) {
            return this._super.search.call(this, query, paging);
        }
    };
};
asset.server = function(ctx) {
    var type = ctx.type;
    return {
        onUserLoggedIn: function() {},
        endpoints: {
            apis: [{
                url: 'asset',
                path: 'asset.jag'
            }, {
                url: 'assets',
                path: 'assets.jag'
            }],
            pages: [{
                title: 'Asset: ' + type,
                url: 'asset',
                path: 'asset.jag'
            }, {
                title: 'Assets ' + type,
                url: 'assets',
                path: 'assets.jag'
            }, {
                title: 'Create ' + type,
                url: 'create',
                path: 'create.jag'
            }, {
                title: 'Update ' + type,
                url: 'update',
                path: 'update.jag'
            }, {
                title: 'Details ' + type,
                url: 'details',
                path: 'details.jag'
            }, {
                title: 'List ' + type,
                url: 'list',
                path: 'list.jag'
            }, {
                title: 'Lifecycle',
                url: 'lifecycle',
                path: 'lifecycle.jag'
            }]
        }
    };
};
asset.configure = function() {
    return {
        table: {
            overview: {
                fields: {
                    name: {
                        name: {
                            name: 'name',
                            label: 'Name'
                        },
                        required: false,
                        validation: function() {}
                    },
                    version: {
                        name: {
                            label: 'Super Version'
                        }
                    }
                }
            }
        },
        meta: {
            lifecycle: {
                name: 'SimpleLifecycle',
                commentRequired: true
            },
            ui: {
                icon: 'icon-cog'
            }
        }
    };
};
asset.renderer = function(ctx) {
    var buildListLeftNav = function(page, util) {
        var log = new Log();
        return [{
            name: 'Add ',
            iconClass: 'icon-plus-sign-alt',
            url: util.buildUrl('create')
        }, {
            name: 'Statistics',
            iconClass: 'icon-dashboard',
            url: util.buildUrl('stats')
        }];
    };
    var buildDefaultLeftNav = function(page, util) {
        var id=page.assets.id;
        return [{
            name: 'Overview',
            iconClass: 'icon-list-alt',
            url: util.buildUrl('details')+'/'+id
        }, {
            name: 'Edit',
            iconClass: 'icon-edit',
            url: util.buildUrl('update')+'/'+id
        }, {
            name: 'Life Cycle',
            iconClass: 'icon-retweet',
            url: util.buildUrl('lifecycle')+'/'+id
        }];
    };
    var isActivatedAsset = function(assetType) {
        var activatedAssets = ctx.tenantConfigs.assets;
        return true;
        if (!activatedAssets) {
            throw 'Unable to load all activated assets for current tenant: ' + ctx.tenatId + '.Make sure that the assets property is present in the tenant config';
        }
        for (var index in activatedAssets) {
            if (activatedAssets[index] == assetType) {
                return true;
            }
        }
        return false;
    };
    return {
        create: function(page) {},
        update: function(page) {},
        list: function(page) {},
        details: function(page) {
            
        },
        lifecycle: function(page) {},
        leftNav: function(page) {
            switch (page.meta.pageName) {
                case 'list':
                    page.leftNav = buildListLeftNav(page, this);
                    break;
                default:
{'fraction_non_alphanumeric': 0.11941183445986008, 'fraction_numerical': 0.0, 'mean_word_length': 1.03131021194605, 'pattern_counts': {'":': 0, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '977695', 'n_tokens_mistral': 2227, 'n_tokens_neox': 2130, 'n_words': 465}