2020-04-26 20:33:39 +00:00
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import DeployToPortal from './src/deploy-to-portal';
|
|
|
|
|
2020-05-14 22:54:07 +00:00
|
|
|
export const documentActions = [
|
|
|
|
{
|
|
|
|
label: 'Deploy to Portal',
|
|
|
|
hideAfterClick: true,
|
|
|
|
action(context, spec) {
|
|
|
|
const root = document.createElement('div');
|
|
|
|
ReactDOM.render(
|
|
|
|
<DeployToPortal
|
|
|
|
spec={spec}
|
|
|
|
store={context.store}
|
|
|
|
axios={context.__private.axios}
|
|
|
|
trackEvent={context.__private.analytics.trackEvent}
|
|
|
|
/>,
|
|
|
|
root,
|
|
|
|
);
|
2020-04-26 20:33:39 +00:00
|
|
|
|
2020-05-14 22:54:07 +00:00
|
|
|
context.app.dialog('Deploy to Portal', root, {
|
|
|
|
skinny: true,
|
|
|
|
onHide() {
|
|
|
|
ReactDOM.unmountComponentAtNode(root);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
2020-04-26 20:33:39 +00:00
|
|
|
},
|
2020-05-14 22:54:07 +00:00
|
|
|
];
|