Skip to content

Fix errors and add warning on first application load #715

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function ClusterUsage() {
}

// If no clusterId in url
if (clusters && !urlQueries.clusterId) {
if (clusters?.length && !urlQueries.clusterId) {
setSelectedCluster(clusters[0].id);
addQueriesToUrl({ queryName: 'clusterId', queryValue: clusters[0].id });
}
Expand Down
1 change: 1 addition & 0 deletions client-reactjs/src/components/common/Constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const Constants = {

CLUSTER_SELECTED: 'CLUSTER_SELECTED',
CLUSTERS_RETRIEVED: 'CLUSTERS_RETRIEVED',
NO_CLUSTERS_FOUND: 'NO_CLUSTERS_FOUND',

CONSUMERS_RETRIEVED: 'CONSUMERS_RETRIEVED',
LICENSES_RETRIEVED: 'LICENSES_RETRIEVED',
Expand Down
76 changes: 76 additions & 0 deletions client-reactjs/src/components/common/noCluster.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
import React from 'react';
import { Modal } from 'antd';
import { Link } from 'react-router-dom';

const NoCluster = ({ visible, setVisible, applicationId }) => {
const handleOk = () => {
setVisible(false);
};

return (
<div>
<Modal
title="No Clusters Setup"
open={visible}
onOk={handleOk}
footer={(_, { OkBtn }) => (
<>
<OkBtn />
</>
)}>
<p>
It looks like you do not have any clusters set up, most of Tombolos functionalities rely on a connection to an
HPCC cluster including:
<br />
<br />
<ul>
<li>
<Link to={`/${applicationId}/Dataflow`} onClick={() => setVisible(false)}>
Workflow Management
</Link>
</li>
<li>
<Link to={`/${applicationId}/fileMonitoring`} onClick={() => setVisible(false)}>
File Monitoring
</Link>
</li>
<li>
<Link to={`/${applicationId}/clustermonitoring`} onClick={() => setVisible(false)}>
Cluster Monitoring
</Link>
</li>
<li>
<Link to={`/${applicationId}/jobmonitoring`} onClick={() => setVisible(false)}>
Job Monitoring
</Link>
</li>

<li>
<Link to={`/${applicationId}/superfileMonitoring`} onClick={() => setVisible(false)}>
Superfile Monitoring
</Link>
</li>

<li>
<Link to={`/${applicationId}/dashboard/clusterUsage`} onClick={() => setVisible(false)}>
Cluster Usage Dashboards
</Link>
</li>
<li>
<Link to={`/${applicationId}/dashboard/notifications`} onClick={() => setVisible(false)}>
Notification Dashboards
</Link>
</li>
</ul>
<br />
<Link to="/admin/clusters" onClick={() => setVisible(false)}>
Set up a cluster now
</Link>
, or go to the left navigation and select the cluster option at any time.
</p>
</Modal>
</div>
);
};

export default NoCluster;
Loading
Loading