Skip to content

Commit 923338b

Browse files
authored
Merge branch 'ee-setup' into feat/manual-env
2 parents df8f047 + fb687bc commit 923338b

File tree

6 files changed

+57
-61
lines changed

6 files changed

+57
-61
lines changed

client/packages/lowcoder/src/i18n/locales/en.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2436,6 +2436,15 @@ export const en = {
24362436
"LIBRARY_QUERY_DELETE" : "Delete Library Query ",
24372437
"LIBRARY_QUERY_PUBLISH" : "Publish Library Query ",
24382438
"API_CALL_EVENT" : "API Call Event ",
2439+
"logFilter" : "Log Filter",
2440+
"noLogsFound" : "No logs found. Adjust the filters and try again.",
2441+
"usageLogUserEngagement" : "User Engagement By Region",
2442+
"usageLogAppViews" : "App Usage over time",
2443+
"usageLogTopTen" : "Top 10 Apps",
2444+
"usageLogAnonymousKNown" : "Anonymous/Known Users",
2445+
"usageLogDevices" : "Device/OS Breakdown",
2446+
"usageLogBrowsers" : "Browser/Layout Engine Breakdown",
2447+
24392448
},
24402449

24412450
"subscription": {

client/packages/lowcoder/src/pages/ApplicationV2/index.tsx

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -210,56 +210,43 @@ export default function ApplicationHome() {
210210

211211
{
212212
items: [
213-
214213
{
215-
text: <TabLabel>{trans("home.datasource")}</TabLabel>,
216-
routePath: DATASOURCE_URL,
217-
routePathExact: false,
218-
routeComp: DatasourceHome,
219-
icon: ({ selected, ...otherProps }) => selected ? <HomeDataSourceIcon {...otherProps} width={"24px"}/> : <HomeDataSourceIcon {...otherProps} width={"24px"}/>,
220-
visible: ({ user }) => user.orgDev,
221-
onSelected: (_, currentPath) => currentPath.split("/")[1] === "datasource",
222-
mobileVisible: false,
214+
text: <TabLabel>{trans("home.datasource")}</TabLabel>,
215+
routePath: DATASOURCE_URL,
216+
routePathExact: false,
217+
routeComp: DatasourceHome,
218+
icon: ({ selected, ...otherProps }) => selected ? <HomeDataSourceIcon {...otherProps} width={"24px"}/> : <HomeDataSourceIcon {...otherProps} width={"24px"}/>,
219+
visible: ({ user }) => user.orgDev,
220+
onSelected: (_, currentPath) => currentPath.split("/")[1] === "datasource",
221+
mobileVisible: false,
222+
},
223+
{
224+
text: <TabLabel>{trans("home.queryLibrary")}</TabLabel>,
225+
routePath: QUERY_LIBRARY_URL,
226+
routeComp: QueryLibraryEditor,
227+
icon: ({ selected, ...otherProps }) => selected ? <HomeQueryLibraryIcon {...otherProps} width={"24px"}/> : <HomeQueryLibraryIcon {...otherProps} width={"24px"}/>,
228+
visible: ({ user }) => user.orgDev,
229+
mobileVisible: false,
230+
}
231+
],
223232
},
224-
{
225-
text: <TabLabel>{trans("home.queryLibrary")}</TabLabel>,
226-
routePath: QUERY_LIBRARY_URL,
227-
routeComp: QueryLibraryEditor,
228-
icon: ({ selected, ...otherProps }) => selected ? <HomeQueryLibraryIcon {...otherProps} width={"24px"}/> : <HomeQueryLibraryIcon {...otherProps} width={"24px"}/>,
229-
visible: ({ user }) => user.orgDev,
230-
mobileVisible: false,
231-
}
232-
],
233-
},
234-
235-
// Show Subscription if not yet subscribed
236233

237-
!supportSubscription && user.orgDev ? {
238-
items: [
239-
{
240-
text: <TabLabel>{trans("home.support")}</TabLabel>,
241-
routePath: SUBSCRIPTION_SETTING,
242-
routeComp: Subscription,
243-
routePathExact: false,
244-
icon: ({ selected, ...otherProps }) => selected ? <SupportIcon {...otherProps} width={"24px"}/> : <SupportIcon {...otherProps} width={"24px"}/>,
245-
mobileVisible: true,
246-
},
247-
],
248-
} : { items: [] },
234+
// Show Subscription if not yet subscribed else Support Pages
249235

250-
// show Support Section when an active Subscription exist
251-
supportSubscription && user.orgDev ? {
252-
items: [
253236
{
254-
text: <TabLabel>{trans("home.support")}</TabLabel>,
255-
routePath: SUPPORT_URL,
256-
routeComp: Support,
257-
routePathExact: false,
258-
icon: ({ selected, ...otherProps }) => selected ? <SupportIcon {...otherProps} width={"24px"}/> : <SupportIcon {...otherProps} width={"24px"}/>,
259-
mobileVisible: true,
237+
items: [
238+
{
239+
text: <TabLabel>{trans("home.support")}</TabLabel>,
240+
routePath: supportSubscription ? SUPPORT_URL : SUBSCRIPTION_SETTING,
241+
routeComp: supportSubscription ? Support : Setting,
242+
routePathExact: false,
243+
icon: ({ selected, ...otherProps }) => <SupportIcon {...otherProps} width={"24px"} />,
244+
mobileVisible: true,
245+
visible: ({ user }) => user.orgDev
246+
}
247+
]
260248
},
261-
],
262-
} : { items: [] },
249+
263250
{
264251
items: [
265252
{

client/packages/lowcoder/src/pages/setting/appUsage/charts/browserEngineBreakdown.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useMemo, useRef } from "react";
22
import ReactECharts from "echarts-for-react";
33
import dayjs from "dayjs";
44
import { debounce } from "lodash";
5+
import { trans } from "i18n";
56

67
interface Props {
78
data: Array<any>;
@@ -38,9 +39,8 @@ const BrowserEngineBreakdownChart = ({ data}: Props) => {
3839
<ReactECharts
3940
ref={chartRef}
4041
option={{
41-
title: { text: "Audit Log", left: "center" },
4242
tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
43-
legend: { left: "left", orient: "vertical", top: "12%" }, // Ensure labels are on the left
43+
legend: { left: "left", orient: "vertical", top: "12%" },
4444
grid: { left: "20%", right: "4%", bottom: "3%", containLabel: true },
4545
xAxis: {
4646
type: "value",

client/packages/lowcoder/src/pages/setting/appUsage/charts/deviceOSBreakdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useMemo, useRef } from "react";
22
import ReactECharts from "echarts-for-react";
33
import dayjs from "dayjs";
44
import { debounce } from "lodash";
5+
import { trans } from "i18n";
56

67
interface Props {
78
data: Array<any>;
@@ -38,7 +39,6 @@ const DeviceOSBreakdownChart = ({ data}: Props) => {
3839
<ReactECharts
3940
ref={chartRef}
4041
option={{
41-
title: { text: "Audit Log", left: "center" },
4242
tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
4343
legend: { left: "left", orient: "vertical", top: "12%" }, // Ensure labels are on the left
4444
grid: { left: "20%", right: "4%", bottom: "3%", containLabel: true },

client/packages/lowcoder/src/pages/setting/appUsage/charts/userActivityByTime.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React, { useRef } from "react";
22
import ReactECharts from "echarts-for-react";
33
import dayjs from "dayjs";
44
import { debounce } from "lodash";
5+
import { trans } from "i18n";
56

67
interface Props {
78
data: Array<any>;
@@ -72,7 +73,6 @@ const UserActivityByTimeChart = ({ data, setDateRange }: Props) => {
7273
<ReactECharts
7374
ref={chartRef}
7475
option={{
75-
title: { text: "App Usage Log", left: "center" },
7676
tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
7777
legend: { left: "left", orient: "vertical", top: "12%" }, // Ensure labels are on the left
7878
grid: { left: "20%", right: "4%", bottom: "3%", containLabel: true },

client/packages/lowcoder/src/pages/setting/appUsage/dashboard.tsx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export function AppUsageDashboard() {
370370
<DetailContent>
371371
<AppLogContent>
372372
<StyleThemeSettingsCover>
373-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.AuditLogOverview")}</h2>
373+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.logFilter")}</h2>
374374
</StyleThemeSettingsCover>
375375
<Card size="small" style={{ marginBottom: "20px" }}>
376376
<Form
@@ -427,7 +427,7 @@ export function AppUsageDashboard() {
427427
</AppLogContent>
428428
<AppLogContent>
429429
<StyleThemeSettingsCover>
430-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"User Engagement By Region"}</h2>
430+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogUserEngagement")}</h2>
431431
</StyleThemeSettingsCover>
432432
<Card size="small">
433433
{loading ? (
@@ -437,13 +437,13 @@ export function AppUsageDashboard() {
437437
<UserEngagementByRegionChart data={allLogs}/>
438438
</>
439439
) : (
440-
<p>No logs found. Adjust the filters and try again.</p>
440+
<p>{trans("enterprise.noLogsFound")}</p>
441441
)}
442442
</Card>
443443
</AppLogContent>
444444
<AppLogContent>
445445
<StyleThemeSettingsCover>
446-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"App Usage Logs"}</h2>
446+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogAppViews")}</h2>
447447
</StyleThemeSettingsCover>
448448
<Card size="small">
449449
{loading ? (
@@ -456,13 +456,13 @@ export function AppUsageDashboard() {
456456
/>
457457
</>
458458
) : (
459-
<p>No logs found. Adjust the filters and try again.</p>
459+
<p>{trans("enterprise.noLogsFound")}</p>
460460
)}
461461
</Card>
462462
</AppLogContent>
463463
<AppLogContent>
464464
<StyleThemeSettingsCover>
465-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"Top 10 Apps"}</h2>
465+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogTopTen")}</h2>
466466
</StyleThemeSettingsCover>
467467
<Card size="small">
468468
{loading ? (
@@ -480,13 +480,13 @@ export function AppUsageDashboard() {
480480
/>
481481
</div>
482482
) : (
483-
<p>No logs found. Adjust the filters and try again.</p>
483+
<p>{trans("enterprise.noLogsFound")}</p>
484484
)}
485485
</Card>
486486
</AppLogContent>
487487
<AppLogContent>
488488
<StyleThemeSettingsCover>
489-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"Anonymous/Known Users"}</h2>
489+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogAnonymousKNown")}</h2>
490490
</StyleThemeSettingsCover>
491491
<Card size="small">
492492
{loading ? (
@@ -498,13 +498,13 @@ export function AppUsageDashboard() {
498498
/>
499499
</>
500500
) : (
501-
<p>No logs found. Adjust the filters and try again.</p>
501+
<p>{trans("enterprise.noLogsFound")}</p>
502502
)}
503503
</Card>
504504
</AppLogContent>
505505
<AppLogContent>
506506
<StyleThemeSettingsCover>
507-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"Device/OS Breakdown"}</h2>
507+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogDevices")}</h2>
508508
</StyleThemeSettingsCover>
509509
<Card size="small">
510510
{loading ? (
@@ -516,13 +516,13 @@ export function AppUsageDashboard() {
516516
/>
517517
</>
518518
) : (
519-
<p>No logs found. Adjust the filters and try again.</p>
519+
<p>{trans("enterprise.noLogsFound")}</p>
520520
)}
521521
</Card>
522522
</AppLogContent>
523523
<AppLogContent>
524524
<StyleThemeSettingsCover>
525-
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{"Browser/Layout Engine Breakdown"}</h2>
525+
<h2 style={{ color: "#ffffff", marginTop: "8px" }}>{trans("enterprise.usageLogBrowsers")}</h2>
526526
</StyleThemeSettingsCover>
527527
<Card size="small">
528528
{loading ? (
@@ -534,7 +534,7 @@ export function AppUsageDashboard() {
534534
/>
535535
</>
536536
) : (
537-
<p>No logs found. Adjust the filters and try again.</p>
537+
<p>{trans("enterprise.noLogsFound")}</p>
538538
)}
539539
</Card>
540540
</AppLogContent>

0 commit comments

Comments
 (0)