Change the file structure of the APIM Store

merge-requests/480/head
Jayasanka Weerasinghe 5 years ago
parent f3384203f4
commit 7976ee4e51

@ -22,7 +22,7 @@ import RouteWithSubRoutes from './components/RouteWithSubRoutes';
import { BrowserRouter as Router, Redirect, Switch } from 'react-router-dom';
import axios from 'axios';
import { Layout, Spin, Result } from 'antd';
import ConfigContext from './context/ConfigContext';
import ConfigContext from './components/context/ConfigContext';
const { Content } = Layout;
const loadingView = (

@ -18,12 +18,12 @@
import React from 'react';
import ReactDOM from 'react-dom';
import * as serviceWorker from './serviceWorker';
import * as serviceWorker from './services/serviceWorkers/serviceWorker';
import App from './App';
import Login from './pages/Login';
import Dashboard from './pages/dashboard/Dashboard';
import Apps from './pages/dashboard/apps/Apps';
import Release from './pages/dashboard/apps/release/Release';
import Login from './scenes/Login';
import Dashboard from './scenes/Home';
import Apps from './scenes/Home/scenes/Apps';
import Release from './scenes/Home/scenes/Apps/scenes/Release';
import './index.css';
const routes = [

@ -19,8 +19,8 @@
import React from 'react';
import { Menu, Icon } from 'antd';
import axios from 'axios';
import { withConfigContext } from '../../../context/ConfigContext';
import { handleApiError } from '../../../js/Utils';
import { withConfigContext } from '../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../services/utils/errorHandler';
/*
This class for call the logout api by sending request

@ -24,10 +24,10 @@ import { Link } from 'react-router-dom';
import RouteWithSubRoutes from '../../components/RouteWithSubRoutes';
import { Switch } from 'react-router';
import axios from 'axios';
import './Dashboard.css';
import { withConfigContext } from '../../context/ConfigContext';
import Logout from './logout/Logout';
import { handleApiError } from '../../js/Utils';
import './styles.css';
import { withConfigContext } from '../../components/context/ConfigContext';
import Logout from './components/Logout';
import { handleApiError } from '../../services/utils/errorHandler';
const { SubMenu } = Menu;

@ -19,7 +19,7 @@
import { Card, Typography, Col, Row } from 'antd';
import React from 'react';
import { Link } from 'react-router-dom';
import './AppCard.css';
import './styles.css';
import StarRatings from 'react-star-ratings';
const { Meta } = Card;

@ -17,11 +17,11 @@
*/
import React from 'react';
import AppCard from './AppCard';
import AppCard from './components/AppCard';
import { Col, Row, Result } from 'antd';
import axios from 'axios';
import { withConfigContext } from '../../context/ConfigContext';
import { handleApiError } from '../../js/Utils';
import { withConfigContext } from '../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../services/utils/errorHandler';
import InfiniteScroll from 'react-infinite-scroller';
const limit = 30;

@ -17,7 +17,7 @@
*/
import React from 'react';
import AppList from '../../../components/apps/AppList';
import AppList from './components/AppList';
class Apps extends React.Component {
routes;

@ -19,7 +19,7 @@
import React, { Component } from 'react';
import RcViewer from 'rc-viewer';
class ImgViewer extends Component {
class ImageViewer extends Component {
render() {
const options = {
title: false,
@ -59,4 +59,4 @@ class ImgViewer extends Component {
}
}
export default ImgViewer;
export default ImageViewer;

@ -23,9 +23,9 @@ import TimeAgo from 'javascript-time-ago';
// Load locale-specific relative date/time formatting rules.
import en from 'javascript-time-ago/locale/en';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const columns = [

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -18,14 +18,14 @@
import React from 'react';
import { Modal, Spin, Tabs } from 'antd';
import UserInstall from './UserInstall';
import GroupInstall from './GroupInstall';
import RoleInstall from './RoleInstall';
import DeviceInstall from './DeviceInstall';
import UserInstall from './components/UserInstall';
import GroupInstall from './components/GroupInstall';
import RoleInstall from './components/RoleInstall';
import DeviceInstall from './components/DeviceInstall';
const { TabPane } = Tabs;
class AppInstallModal extends React.Component {
class Install extends React.Component {
state = {
data: [],
};
@ -65,4 +65,4 @@ class AppInstallModal extends React.Component {
}
}
export default AppInstallModal;
export default Install;

@ -31,8 +31,8 @@ import {
} from 'antd';
import StarRatings from 'react-star-ratings';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import { withConfigContext } from '../../../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../../../services/utils/errorHandler';
const { Title } = Typography;
const { TextArea } = Input;

@ -18,9 +18,9 @@
import React from 'react';
import { List, Typography, Empty, Alert } from 'antd';
import SingleReview from './singleReview/SingleReview';
import AddReview from './AddReview';
import { withConfigContext } from '../../../../context/ConfigContext';
import SingleReview from '../Reviews/components/Review';
import AddReview from './components/AddReview';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
const { Text } = Typography;

@ -19,12 +19,12 @@
import React from 'react';
import { Row, Typography, Icon } from 'antd';
import StarRatings from 'react-star-ratings';
import './DetailedRating.css';
import { withConfigContext } from '../../../context/ConfigContext';
import './styles.css';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
const { Text } = Typography;
class DetailedRating extends React.Component {
class Rating extends React.Component {
render() {
const { detailedRating } = this.props;
@ -122,4 +122,4 @@ class DetailedRating extends React.Component {
}
}
export default withConfigContext(DetailedRating);
export default withConfigContext(Rating);

@ -30,14 +30,14 @@ import {
} from 'antd';
import StarRatings from 'react-star-ratings';
import axios from 'axios';
import './EditReview.css';
import { withConfigContext } from '../../../../../../context/ConfigContext';
import { handleApiError } from '../../../../../../js/Utils';
import './styles.css';
import { withConfigContext } from '../../../../../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../../../../../services/utils/errorHandler';
const { Title } = Typography;
const { TextArea } = Input;
class EditReview extends React.Component {
class Edit extends React.Component {
constructor(props) {
super(props);
this.state = {
@ -195,4 +195,4 @@ class EditReview extends React.Component {
}
}
export default withConfigContext(EditReview);
export default withConfigContext(Edit);

@ -21,11 +21,11 @@ import { Avatar, notification } from 'antd';
import { List, Typography, Popconfirm } from 'antd';
import StarRatings from 'react-star-ratings';
import Twemoji from 'react-twemoji';
import './SingleReview.css';
import EditReview from './editReview/EditReview';
import './styles.css';
import EditReview from './components/Edit';
import axios from 'axios';
import { withConfigContext } from '../../../../../context/ConfigContext';
import { handleApiError } from '../../../../../js/Utils';
import { withConfigContext } from '../../../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../../../services/utils/errorHandler';
const { Text, Paragraph } = Typography;
const colorList = [
@ -41,7 +41,7 @@ const colorList = [
'#f9ca24',
];
class SingleReview extends React.Component {
class Review extends React.Component {
static defaultProps = {
isPersonalReview: false,
};
@ -167,4 +167,4 @@ class SingleReview extends React.Component {
}
}
export default withConfigContext(SingleReview);
export default withConfigContext(Review);

@ -18,13 +18,13 @@
import React from 'react';
import { List, Spin, Button, Alert } from 'antd';
import './Reviews.css';
import './styles.css';
import InfiniteScroll from 'react-infinite-scroller';
import SingleReview from './singleReview/SingleReview';
import SingleReview from './components/Review';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
const limit = 5;

@ -17,13 +17,13 @@
*/
import React from 'react';
import CurrentUsersReview from './CurrentUsersReview';
import CurrentUsersReview from './componets/CurrentUsersReview';
import { Col, Divider, Row, Typography } from 'antd';
import DetailedRating from '../DetailedRating';
import Reviews from './Reviews';
import DetailedRating from './componets/Rating';
import Reviews from './componets/Reviews';
import axios from 'axios';
import { handleApiError } from '../../../../js/Utils';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../services/utils/errorHandler';
import { withConfigContext } from '../../../../../../../../../../components/context/ConfigContext';
const { Text } = Typography;

@ -23,8 +23,8 @@ import TimeAgo from 'javascript-time-ago';
// Load locale-specific relative date/time formatting rules.
import en from 'javascript-time-ago/locale/en';
import { withConfigContext } from '../../../context/ConfigContext';
import { handleApiError } from '../../../js/Utils';
import { withConfigContext } from '../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../services/utils/errorHandler';
const { Text } = Typography;

@ -23,9 +23,9 @@ import TimeAgo from 'javascript-time-ago';
// Load locale-specific relative date/time formatting rules.
import en from 'javascript-time-ago/locale/en';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const columns = [

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -20,9 +20,9 @@ import React from 'react';
import { Typography, Select, Spin, Alert } from 'antd';
import debounce from 'lodash.debounce';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { handleApiError } from '../../../../js/Utils';
import InstallModalFooter from './installModalFooter/InstallModalFooter';
import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography;
const { Option } = Select;

@ -17,14 +17,14 @@
*/
import React from 'react';
import { Modal, Spin, Tabs } from 'antd';
import DeviceUninstall from './DeviceUninstall';
import UserUninstall from './UserUninstall';
import RoleUninstall from './RoleUninstall';
import GroupUninstall from './GroupUninstall';
import DeviceUninstall from './components/DeviceUninstall';
import UserUninstall from './components/UserUninstall';
import RoleUninstall from './components/RoleUninstall';
import GroupUninstall from './components/GroupUninstall';
const { TabPane } = Tabs;
class AppUninstallModal extends React.Component {
class Uninstall extends React.Component {
state = {
data: [],
};
@ -74,4 +74,4 @@ class AppUninstallModal extends React.Component {
}
}
export default AppUninstallModal;
export default Uninstall;

@ -30,17 +30,17 @@ import {
Tabs,
Tag,
} from 'antd';
import '../../../App.css';
import ImgViewer from '../../apps/release/images/ImgViewer';
import '../../../../../../../../App.css';
import ImageViewer from './components/ImageViewer';
import StarRatings from 'react-star-ratings';
import axios from 'axios';
import pSBC from 'shade-blend-color';
import AppInstallModal from './install/AppInstallModal';
import AppUninstallModal from './install/AppUninstallModal';
import { withConfigContext } from '../../../context/ConfigContext';
import { handleApiError } from '../../../js/Utils';
import ReviewContainer from './review/ReviewContainer';
import SubscriptionDetails from './SubscriptionDetails';
import AppInstallModal from './components/Install';
import Uninstall from './components/Uninstall';
import { withConfigContext } from '../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../../../services/utils/errorHandler';
import ReviewContainer from './components/ReviewContainer';
import SubscriptionDetails from './components/SubscriptionDetails';
const { Title, Text, Paragraph } = Typography;
const { TabPane } = Tabs;
@ -175,7 +175,7 @@ class ReleaseView extends React.Component {
onClose={this.closeAppOperationModal}
onInstall={this.appOperation}
/>
<AppUninstallModal
<Uninstall
uuid={release.uuid}
loading={this.state.loading}
visible={this.state.appUninstallModalVisible}
@ -220,7 +220,7 @@ class ReleaseView extends React.Component {
<Tabs>
<TabPane tab="App" key="1">
<Row>
<ImgViewer images={release.screenshots} />
<ImageViewer images={release.screenshots} />
</Row>
<Divider />
<Paragraph

@ -17,13 +17,13 @@
*/
import React from 'react';
import '../../../../App.css';
import '../../../../../../App.css';
import { Skeleton, Typography, Row, Col, Card, Breadcrumb, Icon } from 'antd';
import ReleaseView from '../../../../components/apps/release/ReleaseView';
import ReleaseView from './components/ReleaseView';
import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext';
import { withConfigContext } from '../../../../../../components/context/ConfigContext';
import { Link } from 'react-router-dom';
import { handleApiError } from '../../../../js/Utils';
import { handleApiError } from '../../../../../../services/utils/errorHandler';
const { Title } = Typography;

@ -28,9 +28,9 @@ import {
Checkbox,
notification,
} from 'antd';
import './Login.css';
import './styles.css';
import axios from 'axios';
import { withConfigContext } from '../context/ConfigContext';
import { withConfigContext } from '../../components/context/ConfigContext';
const { Title } = Typography;
const { Text } = Typography;
Loading…
Cancel
Save