Skip to content

Commit 803b0d2

Browse files
committed
docs: youtube fullscreen
1 parent e29b956 commit 803b0d2

File tree

5 files changed

+133
-128
lines changed

5 files changed

+133
-128
lines changed

content/docs/administration/custom-approval.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ feature_name: CUSTOM_APPROVAL
55

66
<TutorialBlock url="/docs/tutorials/database-change-management-with-risk-adjusted-approval-flow" title="Database Change Management with Risk-Adjusted Approval Flow" />
77

8-
<iframe width="675" height="380" src="https://www.youtube.com/embed/K_RWlqdplZQ" title="YouTube video player" className="w-full" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen></iframe>
8+
<iframe width="675" height="380" src="https://www.youtube.com/embed/K_RWlqdplZQ" title="YouTube video player" className="w-full" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen="allowFullScreen"></iframe>
99

1010
In **Settings > Custom Approval**, you can choose which approval flow to use for a [risk level](/docs/administration/risk-center) and define approval flows.
1111

content/docs/sql-editor/ai-assistant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ feature_name: AI_ASSISTANT
55

66
Here is a video demoing this feature:
77

8-
<iframe width="100%" height="320" src="https://www.youtube.com/embed/3qGyad0RK50?si=UO0M98Brd0ByY2aC" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
8+
<iframe width="100%" height="320" src="https://www.youtube.com/embed/3qGyad0RK50?si=UO0M98Brd0ByY2aC" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="allowFullScreen"></iframe>
99

1010
## Setup
1111

content/docs/tutorials/data-classification.md

Lines changed: 129 additions & 124 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ This tutorial guides you through setting up data classification and masking usin
1515

1616
By the end of this tutorial, you will have accomplished the following:
1717

18-
<iframe width="100%" height="315" src="https://www.youtube.com/embed/ExH5lWy5f10?si=yaLf-hbhyGFHKkww" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
18+
<iframe width="100%" height="315" src="https://www.youtube.com/embed/ExH5lWy5f10?si=yaLf-hbhyGFHKkww" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="allowFullScreen"></iframe>
1919

2020
## Prerequisites
2121

@@ -39,7 +39,7 @@ This demo app simulates the process of fetching data from databases connected to
3939
1. Start Bytebase via Docker and register an account which will be granted `Workspace Admin` role.
4040

4141
<IncludeBlock url="/docs/get-started/install/terminal-docker-run-volume"></IncludeBlock>
42-
You'll need an API service account user too:
42+
You'll need an API service account user too:
4343

4444
1. Go to **IAM&Admin > Users&Groups**, click **+Add User**.
4545
1. Choose `Service Account` as the **Type**, fill in the **Email** with `api-sample@service.bytebase.com`, choose `Workspace DBA` as **Roles**, and click **Confirm**.
@@ -63,30 +63,30 @@ There are two ways to configure the data masking based on the classification lev
6363
1. Choose **Masking Level** as `Partial` and click **Confirm**.
6464
1. The same way, we can add another masking rule for `Level 2` with **Masking Level** as `Full`.
6565

66-
![bb-data-masking](/content/docs/tutorials/data-classification/bb-data-masking.webp)
66+
![bb-data-masking](/content/docs/tutorials/data-classification/bb-data-masking.webp)
6767

6868
#### API
6969

7070
1. Find the [data masking configuration file](https://github.com/bytebase/api-example/blob/main/data-security/masking/global-masking-rule.json) within the `data-security` repository.
7171
1. Generate the token for the service account user:
7272

73-
```bash
74-
export bytebase_url=http://localhost:8080
75-
bytebase_account="api-sample@service.bytebase.com"
76-
bytebase_password="bbs_bxxxxxxxxxoUxfY"
77-
bytebase_token=$(curl -v ${bytebase_url}/v1/auth/login \
78-
--data-raw '{"email":"'${bytebase_account}'","password":"'${bytebase_password}'","web":true}' \ --compressed 2>&1 | grep token | grep -o 'access-token=[^;]*;' | grep -o '[^;]*' | sed 's/access-token=//g; s/;//g')
73+
```bash
74+
export bytebase_url=http://localhost:8080
75+
bytebase_account="api-sample@service.bytebase.com"
76+
bytebase_password="bbs_bxxxxxxxxxoUxfY"
77+
bytebase_token=$(curl -v ${bytebase_url}/v1/auth/login \
78+
--data-raw '{"email":"'${bytebase_account}'","password":"'${bytebase_password}'","web":true}' \ --compressed 2>&1 | grep token | grep -o 'access-token=[^;]*;' | grep -o '[^;]*' | sed 's/access-token=//g; s/;//g')
7979

80-
echo $bytebase_token
81-
```
80+
echo $bytebase_token
81+
```
8282

8383
1. Import the data masking configuration:
8484

85-
```bash
86-
curl --request PATCH "${bytebase_url}/v1/policies/masking_rule?allow_missing=true&update_mask=payload" \
87-
--header 'Authorization: Bearer '${bytebase_token} \
88-
--data @global-masking-rule.json
89-
```
85+
```bash
86+
curl --request PATCH "${bytebase_url}/v1/policies/masking_rule?allow_missing=true&update_mask=payload" \
87+
--header 'Authorization: Bearer '${bytebase_token} \
88+
--data @global-masking-rule.json
89+
```
9090

9191
1. Login to Bytebase console and go to **Data Access > Data Masking**, you'll see the data masking is configured.
9292

@@ -112,7 +112,7 @@ There are two ways to configure the data masking based on the classification lev
112112
![demo-two-levels](/content/docs/tutorials/data-classification/demo-two-levels.webp)
113113

114114
1. Go to Bytebase SQL Editor, double click the `salary` table, you'll see the data is masked accordingly.
115-
![bb-sql-editor](/content/docs/tutorials/data-classification/bb-sql-editor.webp)
115+
![bb-sql-editor](/content/docs/tutorials/data-classification/bb-sql-editor.webp)
116116

117117
## Code explanation
118118

@@ -122,121 +122,126 @@ There are two ways to configure the data masking based on the classification lev
122122

123123
1. Use the API `/v1/instances/${instance}/databases/${database}/metadata` to fetch the database schema information. In this demo, the instance is hardcoded as `test-sample-instance` and the database is `test-sample-database`.
124124

125-
```javascript
126-
const instance = 'prod-sample-instance';
127-
const database = 'hr_prod';
128-
129-
const response = await fetch(`${process.env.NEXT_PUBLIC_BB_HOST}/v1/instances/${instance}/databases/${database}/metadata`, {
130-
method: 'GET',
131-
headers: {
132-
'Content-Type': 'application/json',
133-
"Authorization": 'Bearer '+ token
134-
},
135-
cache: 'no-store'
136-
});
137-
```
125+
```javascript
126+
const instance = 'prod-sample-instance';
127+
const database = 'hr_prod';
128+
129+
const response = await fetch(
130+
`${process.env.NEXT_PUBLIC_BB_HOST}/v1/instances/${instance}/databases/${database}/metadata`,
131+
{
132+
method: 'GET',
133+
headers: {
134+
'Content-Type': 'application/json',
135+
Authorization: 'Bearer ' + token,
136+
},
137+
cache: 'no-store',
138+
},
139+
);
140+
```
138141

139142
1. The metadata response includes the database schema under `schemas`:
140143

141-
```javascript
142-
"schemas": [
143-
{
144-
"name": "public",
145-
"tables": [
146-
{
147-
"name": "dept_emp",
148-
"columns": [
149-
{
150-
"name": "emp_no",
151-
"position": 1,
152-
"hasDefault": false,
153-
"onUpdate": "",
154-
"nullable": false,
155-
"type": "integer",
156-
"characterSet": "",
157-
"collation": "",
158-
"comment": "",
159-
"userComment": "",
160-
"effectiveMaskingLevel": "MASKING_LEVEL_UNSPECIFIED",
161-
"generation": null
162-
},
163-
{
164-
"name": "dept_no",
165-
"position": 2,
166-
"hasDefault": false,
167-
"onUpdate": "",
168-
"nullable": false,
169-
"type": "text",
170-
"characterSet": "",
171-
"collation": "",
172-
"comment": "",
173-
"userComment": "",
174-
"effectiveMaskingLevel": "MASKING_LEVEL_UNSPECIFIED",
175-
"generation": null
176-
},
177-
...
178-
]
179-
}
180-
...
181-
]
182-
}
183-
]
184-
```
185-
186-
Meanwhile, it also includes the classification information under `schemaConfigs`:
187-
188-
```javascript
189-
"schemaConfigs": [
190-
{
191-
"name": "public",
192-
"tableConfigs": [
193-
{
194-
"name": "employee",
195-
"columnConfigs": [
196-
{
197-
"name": "birth_date",
198-
"semanticTypeId": "",
199-
"labels": {},
200-
"classificationId": "1-3"
201-
},
202-
{
203-
"name": "emp_no",
204-
"semanticTypeId": "",
205-
"labels": {},
206-
"classificationId": "1-1"
207-
}
208-
],
209-
"classificationId": "",
210-
"updater": "",
211-
"sourceBranch": "",
212-
"updateTime": null
213-
}
214-
],
215-
"functionConfigs": [],
216-
"procedureConfigs": [],
217-
"viewConfigs": []
218-
}
219-
]
220-
...
221-
222-
```
144+
```javascript
145+
"schemas": [
146+
{
147+
"name": "public",
148+
"tables": [
149+
{
150+
"name": "dept_emp",
151+
"columns": [
152+
{
153+
"name": "emp_no",
154+
"position": 1,
155+
"hasDefault": false,
156+
"onUpdate": "",
157+
"nullable": false,
158+
"type": "integer",
159+
"characterSet": "",
160+
"collation": "",
161+
"comment": "",
162+
"userComment": "",
163+
"effectiveMaskingLevel": "MASKING_LEVEL_UNSPECIFIED",
164+
"generation": null
165+
},
166+
{
167+
"name": "dept_no",
168+
"position": 2,
169+
"hasDefault": false,
170+
"onUpdate": "",
171+
"nullable": false,
172+
"type": "text",
173+
"characterSet": "",
174+
"collation": "",
175+
"comment": "",
176+
"userComment": "",
177+
"effectiveMaskingLevel": "MASKING_LEVEL_UNSPECIFIED",
178+
"generation": null
179+
},
180+
...
181+
]
182+
}
183+
...
184+
]
185+
}
186+
]
187+
```
188+
189+
Meanwhile, it also includes the classification information under `schemaConfigs`:
190+
191+
```javascript
192+
"schemaConfigs": [
193+
{
194+
"name": "public",
195+
"tableConfigs": [
196+
{
197+
"name": "employee",
198+
"columnConfigs": [
199+
{
200+
"name": "birth_date",
201+
"semanticTypeId": "",
202+
"labels": {},
203+
"classificationId": "1-3"
204+
},
205+
{
206+
"name": "emp_no",
207+
"semanticTypeId": "",
208+
"labels": {},
209+
"classificationId": "1-1"
210+
}
211+
],
212+
"classificationId": "",
213+
"updater": "",
214+
"sourceBranch": "",
215+
"updateTime": null
216+
}
217+
],
218+
"functionConfigs": [],
219+
"procedureConfigs": [],
220+
"viewConfigs": []
221+
}
222+
]
223+
...
224+
225+
```
223226

224227
### Update the schema with classification
225228

226229
1. To update the schema with classification, we need to use the API `/v1/instances/${instance}/databases/${database}/metadata` with `PATCH` method.
227230

228-
```javascript
229-
const response = await fetch(`${process.env.NEXT_PUBLIC_BB_HOST}/v1/instances/${instance}/databases/${database}/metadata`, {
230-
method: 'PATCH',
231-
headers: {
232-
'Content-Type': 'application/json',
233-
"Authorization": 'Bearer '+ token
234-
},
235-
body: JSON.stringify(req),
236-
cache: 'no-store'
237-
});
238-
239-
```
231+
```javascript
232+
const response = await fetch(
233+
`${process.env.NEXT_PUBLIC_BB_HOST}/v1/instances/${instance}/databases/${database}/metadata`,
234+
{
235+
method: 'PATCH',
236+
headers: {
237+
'Content-Type': 'application/json',
238+
Authorization: 'Bearer ' + token,
239+
},
240+
body: JSON.stringify(req),
241+
cache: 'no-store',
242+
},
243+
);
244+
```
240245

241246
### Fetch defined classification
242247

content/docs/tutorials/database-change-management-with-jira-automated.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Bytebase is an open-source database DevSecOps solution for Developer, Security,
1515

1616
Here is what you will achieve by the end of this tutorial:
1717

18-
<iframe width="100%" height="320" src="https://www.youtube.com/embed/t23dFR6ZJl0?si=g_UkL8fTm6WnZihW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
18+
<iframe width="100%" height="320" src="https://www.youtube.com/embed/t23dFR6ZJl0?si=g_UkL8fTm6WnZihW" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="allowFullScreen"></iframe>
1919

2020
![auto-jira](/content/docs/tutorials/database-change-management-with-jira-automated/auto-jira.webp)
2121

content/docs/tutorials/embed-sql-editor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can also embed the Bytebase SQL Editor into your application. This tutorial
1919

2020
By the end of this tutorial, you will have achieved the following:
2121

22-
<iframe width="100%" height="320" src="https://www.youtube.com/embed/SrH2kwQhALI?si=hI-b3sGMnscLwvgt" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>
22+
<iframe width="100%" height="320" src="https://www.youtube.com/embed/SrH2kwQhALI?si=hI-b3sGMnscLwvgt" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="allowFullScreen"></iframe>
2323

2424
## Prerequisites
2525

0 commit comments

Comments
 (0)