Skip to content

Commit c66db39

Browse files
authored
Merge pull request #211 from kaleido-io/new-events
Add new events and operations to FireFly UI
2 parents cd45345 + edf1d09 commit c66db39

File tree

6 files changed

+46
-4
lines changed

6 files changed

+46
-4
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/interfaces/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export const FF_Paths = {
111111
transactionByIdBlockchainEvents: (txId: string) =>
112112
`/transactions/${txId}/blockchainevents`,
113113
transactionByIdOperations: (txId: string) =>
114-
`/transactions/${txId}/operations`,
114+
`/transactions/${txId}/operations?fetchstatus`,
115115
transactionByIdStatus: (txId: string) => `/transactions/${txId}/status`,
116116
// Network
117117
networkIdentities: '/network/identities',

src/interfaces/enums/eventTypes.tsx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ export enum FF_EVENTS {
3131
BLOCKCHAIN_EVENT_RECEIVED = 'blockchain_event_received',
3232
BLOCKCHAIN_INVOKE_OP_SUCCEEDED = 'blockchain_invoke_op_succeeded',
3333
BLOCKCHAIN_INVOKE_OP_FAILED = 'blockchain_invoke_op_failed',
34+
BLOCKCHAIN_CONTRACT_DEPLOY_OP_SUCCEEDED = 'blockchain_contract_deploy_op_succeeded',
35+
BLOCKCHAIN_CONTRACT_DEPLOY_OP_FAILED = 'blockchain_contract_deploy_op_failed',
3436
CONTRACT_API_CONFIRMED = 'contract_api_confirmed',
3537
CONTRACT_INTERFACE_CONFIRMED = 'contract_interface_confirmed',
3638
DATATYPE_CONFIRMED = 'datatype_confirmed',
@@ -111,6 +113,30 @@ export const FF_EVENTS_CATEGORY_MAP: {
111113
<LaunchButton link={FF_NAV_PATHS.activityOpPath(ns, refID)} />
112114
),
113115
},
116+
[FF_EVENTS.BLOCKCHAIN_CONTRACT_DEPLOY_OP_SUCCEEDED]: {
117+
category: EventCategoryEnum.BLOCKCHAIN,
118+
color: FFColors.Yellow,
119+
nicename: 'blockchainContractDeploySucceeded',
120+
enrichedEventKey: 'operation',
121+
enrichedEventString: (event: IEvent): string =>
122+
`Operation ID=${event.reference}`,
123+
referenceIDName: 'operationID',
124+
referenceIDButton: (ns: string, refID: string): JSX.Element => (
125+
<LaunchButton link={FF_NAV_PATHS.activityOpPath(ns, refID)} />
126+
),
127+
},
128+
[FF_EVENTS.BLOCKCHAIN_CONTRACT_DEPLOY_OP_FAILED]: {
129+
category: EventCategoryEnum.BLOCKCHAIN,
130+
color: FFColors.Yellow,
131+
nicename: 'blockchainContractDeployFailed',
132+
enrichedEventKey: 'operation',
133+
enrichedEventString: (event: IEvent): string =>
134+
`Operation ID=${event.reference}`,
135+
referenceIDName: 'operationID',
136+
referenceIDButton: (ns: string, refID: string): JSX.Element => (
137+
<LaunchButton link={FF_NAV_PATHS.activityOpPath(ns, refID)} />
138+
),
139+
},
114140
[FF_EVENTS.CONTRACT_API_CONFIRMED]: {
115141
category: EventCategoryEnum.BLOCKCHAIN,
116142
color: FFColors.Yellow,

src/interfaces/enums/operationTypes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ export enum FF_OPS {
5252
BLOCKCHAIN_PIN_BATCH = 'blockchain_pin_batch',
5353
BLOCKCHAIN_INVOKE = 'blockchain_invoke',
5454
BLOCKCHAIN_NETWORK_ACTION = 'blockchain_network_action',
55+
BLOCKCHAIN_DEPLOY = 'blockchain_deploy',
5556
// Message/Definitions
5657
SHAREDSTORAGE_UPLOAD_BATCH = 'sharedstorage_upload_batch',
5758
SHAREDSTORAGE_UPLOAD_BLOB = 'sharedstorage_upload_blob',
@@ -84,6 +85,11 @@ export const FF_OP_CATEGORY_MAP: { [key in FF_OPS]: IBlockchainCategory } = {
8485
color: FFColors.Yellow,
8586
nicename: 'blockchainNetworkAction',
8687
},
88+
[FF_OPS.BLOCKCHAIN_DEPLOY]: {
89+
category: OpCategoryEnum.BLOCKCHAIN,
90+
color: FFColors.Yellow,
91+
nicename: 'blockchainDeploy',
92+
},
8793
// Message Events
8894
[FF_OPS.SHAREDSTORAGE_UPLOAD_BATCH]: {
8995
category: OpCategoryEnum.MESSAGES,

src/interfaces/enums/transactionTypes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export enum FF_TX {
5151
// Blockchain Event
5252
CONTRACT_INVOKE = 'contract_invoke',
5353
NETWORK_ACTION = 'network_action',
54+
CONTRACT_DEPLOY = 'contract_deploy',
5455
//Message/Definitions
5556
BATCH_PIN = 'batch_pin',
5657
UNPINNED = 'unpinned',
@@ -74,6 +75,11 @@ export const FF_TX_CATEGORY_MAP: { [key in FF_TX]: IBlockchainCategory } = {
7475
color: FFColors.Yellow,
7576
nicename: 'networkAction',
7677
},
78+
[FF_TX.CONTRACT_DEPLOY]: {
79+
category: TxCategoryEnum.BLOCKCHAIN,
80+
color: FFColors.Yellow,
81+
nicename: 'contractDeploy',
82+
},
7783
[FF_TX.NONE]: {
7884
category: TxCategoryEnum.BLOCKCHAIN,
7985
color: FFColors.Yellow,

src/translations/en.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
"blockchainEvent": "Blockchain Event",
3535
"blockchainEventID": "Blockchain Event ID",
3636
"blockchainEventReceived": "Blockchain Event Received",
37+
"blockchainContractDeploySucceeded": "Contract Deployment Succeeded",
38+
"blockchainContractDeployFailed": "Contract Deployment Failed",
39+
"blockchainDeploy": "Contract Deployment",
3740
"blockchainEvents": "Blockchain Events",
3841
"blockchainId": "Blockchain ID",
3942
"blockchainIds": "Blockchain IDs",
@@ -60,6 +63,7 @@
6063
"contractAPI": "Contract API",
6164
"contractApiConfirmed": "Contract API Confirmed",
6265
"contractAPIs": "Contract APIs",
66+
"contractDeploy": "Contract Deployment",
6367
"contractInterface": "Contract Interface",
6468
"contractInterfaceConfirmed": "Contract Interface Confirmed",
6569
"contractInterfaces": "Contract Interfaces",
@@ -388,4 +392,4 @@
388392
"yes": "Yes",
389393
"yourNode": "Your Node",
390394
"yourOrg": "Your Org"
391-
}
395+
}

0 commit comments

Comments
 (0)