You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by sb...@apache.org on 2018/07/25 06:34:29 UTC
[11/18] ignite git commit: IGNITE-5466 Web Console: Fixed action menu
after deleting cluster configuration.
IGNITE-5466 Web Console: Fixed action menu after deleting cluster configuration.
Project: http://git-wip-us.apache.org/repos/asf/ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/ignite/commit/4abd1f3c
Tree: http://git-wip-us.apache.org/repos/asf/ignite/tree/4abd1f3c
Diff: http://git-wip-us.apache.org/repos/asf/ignite/diff/4abd1f3c
Branch: refs/heads/ignite-6467-1
Commit: 4abd1f3cf9c5258cd98c93b5c4245dbbdc824cfa
Parents: d0e6def
Author: Alexander Kalinin <ve...@yandex.ru>
Authored: Tue Jul 24 22:26:39 2018 +0700
Committer: Alexey Kuznetsov <ak...@apache.org>
Committed: Tue Jul 24 22:26:39 2018 +0700
----------------------------------------------------------------------
.../app/components/page-configure-overview/controller.js | 5 +++++
.../app/components/page-configure-overview/template.pug | 1 +
2 files changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ignite/blob/4abd1f3c/modules/web-console/frontend/app/components/page-configure-overview/controller.js
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure-overview/controller.js b/modules/web-console/frontend/app/components/page-configure-overview/controller.js
index 6a24f96..db21d9a 100644
--- a/modules/web-console/frontend/app/components/page-configure-overview/controller.js
+++ b/modules/web-console/frontend/app/components/page-configure-overview/controller.js
@@ -70,6 +70,9 @@ export default class PageConfigureOverviewController {
/** @param {Array<ig.config.cluster.ShortCluster>} clusters */
removeClusters(clusters) {
this.ConfigureState.dispatchAction(confirmClustersRemoval(clusters.map((c) => c._id)));
+
+ // TODO: Implement storing selected rows in store to share this data between other components.
+ this.selectedRows$.next([]);
}
/** @param {ig.config.cluster.ShortCluster} cluster */
@@ -137,6 +140,8 @@ export default class PageConfigureOverviewController {
/** @type {Subject<Array<ig.config.cluster.ShortCluster>>} */
this.selectedRows$ = new Subject();
+ this.selectedRowsIDs$ = this.selectedRows$.map((selectedClusters) => selectedClusters.map((cluster) => cluster._id));
+
this.actions$ = this.selectedRows$.map((selectedClusters) => [
{
action: 'Edit',
http://git-wip-us.apache.org/repos/asf/ignite/blob/4abd1f3c/modules/web-console/frontend/app/components/page-configure-overview/template.pug
----------------------------------------------------------------------
diff --git a/modules/web-console/frontend/app/components/page-configure-overview/template.pug b/modules/web-console/frontend/app/components/page-configure-overview/template.pug
index d8bdf4f..ee7e4ec 100644
--- a/modules/web-console/frontend/app/components/page-configure-overview/template.pug
+++ b/modules/web-console/frontend/app/components/page-configure-overview/template.pug
@@ -33,6 +33,7 @@ h1.pc-page-header Configuration
on-action='$ctrl.onClustersAction($event)'
max-rows-to-show='10'
one-way-selection='::false'
+ selected-row-id='$ctrl.selectedRowsIDs$|async:this'
on-selection-change='$ctrl.selectedRows$.next($event)'
actions-menu='$ctrl.actions$|async:this'
)