Initial commit
This commit is contained in:
Executable
+34
@@ -0,0 +1,34 @@
|
||||
var template = require('./failed.tpl');
|
||||
|
||||
function getAction () {
|
||||
return 'show_errors';
|
||||
}
|
||||
|
||||
function getButton () {
|
||||
return _t('components.background-importer.background-importer-item.show');
|
||||
}
|
||||
|
||||
function getClosable () {
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateNotification (info) {
|
||||
var data = {
|
||||
info: info,
|
||||
status: _status,
|
||||
closable: getClosable(),
|
||||
button: getButton(),
|
||||
action: getAction()
|
||||
};
|
||||
|
||||
_notification.update(data);
|
||||
}
|
||||
|
||||
var _notification;
|
||||
var _status;
|
||||
|
||||
module.exports = function (model, notification, status, info, showDetails) {
|
||||
_notification = notification;
|
||||
_status = status;
|
||||
updateNotification(template(info));
|
||||
};
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
<%= _t('components.background-importer.background-importer-item.error-connecting', { name: name }) %> <% if (service) { %> <%- _t('components.background-importer.background-importer-item.from') %> <%- service %> <% } %>
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
var template = require('./loading.tpl');
|
||||
|
||||
function getAction () {
|
||||
return false;
|
||||
}
|
||||
|
||||
function getButton () {
|
||||
return false;
|
||||
}
|
||||
|
||||
function getClosable () {
|
||||
var state = _model.get('state');
|
||||
var step = _model.get('step');
|
||||
return state === 'uploading' && step === 'upload';
|
||||
}
|
||||
|
||||
function updateNotification (info) {
|
||||
var data = {
|
||||
info: info,
|
||||
status: _status,
|
||||
closable: getClosable(),
|
||||
button: getButton(),
|
||||
action: getAction()
|
||||
};
|
||||
|
||||
_notification.update(data);
|
||||
}
|
||||
|
||||
var _model;
|
||||
var _notification;
|
||||
var _status;
|
||||
|
||||
module.exports = function (model, notification, status, info, showDetails) {
|
||||
_model = model;
|
||||
_notification = notification;
|
||||
_status = status;
|
||||
updateNotification(template(info));
|
||||
};
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
<span class='CDB-Text is-semibold'><%- progress %>% <%- state %></span> <%- name %> <% if (service && service != "twitter_search") { %> <%- _t('components.background-importer.background-importer-item.from') %> <%- service %> <% } %>
|
||||
Executable
+60
@@ -0,0 +1,60 @@
|
||||
var template = require('./success.tpl');
|
||||
|
||||
function getAction () {
|
||||
var service = _model.get('upload').service_name;
|
||||
var tables_created_count = _model.get('import').tables_created_count;
|
||||
|
||||
if (_showDetails) {
|
||||
if (service && service === 'twitter_search') {
|
||||
return 'show_stats';
|
||||
} else if (tables_created_count === 1) {
|
||||
return 'show_table';
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getButton () {
|
||||
var service = _model.get('upload').service_name;
|
||||
var tables_created_count = _model.get('import').tables_created_count;
|
||||
|
||||
if (_showDetails) {
|
||||
if (service && service === 'twitter_search') {
|
||||
return _t('components.background-importer.background-importer-item.show');
|
||||
} else if (tables_created_count === 1) {
|
||||
return _t('components.background-importer.background-importer-item.show');
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getClosable () {
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateNotification (info) {
|
||||
var data = {
|
||||
info: info,
|
||||
status: _status,
|
||||
closable: getClosable(),
|
||||
button: getButton(),
|
||||
action: getAction()
|
||||
};
|
||||
|
||||
_notification.update(data);
|
||||
}
|
||||
|
||||
var _model;
|
||||
var _notification;
|
||||
var _status;
|
||||
var _showDetails;
|
||||
|
||||
module.exports = function (model, notification, status, info, showDetails) {
|
||||
_model = model;
|
||||
_notification = notification;
|
||||
_status = status;
|
||||
_showDetails = showDetails;
|
||||
updateNotification(template(info));
|
||||
};
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
<%- name %> <% if (service && service != "twitter_search") { %> <%- _t('components.background-importer.background-importer-item.from') %> <%- service %> <% } %> <span class='CDB-Text is-semibold'><%- _t('components.background-importer.background-importer-item.completed') %></span>
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
var template = require('./warnings.tpl');
|
||||
|
||||
function getAction () {
|
||||
return 'show_warnings';
|
||||
}
|
||||
|
||||
function getButton () {
|
||||
return _t('components.background-importer.background-importer-item.show');
|
||||
}
|
||||
|
||||
function getClosable () {
|
||||
return true;
|
||||
}
|
||||
|
||||
function updateNotification (info) {
|
||||
var data = {
|
||||
info: info,
|
||||
status: _status,
|
||||
closable: getClosable(),
|
||||
button: getButton(),
|
||||
action: getAction()
|
||||
};
|
||||
|
||||
_notification.update(data);
|
||||
}
|
||||
|
||||
var _notification;
|
||||
var _status;
|
||||
|
||||
module.exports = function (model, notification, status, info, showDetails) {
|
||||
_notification = notification;
|
||||
_status = status;
|
||||
updateNotification(template(info));
|
||||
};
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
<span class='CDB-Text is-semibold'>Some warnings</span> were produced for <%- name %> <% if (service) { %> <%- _t('components.background-importer.background-importer-item.from') %> <%- service %> <% } %>
|
||||
Reference in New Issue
Block a user