Skip to content

Commit 1dc1fb5

Browse files
committed
change homepage widgets
1 parent b75e198 commit 1dc1fb5

File tree

52 files changed

+2533
-343
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2533
-343
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/**
2+
* Cerberus Copyright (C) 2013 - 2025 cerberustesting
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This file is part of Cerberus.
6+
*
7+
* Cerberus is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Cerberus is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cerberus. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.cerberus.core.api.dto.ai;
21+
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
24+
import com.fasterxml.jackson.annotation.JsonView;
25+
import io.swagger.v3.oas.annotations.media.Schema;
26+
import lombok.Builder;
27+
import lombok.Data;
28+
import lombok.extern.jackson.Jacksonized;
29+
import org.cerberus.core.api.dto.views.View;
30+
31+
/**
32+
* @author bcivel
33+
*/
34+
@Data
35+
@Builder
36+
@Jacksonized
37+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
38+
@Schema(name = "LogAIUsageMonthlyStats")
39+
public class LogAIUsageMonthlyStatsDTOV001 {
40+
41+
@JsonView(View.Public.GET.class)
42+
@Schema(description = "Global KPIs for the last 30 days")
43+
private LogAIUsageStatsDTOV001 currentPeriod;
44+
45+
@JsonView(View.Public.GET.class)
46+
@Schema(description = "Global KPIs for the previous 30 days")
47+
private LogAIUsageStatsDTOV001 previousPeriod;
48+
49+
@JsonView(View.Public.GET.class)
50+
@Schema(description = "User KPIs for the last 30 days")
51+
private LogAIUsageStatsDTOV001 userCurrentPeriod;
52+
53+
@JsonView(View.Public.GET.class)
54+
@Schema(description = "User KPIs for the previous 30 days")
55+
private LogAIUsageStatsDTOV001 userPreviousPeriod;
56+
}

source/src/main/java/org/cerberus/core/api/dto/ai/LogAIUsageStatsDTOV001.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"totalInputTokens",
4040
"totalOutputTokens",
4141
"totalCost",
42+
"totalUsers",
43+
"totalSessions",
4244
"startDate",
4345
"endDate"
4446
})
@@ -57,6 +59,14 @@ public class LogAIUsageStatsDTOV001 {
5759
@Schema(description = "Total cost in USD based on AI usage during the period", example = "1.87")
5860
private double totalCost;
5961

62+
@JsonView(View.Public.GET.class)
63+
@Schema(description = "Total cost in USD based on AI usage during the period", example = "1")
64+
private Integer totalUsers;
65+
66+
@JsonView(View.Public.GET.class)
67+
@Schema(description = "Total cost in USD based on AI usage during the period", example = "1")
68+
private Integer totalSessions;
69+
6070
@JsonView(View.Public.GET.class)
6171
@Schema(description = "Start date of the aggregation period", example = "2025-01-01 00:00:00")
6272
private String startDate;
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/**
2+
* Cerberus Copyright (C) 2013 - 2025 cerberustesting
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This file is part of Cerberus.
6+
*
7+
* Cerberus is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Cerberus is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cerberus. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.cerberus.core.api.dto.application;
21+
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonView;
24+
import io.swagger.v3.oas.annotations.media.Schema;
25+
import lombok.Builder;
26+
import lombok.Data;
27+
import lombok.extern.jackson.Jacksonized;
28+
import org.cerberus.core.api.dto.ai.LogAIUsageStatsDTOV001;
29+
import org.cerberus.core.api.dto.views.View;
30+
31+
/**
32+
* @author bcivel
33+
*/
34+
@Data
35+
@Builder
36+
@Jacksonized
37+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
38+
@Schema(name = "ApplicationMonthlyStats")
39+
public class ApplicationMonthlyStatsDTOV001 {
40+
41+
@JsonView(View.Public.GET.class)
42+
@Schema(description = "Global KPIs")
43+
private ApplicationStatsDTOV001 global;
44+
45+
@JsonView(View.Public.GET.class)
46+
@Schema(description = "Global KPIs for the previous 30 days")
47+
private ApplicationStatsDTOV001 globalPreviousMonth;
48+
49+
@JsonView(View.Public.GET.class)
50+
@Schema(description = "User KPIs")
51+
private ApplicationStatsDTOV001 system;
52+
53+
@JsonView(View.Public.GET.class)
54+
@Schema(description = "User KPIs for the previous 30 days")
55+
private ApplicationStatsDTOV001 systemPreviousMonth;
56+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Cerberus Copyright (C) 2013 - 2025 cerberustesting
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This file is part of Cerberus.
6+
*
7+
* Cerberus is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Cerberus is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cerberus. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.cerberus.core.api.dto.application;
21+
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
24+
import com.fasterxml.jackson.annotation.JsonView;
25+
import io.swagger.v3.oas.annotations.media.Schema;
26+
import lombok.Builder;
27+
import lombok.Data;
28+
import lombok.ToString;
29+
import lombok.extern.jackson.Jacksonized;
30+
import org.cerberus.core.api.dto.views.View;
31+
32+
import java.util.Map;
33+
34+
35+
@ToString
36+
@Data
37+
@Builder
38+
@Jacksonized
39+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
40+
@JsonPropertyOrder({
41+
"totalApplications",
42+
"totalApplicationsByType",
43+
"fromDate",
44+
"toDate"
45+
})
46+
@Schema(name = "ApplicationStats")
47+
public class ApplicationStatsDTOV001 {
48+
49+
@JsonView({View.Public.GET.class})
50+
@Schema(description = "Total number of applications", example = "120")
51+
private Integer totalApplications;
52+
53+
@JsonView({View.Public.GET.class})
54+
@Schema(description = "Number of applications grouped by type",
55+
example = "{\"Web\":40,\"API\":50,\"Batch\":30}")
56+
private Map<String, Integer> totalApplicationsByType;
57+
58+
@JsonView({View.Public.GET.class})
59+
@Schema(description = "Start date of the period", example = "2025-11-11")
60+
private String fromDate;
61+
62+
@JsonView({View.Public.GET.class})
63+
@Schema(description = "End date of the period", example = "2025-12-11")
64+
private String toDate;
65+
}
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
/**
2+
* Cerberus Copyright (C) 2013 - 2025 cerberustesting
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This file is part of Cerberus.
6+
*
7+
* Cerberus is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Cerberus is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cerberus. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.cerberus.core.api.dto.campaign;
21+
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonView;
24+
import io.swagger.v3.oas.annotations.media.Schema;
25+
import lombok.Builder;
26+
import lombok.Data;
27+
import lombok.extern.jackson.Jacksonized;
28+
import org.cerberus.core.api.dto.application.ApplicationStatsDTOV001;
29+
import org.cerberus.core.api.dto.views.View;
30+
31+
/**
32+
* @author bcivel
33+
*/
34+
@Data
35+
@Builder
36+
@Jacksonized
37+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
38+
@Schema(name = "CampaignMonthlyStats")
39+
public class CampaignMonthlyStatsDTOV001 {
40+
41+
@JsonView(View.Public.GET.class)
42+
@Schema(description = "Global KPIs")
43+
private CampaignStatsDTOV001 global;
44+
45+
@JsonView(View.Public.GET.class)
46+
@Schema(description = "Global KPIs for the previous 30 days")
47+
private CampaignStatsDTOV001 globalPreviousMonth;
48+
49+
@JsonView(View.Public.GET.class)
50+
@Schema(description = "User KPIs")
51+
private CampaignStatsDTOV001 system;
52+
53+
@JsonView(View.Public.GET.class)
54+
@Schema(description = "User KPIs for the previous 30 days")
55+
private CampaignStatsDTOV001 systemPreviousMonth;
56+
57+
}
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
/*
2+
* Cerberus Copyright (C) 2013 - 2025 cerberustesting
3+
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4+
*
5+
* This file is part of Cerberus.
6+
*
7+
* Cerberus is free software: you can redistribute it and/or modify
8+
* it under the terms of the GNU General Public License as published by
9+
* the Free Software Foundation, either version 3 of the License, or
10+
* (at your option) any later version.
11+
*
12+
* Cerberus is distributed in the hope that it will be useful,
13+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
* GNU General Public License for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* along with Cerberus. If not, see <http://www.gnu.org/licenses/>.
19+
*/
20+
package org.cerberus.core.api.dto.campaign;
21+
22+
import com.fasterxml.jackson.annotation.JsonInclude;
23+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
24+
import com.fasterxml.jackson.annotation.JsonView;
25+
import io.swagger.v3.oas.annotations.media.Schema;
26+
import lombok.Builder;
27+
import lombok.Data;
28+
import lombok.ToString;
29+
import lombok.extern.jackson.Jacksonized;
30+
import org.cerberus.core.api.dto.views.View;
31+
32+
import java.util.Map;
33+
34+
35+
@ToString
36+
@Data
37+
@Builder
38+
@Jacksonized
39+
@JsonInclude(JsonInclude.Include.NON_EMPTY)
40+
@JsonPropertyOrder({
41+
"totalCampaigns",
42+
"totalCampaignsLaunched",
43+
"fromDate",
44+
"toDate"
45+
})
46+
@Schema(name = "CampaignsStats")
47+
public class CampaignStatsDTOV001 {
48+
49+
@JsonView({View.Public.GET.class})
50+
@Schema(description = "Total number of campaigns", example = "120")
51+
private Integer totalCampaigns;
52+
53+
@JsonView({View.Public.GET.class})
54+
@Schema(description = "Number of campaigns launched", example = "30")
55+
private Integer totalCampaignsLaunched;
56+
57+
@JsonView({View.Public.GET.class})
58+
@Schema(description = "Start date of the period", example = "2025-11-11")
59+
private String fromDate;
60+
61+
@JsonView({View.Public.GET.class})
62+
@Schema(description = "End date of the period", example = "2025-12-11")
63+
private String toDate;
64+
}

source/src/main/java/org/cerberus/core/api/dto/campaignexecution/CampaignExecutionDTOV001.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import lombok.Builder;
2929
import lombok.Data;
3030
import lombok.extern.jackson.Jacksonized;
31+
import org.cerberus.core.api.dto.testcaseexecution.TestcaseExecutionDTOV001;
3132
import org.cerberus.core.api.dto.views.View;
3233

3334
/**

source/src/main/java/org/cerberus/core/api/dto/campaignexecution/CampaignExecutionMapperV001.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
package org.cerberus.core.api.dto.campaignexecution;
2222

23+
import org.cerberus.core.api.dto.testcaseexecution.TestcaseExecutionMapperV001;
2324
import org.cerberus.core.api.mappers.TimestampMapper;
2425
import org.cerberus.core.crud.entity.Tag;
2526
import org.mapstruct.Mapper;

0 commit comments

Comments
 (0)