IGNITE-843 Fixed load cluster from db for download.
Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/ea45ca0f Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/ea45ca0f Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/ea45ca0f Branch: refs/heads/ignite-1121 Commit: ea45ca0f5d74a31bf403175f5efb22964529cbf3 Parents: 5b111c7 Author: AKuznetsov <akuznet...@gridgain.com> Authored: Thu Jul 30 23:48:04 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Thu Jul 30 23:48:04 2015 +0700 ---------------------------------------------------------------------- modules/control-center-web/src/main/js/routes/summary.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/ea45ca0f/modules/control-center-web/src/main/js/routes/summary.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/routes/summary.js b/modules/control-center-web/src/main/js/routes/summary.js index e91e045..c992ad9 100644 --- a/modules/control-center-web/src/main/js/routes/summary.js +++ b/modules/control-center-web/src/main/js/routes/summary.js @@ -55,8 +55,8 @@ router.post('/generator', function (req, res) { }); router.post('/download', function (req, res) { - // Get cluster. - db.Cluster.findById(req.body._id).populate('caches').exec(function (err, cluster) { + // Get cluster with all inner objects (caches, metadata). + db.Cluster.findById(req.body._id).deepPopulate('caches caches.queryMetadata caches.storeMetadata').exec(function (err, cluster) { if (err) return res.status(500).send(err.message); @@ -80,7 +80,7 @@ router.post('/download', function (req, res) { }); // Set the archive name. - res.attachment(cluster.name + (clientNearConfiguration ? '-client' : '') + '-configuration.zip'); + res.attachment(cluster.name + (clientNearConfiguration ? '-client' : '-server') + '-configuration.zip'); var generatorCommon = require('./generator/common'); @@ -105,4 +105,4 @@ router.post('/download', function (req, res) { }); }); -module.exports = router; \ No newline at end of file +module.exports = router;