Skip to content

Commit ec7fe9c

Browse files
committed
feat(frontend): add subscriptions
add subscriptions for applications and releases with connection handling Signed-off-by: Osman Hadzic <osman.hadzic@secomind.com>
1 parent 4bbb2eb commit ec7fe9c

File tree

3 files changed

+279
-85
lines changed

3 files changed

+279
-85
lines changed

frontend/src/api/schema.graphql

Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,24 @@ input ContainerCreateWithNestedVolumesInput {
2020
}
2121

2222
input ContainerCreateWithNestedDeviceMappingsInput {
23-
pathOnHost: String!
24-
pathInContainer: String!
2523
cgroupPermissions: String!
24+
pathInContainer: String!
25+
pathOnHost: String!
2626
}
2727

2828
input CampaignCampaignMechanismFirmwareUpgradeInput {
29-
baseImageId: ID
29+
"""
30+
This boolean flag determines if the Base Image will be pushed to the
31+
Device even if it already has a greater version of the Base Image.
32+
"""
33+
forceDowngrade: Boolean
34+
35+
"""
36+
The maximum percentage of failures allowed over the number of total targets.
37+
If the failures exceed this threshold, the Update Campaign terminates with
38+
a failure.
39+
"""
40+
maxFailurePercentage: Float
3041

3142
"""
3243
The maximum number of in progress updates. The Update Campaign will have
@@ -35,12 +46,6 @@ input CampaignCampaignMechanismFirmwareUpgradeInput {
3546
"""
3647
maxInProgressOperations: Int
3748

38-
"""
39-
The timeout (in seconds) Edgehog has to wait before considering an OTA
40-
Request lost (and possibly retry). It must be at least 30 seconds.
41-
"""
42-
requestTimeoutSeconds: Int
43-
4449
"""
4550
The number of attempts that have to be tried before giving up on the
4651
update of a specific target (and considering it an error). Note that the
@@ -50,17 +55,12 @@ input CampaignCampaignMechanismFirmwareUpgradeInput {
5055
requestRetries: Int
5156

5257
"""
53-
The maximum percentage of failures allowed over the number of total targets.
54-
If the failures exceed this threshold, the Update Campaign terminates with
55-
a failure.
58+
The timeout (in seconds) Edgehog has to wait before considering an OTA
59+
Request lost (and possibly retry). It must be at least 30 seconds.
5660
"""
57-
maxFailurePercentage: Float
61+
requestTimeoutSeconds: Int
5862

59-
"""
60-
This boolean flag determines if the Base Image will be pushed to the
61-
Device even if it already has a greater version of the Base Image.
62-
"""
63-
forceDowngrade: Boolean
63+
baseImageId: ID
6464
}
6565

6666
"An object representing the properties of a Firmware Upgrade campaign mechanism."
@@ -106,9 +106,12 @@ type FirmwareUpgrade {
106106
}
107107

108108
input CampaignCampaignMechanismDeploymentUpgradeInput {
109-
releaseId: ID
110-
111-
targetReleaseId: ID
109+
"""
110+
The maximum percentage of failures allowed over the number of total targets.
111+
If the failures exceed this threshold, the Campaign terminates with
112+
a failure.
113+
"""
114+
maxFailurePercentage: Float
112115

113116
"""
114117
The maximum number of in progress operations. The Campaign will
@@ -117,12 +120,6 @@ input CampaignCampaignMechanismDeploymentUpgradeInput {
117120
"""
118121
maxInProgressOperations: Int
119122

120-
"""
121-
The timeout (in seconds) Edgehog has to wait before considering a
122-
Deployment lost (and possibly retry). It must be at least 30 seconds.
123-
"""
124-
requestTimeoutSeconds: Int
125-
126123
"""
127124
The number of attempts that have to be tried before giving up on the
128125
deploy of a specific target (and considering it an error). Note that the
@@ -132,11 +129,14 @@ input CampaignCampaignMechanismDeploymentUpgradeInput {
132129
requestRetries: Int
133130

134131
"""
135-
The maximum percentage of failures allowed over the number of total targets.
136-
If the failures exceed this threshold, the Campaign terminates with
137-
a failure.
132+
The timeout (in seconds) Edgehog has to wait before considering a
133+
Deployment lost (and possibly retry). It must be at least 30 seconds.
138134
"""
139-
maxFailurePercentage: Float
135+
requestTimeoutSeconds: Int
136+
137+
releaseId: ID
138+
139+
targetReleaseId: ID
140140
}
141141

142142
"An object representing the properties of a Upgrade deployment campaign mechanism."
@@ -181,7 +181,12 @@ type DeploymentUpgrade {
181181
}
182182

183183
input CampaignCampaignMechanismDeploymentDeleteInput {
184-
releaseId: ID
184+
"""
185+
The maximum percentage of failures allowed over the number of total targets.
186+
If the failures exceed this threshold, the Campaign terminates with
187+
a failure.
188+
"""
189+
maxFailurePercentage: Float
185190

186191
"""
187192
The maximum number of in progress operations. The Campaign will
@@ -190,12 +195,6 @@ input CampaignCampaignMechanismDeploymentDeleteInput {
190195
"""
191196
maxInProgressOperations: Int
192197

193-
"""
194-
The timeout (in seconds) Edgehog has to wait before considering a
195-
Deployment lost (and possibly retry). It must be at least 30 seconds.
196-
"""
197-
requestTimeoutSeconds: Int
198-
199198
"""
200199
The number of attempts that have to be tried before giving up on the
201200
deploy of a specific target (and considering it an error). Note that the
@@ -205,11 +204,12 @@ input CampaignCampaignMechanismDeploymentDeleteInput {
205204
requestRetries: Int
206205

207206
"""
208-
The maximum percentage of failures allowed over the number of total targets.
209-
If the failures exceed this threshold, the Campaign terminates with
210-
a failure.
207+
The timeout (in seconds) Edgehog has to wait before considering a
208+
Deployment lost (and possibly retry). It must be at least 30 seconds.
211209
"""
212-
maxFailurePercentage: Float
210+
requestTimeoutSeconds: Int
211+
212+
releaseId: ID
213213
}
214214

215215
"An object representing the properties of a Delete deployment campaign mechanism."
@@ -249,7 +249,12 @@ type DeploymentDelete {
249249
}
250250

251251
input CampaignCampaignMechanismDeploymentStopInput {
252-
releaseId: ID
252+
"""
253+
The maximum percentage of failures allowed over the number of total targets.
254+
If the failures exceed this threshold, the Campaign terminates with
255+
a failure.
256+
"""
257+
maxFailurePercentage: Float
253258

254259
"""
255260
The maximum number of in progress operations. The Campaign will
@@ -258,12 +263,6 @@ input CampaignCampaignMechanismDeploymentStopInput {
258263
"""
259264
maxInProgressOperations: Int
260265

261-
"""
262-
The timeout (in seconds) Edgehog has to wait before considering a
263-
Deployment lost (and possibly retry). It must be at least 30 seconds.
264-
"""
265-
requestTimeoutSeconds: Int
266-
267266
"""
268267
The number of attempts that have to be tried before giving up on the
269268
deploy of a specific target (and considering it an error). Note that the
@@ -273,11 +272,12 @@ input CampaignCampaignMechanismDeploymentStopInput {
273272
requestRetries: Int
274273

275274
"""
276-
The maximum percentage of failures allowed over the number of total targets.
277-
If the failures exceed this threshold, the Campaign terminates with
278-
a failure.
275+
The timeout (in seconds) Edgehog has to wait before considering a
276+
Deployment lost (and possibly retry). It must be at least 30 seconds.
279277
"""
280-
maxFailurePercentage: Float
278+
requestTimeoutSeconds: Int
279+
280+
releaseId: ID
281281
}
282282

283283
"An object representing the properties of a Stop deployment campaign mechanism."
@@ -317,7 +317,12 @@ type DeploymentStop {
317317
}
318318

319319
input CampaignCampaignMechanismDeploymentStartInput {
320-
releaseId: ID
320+
"""
321+
The maximum percentage of failures allowed over the number of total targets.
322+
If the failures exceed this threshold, the Campaign terminates with
323+
a failure.
324+
"""
325+
maxFailurePercentage: Float
321326

322327
"""
323328
The maximum number of in progress operations. The Campaign will
@@ -326,12 +331,6 @@ input CampaignCampaignMechanismDeploymentStartInput {
326331
"""
327332
maxInProgressOperations: Int
328333

329-
"""
330-
The timeout (in seconds) Edgehog has to wait before considering a
331-
Deployment lost (and possibly retry). It must be at least 30 seconds.
332-
"""
333-
requestTimeoutSeconds: Int
334-
335334
"""
336335
The number of attempts that have to be tried before giving up on the
337336
deploy of a specific target (and considering it an error). Note that the
@@ -341,11 +340,12 @@ input CampaignCampaignMechanismDeploymentStartInput {
341340
requestRetries: Int
342341

343342
"""
344-
The maximum percentage of failures allowed over the number of total targets.
345-
If the failures exceed this threshold, the Campaign terminates with
346-
a failure.
343+
The timeout (in seconds) Edgehog has to wait before considering a
344+
Deployment lost (and possibly retry). It must be at least 30 seconds.
347345
"""
348-
maxFailurePercentage: Float
346+
requestTimeoutSeconds: Int
347+
348+
releaseId: ID
349349
}
350350

351351
"An object representing the properties of a Start deployment campaign mechanism."
@@ -385,7 +385,12 @@ type DeploymentStart {
385385
}
386386

387387
input CampaignCampaignMechanismDeploymentDeployInput {
388-
releaseId: ID
388+
"""
389+
The maximum percentage of failures allowed over the number of total targets.
390+
If the failures exceed this threshold, the Deployment Campaign terminates with
391+
a failure.
392+
"""
393+
maxFailurePercentage: Float
389394

390395
"""
391396
The maximum number of in progress deployments. The Update Campaign will
@@ -394,12 +399,6 @@ input CampaignCampaignMechanismDeploymentDeployInput {
394399
"""
395400
maxInProgressOperations: Int
396401

397-
"""
398-
The timeout (in seconds) Edgehog has to wait before considering a
399-
Deployment lost (and possibly retry). It must be at least 30 seconds.
400-
"""
401-
requestTimeoutSeconds: Int
402-
403402
"""
404403
The number of attempts that have to be tried before giving up on the
405404
deploy of a specific target (and considering it an error). Note that the
@@ -409,11 +408,12 @@ input CampaignCampaignMechanismDeploymentDeployInput {
409408
requestRetries: Int
410409

411410
"""
412-
The maximum percentage of failures allowed over the number of total targets.
413-
If the failures exceed this threshold, the Deployment Campaign terminates with
414-
a failure.
411+
The timeout (in seconds) Edgehog has to wait before considering a
412+
Deployment lost (and possibly retry). It must be at least 30 seconds.
415413
"""
416-
maxFailurePercentage: Float
414+
requestTimeoutSeconds: Int
415+
416+
releaseId: ID
417417
}
418418

419419
"An object representing the properties of a Deploy deployment campaign mechanism."
@@ -1375,27 +1375,27 @@ input ReleaseCreateContainersInput {
13751375
image: ContainerCreateWithNestedImageInput
13761376
hostname: String
13771377
networks: [ContainerCreateWithNestedNetworksInput!]
1378-
deviceMappings: [ContainerCreateWithNestedDeviceMappingsInput!]
13791378
volumes: [ContainerCreateWithNestedVolumesInput!]
13801379
binds: [String!]
1381-
tmpfs: [String!]
1382-
privileged: Boolean
1383-
portBindings: [String!]
1384-
restartPolicy: String
1385-
networkMode: String
1386-
extraHosts: [String!]
13871380
capAdd: [String!]
13881381
capDrop: [String!]
13891382
cpuPeriod: Int
13901383
cpuQuota: Int
13911384
cpuRealtimePeriod: Int
13921385
cpuRealtimeRuntime: Int
1386+
extraHosts: [String!]
13931387
memoryReservation: Int
13941388
memorySwap: Int
13951389
memorySwappiness: Int
1396-
volumeDriver: String
1397-
storageOpt: [String!]
1390+
networkMode: String
1391+
portBindings: [String!]
1392+
privileged: Boolean
13981393
readOnlyRootfs: Boolean
1394+
restartPolicy: String
1395+
storageOpt: [String!]
1396+
tmpfs: [String!]
1397+
volumeDriver: String
1398+
deviceMappings: [ContainerCreateWithNestedDeviceMappingsInput!]
13991399
}
14001400

14011401
input ReleaseCreateRequiredSystemModelsInput {

0 commit comments

Comments
 (0)