grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
60.72k stars 11.61k forks source link

DashboardScene: Restrict dashboard in read only state #87316

Closed Sergej-Vlasov closed 2 weeks ago

Sergej-Vlasov commented 2 weeks ago

In order to fix this for G11 a temporary solution of Make Editable button was introduced and few safeguards around that.

Fixes #87169

Special notes for your reviewer:

Please check that:

grafana-delivery-bot[bot] commented 2 weeks ago

This PR must be merged before a backport PR will be created.

grafana-delivery-bot[bot] commented 2 weeks ago

This PR must be merged before a backport PR will be created.

grafana-delivery-bot[bot] commented 2 weeks ago

The backport to v11.0.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-87316-to-v11.0.x origin/v11.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 64330534799cd1e222c69a0a07ba5dc8f39366e1

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-87316-to-v11.0.x
# Create the PR body template
PR_BODY=$(gh pr view 87316 --json body --template 'Backport 64330534799cd1e222c69a0a07ba5dc8f39366e1 from #87316{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v11.0.x] DashboardScene: Restrict dashboard in read only state" --body-file - --label "type/bug" --label "area/frontend" --label "no-changelog" --label "area/scenes" --label "internal" --label "backport" --base v11.0.x --milestone 11.0.x --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-87316-to-v11.0.x

# Create a pull request where the `base` branch is `v11.0.x` and the `compare`/`head` branch is `backport-87316-to-v11.0.x`.

# Remove the local backport branch
git switch main
git branch -D backport-87316-to-v11.0.x
grafana-delivery-bot[bot] commented 2 weeks ago

The backport to v11.0.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new branch
git switch --create backport-87316-to-v11.0.x origin/v11.0.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x 64330534799cd1e222c69a0a07ba5dc8f39366e1

When the conflicts are resolved, stage and commit the changes:

git add . && git cherry-pick --continue

If you have the GitHub CLI installed:

# Push the branch to GitHub:
git push --set-upstream origin backport-87316-to-v11.0.x
# Create the PR body template
PR_BODY=$(gh pr view 87316 --json body --template 'Backport 64330534799cd1e222c69a0a07ba5dc8f39366e1 from #87316{{ "\n\n---\n\n" }}{{ index . "body" }}')
# Create the PR on GitHub
echo "${PR_BODY}" | gh pr create --title "[v11.0.x] DashboardScene: Restrict dashboard in read only state" --body-file - --label "type/bug" --label "area/frontend" --label "no-changelog" --label "area/scenes" --label "internal" --label "backport" --base v11.0.x --milestone 11.0.x --web

Or, if you don't have the GitHub CLI installed (we recommend you install it!):

# Push the branch to GitHub:
git push --set-upstream origin backport-87316-to-v11.0.x

# Create a pull request where the `base` branch is `v11.0.x` and the `compare`/`head` branch is `backport-87316-to-v11.0.x`.

# Remove the local backport branch
git switch main
git branch -D backport-87316-to-v11.0.x