Skip to content

Commit 71652a9

Browse files
Merge branch 'master' into SER-2124
2 parents 33c85d9 + 3859fd6 commit 71652a9

File tree

3 files changed

+66
-16
lines changed

3 files changed

+66
-16
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Version 24.05.XX
2+
Fixes:
3+
- [dashboards] Fixing issue where dashboard widgets go into single column
4+
15
## Version 24.05.18
26
Fixes:
37
- [core] Fixed bug where changing passwords results in the loss of the "Global Admin" role
@@ -79,7 +83,7 @@ Enterprise Features:
7983
## Version 24.05.12
8084
Fixes:
8185
- [dashboards] Fixes for dashboards grid
82-
- [dasboards] UI fix for dashboard widget action menu
86+
- [dashboards] UI fix for dashboard widget action menu
8387
- [push] Refactored fcm API related code
8488
- [reports] Use config for encryption key in reports
8589

plugins/dashboards/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Custom Dashboards
2+
3+
## Dashboard Frontend request & grid interaction flow
4+
```mermaid
5+
6+
graph TD
7+
A[User Initiates Refresh] --> B{Check Conditions}
8+
B -->|Conditions Met| C[refresh method]
9+
B -->|Conditions Not Met| Z[Skip Refresh]
10+
11+
C --> D{isRequestSane}
12+
D -->|Yes| E[dateChanged method]
13+
D -->|No| Y[Mark Request Sane]
14+
Y --> Z
15+
16+
E --> F[dispatch getDashboard action]
17+
F --> G[Server Request]
18+
G --> H{Check isSane}
19+
H -->|Yes| I[Update Vuex Store]
20+
H -->|No| X[Skip Update]
21+
22+
I --> J[validateWidgets method]
23+
J --> K[Update Grid]
24+
25+
L[Grid Interaction Starts] --> M[Set gridInteraction true]
26+
M --> N[Mark Request Not Sane]
27+
28+
O[Grid Interaction Ends] --> P[updateAllWidgetsGeography]
29+
P --> Q[Set gridInteraction false]
30+
Q --> R[Mark Request Sane]
31+
32+
S[Widget Resize/Move] --> T[grid.on 'change' event]
33+
T --> U[Update Widget in Store]
34+
35+
V[New Widget Added] --> W[grid.on 'added' event]
36+
W --> X1[Update Widget Size/Position]
37+
X1 --> Y1[Add to Vuex Store]
38+
39+
style A fill:#f9f,stroke:#333,stroke-width:2px
40+
style L fill:#f9f,stroke:#333,stroke-width:2px
41+
style S fill:#f9f,stroke:#333,stroke-width:2px
42+
style V fill:#f9f,stroke:#333,stroke-width:2px
43+
44+
```

plugins/dashboards/frontend/public/javascripts/countly.views.js

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,22 +1169,24 @@
11691169
});
11701170

11711171
this.grid.on('change', function(event, items) {
1172-
items.forEach(item => {
1173-
self.updateWidgetGeography(
1174-
item.id,
1175-
{
1176-
size: [item.w, item.h],
1177-
position: [item.x, item.y]
1178-
}
1179-
);
1180-
});
1181-
_.debounce(function() {
1182-
self.$nextTick(function() {
1183-
setTimeout(function() {
1184-
self.customCompact(self.grid);
1185-
}, 10);
1172+
if (self.grid.opts && self.grid.opts.column && self.grid.opts.column === 12) {
1173+
items.forEach(item => {
1174+
self.updateWidgetGeography(
1175+
item.id,
1176+
{
1177+
size: [item.w, item.h],
1178+
position: [item.x, item.y]
1179+
}
1180+
);
11861181
});
1187-
}, 400)();
1182+
_.debounce(function() {
1183+
self.$nextTick(function() {
1184+
setTimeout(function() {
1185+
self.customCompact(self.grid);
1186+
}, 10);
1187+
});
1188+
}, 400)();
1189+
}
11881190
});
11891191

11901192
this.grid.on("removed", function() {

0 commit comments

Comments
 (0)