File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
app/javascript/components Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,8 @@ import PropTypes from 'prop-types';
55import { Toolbar } from './toolbar' ;
66
77import DashboardToolbar from './dashboard_toolbar' ;
8- import { convertMultParamsToRailsMultParams } from '../toolbar-actions/util'
8+ import { convertMultParamsToRailsMultParams } from '../toolbar-actions/util' ;
9+ import { sendDataWithRx } from '../miq_observable' ;
910
1011/* global miqJqueryRequest, miqSerializeForm */
1112/* eslint no-restricted-globals: ["off", "miqJqueryRequest", "miqSerializeForm"] */
@@ -89,9 +90,7 @@ const onClick = (button) => {
8990 }
9091 } else if ( button . data && button . data . function ) {
9192 // Client-side buttons use 'function' and 'function-data'.
92- /* eslint no-new-func: "off" */
93- const fn = new Function ( `return ${ button . data . function } ` ) ;
94- fn ( ) . call ( button , button . data [ 'function-data' ] ) ;
93+ sendDataWithRx ( button . data [ 'function-data' ] ) ;
9594 return ;
9695 } else { // Most of (classic) buttons.
9796 // If no url was specified, run standard button ajax transaction.
You can’t perform that action at this time.
0 commit comments