How to use knights-templar - 10 common examples

To help you get started, we’ve selected a few knights-templar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / apex-malhar / front / js / app / lib / widgets / OpActionWidget / OpActionWidget.js View on Github external
},
    
    stopRecording: function(evt) {
        this.$('.stopRecording').prop('disabled', true);
        var operator = this.model;
        var operatorId = operator.get('id');
        var appId = operator.get('appId');
        
        // Get the recording
        this.dataSource.stopOpRecording({
            appId: appId, 
            operatorId: operatorId
        });
    },
    
    template: kt.make(__dirname+'/OpActionWidget.html','_')
});
exports = module.exports = OpActionWidget;
github apache / apex-malhar / front / js / app / lib / widgets / ConfigWelcomeWidget / ConfigWelcomeWidget.js View on Github external
}

        var step = $target.data('action');
        if (step) {
            //this.steps.setActive(step);
            this.go(step);
        }
    },
    
    // base markup for the wizard
    template: kt.make(__dirname+'/ConfigWelcomeWidget.html','_'),

    navStates: {
        WelcomeView: {
            view: WelcomeView,
            template: kt.make(__dirname+'/WelcomeView.html'),
            indicator: 'welcome'
        },
        LicenseInfoView: {
            view: LicenseInfoView,
            template: kt.make(__dirname+'/LicenseInfoView.html'),
            indicator: 'license'
        },
        // LicenseRegisterView: {
        //     view: LicenseRegisterView,
        //     template: kt.make(__dirname+'/LicenseRegisterView.html'),
        //     indicator: 'license'
        // },
        LicenseUploadView: {
            view: LicenseUploadView,
            template: kt.make(__dirname+'/LicenseUploadView.html'),
            indicator: 'license'
github apache / apex-malhar / front / js / datatorrent / ModalView.js View on Github external
// Override this to pass html into body of modal
	body: function() {
		return 'I ain\'t got no body';
	},

	onConfirm: function(evt) {
		evt.preventDefault();
		this.destroy();
	},

	onCancel: function(evt) {
		evt.preventDefault();
		this.destroy();
	},

	BASE_MODAL_TEMPLATE: kt.make(__dirname+'/ModalView.html','_')

});
exports = module.exports = ModalView;
github apache / apex-malhar / front / js / datatorrent / WidgetView.js View on Github external
},
    
    _toggleHighlight: function(highlighted) {
        this.$el[ highlighted ? 'addClass' : 'removeClass' ]('highlighted');
    },

    remove: function() {
        if (typeof this.onRemove === 'function') {
            this.onRemove();
        }
        BaseView.prototype.remove.apply(this, arguments);
    },
    
    // @final
    BASE_TEMPLATE: kt.make(__dirname+'/WidgetView.html','_')
    
});
exports = module.exports = WidgetView;
github apache / apex-malhar / front / js / app / lib / widgets / InstanceActionWidget / InstanceActionWidget.js View on Github external
},
    
    events: {
        'click .killApplication': 'killApplication',
        'click .shutdownApplication': 'shutdownApplication'
    },
    
    killApplication: function(evt) {
        this.model.kill(this.dataSource);
    },
    
    shutdownApplication: function(evt) {
        this.model.shutdown(this.dataSource);
    },
    
    template: kt.make(__dirname+'/InstanceActionWidget.html','_')
    
});
exports = module.exports = InstanceActionWidget;
github apache / apex-malhar / front / js / app / lib / widgets / CtnrActionWidget / CtnrActionWidget.js View on Github external
initialize: function() {
        BaseView.prototype.initialize.apply(this, arguments);
        this.listenTo(this.model, 'change:containerLogsUrl', this.renderContent);
    },
    
    events: {
        'click .killCtnr': 'killCtnr'
    },

    killCtnr: function() {
        this.$('.killCtnr').prop('disabled', true);
        this.model.kill();
    },
    
    template: kt.make(__dirname+'/CtnrActionWidget.html','_')

});
exports = module.exports = CtnrActionWidget;
github apache / apex-malhar / front / js / datatorrent / RestartModalView / RestartModalView.js View on Github external
var html = this.template(json);
        return html;
    },

    events: {
        'click .cancelBtn': 'onCancel',
        'click .confirmBtn': 'onConfirm'
    },

    confirmText: text('close'),

    cancelText: false,

    confirmText: false,

    template: kt.make(__dirname + '/RestartModalView.html', '_')

});
exports = module.exports = RestartModalView;
github apache / apex-malhar / front / js / datatorrent / widgets / ListWidget / ListWidget.js View on Github external
return result;
    },
    
    assignments: function() {
        var assignments = {
            '.table-target': 'tabled'
        }
        
        if (this.subview('palette')) {
            assignments['.palette-target'] = 'palette';
        }
        
        return assignments;
    },
    
    template: kt.make(__dirname+'/ListWidget.html','_'),
    
});
exports = module.exports = ListWidget;
github apache / apex-malhar / front / js / app / lib / pages / DiagnosticsPageView / DiagnosticsPageView.js View on Github external
this.subview('issues', new IssuesSubView({}));
        this.subview('info', new InfoSubView({}));
    },

    render: function() {
        var json = {};
        var html = this.template(json);
        this.$el.html(html);
        this.assign({
            '.diagnostic-issues': 'issues',
            '.diagnostic-info': 'info'
        });
        return this;
    },

    template: kt.make(__dirname+'/DiagnosticsPageView.html')

});

exports = module.exports = DiagnosticsPageView;
github apache / apex-malhar / front / js / app / lib / pages / LicensePageView / LicensePageView.js View on Github external
});
        });

        this.license = options.app.license;
        this.listenTo(this.license.get('agent'), 'sync', this.render);
    },

    render: function() {
        var json = this.license.toJSON()
        var html = this.template(json);
        this.$el.html(html);
        this.assign('.file-upload-target', 'file-upload');
        return this;
    },

    template: kt.make(__dirname+'/LicensePageView.html')

});

exports = module.exports = LicensePageView;

knights-templar

Precompile templates with browserify, or simply compile templates if in node environment

BSD
Latest version published 10 years ago

Package Health Score

42 / 100
Full package analysis

Popular knights-templar functions