Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Commit bafdae0

Browse files
Update race condition for initial request (#619)
* update race condition for initial req * Update version --------- Co-authored-by: Mikhail Volkov <mikhail@volkovlabs.io>
1 parent 6976010 commit bafdae0

10 files changed

Lines changed: 628 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [6.2.0] - 2025-09-02
8+
9+
### Changed
10+
11+
- Update race condition for initial request ([#619](https://github.com/volkovlabs/business-forms/issues/619)).
12+
713
## [6.1.0] - 2025-08-31
814

915
### Changed

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ services:
99
- main
1010
- dependency
1111

12+
server-delay:
13+
build:
14+
context: ./server-delay
15+
ports:
16+
- 5002:5002/tcp
17+
profiles:
18+
- dev
19+
- main
20+
- dependency
21+
1222
grafana:
1323
image: ghcr.io/volkovlabs/app:latest
1424
ports:

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default defineConfig(
3232
'jest*.js',
3333
'playwright.config.ts',
3434
'server-json/*',
35+
'server-delay/*',
3536
'server-mysql/*',
3637
'server-pg/*',
3738
'src/__mocks__/**',

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,5 +83,5 @@
8383
"test:e2e:docker": "docker compose --profile e2e up --exit-code-from test",
8484
"upgrade": "npm upgrade --save"
8585
},
86-
"version": "6.1.0"
86+
"version": "6.2.0"
8787
}

provisioning/dashboards/delay.json

Lines changed: 341 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,341 @@
1+
{
2+
"annotations": {
3+
"list": [
4+
{
5+
"builtIn": 1,
6+
"datasource": {
7+
"type": "grafana",
8+
"uid": "-- Grafana --"
9+
},
10+
"enable": true,
11+
"hide": true,
12+
"iconColor": "rgba(0, 211, 255, 1)",
13+
"name": "Annotations & Alerts",
14+
"type": "dashboard"
15+
}
16+
]
17+
},
18+
"editable": true,
19+
"fiscalYearStartMonth": 0,
20+
"graphTooltip": 0,
21+
"id": 12,
22+
"links": [],
23+
"panels": [
24+
{
25+
"datasource": {
26+
"type": "marcusolsson-static-datasource",
27+
"uid": "P1D2C73DC01F2359B"
28+
},
29+
"fieldConfig": {
30+
"defaults": {
31+
"custom": {
32+
"thresholdsStyle": {
33+
"mode": "color",
34+
"thresholds": []
35+
}
36+
},
37+
"thresholds": {
38+
"mode": "absolute",
39+
"steps": [
40+
{
41+
"color": "green",
42+
"value": 0
43+
},
44+
{
45+
"color": "red",
46+
"value": 80
47+
}
48+
]
49+
}
50+
},
51+
"overrides": []
52+
},
53+
"gridPos": {
54+
"h": 4,
55+
"w": 6,
56+
"x": 0,
57+
"y": 0
58+
},
59+
"id": 2,
60+
"options": {
61+
"alertCustomMessage": "",
62+
"alwaysVisibleFilter": false,
63+
"autoScroll": false,
64+
"browserTabNamePattern": "",
65+
"collapsedByDefault": false,
66+
"customValue": false,
67+
"displayMode": "button",
68+
"emptyValue": false,
69+
"favorites": {
70+
"enabled": false,
71+
"storage": "browser"
72+
},
73+
"filter": false,
74+
"groupSelection": false,
75+
"header": true,
76+
"isMinimizeForTable": false,
77+
"isMinimizeViewShowCustomIcon": false,
78+
"isPinTabsEnabled": false,
79+
"isUseLocalTime": false,
80+
"minimizeOutputFormat": "text",
81+
"minimizeViewCustomIcon": "",
82+
"minimizeViewNativeIcon": "gf-movepane-right",
83+
"padding": 16,
84+
"persistent": false,
85+
"requestLatency": "low",
86+
"saveSelectedGroup": false,
87+
"saveSelectedGroupKey": "",
88+
"selectedValues": {
89+
"showSelected": false
90+
},
91+
"showGroupTotal": false,
92+
"showLabel": false,
93+
"showName": false,
94+
"showResetButton": false,
95+
"showTotal": false,
96+
"statusSort": false,
97+
"sticky": false,
98+
"tabsInOrder": true,
99+
"variable": "apinum",
100+
"wordBreak": "normal"
101+
},
102+
"targets": [
103+
{
104+
"refId": "A"
105+
}
106+
],
107+
"title": "Variable - delay in sec",
108+
"type": "volkovlabs-variable-panel"
109+
},
110+
{
111+
"datasource": {
112+
"type": "marcusolsson-static-datasource",
113+
"uid": "P1D2C73DC01F2359B"
114+
},
115+
"fieldConfig": {
116+
"defaults": {},
117+
"overrides": []
118+
},
119+
"gridPos": {
120+
"h": 9,
121+
"w": 6,
122+
"x": 6,
123+
"y": 0
124+
},
125+
"id": 1,
126+
"options": {
127+
"buttonGroup": {
128+
"orientation": "center",
129+
"size": "md"
130+
},
131+
"confirmModal": {
132+
"body": "Please confirm to update changed values",
133+
"cancel": "Cancel",
134+
"columns": {
135+
"include": ["name", "oldValue", "newValue"],
136+
"name": "Label",
137+
"newValue": "New Value",
138+
"oldValue": "Old Value"
139+
},
140+
"confirm": "Confirm",
141+
"elementDisplayMode": "modified",
142+
"title": "Confirm update request"
143+
},
144+
"elementValueChanged": "",
145+
"elements": [
146+
{
147+
"hidden": false,
148+
"id": "apinum",
149+
"labelWidth": 10,
150+
"section": "",
151+
"title": "apinum",
152+
"tooltip": "",
153+
"type": "string",
154+
"uid": "a1f3ea8b-2da1-4eec-8fea-9f0bc3eeca6c",
155+
"unit": "",
156+
"value": ""
157+
},
158+
{
159+
"hidden": false,
160+
"id": "delayMs",
161+
"labelWidth": 10,
162+
"section": "",
163+
"title": "delayMs",
164+
"tooltip": "",
165+
"type": "string",
166+
"uid": "8abe5638-1f9b-4465-a6cd-88e132c0ad5a",
167+
"unit": "",
168+
"value": ""
169+
},
170+
{
171+
"hidden": false,
172+
"id": "timestamp",
173+
"labelWidth": 10,
174+
"section": "",
175+
"title": "timestamp",
176+
"tooltip": "",
177+
"type": "string",
178+
"uid": "86940898-8fdc-439e-8b91-5b9644992f6b",
179+
"unit": "",
180+
"value": ""
181+
},
182+
{
183+
"hidden": false,
184+
"id": "value",
185+
"labelWidth": 10,
186+
"section": "",
187+
"title": "value",
188+
"tooltip": "",
189+
"type": "string",
190+
"uid": "cc8afe01-7618-4938-8388-5805aa96e04f",
191+
"unit": "",
192+
"value": ""
193+
}
194+
],
195+
"initial": {
196+
"code": "console.log('after initial reqest',context)",
197+
"contentType": "application/json",
198+
"getPayload": "return {}",
199+
"highlight": false,
200+
"highlightColor": "red",
201+
"method": "GET",
202+
"payload": {},
203+
"url": "http://localhost:5002/boom/$apinum"
204+
},
205+
"layout": {
206+
"orientation": "horizontal",
207+
"padding": 10,
208+
"sectionVariant": "default",
209+
"variant": "single"
210+
},
211+
"reset": {
212+
"backgroundColor": "purple",
213+
"foregroundColor": "yellow",
214+
"icon": "process",
215+
"text": "Reset",
216+
"variant": "hidden"
217+
},
218+
"resetAction": {
219+
"code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}",
220+
"confirm": false,
221+
"getPayload": "return {}",
222+
"mode": "initial",
223+
"payload": {}
224+
},
225+
"saveDefault": {
226+
"icon": "save",
227+
"text": "Save Default",
228+
"variant": "hidden"
229+
},
230+
"submit": {
231+
"backgroundColor": "purple",
232+
"foregroundColor": "yellow",
233+
"icon": "cloud-upload",
234+
"text": "Submit",
235+
"variant": "primary"
236+
},
237+
"sync": true,
238+
"update": {
239+
"code": "if (context.panel.response) {\n context.grafana.notifySuccess(['Update', 'Values updated successfully.']);\n context.grafana.refresh();\n} else {\n context.grafana.notifyError(['Update', 'An error occurred updating values.']);\n}",
240+
"confirm": false,
241+
"contentType": "application/json",
242+
"getPayload": "const payload = {};\ncontext.panel.elements.forEach((element) => {\n if (!element.value) {\n return;\n }\n payload[element.id] = element.value;\n})\nreturn payload;",
243+
"method": "-",
244+
"payload": {},
245+
"payloadMode": "all"
246+
},
247+
"updateEnabled": "auto"
248+
},
249+
"targets": [
250+
{
251+
"datasource": {
252+
"type": "marcusolsson-static-datasource",
253+
"uid": "P1D2C73DC01F2359B"
254+
},
255+
"refId": "A"
256+
}
257+
],
258+
"title": "Result - Sync",
259+
"type": "volkovlabs-form-panel"
260+
}
261+
],
262+
"preload": false,
263+
"schemaVersion": 41,
264+
"tags": [],
265+
"templating": {
266+
"list": [
267+
{
268+
"allowCustomValue": false,
269+
"current": {
270+
"text": "3",
271+
"value": "3"
272+
},
273+
"label": "apinum",
274+
"name": "apinum",
275+
"options": [
276+
{
277+
"selected": false,
278+
"text": "10",
279+
"value": "10"
280+
},
281+
{
282+
"selected": false,
283+
"text": "9",
284+
"value": "9"
285+
},
286+
{
287+
"selected": false,
288+
"text": "8",
289+
"value": "8"
290+
},
291+
{
292+
"selected": false,
293+
"text": "7",
294+
"value": "7"
295+
},
296+
{
297+
"selected": false,
298+
"text": "6",
299+
"value": "6"
300+
},
301+
{
302+
"selected": false,
303+
"text": "5",
304+
"value": "5"
305+
},
306+
{
307+
"selected": false,
308+
"text": "4",
309+
"value": "4"
310+
},
311+
{
312+
"selected": true,
313+
"text": "3",
314+
"value": "3"
315+
},
316+
{
317+
"selected": false,
318+
"text": "2",
319+
"value": "2"
320+
},
321+
{
322+
"selected": false,
323+
"text": "1",
324+
"value": "1"
325+
}
326+
],
327+
"query": "10,9,8,7,6,5,4,3,2,1",
328+
"type": "custom"
329+
}
330+
]
331+
},
332+
"time": {
333+
"from": "now-6h",
334+
"to": "now"
335+
},
336+
"timepicker": {},
337+
"timezone": "browser",
338+
"title": "Server Delay",
339+
"uid": "42de6275-3c2c-4510-8544-002392f4be15",
340+
"version": 14
341+
}

0 commit comments

Comments
 (0)