Change the file structure of the APIM Store

4.x.x
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 { BrowserRouter as Router, Redirect, Switch } from 'react-router-dom';
import axios from 'axios'; import axios from 'axios';
import { Layout, Spin, Result } from 'antd'; import { Layout, Spin, Result } from 'antd';
import ConfigContext from './context/ConfigContext'; import ConfigContext from './components/context/ConfigContext';
const { Content } = Layout; const { Content } = Layout;
const loadingView = ( const loadingView = (

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

@ -19,8 +19,8 @@
import React from 'react'; import React from 'react';
import { Menu, Icon } from 'antd'; import { Menu, Icon } from 'antd';
import axios from 'axios'; import axios from 'axios';
import { withConfigContext } from '../../../context/ConfigContext'; import { withConfigContext } from '../../../../components/context/ConfigContext';
import { handleApiError } from '../../../js/Utils'; import { handleApiError } from '../../../../services/utils/errorHandler';
/* /*
This class for call the logout api by sending request 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 RouteWithSubRoutes from '../../components/RouteWithSubRoutes';
import { Switch } from 'react-router'; import { Switch } from 'react-router';
import axios from 'axios'; import axios from 'axios';
import './Dashboard.css'; import './styles.css';
import { withConfigContext } from '../../context/ConfigContext'; import { withConfigContext } from '../../components/context/ConfigContext';
import Logout from './logout/Logout'; import Logout from './components/Logout';
import { handleApiError } from '../../js/Utils'; import { handleApiError } from '../../services/utils/errorHandler';
const { SubMenu } = Menu; const { SubMenu } = Menu;

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

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

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

@ -19,7 +19,7 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import RcViewer from 'rc-viewer'; import RcViewer from 'rc-viewer';
class ImgViewer extends Component { class ImageViewer extends Component {
render() { render() {
const options = { const options = {
title: false, 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. // Load locale-specific relative date/time formatting rules.
import en from 'javascript-time-ago/locale/en'; import en from 'javascript-time-ago/locale/en';
import { withConfigContext } from '../../../../context/ConfigContext'; import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../js/Utils'; import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
import InstallModalFooter from './installModalFooter/InstallModalFooter'; import InstallModalFooter from '../../../installModalFooter';
const { Text } = Typography; const { Text } = Typography;
const columns = [ const columns = [

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

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

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

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

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

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

@ -19,12 +19,12 @@
import React from 'react'; import React from 'react';
import { Row, Typography, Icon } from 'antd'; import { Row, Typography, Icon } from 'antd';
import StarRatings from 'react-star-ratings'; import StarRatings from 'react-star-ratings';
import './DetailedRating.css'; import './styles.css';
import { withConfigContext } from '../../../context/ConfigContext'; import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
const { Text } = Typography; const { Text } = Typography;
class DetailedRating extends React.Component { class Rating extends React.Component {
render() { render() {
const { detailedRating } = this.props; 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'; } from 'antd';
import StarRatings from 'react-star-ratings'; import StarRatings from 'react-star-ratings';
import axios from 'axios'; import axios from 'axios';
import './EditReview.css'; import './styles.css';
import { withConfigContext } from '../../../../../../context/ConfigContext'; import { withConfigContext } from '../../../../../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../../js/Utils'; import { handleApiError } from '../../../../../../../../../../../../../../../../services/utils/errorHandler';
const { Title } = Typography; const { Title } = Typography;
const { TextArea } = Input; const { TextArea } = Input;
class EditReview extends React.Component { class Edit extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { 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 { List, Typography, Popconfirm } from 'antd';
import StarRatings from 'react-star-ratings'; import StarRatings from 'react-star-ratings';
import Twemoji from 'react-twemoji'; import Twemoji from 'react-twemoji';
import './SingleReview.css'; import './styles.css';
import EditReview from './editReview/EditReview'; import EditReview from './components/Edit';
import axios from 'axios'; import axios from 'axios';
import { withConfigContext } from '../../../../../context/ConfigContext'; import { withConfigContext } from '../../../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../../js/Utils'; import { handleApiError } from '../../../../../../../../../../../../../../services/utils/errorHandler';
const { Text, Paragraph } = Typography; const { Text, Paragraph } = Typography;
const colorList = [ const colorList = [
@ -41,7 +41,7 @@ const colorList = [
'#f9ca24', '#f9ca24',
]; ];
class SingleReview extends React.Component { class Review extends React.Component {
static defaultProps = { static defaultProps = {
isPersonalReview: false, 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 React from 'react';
import { List, Spin, Button, Alert } from 'antd'; import { List, Spin, Button, Alert } from 'antd';
import './Reviews.css'; import './styles.css';
import InfiniteScroll from 'react-infinite-scroller'; import InfiniteScroll from 'react-infinite-scroller';
import SingleReview from './singleReview/SingleReview'; import SingleReview from './components/Review';
import axios from 'axios'; import axios from 'axios';
import { withConfigContext } from '../../../../context/ConfigContext'; import { withConfigContext } from '../../../../../../../../../../../../components/context/ConfigContext';
import { handleApiError } from '../../../../js/Utils'; import { handleApiError } from '../../../../../../../../../../../../services/utils/errorHandler';
const limit = 5; const limit = 5;

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

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

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

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

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

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

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

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

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

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