Skip to content

Commit

Permalink
GITBOOK-22: Search Blocks Docs added
Browse files Browse the repository at this point in the history
  • Loading branch information
prernaadev01 authored and gitbook-bot committed Oct 30, 2023
1 parent 022b7e7 commit 372f2d8
Show file tree
Hide file tree
Showing 52 changed files with 117 additions and 24 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1) (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (2) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (2) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (2) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (2) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (2).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (3) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (3) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (3).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (4) (1) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (4) (1) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (4) (1) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (4) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (4).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (5) (3) (1).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/.gitbook/assets/image (5) (3).png
Binary file modified docs/.gitbook/assets/image (5).png
Binary file modified docs/.gitbook/assets/image (6) (1) (1) (1).png
Binary file modified docs/.gitbook/assets/image (6) (1) (1).png
Binary file modified docs/.gitbook/assets/image (6) (1).png
Binary file modified docs/.gitbook/assets/image (6).png
Binary file modified docs/.gitbook/assets/image.png
4 changes: 4 additions & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,10 @@
* [💻 Search Policy using UI](guardian/standard-registry/policies/search-policy/search-policy-using-ui.md)
* [⚙ Search Policy APIs](guardian/standard-registry/policies/search-policy/search-policy-apis/README.md)
* [Search Policy](guardian/standard-registry/policies/search-policy/search-policy-apis/search-policy.md)
* [📂 Search Block](guardian/standard-registry/policies/search-block/README.md)
* [💻 Search Block using UI](guardian/standard-registry/policies/search-block/search-block-using-ui.md)
* [⚙ Search Block APIs](guardian/standard-registry/policies/search-block/search-block-apis/README.md)
* [Searching Same Blocks](guardian/standard-registry/policies/search-block/search-block-apis/searching-same-blocks.md)
* [📂 Document Comparison](guardian/standard-registry/policies/document-comparison/README.md)
* [💻 Document Comparison using UI](guardian/standard-registry/policies/document-comparison/document-comparison-using-ui.md)
* [⚙ Document Comparison APIs](guardian/standard-registry/policies/document-comparison/document-comparison-apis/README.md)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ and then select test under ui-tests/specs/policies

Finally, all the selected test runs and you can see the key components of the Test Runner that you need to pay attention to when executing tests.

<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../.gitbook/assets/image (2) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

**Test Status Menu:** The menu shows a summary of the number of tests passed, passed, failed, or incomplete, and the time spent on the test.

Expand Down
6 changes: 3 additions & 3 deletions docs/guardian/demo-guide/carbon-offsets/dovu-methodologies.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ for Cool Farm, we see below form:

8. Once filled and clicked on OK, Registrant waits for approval from Standard Registry:

<figure><img src="../../../.gitbook/assets/image (4) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (4) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

9. Now we login as Standard Registry and click on Farm Projects tab, we can see the Request being submitted by Registrant for Approve/Reject

Expand All @@ -62,7 +62,7 @@ For testing purpose, we will approve the farm project.

10. Once SR approves, we login back as Registrant and submit AgreCalc Document by filling out the form:

<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

For Cool Farm Tool methodology, you will see the below request form:

Expand All @@ -71,7 +71,7 @@ For Cool Farm Tool methodology, you will see the below request form:
11. Once the Request is submitted, Registrant is waiting for it to be approved by Verifier.
12. Now we logout and login as Verifier, we verify the documents by clicking on approve.

<figure><img src="../../../.gitbook/assets/image (6) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

13. Once approved, we login as SR and check the Token History by clicking on Token History Tab:

Expand Down
8 changes: 4 additions & 4 deletions docs/guardian/demo-guide/carbon-offsets/improved-cookstove.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ We need to first import the policy from open source repository.

Once imported, there will be 2 additional users with different roles (aside from the Standard Registry) that need to be created. Create a user account for the Project Developer. Once created and entered into the Policy, select the Project Developer role from the drop-down.

<figure><img src="../../../.gitbook/assets/image (4) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (4) (1) (1).png" alt=""><figcaption></figcaption></figure>

Fill out the Agent Application and wait for the approval.

Expand Down Expand Up @@ -74,7 +74,7 @@ Now, the Project Developer must go into their screen and "Submit a PDD" and fill

<figure><img src="../../../.gitbook/assets/image (25).png" alt=""><figcaption></figcaption></figure>

<figure><img src="../../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

Now, the Project Developer must go into their screen and "Submit a PDD" and fill out the Project Design Document form.

Expand All @@ -84,7 +84,7 @@ Now, the Project Developer must go into their screen and "Submit a PDD" and fill

The Verifier must now go into their Policy screen and view the PDD by click on the "Review button" and filling out the review form.

<figure><img src="../../../.gitbook/assets/image (6).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6) (1).png" alt=""><figcaption></figcaption></figure>

After that, the Verifer can select a Review ID and "Finalise review."

Expand All @@ -94,7 +94,7 @@ After that, the Verifer can select a Review ID and "Finalise review."

Once the PDD has been verified, the Project Developer can "Request registration."

<figure><img src="../../../.gitbook/assets/image (4) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (4) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

<figure><img src="../../../.gitbook/assets/image (15) (1).png" alt=""><figcaption></figcaption></figure>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Verra REDD 4 = 1695250025.604149003
Verra REDD 5 = 1695251173.300475003
```

<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

Once Policy is imported successfully, you get two options : Publish and Dry Run mode.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ To get detailed information on Signature status, we have an info icon near the t

To get the final Signature Result with detailed information such as which users have Signed / Declined, we need to hover on the Status as shown below:

<figure><img src="../../../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

### API Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ We have added new Impacts Section to display Primary/Secondary Impacts token det

In the case when multiple linked mint blocks are used then the system displays all linked VPs as shown below:

<figure><img src="../../../../.gitbook/assets/image (2) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (2) (1) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

#### 2.1 Data Format:

Expand Down
2 changes: 1 addition & 1 deletion docs/guardian/standard-registry/policies/policy-demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Once you login as a Standard Registry and finish the setup, click on Policies tab.

![](<../../../.gitbook/assets/image (4) (1) (1) (1) (1).png>)
![](<../../../.gitbook/assets/image (4) (1) (1) (1) (1) (1).png>)

We have two options to create Policy :

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ We have several Display settings in Policy Blocks section:

Block comparison displays can be unfolded to display a detailed view of the block Properties.

<figure><img src="../../../../.gitbook/assets/image (5).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (5) (3).png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# 📂 Search Block

Guardian policy authors can search for occurrences of the block usage in a similar context, i.e. embedded into the policy content of similar structure (surrounded by similar blocks), across all published policies within the Guardian instance using the search button in the policy editor.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# ⚙ Search Block APIs

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Searching Same Blocks

{% swagger method="post" path="" baseUrl="/analytics/search/block" summary="Search same blocks." %}
{% swagger-description %}
Search same blocks. Only users with the Standard Registry role are allowed to make the request.
{% endswagger-description %}

{% swagger-parameter in="body" required="true" name="uuid" %}
Filters
{% endswagger-parameter %}

{% swagger-response status="200: OK" description="Successful Operation" %}
```
content:
application/json:
schema:
$ref: '#/components/schemas/SearchPoliciesDTO'
```
{% endswagger-response %}

{% swagger-response status="401: Unauthorized" description="Unauthorized" %}

{% endswagger-response %}

{% swagger-response status="403: Forbidden" description="Forbidden" %}

{% endswagger-response %}

{% swagger-response status="500: Internal Server Error" description="Internal Server Error" %}
```
content:
application/json:
schema:
$ref: '#/components/schemas/InternalServerErrorDTO'
```
{% endswagger-response %}
{% endswagger %}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# 💻 Search Block using UI

## 1. Search Example

Blocks of similar configuration can be searched by clicking on search icon with respect to the block as shown below:

<figure><img src="../../../../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>

## 2. Search Result

Search result displays all the policies and its blocks, which have same flow with respect to the base block search.

<figure><img src="../../../../.gitbook/assets/image (1).png" alt=""><figcaption></figcaption></figure>

### 2.1 Context

The search finds and displays the ranked list (most similar on top) of longest continuous matching sequences of blocks surrounding the target block (highlighted). The search considers all dimensions - next/previous, parent/child - to be of equal weight and thus ranks results by the number of blocks in the found ‘similar’ sequence.

<figure><img src="../../../../.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>

Additionally, the system compares the configuration of the blocks individually, and displays the %% of similarity to the right of each block in comparison with the corresponding blocks in the base policy.

### 2.2 Block Configuration

Right panel of the UI displays the configuration details of the currently selected block as shown below.

Clicking “Apply” button will transfer (or apply) the configuration of the found block to the corresponding base policy block.

{% hint style="info" %}
**Note:** Original settings of the base policy block will be lost if ‘Apply’ action is executed.
{% endhint %}

<figure><img src="../../../../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>

### 2.3 Search Results Layout Display

Search results are displayed as folded groups by Policy (policy name is displayed in the group heading).

<figure><img src="../../../../.gitbook/assets/image (4).png" alt=""><figcaption></figcaption></figure>

The results are sorted by (in the correct order):

1\. The number of the similar blocks in the matching sequence

2\. Cumulative similarity score (%%) of the blocks

<figure><img src="../../../../.gitbook/assets/image (5).png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Policies can be searched by clicking on "Search policies" button. It can be searched based on their similarity to the given policy.&#x20;

<figure><img src="../../../../.gitbook/assets/image (4).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (4) (1).png" alt=""><figcaption></figcaption></figure>

The results are displayed in the descending order, the most similar policy is displayed at the top. It also displays similarity rate percentage.

<figure><img src="../../../../.gitbook/assets/image (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

We can also have an option for full display mode of similarity result as shown:

<figure><img src="../../../../.gitbook/assets/image (2) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../../.gitbook/assets/image (2) (1) (1).png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ To create a new Schemas, click on the **New** button at the top right corner.

After clicking on the New button, you will be asked to enter Schema details such as Schema Name, Policy Dropdown, Entity : VC/MRV/NONE, Schema Description and any other required fields.

![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1).png>)
![](<../../../.gitbook/assets/image (1) (1) (1) (1) (1) (1) (1).png>)

In addition to the basic Schema details we also have an option to add Field and Condition to each field.

![](<../../../.gitbook/assets/image (9) (1) (2) (1).png>)

We can also customize the Field keys and Field Title by clicking on Advanced Tab.

![](<../../../.gitbook/assets/image (3) (1) (1) (1) (1).png>)
![](<../../../.gitbook/assets/image (3) (1) (1) (1) (1) (1).png>)

Instead of creating a new Schema from scratch, there is also an option to import it via File or via IPFS.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ To display System / Policy Schemas in the GUI, we have added a toggle in the Sch

Whenever an account is created, System Schemas are generated automatically.

<figure><img src="../../../.gitbook/assets/image (3) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: By default System Schemas cannot be edited/deleted.
Expand Down
4 changes: 2 additions & 2 deletions docs/guardian/tokens/retirement-contract/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ The ‘retirement contracts’ are responsible for the mechanics of matching ‘

The high-level flow of the actions which configure token retirement is illustrated on the sequence diagram below:

<figure><img src="../../../.gitbook/assets/image (3).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1).png" alt=""><figcaption></figcaption></figure>

Guardian contains a full production retirement system implementation which allows the configuration of arbitrary pools of tokens (two-sided, one-sides, with arbitrary ‘exchange rates’ etc), issued by different SRs, operating on different Guardian instances, to be configured for retirement with arbitrary additional rules further controlling their lifecycle.&#x20;

A simplified architecture diagram of the retirement contracts implementation is shown on the diagram below.

<figure><img src="../../../.gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (6).png" alt=""><figcaption></figcaption></figure>
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

1. Guardian instance out of the box contains implementations for ‘Wiping’ and ‘Retirement’ contracts which can be deployed/enabled from the UI.

<figure><img src="../../../.gitbook/assets/image (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (1) (1).png" alt=""><figcaption></figcaption></figure>

2. Each SR has its own contract permissions. Since contracts are deployed on Hedera and their methods can be called independently via 3rd party systems but the status of these contracts can change without Guardian’s knowledge. SRs can action a ‘refresh’ of their permissions by clicking on the refresh sign (chargeable Hedera operation, costs < 1 hbar)

<figure><img src="../../../.gitbook/assets/image (2).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (2) (1).png" alt=""><figcaption></figcaption></figure>

### **Contract Roles:**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

We have a new tab as Token for all Blocks. This tab is used to add token template and set value for each token option. These values will be filled by User if it is null.

<figure><img src="../../../.gitbook/assets/image (3) (1) (1).png" alt=""><figcaption></figcaption></figure>
<figure><img src="../../../.gitbook/assets/image (3) (1) (1) (1).png" alt=""><figcaption></figcaption></figure>

0 comments on commit 372f2d8

Please sign in to comment.