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 { withI18n } from '@lingui/react';
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 (
<Modal
isLarge
isOpen
title={i18n._(t`Node Details | ${node.unifiedJobTemplate.name}`)}
onClose={onClose}
>
<Modal isLarge isOpen title={i18n._(t`Node Details`)} onClose={onClose}>
Coming soon :)
</Modal>
);
}
NodeViewModal.propTypes = {
node: shape().isRequired,
onClose: func.isRequired,
};

View File

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