Repository: incubator-ignite Updated Branches: refs/heads/ignite-843 4abc9f178 -> e432e062e
IGNITE-843 WIP Modal for metadata load. Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/e432e062 Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/e432e062 Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/e432e062 Branch: refs/heads/ignite-843 Commit: e432e062eb88f94a8d42108722898bfdc980f586 Parents: 4abc9f1 Author: AKuznetsov <akuznet...@gridgain.com> Authored: Mon Aug 10 23:42:24 2015 +0700 Committer: AKuznetsov <akuznet...@gridgain.com> Committed: Mon Aug 10 23:42:24 2015 +0700 ---------------------------------------------------------------------- .../main/js/controllers/metadata-controller.js | 20 ++++++++++++- .../src/main/js/public/stylesheets/style.scss | 5 ++-- .../src/main/js/routes/metadata.js | 7 ++++- .../js/views/configuration/metadata-load.jade | 30 ++++++++++++++++++++ 4 files changed, 58 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e432e062/modules/control-center-web/src/main/js/controllers/metadata-controller.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/controllers/metadata-controller.js b/modules/control-center-web/src/main/js/controllers/metadata-controller.js index 9adfbf9..3172225 100644 --- a/modules/control-center-web/src/main/js/controllers/metadata-controller.js +++ b/modules/control-center-web/src/main/js/controllers/metadata-controller.js @@ -16,7 +16,7 @@ */ controlCenterModule.controller('metadataController', [ - '$scope', '$http', '$common', '$focus', '$confirm', '$copy', '$table', function ($scope, $http, $common, $focus, + '$scope', '$http', '$modal', '$common', '$focus', '$confirm', '$copy', '$table', function ($scope, $http, $modal, $common, $focus, $confirm, $copy, $table) { $scope.joinTip = $common.joinTip; $scope.getModel = $common.getModel; @@ -300,6 +300,24 @@ controlCenterModule.controller('metadataController', [ $scope.backupItem = bak; } + // Pre-fetch modal dialogs. + var loadMetaModal = $modal({scope: $scope, templateUrl: 'metadata/metadata-load', show: false}); + + // Show load metadata modal. + $scope.loadFromDb = function () { + loadMetaModal.$promise.then(function () { + loadMetaModal.show(); + + //$focus('user_email'); + }); + }; + + $scope.loadMetadataFromDb = function(fb_info) { + loadMetaModal.hide(); + + $common.showError("Load metadata from DB not ready yet!"); + }; + // When landing on the page, get metadatas and show them. $http.post('metadata/list') .success(function (data) { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e432e062/modules/control-center-web/src/main/js/public/stylesheets/style.scss ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/public/stylesheets/style.scss b/modules/control-center-web/src/main/js/public/stylesheets/style.scss index 7ee7e1c..d0db23a 100644 --- a/modules/control-center-web/src/main/js/public/stylesheets/style.scss +++ b/modules/control-center-web/src/main/js/public/stylesheets/style.scss @@ -580,7 +580,8 @@ a:hover, .link:hover .title { } .modal-body { - padding-top: 15px; + margin-left: 20px; + margin-right: 20px; } h1.ignite-logo { @@ -890,7 +891,7 @@ button .caret, .btn .caret { } .fieldset-content { - margin: 0 10px 5px 10px; + margin: 0 10px 10px 10px; } .tooltip.right .tooltip-arrow { http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e432e062/modules/control-center-web/src/main/js/routes/metadata.js ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/routes/metadata.js b/modules/control-center-web/src/main/js/routes/metadata.js index 0af624e..67bee96 100644 --- a/modules/control-center-web/src/main/js/routes/metadata.js +++ b/modules/control-center-web/src/main/js/routes/metadata.js @@ -23,6 +23,11 @@ router.get('/', function (req, res) { res.render('configuration/metadata'); }); +/* GET metadata load dialog. */ +router.get('/metadata-load', function (req, res) { + res.render('configuration/metadata-load'); +}); + /** * Get spaces and metadata accessed for user account. * @@ -92,4 +97,4 @@ router.post('/remove', function (req, res) { }) }); -module.exports = router; \ No newline at end of file +module.exports = router; http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/e432e062/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade ---------------------------------------------------------------------- diff --git a/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade new file mode 100644 index 0000000..adecaef --- /dev/null +++ b/modules/control-center-web/src/main/js/views/configuration/metadata-load.jade @@ -0,0 +1,30 @@ +//- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +include ../includes/controls + +.modal.center(role='dialog') + .modal-dialog + .modal-content + #errors-container.modal-header.header + button.close(type='button' ng-click='$hide()' aria-hidden='true') × + h4.modal-title Load metadata from database + form.form-horizontal(name='loadForm' novalidate) + .modal-body + .settings-row(ng-repeat='field in metadataDb') + +form-row-custom(['col-xs-4 col-sm-3 col-md-3'], ['col-xs-8 col-sm-7 col-md-7'], db_info) + .modal-footer + button.btn.btn-primary(ng-disabled='loadForm.$invalid' ng-click='loadMetadataFromDb(db_info)') Load metadata