Refresh option in validation result page
[sdc.git] / openecomp-ui / src / sdc-app / onboarding / softwareProduct / validationResults / SoftwareProductValidationResults.js
index dffade7..ed88ddd 100644 (file)
  */
 import { connect } from 'react-redux';
 import SoftwareProductValidationResultsView from './SoftwareProductValidationResultsView.jsx';
+import SoftwareProductValidationResultsViewActionHelper from './SoftwareProductValidationResultsViewActionHelper.js';
 
 export const mapStateToProps = ({ softwareProduct }) => {
+    let { softwareProductValidationResult } = softwareProduct;
     let { softwareProductValidation } = softwareProduct;
     return {
+        softwareProductValidationResult,
         softwareProductValidation
     };
 };
-
-export default connect(mapStateToProps, null, null, {
+export const mapActionsToProps = dispatch => {
+    return {
+        refreshValidationResults: (requestId, endPoints) => {
+            return SoftwareProductValidationResultsViewActionHelper.refreshValidationResults(
+                dispatch,
+                { requestId, endPoints }
+            );
+        },
+        updateDisplayTestResultData: testResultToDisplay => {
+            return SoftwareProductValidationResultsViewActionHelper.updateDisplayTestResultData(
+                dispatch,
+                { testResultToDisplay }
+            );
+        }
+    };
+};
+export default connect(mapStateToProps, mapActionsToProps, null, {
     withRef: true
 })(SoftwareProductValidationResultsView);