Skip to content
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
2 changes: 1 addition & 1 deletion packages/aesirx-bi-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aesirx-bi-app",
"version": "2.8.0",
"version": "2.8.1",
"license": "GPL-3.0-only",
"author": "AesirX",
"main": "dist/index.js",
Expand Down
95 changes: 66 additions & 29 deletions packages/aesirx-bi-app/src/containers/Dashboard/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,21 @@ const Dashboard = observer(
<div className="bg-white rounded-3 rounded-top-0 position-relative ChartWrapper">
<div className="bg-secondary-25 py-2">
<Row>
<Col sm="3">
<div className="text-gray-heading fw-semibold text-center">Local</div>
</Col>
<Col sm="9">
<div className="text-gray-heading fw-semibold">Page</div>
{this.props.integration && this.props.isFreemium ? (
<></>
) : (
<Col sm="3">
<div className="text-gray-heading fw-semibold text-center">Local</div>
</Col>
)}
<Col sm={`${this.props.integration && this.props.isFreemium ? '12' : '9'}`}>
<div
className={`text-gray-heading fw-semibold ${
this.props.integration && this.props.isFreemium ? 'ps-3' : ''
}`}
>
Page
</div>
</Col>
</Row>
</div>
Expand All @@ -207,17 +217,29 @@ const Dashboard = observer(
const urlParams = item?.url && new URL(item?.url);
return (
<Row key={index} className="py-10">
<Col sm="3">
<div className="text-center">
<span
className={`me-1 fi fi-${item[
BI_FLOW_DETAIL_KEY.GEO
]?.country?.code?.toLowerCase()}`}
></span>
</div>
</Col>
<Col sm="9">
<div className="text-ellipsis-block text-nowrap">
{this.props.integration && this.props.isFreemium ? (
<></>
) : (
<Col sm="3">
<div className="text-center">
<span
className={`me-1 fi fi-${item[
BI_FLOW_DETAIL_KEY.GEO
]?.country?.code?.toLowerCase()}`}
></span>
</div>
</Col>
)}
<Col
sm={`${
this.props.integration && this.props.isFreemium ? '12' : '9'
}`}
>
<div
className={`text-ellipsis-block text-nowrap ${
this.props.integration && this.props.isFreemium ? 'ps-3' : ''
}`}
>
<a href={item?.url} target="_blank" rel="noreferrer">
{urlParams === ''
? 'Unknown'
Expand All @@ -234,13 +256,21 @@ const Dashboard = observer(
{this.dashboardListViewModel.liveVisitorsListData?.length ? (
<div className="bg-white border-top text-center py-3">
{this.props.integration ? (
<a
href="#"
onClick={(e) => this.props.handleChangeLink(e, `/visitors/realtime`)}
className={'text-secondary-50 text-nowrap fw-medium'}
>
{t('txt_view_more')}
</a>
<>
{!this.props.isFreemium ? (
<a
href="#"
onClick={(e) =>
this.props.handleChangeLink(e, `/visitors/realtime`)
}
className={'text-secondary-50 text-nowrap fw-medium'}
>
{t('txt_view_more')}
</a>
) : (
<></>
)}
</>
) : (
<Link
to="/visitors/realtime"
Expand Down Expand Up @@ -436,12 +466,19 @@ const Dashboard = observer(
/>
</div>
</Col>
<Col lg={6} className="mb-24">
<div className="bg-white rounded-3 p-24 shadow-sm h-100 position-relative">
<Countries {...this.props} />
</div>
</Col>
<Col lg={6} className="mb-24">
{this.props.integration && this.props.isFreemium ? (
<></>
) : (
<Col lg={6} className="mb-24">
<div className="bg-white rounded-3 p-24 shadow-sm h-100 position-relative">
<Countries {...this.props} />
</div>
</Col>
)}
<Col
lg={`${this.props.integration && this.props.isFreemium ? '12' : '6'}`}
className="mb-24"
>
<div className="bg-white rounded-3 p-24 shadow-sm h-100 position-relative">
<Browsers {...this.props} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion packages/aesirx-bi-app/src/containers/Dashboard/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ const DashboardContainer = observer(
componentRef={this.componentRef}
sectionName={'dashboard'}
/>
<ComponentToPrint ref={(el) => (this.componentRef = el)} />
<ComponentToPrint ref={(el) => (this.componentRef = el)} {...this.props} />
</DashboardViewModelContextProvider>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,15 +95,16 @@ const UTMTrackingPage = observer((props) => {
?.reduce((acc, curr) => ({ ...acc, ...curr }), {}),
'filter[attribute_name]': 'utm_source',
});
getAttributeUtm({
...activeDomain
?.map((value, index) => ({
[`filter[domain][${index + 1}]`]: value,
}))
?.reduce((acc, curr) => ({ ...acc, ...curr }), {}),
'filter[attribute_name][0]': 'utm_campaign',
'filter_not[visibility_change]': 'true',
});
!(props.integration && props.isFreemium) &&
getAttributeUtm({
...activeDomain
?.map((value, index) => ({
[`filter[domain][${index + 1}]`]: value,
}))
?.reduce((acc, curr) => ({ ...acc, ...curr }), {}),
'filter[attribute_name][0]': 'utm_campaign',
'filter_not[visibility_change]': 'true',
});
};
execute();
return () => {};
Expand Down Expand Up @@ -234,23 +235,29 @@ const UTMTrackingPage = observer((props) => {
/>
</div>
</div>
<h4 className="mb-3 mt-4">UTM Value & Engagement Score</h4>
<div className="row gx-24 mb-24">
<div className="col-12">
{dataAttributeUtm?.list?.data && (
<BehaviorTable
data={dataAttributeUtm?.list?.toAttributeUtm(dataStream?.utm_currency)}
statusTable={statusAttributeUtm}
isPaginationAPI={true}
pagination={dataAttributeUtm?.pagination}
handleFilterTable={handleFilterAttributeUtm}
handleSort={handleSort}
sortBy={sortBy}
{...props}
/>
)}
</div>
</div>
{props.integration && props.isFreemium ? (
<></>
) : (
<>
<h4 className="mb-3 mt-4">UTM Value & Engagement Score</h4>
<div className="row gx-24 mb-24">
<div className="col-12">
{dataAttributeUtm?.list?.data && (
<BehaviorTable
data={dataAttributeUtm?.list?.toAttributeUtm(dataStream?.utm_currency)}
statusTable={statusAttributeUtm}
isPaginationAPI={true}
pagination={dataAttributeUtm?.pagination}
handleFilterTable={handleFilterAttributeUtm}
handleSort={handleSort}
sortBy={sortBy}
{...props}
/>
)}
</div>
</div>
</>
)}
<h4 className="mb-3 mt-4">List Campaign</h4>
{dataAttributeList?.toAttributeList()?.length && (
<Row className="mb-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const UTMTrackingPage = observer(
);
}
render() {
const { integration = false } = this.props;
const { integration = false, isFreemium = true } = this.props;
const { integrationLink, activeDomain } = this.biListViewModel;

const match = matchPath(history.location.pathname, {
Expand All @@ -67,6 +67,7 @@ const UTMTrackingPage = observer(

<ComponentToPrint
integration={integration}
isFreemium={isFreemium}
integrationLink={integrationLink}
activeDomain={activeDomain}
ref={(el) => (this.componentRef = el)}
Expand Down
108 changes: 56 additions & 52 deletions packages/aesirx-bi-app/src/containers/VisitorsPage/Visitors.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,61 +201,65 @@ const VisitorsPage = observer(
handleChangeLink={this.handleChangeLink}
{...this.props}
/>
<div className="position-relative ChartWrapper my-4 bg-white rounded-3 p-3">
<div className="d-flex align-items-center justify-content-between">
<h4 className="ps-3">{t('txt_user_experience')}</h4>
{this.props.integration ? (
<a
href="#"
onClick={(e) => this.handleChangeLink(e, `/flow-list`)}
className={'text-success me-2 text-nowrap fw-semibold'}
>
{t('txt_view_more')}
</a>
{this.props.integration && this.props.isFreemium ? (
<></>
) : (
<div className="position-relative ChartWrapper my-4 bg-white rounded-3 p-3">
<div className="d-flex align-items-center justify-content-between">
<h4 className="ps-3">{t('txt_user_experience')}</h4>
{this.props.integration ? (
<a
href="#"
onClick={(e) => this.handleChangeLink(e, `/flow-list`)}
className={'text-success me-2 text-nowrap fw-semibold'}
>
{t('txt_view_more')}
</a>
) : (
<Link to="/flow-list" className="text-success me-2 text-nowrap fw-semibold">
{t('txt_view_more')}
</Link>
)}
</div>

{this.visitorsListViewModel?.statusFlowList === PAGE_STATUS.LOADING ? (
<RingLoaderComponent className="d-flex justify-content-center align-items-center bg-white rounded-3 shadow-sm" />
) : this.visitorsListViewModel?.flowListTableData?.list ? (
<FlowListTable
data={this.visitorsListViewModel?.flowListTableData?.list?.toFlowListTable(
this.props.integration,
this.context.biListViewModel.dataStream?.utm_currency
)}
isPagination={false}
pagination={this.visitorsListViewModel?.flowListTableData?.pagination}
selectPage={async (value) => {
await this.visitorsListViewModel.handleFilterFlowList({ page: value });
}}
selectPageSize={async (value) => {
await this.visitorsListViewModel.handleFilterFlowList({
page: 1,
page_size: value,
});
}}
status={status}
sortAPI={true}
handleSort={this.handleSortFlowList}
sortBy={this.visitorsListViewModel?.sortByFlowList}
{...this.props}
/>
) : (
<Link to="/flow-list" className="text-success me-2 text-nowrap fw-semibold">
{t('txt_view_more')}
</Link>
<div className="position-relative ChartWrapper bg-white rounded-3 shadow-sm">
<div className="position-absolute top-50 start-50 translate-middle">
<ComponentNoData
icons={env.PUBLIC_URL + '/assets/images/ic_project.svg'}
title={t('txt_no_data')}
width="w-50"
/>
</div>
</div>
)}
</div>

{this.visitorsListViewModel?.statusFlowList === PAGE_STATUS.LOADING ? (
<RingLoaderComponent className="d-flex justify-content-center align-items-center bg-white rounded-3 shadow-sm" />
) : this.visitorsListViewModel?.flowListTableData?.list ? (
<FlowListTable
data={this.visitorsListViewModel?.flowListTableData?.list?.toFlowListTable(
this.props.integration,
this.context.biListViewModel.dataStream?.utm_currency
)}
isPagination={false}
pagination={this.visitorsListViewModel?.flowListTableData?.pagination}
selectPage={async (value) => {
await this.visitorsListViewModel.handleFilterFlowList({ page: value });
}}
selectPageSize={async (value) => {
await this.visitorsListViewModel.handleFilterFlowList({
page: 1,
page_size: value,
});
}}
status={status}
sortAPI={true}
handleSort={this.handleSortFlowList}
sortBy={this.visitorsListViewModel?.sortByFlowList}
{...this.props}
/>
) : (
<div className="position-relative ChartWrapper bg-white rounded-3 shadow-sm">
<div className="position-absolute top-50 start-50 translate-middle">
<ComponentNoData
icons={env.PUBLIC_URL + '/assets/images/ic_project.svg'}
title={t('txt_no_data')}
width="w-50"
/>
</div>
</div>
)}
</div>
)}
</div>
);
}
Expand Down
3 changes: 2 additions & 1 deletion packages/aesirx-bi-app/src/containers/VisitorsPage/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const VisitorsContainer = observer(
}

render() {
const { integration = false } = this.props;
const { integration = false, isFreemium = true } = this.props;
const { integrationLink, activeDomain } = this.biListViewModel;
const matchVisitor = matchPath(history.location.pathname, {
path: process.env.REACT_APP_INTERGRATION ? '/bi' : '' + '/visitors',
Expand Down Expand Up @@ -105,6 +105,7 @@ const VisitorsContainer = observer(
integrationLink={integrationLink}
activeDomain={activeDomain}
ref={(el) => (this.componentRef = el)}
isFreemium={isFreemium}
/>
</VisitorsViewModelContextProvider>
);
Expand Down
Loading