Removes reference to the node unified job template name in the view modal for now. This component is really just a placeholder and this change fixes an error that is thrown when the node's unified job template is deleted.

This commit is contained in:
mabashian
2020-01-24 17:07:15 -05:00
parent 65429e581a
commit a786118415
2 changed files with 4 additions and 12 deletions

View File

@@ -2,23 +2,17 @@ import React from 'react';
import { Modal } from '@patternfly/react-core'; import { Modal } from '@patternfly/react-core';
import { withI18n } from '@lingui/react'; import { withI18n } from '@lingui/react';
import { t } from '@lingui/macro'; import { t } from '@lingui/macro';
import { func, shape } from 'prop-types'; import { func } from 'prop-types';
function NodeViewModal({ i18n, onClose, node }) { function NodeViewModal({ i18n, onClose }) {
return ( return (
<Modal <Modal isLarge isOpen title={i18n._(t`Node Details`)} onClose={onClose}>
isLarge
isOpen
title={i18n._(t`Node Details | ${node.unifiedJobTemplate.name}`)}
onClose={onClose}
>
Coming soon :) Coming soon :)
</Modal> </Modal>
); );
} }
NodeViewModal.propTypes = { NodeViewModal.propTypes = {
node: shape().isRequired,
onClose: func.isRequired, onClose: func.isRequired,
}; };

View File

@@ -907,9 +907,7 @@ function Visualizer({ history, template, i18n }) {
onConfirm={() => deleteAllNodes()} onConfirm={() => deleteAllNodes()}
/> />
)} )}
{nodeToView && ( {nodeToView && <NodeViewModal onClose={() => setNodeToView(null)} />}
<NodeViewModal node={nodeToView} onClose={() => setNodeToView(null)} />
)}
</Fragment> </Fragment>
); );
} }