Files
cartodb/lib/assets/javascripts/dashboard/views/dashboard/background-polling/background-polling-header-title/background-polling-header-title-view.js
T
2020-06-15 10:58:47 +08:00

35 lines
745 B
JavaScript

const CoreView = require('backbone/core-view');
const template = require('./background-polling-header-title.tpl');
/**
* Background polling header title view
*
* It will contain only the title
*
*/
module.exports = CoreView.extend({
tagName: 'h3',
className: 'CDB-Text CDB-Size-large u-lSpace--xl',
initialize: function () {
this._initBinds();
},
render: function () {
this.$el.html(
template({
imports: this.model.getTotalImports(),
totalPollings: this.model.getTotalPollings()
})
);
return this;
},
_initBinds: function () {
this.model.bind('change analysisAdded analysisRemoved importAdded importRemoved geocodingAdded geocodingRemoved', this.render, this);
}
});