-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7018 from RocketChat/rocketchat-importer
converted rocketchat-importer
- Loading branch information
Showing
39 changed files
with
780 additions
and
611 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
packages/rocketchat-importer/client/admin/adminImport.coffee
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* globals Importer */ | ||
Template.adminImport.helpers({ | ||
isAdmin() { | ||
return RocketChat.authz.hasRole(Meteor.userId(), 'admin'); | ||
}, | ||
isImporters() { | ||
return Object.keys(Importer.Importers).length > 0; | ||
}, | ||
getDescription(importer) { | ||
return TAPi18n.__('Importer_From_Description', { from: importer.name }); | ||
}, | ||
importers() { | ||
const importers = []; | ||
_.each(Importer.Importers, function(importer, key) { | ||
importer.key = key; | ||
return importers.push(importer); | ||
}); | ||
return importers; | ||
} | ||
}); | ||
|
||
Template.adminImport.events({ | ||
'click .start-import'() { | ||
const importer = this; | ||
return Meteor.call('setupImporter', importer.key, function(error) { | ||
if (error) { | ||
console.log(t('importer_setup_error'), importer.key, error); | ||
return handleError(error); | ||
} | ||
return FlowRouter.go(`/admin/import/prepare/${ importer.key }`); | ||
}); | ||
} | ||
}); |
152 changes: 0 additions & 152 deletions
152
packages/rocketchat-importer/client/admin/adminImportPrepare.coffee
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.