# Module Differentiation using UI

## 1. **Modules differentiation**

To compare the modules, click on Compare button in the Modules page as shown below:

![image2.png](https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-47a03a9ce0e763236ba46fd7be0d6296a168354d%2F0%20\(1\)%20\(3\)%20\(1\).png?alt=media)

Once, compare button is clicked, we need to select the first and second modules to compare:

![image3.png](https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-508bc851cf219bc8d4c19d15cab8a9767ea41c87%2F1%20\(7\)%20\(1\).png?alt=media)

### 1.1 Result of comparison:

<figure><img src="https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-4f7cd8602112743b3c9a24b99c47060760c63aae%2F2%20(3).png?alt=media" alt=""><figcaption></figcaption></figure>

#### **1.1.1 Params**

1. “***Events***” – configures how differences in Events impact block comparison logic
   * “***Don't compare***” – event differences do not have effect on the block comparison
   * “***All events***” – event differences contributed to the decision of block comparison
2. “***Properties***” – configures how differences in Properties impact block comparison logic
   * “***Don't compare***” – Properties comparison results do not have any effect on the block comparison logic. (Only tag and block type are impactful for comparison).
   * “***Only simple properties***” – only simple Properties impact block comparison results
   * “***All properties***” – all Properties at all layers impact block comparison results
3. “***Children***” – configures if/how child blocks impact the comparison of the parent blocks
   * “***Don't compare***” – differences in child blocks do not impact the comparison results of the parent blocks
   * “***Only child blocks of the first level***” – only immediate children differences impact the comparison results of the parent blocks
   * “***All children***” – comparison results of all children in all layers are impactful on the results of the parent block comparison
4. “***UUID***” – configures if/how UUID and Hedera ID impact the comparison of the blocks
   * “***Don't compare***” – differences in UUID and Hedera ID (of schemas, tokens, topics, etc) do not impact the comparison results of the blocks.
   * “***All UUID***” – differences in UUID and Hedera ID are included in the comparison. When this option is enabled, for example, 2 tokens would be considered to be different even if their settings are absolutely the same. This is because their Hedera Token IDs would be different\_.\_

#### **1.2.2 Sections**

1. “***Description***” – module description
2. “***Module Blocks***” – comparison results for the block structures
3. ***“Input Events”*** – comparison results for the incoming events
4. ***“Output Events”*** – comparison results for the outgoing events

**Color legend \_–**\_ the mapping of the meaning/description of available block colors with the ability to switch on/off types

1. “***Green***” – blocks are identical, including their child blocks
2. “***Green/Yellow***” – blocks are identical, but the child blocks have differences
3. “***Yellow***” – blocks are partially identical
4. “***Red***” – no matching blocks found

Block comparison structure can be expanded to view the comparison of their Properties:

![image4.png](https://1556785885-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNYWPEEAknX9Vki1yV5HY%2Fuploads%2Fgit-blob-529a8204235bb34ea51d5701ee331db07804b7b7%2F3%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\)%20\(1\).png?alt=media)

1. **Data Format**

POST: /analytics/compare/modules

Input:

{

"moduleId1":"63……..1d7c" – ID of the first module

"moduleId2":"63……..1d7c" – ID of the second module

"eventsLvl":"0" – depth (level) of Event comparison (0/1)

"propLvl":"0" – depth (level) of Properties comparison (0/1/2)

"childrenLvl":"0" – depth (level) of child block comparison (0/1/2)

"idLvl":"0" – depth (level) of uuid comparison (0/1)

}

Output:

{

"left" – information about the first policy

"right " – information about the second policy

"blocks" – table with block comparison results

}

POST: /analytics/compare/modules/export?type=csv

Input:

{

"moduleId1":"63……..1d7c" – ID of the first module

"moduleId2":"63……..1d7c" – ID of the second module

"eventsLvl":"0" – depth (level) of Event comparison (0/1)

"propLvl":"0" – depth (level) of Properties comparison (0/1/2)

"childrenLvl":"0" – depth (level) of child block comparison (0/1/2)

"idLvl":"0" – depth (level) of uuid comparison (0/1)

}

Output:

сsv file
