Skip to content
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

Revert "[#3878] Adding Loading indicators to control-center" #3916

Merged
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion bazel.tsconfig.json
Expand Up @@ -16,7 +16,6 @@
"preserveConstEnums": true,
"isolatedModules": false,
"module": "commonjs",
"resolveJsonModule": true,
"sourceMap": true,
"jsx": "react",
"paths": {
Expand Down
2 changes: 0 additions & 2 deletions frontend/control-center/BUILD
Expand Up @@ -30,8 +30,6 @@ ts_web_library(
"@npm//@types/lodash-es",
"@npm//@types/dom-mediacapture-record",
"@npm//lodash-es",
"@npm//react-lottie",
"@npm//@types/react-lottie",
"@npm//react",
"@npm//react-router-dom",
"@npm//redux",
Expand Down
24 changes: 2 additions & 22 deletions frontend/control-center/src/App.tsx
Expand Up @@ -4,7 +4,7 @@ import TopBar from './components/TopBar';
import Sidebar from './components/Sidebar';
import styles from './App.module.scss';
import {getClientConfig} from './actions/config';
import {Navigate, Route, Routes, useLocation} from 'react-router-dom';
import {Navigate, Route, Routes} from 'react-router-dom';
import {INBOX_ROUTE, CATALOG_ROUTE, CONNECTORS_ROUTE, ROOT_ROUTE, STATUS_ROUTE, WEBHOOKS_ROUTE} from './routes/routes';
import NotFound from './pages/NotFound';
import ConnectorsOutlet from './pages/Connectors/ConnectorsOutlet';
Expand All @@ -16,41 +16,21 @@ import Status from './pages/Status';
import Inbox from './pages/Inbox';
import ConnectorConfig from './pages/Connectors/ConnectorConfig';
import CatalogProductPage from './pages/Catalog/CatalogItemDetails';
import {getConnectorsConfiguration, listChannels, listComponents} from './actions';

const mapDispatchToProps = {
getClientConfig,
listChannels,
getConnectorsConfiguration,
listComponents,
};

const connector = connect(null, mapDispatchToProps);

const App = (props: ConnectedProps<typeof connector>) => {
const location = useLocation();

useEffect(() => {
props.getClientConfig().catch((error: Error) => {
console.error(error);
});
props.getClientConfig();
if (localStorage.getItem('theme') === 'dark') {
document.documentElement.setAttribute('data-theme', 'dark');
}
}, []);

useEffect(() => {
props.listChannels().catch((error: Error) => {
console.error(error);
});
props.getConnectorsConfiguration().catch((error: Error) => {
console.error(error);
});
props.listComponents().catch((error: Error) => {
console.error(error);
});
}, [location]);

return (
<div className={styles.container}>
<div className={styles.wrapper}>
Expand Down
Expand Up @@ -14,7 +14,6 @@ import {ReactComponent as CognigyAvatar} from 'assets/images/icons/cognigyLogo.s
import {ReactComponent as RasaAvatar} from 'assets/images/icons/rasaLogo.svg';
import {ReactComponent as AmeliaAvatar} from 'assets/images/icons/ameliaLogo.svg';
import {ReactComponent as AmazonS3Avatar} from 'assets/images/icons/amazons3Logo.svg';
import {ReactComponent as AmazonLexV2Avatar} from 'assets/images/icons/amazonLexV2Logo.svg';
import {ReactComponent as IbmWatsonAssistantAvatar} from 'assets/images/icons/ibmWatsonAssistantLogo.svg';

import {Channel, Source} from 'model';
Expand Down Expand Up @@ -80,9 +79,6 @@ export const getChannelAvatar = (source: string) => {
case Source.amazons3:
case 'Amazon S3':
return <AmazonS3Avatar />;
case Source.amazonLexV2:
case 'Amazon LEX V2':
return <AmazonLexV2Avatar />;
case Source.ibmWatsonAssistant:
case 'IBM Watson Assistant':
return <IbmWatsonAssistantAvatar />;
Expand Down
4 changes: 2 additions & 2 deletions frontend/control-center/src/components/Sidebar/index.tsx
Expand Up @@ -4,7 +4,7 @@ import {useMatch} from 'react-router';
import {connect, ConnectedProps} from 'react-redux';
import {StateModel} from '../../reducers';
import {useCurrentComponentForSource} from '../../selectors';
import {InstallationStatus, Source} from 'model';
import {Source} from 'model';
import {CATALOG_ROUTE, CONNECTORS_ROUTE, INBOX_ROUTE, STATUS_ROUTE, WEBHOOKS_ROUTE} from '../../routes/routes';

import {ReactComponent as ConnectorsIcon} from 'assets/images/icons/gitMerge.svg';
Expand All @@ -27,7 +27,7 @@ const Sidebar = (props: SideBarProps) => {
const {version, components} = props;
const componentInfo = useCurrentComponentForSource(Source.webhooks);

const webhooksEnabled = componentInfo.installationStatus === InstallationStatus.installed;
const webhooksEnabled = componentInfo.installed;
const inboxEnabled = components[Source.frontendInbox]?.enabled || false;
const showLine = inboxEnabled || webhooksEnabled;

Expand Down
Expand Up @@ -5,6 +5,8 @@
.catalogCard {
width: 340px;
height: 248px;
margin-bottom: 28px;
margin-right: 36px;
padding: 0px 12px 0px 20px;
display: flex;
flex-direction: column;
Expand All @@ -14,9 +16,6 @@
outline: 2px solid transparent;
@include font-s;
transition: all 0.1s;
z-index: -1;
position: relative;
pointer-events: all;

&:hover {
outline: 2px solid var(--color-airy-blue);
Expand All @@ -25,14 +24,6 @@
}
}

.installerLoaderWrapper {
position: relative;
z-index: 1;
&:hover {
z-index: 2;
}
}

.cardLogoTitleContainer {
display: flex;
align-items: flex-start;
Expand Down