You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/07/13 09:17:17 UTC

[incubator-devlake-website] branch main updated (887415b -> bd483f0)

This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git


    from 887415b  Added versioning
     new eeb029f  feat: team feature user guide
     new f08aea7  feat: team feature user guide
     new bd483f0  feat: team feature user guide

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 docs/UserManuals/team-feature-user-guide.md | 129 ++++++++++++++++++++++++++++
 static/img/teamflow1.png                    | Bin 0 -> 63046 bytes
 static/img/teamflow2.png                    | Bin 0 -> 54175 bytes
 static/img/teamflow3.png                    | Bin 0 -> 48454 bytes
 static/img/teamflow4.png                    | Bin 0 -> 49179 bytes
 static/img/teamflow5.png                    | Bin 0 -> 71412 bytes
 static/img/teamflow6.png                    | Bin 0 -> 33900 bytes
 static/img/teamflow7.png                    | Bin 0 -> 94123 bytes
 8 files changed, 129 insertions(+)
 create mode 100644 docs/UserManuals/team-feature-user-guide.md
 create mode 100644 static/img/teamflow1.png
 create mode 100644 static/img/teamflow2.png
 create mode 100644 static/img/teamflow3.png
 create mode 100644 static/img/teamflow4.png
 create mode 100644 static/img/teamflow5.png
 create mode 100644 static/img/teamflow6.png
 create mode 100644 static/img/teamflow7.png


[incubator-devlake-website] 02/03: feat: team feature user guide

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit f08aea7b8daeb18b4d67ef2001a38c7535d7e548
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Jul 13 15:11:25 2022 +0800

    feat: team feature user guide
---
 docs/UserManuals/team-feature-user-guide.md |  41 ++++++++++++++++++----------
 static/img/teamflow6.png                    | Bin 33273 -> 33900 bytes
 2 files changed, 26 insertions(+), 15 deletions(-)

diff --git a/docs/UserManuals/team-feature-user-guide.md b/docs/UserManuals/team-feature-user-guide.md
index e798be3..2c9fb4a 100644
--- a/docs/UserManuals/team-feature-user-guide.md
+++ b/docs/UserManuals/team-feature-user-guide.md
@@ -23,7 +23,8 @@ curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_
 
 b. The actual api request.
 
-    i. Create the corresponding teams file: teams.csv (Notes: the table header is in capital letters).
+    i. Create the corresponding teams file: teams.csv 
+    (Notes: 1.The table table field names should have initial capital letters. 2.Be careful not to change the file suffix when opening csv files through the tool ).
 
     ii. The corresponding curl command.(Quick copy folder path for macOS, Shortcut option + command + c)
 
@@ -31,9 +32,11 @@ b. The actual api request.
 curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
 ```
 
-    iii. After successful execution, the teams table is generated and the data can be seen in the database table teams.
+    iii. After successful execution, the teams table is generated and the data can be seen in the database table teams. 
+    (Notes: how to connect to the database: mainly through host, port, username, password, and then through sql tools, such as sequal ace, datagrip and other data, of course you can also access through the command line mysql -h `ip` -u `username` -p -P `port`)
+
+![image](/img/teamflow3.png)
 
-<p align="center"><img src="../../static/img/teamflow3.png" /></p>
 
 ## Step 2 - Construct user tables (roster)
 a. Api request example, you can generate sample data.
@@ -56,11 +59,11 @@ curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --fo
 
     iii. After successful execution, the users table is generated and the data can be seen in the database table users.
 
-<p align="center"><img src="../../static/img/teamflow1.png" /></p>
+![image](/img/teamflow1.png)
     
     iv. Generated the team_users table, you can see the data in the team_users table.
 
-<p align="center"><img src="../../static/img/teamflow2.png" /></p>
+![image](/img/teamflow2.png)
 
 ## Step 3 - Update users if you need  
 If there is a problem with team_users association or data in users, just re-put users api interface, i.e. (b in step 2 above)
@@ -68,9 +71,9 @@ If there is a problem with team_users association or data in users, just re-put
 ## Step 4 - Collect accounts 
 accounts table is collected by users through devlake. You can see the accounts table information in the database.
 
-<p align="center"><img src="../../static/img/teamflow4.png" /></p>
+![image](/img/teamflow4.png)
 
-## Step 5 - Bind accounts and users table relationship
+## Step 5 - Automatically match existing accounts and users through api requests
 
 a. api request:  the name of the plugin is "org", connctionId is order to keep same with other plugins.
 
@@ -95,31 +98,39 @@ curl --location --request POST '127.0.0.1:8080/pipelines' \
 
 b. After successful execution, the user_accounts table is generated, and you can see the data in table user_accounts.
 
-<p align="center"><img src="../../static/img/teamflow5.png" /></p>
+![image](/img/teamflow5.png)
 
 ## Step 6 - Get user_accountsr relationship
-After generating the user_accounts relationship, the user needs to confirm whether the data user and accounts match correctly by the GET method that can get the associated data. The main purpose is to check whether the Id in the accounts table is associated with the UserId relationship.
+After generating the user_accounts relationship, the user can get the associated data through the GET method to confirm whether the data user and account match correctly and whether the matched accounts are complete.
 
-a. http://127.0.0.1:8080/plugins/org/user_accounts.csv (put into the browser to download the file directly)
+a. http://127.0.0.1:8080/plugins/org/user_account_mapping.csv (put into the browser to download the file directly)
 
 b. The corresponding curl command.
 ```
-curl --location --request GET 'http://127.0.0.1:8080/plugins/org/user_accounts.csv'
+curl --location --request GET 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv'
 ```
 
-<p align="center"><img src="../../static/img/teamflow6.png" /></p>
+![image](/img/teamflow6.png)
+
+c. You can also use sql statements to determine, here to provide a sql statement for reference only.
+```
+SELECT a.id as account_id, a.email, a.user_name as account_user_name, u.id as user_id, u.name as real_name
+FROM accounts a 
+        join user_accounts ua on a.id = ua.account_id
+        join users u on ua.user_id = u.id
+```
 
 ## Step 7 - Update user_accounts if you need
-If the relationship in the accounts table is not as expected, you can change the relationship in the accounts table. For example, change the UserId in the line Id=github:GithubAccount:1:1234 to 2 in my accounts here, upload the user_accounts.csv file through the api user_account.csv file.
+If the association between user and account is not as expected, you can change the user_account_mapping.csv file. For example, I change the UserId in the line Id=github:GithubAccount:1:1234 in the user_account_mapping.csv file to 2, and then upload the user_account_mapping.csv file through the api interface.
 
 a. The corresponding curl command.
 ```
-curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/user_accounts.csv' --form 'file=@"/xxxpath/user_accounts.csv"'
+curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv' --form 'file=@"/xxxpath/user_account_mapping.csv"'
 ```
 
 b. You can see that the data in the user_accounts table has been updated.
 
-<p align="center"><img src="../../static/img/teamflow7.png" /></p>
+![image](/img/teamflow7.png)
 
 
 **The above is the flow of user usage for the whole team feature.**
diff --git a/static/img/teamflow6.png b/static/img/teamflow6.png
index 3fee26f..5a55e46 100644
Binary files a/static/img/teamflow6.png and b/static/img/teamflow6.png differ


[incubator-devlake-website] 03/03: feat: team feature user guide

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit bd483f0161e5da948f2a3a3922b778fb1f0d52d8
Author: abeizn <zi...@merico.dev>
AuthorDate: Wed Jul 13 15:44:59 2022 +0800

    feat: team feature user guide
---
 docs/UserManuals/team-feature-user-guide.md | 45 ++++++++++++-----------------
 1 file changed, 19 insertions(+), 26 deletions(-)

diff --git a/docs/UserManuals/team-feature-user-guide.md b/docs/UserManuals/team-feature-user-guide.md
index 2c9fb4a..07a080b 100644
--- a/docs/UserManuals/team-feature-user-guide.md
+++ b/docs/UserManuals/team-feature-user-guide.md
@@ -9,28 +9,24 @@ This is a brief step-by-step guide to using the team feature.
 
 Notes: 
 1. Please convert /xxxpath/*.csv to the absolute path of the csv file you want to upload. 
-2 Please replace the 127.0.0.1:8080 in the text with the actual ip and port. 
+2. Please replace the 127.0.0.1:8080 in the text with the actual ip and port. 
 
 ## Step 1 - Construct the teams table.
 a. Api request example, you can generate sample data.
 
-    i. GET request: http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true (put into the browser can download the corresponding csv file)
+    i.  GET request: http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true (put into the browser can download the corresponding csv file)
 
-    ii. The corresponding curl command.
-```
-curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true'
-```
+    ii. The corresponding curl command:
+        curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true'
+    
 
 b. The actual api request.
 
-    i. Create the corresponding teams file: teams.csv 
+    i.  Create the corresponding teams file: teams.csv 
     (Notes: 1.The table table field names should have initial capital letters. 2.Be careful not to change the file suffix when opening csv files through the tool ).
 
-    ii. The corresponding curl command.(Quick copy folder path for macOS, Shortcut option + command + c)
-
-```
-curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
-```
+    ii. The corresponding curl command(Quick copy folder path for macOS, Shortcut option + command + c):
+    curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
 
     iii. After successful execution, the teams table is generated and the data can be seen in the database table teams. 
     (Notes: how to connect to the database: mainly through host, port, username, password, and then through sql tools, such as sequal ace, datagrip and other data, of course you can also access through the command line mysql -h `ip` -u `username` -p -P `port`)
@@ -41,21 +37,18 @@ curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --fo
 ## Step 2 - Construct user tables (roster)
 a. Api request example, you can generate sample data.
 
-    i. Get request: http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true (put into the browser can download the corresponding csv file).
+    i.  Get request: http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true (put into the browser can download the corresponding csv file).
+
+    ii. The corresponding curl command:
+    curl --location --request GET 'http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true'
 
-    ii. The corresponding curl command.
-```
-curl --location --request GET 'http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true'
-```
 
 b. The actual api request.
 
-    i. Create the csv file (roster) (Notes: the table header is in capital letters: Id,Email,Name).
-  
-    ii. The corresponding curl command.
-```
-curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --form 'file=@"/xxxpath/users.csv"'
-```
+    i.  Create the csv file (roster) (Notes: the table header is in capital letters: Id,Email,Name).
+
+    ii. The corresponding curl command:
+    curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --form 'file=@"/xxxpath/users.csv"'
 
     iii. After successful execution, the users table is generated and the data can be seen in the database table users.
 
@@ -75,7 +68,7 @@ accounts table is collected by users through devlake. You can see the accounts t
 
 ## Step 5 - Automatically match existing accounts and users through api requests
 
-a. api request:  the name of the plugin is "org", connctionId is order to keep same with other plugins.
+a. Api request:  the name of the plugin is "org", connctionId is order to keep same with other plugins.
 
 ```
 curl --location --request POST '127.0.0.1:8080/pipelines' \
@@ -105,7 +98,7 @@ After generating the user_accounts relationship, the user can get the associated
 
 a. http://127.0.0.1:8080/plugins/org/user_account_mapping.csv (put into the browser to download the file directly)
 
-b. The corresponding curl command.
+b. The corresponding curl command:
 ```
 curl --location --request GET 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv'
 ```
@@ -123,7 +116,7 @@ FROM accounts a
 ## Step 7 - Update user_accounts if you need
 If the association between user and account is not as expected, you can change the user_account_mapping.csv file. For example, I change the UserId in the line Id=github:GithubAccount:1:1234 in the user_account_mapping.csv file to 2, and then upload the user_account_mapping.csv file through the api interface.
 
-a. The corresponding curl command.
+a. The corresponding curl command:
 ```
 curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/user_account_mapping.csv' --form 'file=@"/xxxpath/user_account_mapping.csv"'
 ```


[incubator-devlake-website] 01/03: feat: team feature user guide

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake-website.git

commit eeb029f5f54eeb74ebbe28a45a1dfdf96a5db677
Author: abeizn <zi...@merico.dev>
AuthorDate: Tue Jul 12 23:27:23 2022 +0800

    feat: team feature user guide
---
 docs/UserManuals/team-feature-user-guide.md | 125 ++++++++++++++++++++++++++++
 static/img/teamflow1.png                    | Bin 0 -> 63046 bytes
 static/img/teamflow2.png                    | Bin 0 -> 54175 bytes
 static/img/teamflow3.png                    | Bin 0 -> 48454 bytes
 static/img/teamflow4.png                    | Bin 0 -> 49179 bytes
 static/img/teamflow5.png                    | Bin 0 -> 71412 bytes
 static/img/teamflow6.png                    | Bin 0 -> 33273 bytes
 static/img/teamflow7.png                    | Bin 0 -> 94123 bytes
 8 files changed, 125 insertions(+)

diff --git a/docs/UserManuals/team-feature-user-guide.md b/docs/UserManuals/team-feature-user-guide.md
new file mode 100644
index 0000000..e798be3
--- /dev/null
+++ b/docs/UserManuals/team-feature-user-guide.md
@@ -0,0 +1,125 @@
+---
+title: "Team Feature User Guide"
+sidebar_position: 6
+description: >
+  Team Feature User Guide
+---
+## Summary
+This is a brief step-by-step guide to using the team feature.
+
+Notes: 
+1. Please convert /xxxpath/*.csv to the absolute path of the csv file you want to upload. 
+2 Please replace the 127.0.0.1:8080 in the text with the actual ip and port. 
+
+## Step 1 - Construct the teams table.
+a. Api request example, you can generate sample data.
+
+    i. GET request: http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true (put into the browser can download the corresponding csv file)
+
+    ii. The corresponding curl command.
+```
+curl --location --request GET 'http://127.0.0.1:8080/plugins/org/teams.csv?fake_data=true'
+```
+
+b. The actual api request.
+
+    i. Create the corresponding teams file: teams.csv (Notes: the table header is in capital letters).
+
+    ii. The corresponding curl command.(Quick copy folder path for macOS, Shortcut option + command + c)
+
+```
+curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/teams.csv' --form 'file=@"/xxxpath/teams.csv"'
+```
+
+    iii. After successful execution, the teams table is generated and the data can be seen in the database table teams.
+
+<p align="center"><img src="../../static/img/teamflow3.png" /></p>
+
+## Step 2 - Construct user tables (roster)
+a. Api request example, you can generate sample data.
+
+    i. Get request: http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true (put into the browser can download the corresponding csv file).
+
+    ii. The corresponding curl command.
+```
+curl --location --request GET 'http://127.0.0.1:8080/plugins/org/users.csv?fake_data=true'
+```
+
+b. The actual api request.
+
+    i. Create the csv file (roster) (Notes: the table header is in capital letters: Id,Email,Name).
+  
+    ii. The corresponding curl command.
+```
+curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/users.csv' --form 'file=@"/xxxpath/users.csv"'
+```
+
+    iii. After successful execution, the users table is generated and the data can be seen in the database table users.
+
+<p align="center"><img src="../../static/img/teamflow1.png" /></p>
+    
+    iv. Generated the team_users table, you can see the data in the team_users table.
+
+<p align="center"><img src="../../static/img/teamflow2.png" /></p>
+
+## Step 3 - Update users if you need  
+If there is a problem with team_users association or data in users, just re-put users api interface, i.e. (b in step 2 above)
+
+## Step 4 - Collect accounts 
+accounts table is collected by users through devlake. You can see the accounts table information in the database.
+
+<p align="center"><img src="../../static/img/teamflow4.png" /></p>
+
+## Step 5 - Bind accounts and users table relationship
+
+a. api request:  the name of the plugin is "org", connctionId is order to keep same with other plugins.
+
+```
+curl --location --request POST '127.0.0.1:8080/pipelines' \
+--header 'Content-Type: application/json' \
+--data-raw '{
+    "name": "test",
+    "plan":[
+        [
+            {
+                "plugin": "org",
+                "subtasks":["connectUserAccountsExact"],
+                "options":{
+                    "connectionId":1
+                }
+            }
+        ]
+    ]
+}'
+```
+
+b. After successful execution, the user_accounts table is generated, and you can see the data in table user_accounts.
+
+<p align="center"><img src="../../static/img/teamflow5.png" /></p>
+
+## Step 6 - Get user_accountsr relationship
+After generating the user_accounts relationship, the user needs to confirm whether the data user and accounts match correctly by the GET method that can get the associated data. The main purpose is to check whether the Id in the accounts table is associated with the UserId relationship.
+
+a. http://127.0.0.1:8080/plugins/org/user_accounts.csv (put into the browser to download the file directly)
+
+b. The corresponding curl command.
+```
+curl --location --request GET 'http://127.0.0.1:8080/plugins/org/user_accounts.csv'
+```
+
+<p align="center"><img src="../../static/img/teamflow6.png" /></p>
+
+## Step 7 - Update user_accounts if you need
+If the relationship in the accounts table is not as expected, you can change the relationship in the accounts table. For example, change the UserId in the line Id=github:GithubAccount:1:1234 to 2 in my accounts here, upload the user_accounts.csv file through the api user_account.csv file.
+
+a. The corresponding curl command.
+```
+curl --location --request PUT 'http://127.0.0.1:8080/plugins/org/user_accounts.csv' --form 'file=@"/xxxpath/user_accounts.csv"'
+```
+
+b. You can see that the data in the user_accounts table has been updated.
+
+<p align="center"><img src="../../static/img/teamflow7.png" /></p>
+
+
+**The above is the flow of user usage for the whole team feature.**
diff --git a/static/img/teamflow1.png b/static/img/teamflow1.png
new file mode 100644
index 0000000..cd6880b
Binary files /dev/null and b/static/img/teamflow1.png differ
diff --git a/static/img/teamflow2.png b/static/img/teamflow2.png
new file mode 100644
index 0000000..12f66c7
Binary files /dev/null and b/static/img/teamflow2.png differ
diff --git a/static/img/teamflow3.png b/static/img/teamflow3.png
new file mode 100644
index 0000000..e591f28
Binary files /dev/null and b/static/img/teamflow3.png differ
diff --git a/static/img/teamflow4.png b/static/img/teamflow4.png
new file mode 100644
index 0000000..0fb88ad
Binary files /dev/null and b/static/img/teamflow4.png differ
diff --git a/static/img/teamflow5.png b/static/img/teamflow5.png
new file mode 100644
index 0000000..7c02242
Binary files /dev/null and b/static/img/teamflow5.png differ
diff --git a/static/img/teamflow6.png b/static/img/teamflow6.png
new file mode 100644
index 0000000..3fee26f
Binary files /dev/null and b/static/img/teamflow6.png differ
diff --git a/static/img/teamflow7.png b/static/img/teamflow7.png
new file mode 100644
index 0000000..b24d93d
Binary files /dev/null and b/static/img/teamflow7.png differ