Skip to content

Commit

Permalink
Merge pull request #853 from hpcc-systems/yadhap/remove-real-bi-trace
Browse files Browse the repository at this point in the history
Removed trace of real-bi-dashboarding. This is no longer relevent
  • Loading branch information
FancMa01 authored Sep 5, 2024
2 parents 9c42ec0 + 0e0d939 commit 9b790a8
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 637 deletions.
5 changes: 0 additions & 5 deletions Tombolo/client-reactjs/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const FileTemplate = React.lazy(() => import('./components/application/templates
const JobDetailsForm = React.lazy(() => import('./components/application/Jobs/JobDetails'));
const IndexDetailsForm = React.lazy(() => import('./components/application/IndexDetails'));
const QueryDetailsForm = React.lazy(() => import('./components/application/queries/QueryDetails'));
const VisualizationDetailsForm = React.lazy(() => import('./components/application/VisualizationDetails'));
const ManualJobDetail = React.lazy(() => import('./components/application/Jobs/ManualJobDetail'));
const Actions = React.lazy(() => import('./components/application/actions/actions'));
const AddJobsForm = React.lazy(() => import('./components/application/Jobs/AddjobsForm/AddJobsForm'));
Expand Down Expand Up @@ -375,10 +374,6 @@ class App extends React.Component {
<PrivateRoute path="/:applicationId/assets/job/:assetId?" component={JobDetailsForm} />
<PrivateRoute path="/:applicationId/assets/index/:assetId?" component={IndexDetailsForm} />
<PrivateRoute path="/:applicationId/assets/query/:assetId?" component={QueryDetailsForm} />
<PrivateRoute
path="/:applicationId/assets/visualizations/:visualizationId?"
component={VisualizationDetailsForm}
/>
<PrivateRoute path="/:applicationId/assets" component={Assets} />
<PrivateRoute
path="/:applicationId/dataflow/details/:dataflowId?"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
import React, { useState, useEffect } from 'react';
import { Table, message, Popconfirm, Tooltip, Divider, Space, Typography, Button } from 'antd';
import { Table, message, Tooltip, Divider, Space, Typography, Button } from 'antd';
import { useHistory } from 'react-router';
import { useSelector, useDispatch } from 'react-redux';
import {
DeleteOutlined,
EditOutlined,
QuestionCircleOutlined,
FolderOpenOutlined,
FilePdfOutlined,
AreaChartOutlined,
} from '@ant-design/icons';
import { DeleteOutlined, EditOutlined, FolderOpenOutlined, FilePdfOutlined } from '@ant-design/icons';

import { authHeader, handleError } from '../../common/AuthHeader.js';
import MoveAssetsDialog from './MoveAssetsDialog';
Expand Down Expand Up @@ -80,7 +73,7 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
}, [selectedAsset]);

//When edit icon is clicked
const handleEdit = (id, type, action, vizUrl) => {
const handleEdit = (id, type, action) => {
dispatch(assetsActions.assetSelected(id, applicationId, ''));

switch (type) {
Expand All @@ -99,9 +92,6 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
case 'Query':
history.push('/' + applicationId + '/assets/query/' + id);
break;
case 'RealBI Dashboard':
window.open(vizUrl);
break;
case 'Group':
if (action !== 'edit') {
openGroup(id);
Expand Down Expand Up @@ -153,10 +143,6 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
deleteUrl = '/api/groups';
method = 'delete';
break;
case 'RealBI Dashboard':
data = JSON.stringify({ id: id });
deleteUrl = '/api/file/read/deleteVisualization';
break;
default:
break;
}
Expand Down Expand Up @@ -189,32 +175,6 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
dispatch(assetsActions.assetInGroupSelected(groupId));
};

const handleCreateVisualization = (id, cluster_id) => {
console.log(cluster_id);
fetch('/api/file/read/visualization', {
method: 'post',
headers: authHeader(),
body: JSON.stringify({
id: id,
application_id: applicationId,
email: authReducer.user.email,
editingAllowed: editingAllowed,
}),
})
.then(function (response) {
if (response.ok && response.status == 200) {
return response.json();
}
handleError(response);
})
.then(function (data) {
if (data && data.success) {
fetchDataAndRenderTable();
window.open(data.url);
}
});
};

const generateAssetIcon = (type) => {
const icons = {
Job: <i className="fa fa-clock-o"></i>,
Expand All @@ -223,7 +183,6 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
Query: <i className="fa fa-search"></i>,
Group: <i className="fa fa-folder-o"></i>,
'File Template': <i className="fa fa-file-text-o"></i>,
'RealBI Dashboard': <i className="fa fa-area-chart"></i>,
};
return <React.Fragment>{icons[type]}</React.Fragment>;
};
Expand Down Expand Up @@ -391,25 +350,6 @@ function AssetsTable({ openGroup, handleEditGroup, refreshGroups }) {
}
/>
</Tooltip>

{record.type === 'File' ? (
record.visualization ? (
<Tooltip placement="right" title={<Text text="RealBI Dashboard" />}>
<a href={record.visualization} target="_blank" rel="noreferrer">
<AreaChartOutlined className="asset-action-icon" />
</a>
</Tooltip>
) : (
<Popconfirm
title="Are you sure you want to create a chart with this data?"
onConfirm={() => handleCreateVisualization(record.id, record.cluster_id)}
icon={<QuestionCircleOutlined />}>
<Tooltip placement="right" title={<Text text="RealBI Dashboard" />}>
<AreaChartOutlined className="asset-action-icon" />
</Tooltip>
</Popconfirm>
)
) : null}
</Space>
),
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,6 @@ const Assets = () => {
File: () => goTo('file'),
Index: () => goTo('index'),
Query: () => goTo('query'),
'RealBI Dashboard': () => goTo('visualizations'),
'File Template': () => goTo('fileTemplate'),
Group: () => openNewGroupDialog({ edit: false, groupId: '' }),
'Edit-Group': () => openNewGroupDialog({ edit: true, groupId: '' }),
Expand Down Expand Up @@ -301,7 +300,6 @@ const Assets = () => {
{ key: 'Job', icon: <i className="fa fa-lg fa-clock-o"></i>, label: 'Job' },
{ key: 'Query', icon: <i className="fa fa-lg fa-search"></i>, label: 'Query' },
{ key: 'Index', icon: <i className="fa fa-lg fa-indent"></i>, label: 'Index' },
{ key: 'RealBI Dashboard', icon: <i className="fa fa-lg fa-area-chart"></i>, label: 'RealBI Dashboard' },
];

//Generate PDF & printing task complete function
Expand Down

This file was deleted.

Loading

0 comments on commit 9b790a8

Please sign in to comment.