Работает создание коммитов и перенос в новый enviroment

This commit is contained in:
2026-01-23 13:57:44 +03:00
parent e9d3f3c827
commit 07ec2d9797
37 changed files with 3227 additions and 252 deletions

View File

@@ -1,40 +1,43 @@
# Quickstart: Git Integration Plugin
# Quickstart: Git Integration for Dashboards
## Setup
## Prerequisites
- A running Superset instance.
- A Git repository (GitLab, GitHub, etc.) created for your dashboard.
- A Personal Access Token (PAT) with `repo` scope.
1. **Install Dependencies**:
```bash
cd backend && .venv/bin/pip install GitPython
```
## Setup Guide
2. **Configure Git Server**:
- Go to Settings -> Git Integration
- Click "Add Server"
- Select Provider (e.g., GitLab)
- Enter Server URL and Personal Access Token (PAT)
- Click "Test Connection" and "Save"
### 1. Configure Git Connection
1. Navigate to the **Git Integration** tab in the tools menu.
2. Select your Dashboard from the dropdown.
3. Enter your Git Provider details:
- **Repo URL**: `https://github.com/myorg/sales-dashboard.git`
- **Username**: `myuser`
- **PAT**: `ghp_xxxxxxxxxxxx`
4. Click **Save & Connect**. The system will clone the repository.
3. **Link Dashboard to Git**:
- Navigate to the Dashboard view
- Select a dashboard
- Click "Enable Git Integration"
- Select the Git server and provide repository path (e.g., `my-org/my-dashboard-repo`)
### 2. Development Workflow
## Common Workflows
#### Making Changes
1. Edit your dashboard in Superset as usual.
2. Go to the **Git Integration** panel.
3. Click **Sync Status**. This pulls the latest state from Superset and compares it with the Git repo.
4. You will see a list of changed files (e.g., `charts/my-chart.yaml`).
### Versioning Changes
1. Make changes to the dashboard in Superset.
2. In the Git Integration panel, click "Commit".
3. Enter a commit message and select files (metadata, charts, etc.).
4. Click "Push" to sync with remote.
#### Committing
1. Select the files you want to include.
2. Enter a commit message.
3. Click **Commit**.
### Branching
1. Click "New Branch".
2. Enter branch name (e.g., `feature/new-charts`).
3. The dashboard state is now tracked on this branch.
#### Pushing
1. Click **Push** to send your changes to the remote repository.
### Deployment
1. Ensure changes are committed and pushed.
2. Click "Deploy".
3. Select target environment (e.g., "Production").
4. Monitor deployment logs for success.
### 3. Branching
1. To work on a new feature, go to the **Branches** tab.
2. Enter a name (e.g., `feature/Q4-updates`) and click **Create Branch**.
3. The system automatically switches to this branch.
### 4. Deploying
1. Switch to the **Deploy** tab.
2. Select the target environment (e.g., "Production").
3. Click **Deploy**. The current version of the dashboard will be imported into the target environment.