You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by ak...@apache.org on 2018/04/04 07:10:31 UTC

ignite git commit: IGNITE-5466 Web Console: Fixed issues with routing to default state.

Repository: ignite
Updated Branches:
  refs/heads/master 2dd6ba330 -> fe21aecf0


IGNITE-5466 Web Console: Fixed issues with routing to default state.


Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/fe21aecf
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/fe21aecf
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/fe21aecf

Branch: refs/heads/master
Commit: fe21aecf0b2ed1489b6efce7522e59e1ed206068
Parents: 2dd6ba3
Author: Ilya Borisov <kl...@gmail.com>
Authored: Wed Apr 4 14:09:47 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Wed Apr 4 14:09:47 2018 +0700

----------------------------------------------------------------------
 .../list-of-registered-users/controller.js      |   2 +-
 .../app/components/page-landing/index.js        |   4 +-
 .../components/queries-notebook/controller.js   |   2 +-
 .../queries-notebook/template.tpl.pug           |   2 +-
 .../frontend/app/modules/demo/Demo.module.js    |   6 +-
 .../views/configuration/domains-import.tpl.pug  | 182 -------------------
 .../views/configuration/domains.tpl.pug         |  58 ------
 7 files changed, 8 insertions(+), 248 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/app/components/list-of-registered-users/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/list-of-registered-users/controller.js b/modules/web-console/frontend/app/components/list-of-registered-users/controller.js
index 41ac897..53a5521 100644
--- a/modules/web-console/frontend/app/components/list-of-registered-users/controller.js
+++ b/modules/web-console/frontend/app/components/list-of-registered-users/controller.js
@@ -59,7 +59,7 @@ export default class IgniteListOfRegisteredUsersCtrl {
 
             AdminData.becomeUser(user._id)
                 .then(() => User.load())
-                .then(() => $state.go('base.configuration.overview'))
+                .then(() => $state.go('default-state'))
                 .then(() => NotebookData.load());
         };
 

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/app/components/page-landing/index.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-landing/index.js b/modules/web-console/frontend/app/components/page-landing/index.js
index 037f3d4..ff6ee59 100644
--- a/modules/web-console/frontend/app/components/page-landing/index.js
+++ b/modules/web-console/frontend/app/components/page-landing/index.js
@@ -53,9 +53,9 @@ export default angular
 
                             const restored = trans.router.stateService.target(name, params);
 
-                            return restored.valid() ? restored : 'base.configuration.tabs';
+                            return restored.valid() ? restored : 'default-state';
                         } catch (ignored) {
-                            return 'base.configuration.tabs';
+                            return 'default-state';
                         }
                     })
                     .catch(() => true);

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
index 9edc107..fa7460f 100644
--- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/controller.js
@@ -936,7 +936,7 @@ export class NotebookCtrl {
 
         const _startWatch = () => {
             const awaitClusters$ = fromPromise(
-                agentMgr.startClusterWatch('Back to Configuration', 'base.configuration.overview'));
+                agentMgr.startClusterWatch('Back to Configuration', 'default-state'));
 
             const finishLoading$ = defer(() => {
                 if (!$root.IgniteDemoMode)

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
index 40ed54c..7d91a3f 100644
--- a/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
+++ b/modules/web-console/frontend/app/components/page-queries/components/queries-notebook/template.tpl.pug
@@ -79,7 +79,7 @@ mixin notebook-rename
 mixin notebook-error
     h2 Failed to load notebook
     label.col-sm-12 Notebook not accessible any more. Go back to configuration or open to another notebook.
-    button.h3.btn.btn-primary(ui-sref='base.configuration.tabs.advanced.clusters') Back to configuration
+    button.h3.btn.btn-primary(ui-sref='default-state') Back to configuration
 
 mixin paragraph-rename
     .col-sm-6(ng-hide='paragraph.edit')

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/app/modules/demo/Demo.module.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/modules/demo/Demo.module.js b/modules/web-console/frontend/app/modules/demo/Demo.module.js
index 5dbd775..2e1a627 100644
--- a/modules/web-console/frontend/app/modules/demo/Demo.module.js
+++ b/modules/web-console/frontend/app/modules/demo/Demo.module.js
@@ -34,7 +34,7 @@ angular
         .state('demo.resume', {
             url: '/resume',
             permission: 'demo',
-            redirectTo: 'base.configuration.overview',
+            redirectTo: 'default-state',
             unsaved: true,
             tfMetaTags: {
                 title: 'Demo resume'
@@ -47,11 +47,11 @@ angular
                 const $http = trans.injector().get('$http');
 
                 return $http.post('/api/v1/demo/reset')
-                    .then(() => 'base.configuration.overview')
+                    .then(() => 'default-state')
                     .catch((err) => {
                         trans.injector().get('IgniteMessages').showError(err);
 
-                        return 'base.configuration.overview';
+                        return 'default-state';
                     });
             },
             unsaved: true,

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug b/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
deleted file mode 100644
index 369c7de..0000000
--- a/modules/web-console/frontend/views/configuration/domains-import.tpl.pug
+++ /dev/null
@@ -1,182 +0,0 @@
-//-
-    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 /app/helpers/jade/mixins
-
-mixin chk(mdl, change, tip)
-    input(type='checkbox' ng-model=mdl ng-change=change bs-tooltip='' data-title=tip data-trigger='hover' data-placement='top')
-
-mixin td-ellipses-lbl(w, lbl)
-    td.td-ellipsis(width=`${w}` style=`min-width: ${w}; max-width: ${w}`)
-        label #{lbl}
-
-.modal.modal-domain-import.center(role='dialog')
-    -var tipOpts = {};
-    - tipOpts.container = '.modal-content'
-    - tipOpts.placement = 'top'
-    .modal-dialog.domains-import-dialog
-        .modal-content(ignite-loading='importDomainFromDb' ignite-loading-text='{{importDomain.loadingOptions.text}}')
-            #errors-container.modal-header.header
-                button.close(ng-click='$hide()' aria-hidden='true') &times;
-                h4.modal-title() 
-                    i.fa.fa-database
-                    span(ng-if='!importDomain.demo') Import domain models from database
-                    span(ng-if='importDomain.demo') Import domain models from demo database
-            .modal-body
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && !importDomain.jdbcDriversNotFound')
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "drivers" && importDomain.jdbcDriversNotFound')
-                    | Domain model could not be imported
-                    ul
-                        li Agent failed to find JDBC drivers
-                        li Copy required JDBC drivers into agent 'jdbc-drivers' folder and try again
-                        li Refer to agent README.txt for more information
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && importDomain.demo')
-                    div(ng-if='demoConnection.db == "H2"')
-                        label Demo description:
-                        ul
-                            li In-memory H2 database server will be started inside agent
-                            li Database will be populated with sample tables
-                            li You could test domain model generation with this demo database
-                            li Click "Next" to continue
-                    div(ng-if='demoConnection.db != "H2"')
-                        label Demo could not be started
-                            ul
-                                li Agent failed to resolve H2 database jar
-                                li Copy h2-x.x.x.jar into agent 'jdbc-drivers' folder and try again
-                                li Refer to agent README.txt for more information
-                .import-domain-model-wizard-page(ng-if='importDomain.action == "connect" && !importDomain.demo')
-                    -var form = 'connectForm'
-
-                    form.form-horizontal(name=form novalidate)
-                        .settings-row.settings-row_small-label
-                            +ignite-form-field-dropdown('Driver JAR:', 'ui.selectedJdbcDriverJar', '"jdbcDriverJar"', false, true, false,
-                                'Choose JDBC driver', '', 'jdbcDriverJars',
-                                'Select appropriate JAR with JDBC driver<br> To add another driver you need to place it into "/jdbc-drivers" folder of Ignite Web Agent<br> Refer to Ignite Web Agent README.txt for for more information'
-                            )
-                        .settings-row.settings-row_small-label
-                            +java-class('JDBC driver:', 'selectedPreset.jdbcDriverClass', '"jdbcDriverClass"', true, true, 'Fully qualified class name of JDBC driver that will be used to connect to database')
-                        .settings-row.settings-row_small-label
-                            +text-enabled-autofocus('JDBC URL:', 'selectedPreset.jdbcUrl', '"jdbcUrl"', true, true, 'JDBC URL', 'JDBC URL for connecting to database<br>Refer to your database documentation for details')
-                        .settings-row.settings-row_small-label
-                            +text('User:', 'selectedPreset.user', '"jdbcUser"', false, '', 'User name for connecting to database')
-                        .settings-row.settings-row_small-label
-                            +password('Password:', 'selectedPreset.password', '"jdbcPassword"', false, '', 'Password for connecting to database<br>Note, password would not be saved in preferences for security reasons')(ignite-on-enter='importDomainNext()')
-                        .settings-row
-                            - tipOpts.placement = 'auto'
-                            +checkbox('Tables only', 'selectedPreset.tablesOnly', '"tablesOnly"', 'If selected, then only tables metadata will be parsed<br>Otherwise table and view metadata will be parsed')
-                            - tipOpts.placement = 'top'
-
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "schemas"')
-                    table.table.metadata(st-table='importDomain.displayedSchemas' st-safe-src='importDomain.schemas')
-                        thead
-                            tr
-                                th.header(colspan='2')
-                                    .col-sm-4.pull-right(style='margin-bottom: 5px')
-                                        input.form-control(type='text' st-search='name' placeholder='Filter schemas...' ng-model='importDomain.displayedSchemasFilter' )
-                            tr
-                                th(width='30px')
-                                    +chk('importDomain.allSchemasSelected',  'selectAllSchemas()', 'Select all schemas')
-                                th
-                                    label Schema
-                            tbody
-                                tr
-                                    td(colspan='2')
-                                        .scrollable-y(style='height: 213px')
-                                            table.table-modal-striped(id='importSchemasData')
-                                                tbody
-                                                    tr(ng-repeat='schema in importDomain.displayedSchemas')
-                                                        td(width='30px')
-                                                            input(type='checkbox' ng-model='schema.use' ng-change='selectSchema()')
-                                                        td
-                                                            label {{schema.name}}
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "tables"')
-                    table.table.metadata(st-table='importDomain.displayedTables' st-safe-src='importDomain.tables')
-                        thead
-                            tr
-                                th.header(colspan='6')
-                                    .col-sm-4.pull-right(style='margin-bottom: 8px')
-                                        input.form-control(type='text' st-search='label' placeholder='Filter tables...' ng-model='importDomain.displayedTablesFilter' ng-change='selectTable()')
-                            tr
-                                th(width='30px')
-                                    +chk('importDomain.allTablesSelected',  'selectAllTables()', 'Select all tables')
-                                th(width='130px')
-                                    label Schema
-                                th(width='160px')
-                                    label Table name
-                                th(colspan=2 width='288px')
-                                    label Cache
-                                th
-                        tbody
-                            tr
-                                td(colspan='6')
-                                    .scrollable-y(style='height: 143px')
-                                        table.table-modal-striped(id='importTableData')
-                                            tbody
-                                                tr(ng-repeat='table in importDomain.displayedTables track by $index')
-                                                    td(width='30px' style='min-width: 30px; max-width: 30px')
-                                                        input(type='checkbox' ng-model='table.use' ng-change='selectTable()')
-                                                    +td-ellipses-lbl('130px', '{{table.schema}}')
-                                                    +td-ellipses-lbl('160px', '{{table.table}}')
-                                                    td(colspan='2' width='288px' style='min-width: 160px; max-width: 160px')
-                                                        div.td-ellipsis
-                                                            a(ng-if='!table.edit' ng-click='startEditDbTableCache(table)') {{tableActionView(table)}}
-                                                            div(style='display: flex' ng-if='table.edit')
-                                                                button.select-toggle.form-control(style='width: 35%; margin-right: 5px' bs-select ng-model='table.action' bs-options='item.value as item.shortLabel for item in importActions')
-                                                                button.select-toggle.form-control(style='width: 65%; margin-right: 0' bs-select ng-model='table.cacheOrTemplate'  bs-options='item.value as item.label for item in table.cachesOrTemplates')
-                                                    td
-                    .settings-row
-                        label Defaults to be applied for filtered tables
-                        i.tipLabel.icon-help(bs-tooltip='' data-title='Select and apply options for caches generation')
-                    .settings-row
-                        .col-sm-11
-                            .col-sm-6(style='padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.action' bs-options='item.value as item.label for item in importActions')
-                            .col-sm-6(style='padding-left: 5px; padding-right: 5px')
-                                button.select-toggle.form-control(bs-select ng-model='importCommon.cacheOrTemplate' bs-options='item.value as item.label for item in importCommon.cachesOrTemplates')
-                        .col-sm-1(style='padding-left: 5px')
-                            button.btn.btn-primary(ng-click='applyDefaults()') Apply
-                .import-domain-model-wizard-page(ng-show='importDomain.action == "options"')
-                    -var form = 'optionsForm'
-                    -var generatePojo = 'ui.generatePojo'
-
-                    form.form-horizontal(name=form novalidate)
-                        .settings-row
-                            +checkbox('Use Java built-in types for keys', 'ui.builtinKeys', '"domainBuiltinKeys"', 'Use Java built-in types like "Integer", "Long", "String" instead of POJO generation in case when table primary key contains only one field')
-                        .settings-row
-                            +checkbox('Use primitive types for NOT NULL table columns', 'ui.usePrimitives', '"domainUsePrimitives"', 'Use primitive types like "int", "long", "double" for POJOs fields generation in case of NOT NULL columns')
-                        .settings-row
-                            +checkbox('Generate query entity key fields', 'ui.generateKeyFields', '"generateKeyFields"',
-                                'Generate key fields for query entity.<br\>\
-                                We need this for the cases when no key-value classes\
-                                are present on cluster nodes, and we need to build/modify keys and values during SQL DML operations.\
-                                Thus, setting this parameter is not mandatory and should be based on particular use case.')
-                        .settings-row
-                            +checkbox('Generate POJO classes', generatePojo, '"domainGeneratePojo"', 'If selected then POJO classes will be generated from database tables')
-                        .settings-row(ng-show=generatePojo)
-                            +checkbox('Generate aliases for query entity', 'ui.generateTypeAliases', '"domainGenerateTypeAliases"', 'Generate aliases for query entity if table name is invalid Java identifier')
-                        .settings-row(ng-show=generatePojo)
-                            +checkbox('Generate aliases for query fields', 'ui.generateFieldAliases', '"domainGenerateFieldAliases"', 'Generate aliases for query fields with database field names when database field name differ from Java field name')
-                        .settings-row.settings-row_small-label(ng-show=generatePojo)
-                            +java-package('Package:', 'ui.packageName', '"domainPackageName"', true, true, 'Package that will be used for POJOs generation')
-                        .settings-row.settings-row_small-label
-                            +ignite-form-field-dropdown('Clusters:', 'ui.generatedCachesClusters', '"generatedCachesClusters"', false, false, true,
-                                'Choose clusters for generated caches', '', 'clusters',
-                                'Choose clusters that will be associated with generated caches'
-                            )
-            .modal-footer
-                label(ng-hide='importDomain.action == "drivers" || (importDomain.action == "connect" && importDomain.demo)').labelField {{importDomain.info}}
-                a.btn.btn-primary(ng-hide='importDomain.action == "drivers" || importDomain.action == "connect"' ng-click='importDomainPrev()' bs-tooltip='' data-title='{{prevTooltipText()}}' data-placement='bottom') Prev
-                a.btn.btn-primary(ng-click='importDomainNext(optionsForm)' ng-disabled='!importDomainNextAvailable()' bs-tooltip='' data-title='{{nextTooltipText()}}' data-placement='bottom') {{importDomain.button}}

http://git-wip-us.apache.org/repos/asf/ignite/blob/fe21aecf/modules/web-console/frontend/views/configuration/domains.tpl.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/views/configuration/domains.tpl.pug b/modules/web-console/frontend/views/configuration/domains.tpl.pug
deleted file mode 100644
index 89bd2ac..0000000
--- a/modules/web-console/frontend/views/configuration/domains.tpl.pug
+++ /dev/null
@@ -1,58 +0,0 @@
-//-
-    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.
-
-pc-items-table(
-    table-title='::"My domain models"'
-    column-defs='$ctrl.modelsColumnDefs'
-    items='$ctrl.modelsTable'
-    on-action='$ctrl.onModelAction($event)'
-    selected-row-id='$ctrl.selectedItemIDs'
-    on-selection-change='$ctrl.selectionHook($event)'
-)
-    footer-slot
-        div(style='font-style: italic' ng-hide='$ctrl.modelsTable.length')
-            | You have no domain models. #[a.link-success(ui-sref='base.configuration.tabs.advanced.models.model({modelID: "new"})') Create one?]
-        a.link-success(ui-sref='base.configuration.tabs.advanced.models.model({modelID: "new"})' ng-show='$ctrl.modelsTable.length') + Add new domain model
-
-h2.pc-page-header(ng-if='$ctrl.selectedItemIDs.length !== 1')
-    | {{ $ctrl.selectedItemIDs.length ? 'Multiple' : 'No' }} domain models selected
-    span.pc-page-header-sub Select only one domain model to see settings and edit it
-
-h2.pc-page-header(ng-if='$ctrl.selectedItemIDs.length === 1')
-    | {{ $ctrl.$state.params.modelID !== 'new' ? 'Edit' : 'Create' }} domain model {{ backupItem.valueType ? 'for ‘'+backupItem.valueType+'’ value type' : '' }}
-
-div(bs-collapse='' data-allow-multiple='true' ng-model='ui.activePanels' ng-class='{"pca-form-blocked": $ctrl.selectedItemIDs.length !== 1}')
-    form.form-horizontal(name='ui.inputForm' novalidate )
-        include /app/modules/states/configuration/domains/general
-        include /app/modules/states/configuration/domains/query
-        include /app/modules/states/configuration/domains/store
-
-.pc-form-actions-panel(ng-class='{"pca-form-blocked": $ctrl.selectedItemIDs.length !== 1}')
-    button.btn-ignite.btn-ignite--success(
-        ng-click='showImportDomainModal()'
-        type='button'
-    ) Import from database
-    .pc-form-actions-panel__right-after
-    button.btn-ignite.btn-ignite--link-success(
-        type='button'
-        ng-disabled='!ui.inputForm.$dirty'
-        ng-click='ui.inputForm.$dirty && resetAll()'
-    )
-        | Cancel
-    button.btn-ignite.btn-ignite--success(
-        ng-disabled='!ui.inputForm.$dirty'
-        ng-click='ui.inputForm.$dirty && $ctrl.saveItem(backupItem)'
-    ) Save