[ARVADOS-WORKBENCH2] updated: 1.2.0-378-g3fd7d22

Git user git at public.curoverse.com
Sun Sep 16 17:14:24 EDT 2018


Summary of changes:
 src/store/progress-indicator/with-progress.ts | 38 +++++++++++++--------------
 1 file changed, 19 insertions(+), 19 deletions(-)

       via  3fd7d22747e43fd810c1eace852ae5b184b06bde (commit)
      from  e49daa4deeadf74cb0737501ed64bc41ba7a56d9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 3fd7d22747e43fd810c1eace852ae5b184b06bde
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date:   Sun Sep 16 23:14:20 2018 +0200

    Reactivate withProgress
    
    Feature #14186
    
    Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>

diff --git a/src/store/progress-indicator/with-progress.ts b/src/store/progress-indicator/with-progress.ts
index 976f757..24f7e32 100644
--- a/src/store/progress-indicator/with-progress.ts
+++ b/src/store/progress-indicator/with-progress.ts
@@ -1,20 +1,20 @@
-// // Copyright (C) The Arvados Authors. All rights reserved.
-// //
-// // SPDX-License-Identifier: AGPL-3.0
+// Copyright (C) The Arvados Authors. All rights reserved.
 //
-// import * as React from 'react';
-// import { connect } from 'react-redux';
-// import { RootState } from '~/store/store';
-//
-// export type WithProgressStateProps = {
-//     started: boolean;
-// };
-//
-// export const withProgress = (id: string) =>
-//     (component: React.ComponentType<WithProgressStateProps>) =>
-//         connect(mapStateToProps(id))(component);
-//
-// export const mapStateToProps = (id: string) => (state: RootState): WithProgressStateProps => {
-//     const progress = state.progressIndicator[id];
-//     return progress;
-// };
+// SPDX-License-Identifier: AGPL-3.0
+
+import * as React from 'react';
+import { connect } from 'react-redux';
+import { RootState } from '~/store/store';
+
+export type WithProgressStateProps = {
+    working: boolean;
+};
+
+export const withProgress = (id: string) =>
+    (component: React.ComponentType<WithProgressStateProps>) =>
+        connect(mapStateToProps(id))(component);
+
+export const mapStateToProps = (id: string) => (state: RootState): WithProgressStateProps => {
+    const progress = state.progressIndicator.find(p => p.id === id);
+    return { working: progress ? progress.working : false };
+};

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list