mirror of https://github.com/grafana/grafana.git
Merge branch 'main' into aocenas/scopes/command-palette
This commit is contained in:
commit
1e35bcdc25
|
@ -96,8 +96,14 @@ module.exports = [
|
|||
},
|
||||
},
|
||||
{
|
||||
files: ['**/*.{ts,tsx}'],
|
||||
ignores: ['**/*.{test,spec}.{ts,tsx}', '**/__mocks__/**', '**/public/test/**', '**/mocks.{ts,tsx}'],
|
||||
files: ['**/*.{js,jsx,ts,tsx}'],
|
||||
ignores: [
|
||||
'**/*.{test,spec}.{ts,tsx}',
|
||||
'**/__mocks__/**',
|
||||
'**/public/test/**',
|
||||
'**/mocks.{ts,tsx}',
|
||||
'**/spec/**/*.{ts,tsx}',
|
||||
],
|
||||
rules: {
|
||||
'@typescript-eslint/consistent-type-assertions': ['error', { assertionStyle: 'never' }],
|
||||
},
|
||||
|
|
|
@ -428,9 +428,6 @@ exports[`better eslint`] = {
|
|||
"packages/grafana-prometheus/src/querybuilder/components/LabelParamEditor.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-prometheus/src/querybuilder/components/MetricSelect.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"packages/grafana-prometheus/src/querybuilder/components/PromQueryBuilder.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
|
@ -1085,9 +1082,6 @@ exports[`better eslint`] = {
|
|||
"public/app/features/auth-config/utils/data.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"public/app/features/browse-dashboards/api/browseDashboardsAPI.ts:5381": [
|
||||
[0, 0, 0, "Do not re-export imported variable (\`@reduxjs/toolkit/query/react\`)", "0"]
|
||||
],
|
||||
"public/app/features/browse-dashboards/state/index.ts:5381": [
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"],
|
||||
[0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"],
|
||||
|
@ -1726,8 +1720,7 @@ exports[`better eslint`] = {
|
|||
[0, 0, 0, "Do not re-export imported variable (\`./external.utils\`)", "0"]
|
||||
],
|
||||
"public/app/features/explore/spec/helper/setup.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"public/app/features/explore/state/time.test.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
|
|
42
.drone.yml
42
.drone.yml
|
@ -134,7 +134,7 @@ steps:
|
|||
environment:
|
||||
HOST: start-storybook
|
||||
PORT: "9001"
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-storybook-suite
|
||||
trigger:
|
||||
event:
|
||||
|
@ -561,7 +561,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
|
||||
|
@ -570,7 +570,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
||||
|
@ -579,7 +579,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
|
||||
|
@ -588,7 +588,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
||||
|
@ -597,7 +597,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
|
||||
|
@ -606,7 +606,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
||||
|
@ -615,7 +615,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-various-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
|
||||
|
@ -624,7 +624,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/various-suite
|
||||
- commands:
|
||||
- GITHUB_TOKEN=$(cat /github-app/token)
|
||||
|
@ -1658,7 +1658,7 @@ steps:
|
|||
environment:
|
||||
HOST: start-storybook
|
||||
PORT: "9001"
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-storybook-suite
|
||||
trigger:
|
||||
branch: main
|
||||
|
@ -1851,7 +1851,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/dashboards-suite
|
||||
|
@ -1860,7 +1860,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/dashboards-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite smoke-tests-suite
|
||||
|
@ -1869,7 +1869,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/smoke-tests-suite
|
||||
|
@ -1878,7 +1878,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/smoke-tests-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite panels-suite
|
||||
|
@ -1887,7 +1887,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/panels-suite
|
||||
|
@ -1896,7 +1896,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/panels-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite various-suite
|
||||
|
@ -1905,7 +1905,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-various-suite
|
||||
- commands:
|
||||
- ./bin/build e2e-tests --port 3001 --suite old-arch/various-suite
|
||||
|
@ -1914,7 +1914,7 @@ steps:
|
|||
- build-test-plugins
|
||||
environment:
|
||||
HOST: grafana-server
|
||||
image: cypress/included:13.10.0
|
||||
image: cypress/included:14.3.2
|
||||
name: end-to-end-tests-old-arch/various-suite
|
||||
- commands:
|
||||
- GITHUB_TOKEN=$(cat /github-app/token)
|
||||
|
@ -4923,7 +4923,7 @@ steps:
|
|||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/drone-downstream
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/docker-puppeteer:1.1.0
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM grafana/docs-base:latest
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM cypress/included:13.10.0
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM cypress/included:14.3.2
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM jwilder/dockerize:0.6.1
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM koalaman/shellcheck:stable
|
||||
- trivy --exit-code 0 --severity UNKNOWN,LOW,MEDIUM rockylinux:9
|
||||
|
@ -4961,7 +4961,7 @@ steps:
|
|||
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/drone-downstream
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/docker-puppeteer:1.1.0
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL grafana/docs-base:latest
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL cypress/included:13.10.0
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL cypress/included:14.3.2
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL jwilder/dockerize:0.6.1
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL koalaman/shellcheck:stable
|
||||
- trivy --exit-code 1 --severity HIGH,CRITICAL rockylinux:9
|
||||
|
@ -5210,6 +5210,6 @@ kind: secret
|
|||
name: gcr_credentials
|
||||
---
|
||||
kind: signature
|
||||
hmac: 8e25f1f786b8de4eb21dfbeca8c5fcb9701b1e62ecf98287d9225ecc6e8c29e8
|
||||
hmac: 16029e3922ae0a13a31233717aa172c06bf0e6fc8cf01f5148de62147c259ac8
|
||||
|
||||
...
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
/pkg/services/dashboardversion/ @grafana/grafana-backend-group
|
||||
/pkg/services/encryption/ @grafana/grafana-operator-experience-squad
|
||||
/pkg/services/folder/ @grafana/grafana-search-and-storage
|
||||
/pkg/services/frontend/ @grafana/grafana-frontend-platform
|
||||
/pkg/services/apiserver @grafana/grafana-app-platform-squad
|
||||
/pkg/services/hooks/ @grafana/grafana-backend-group
|
||||
/pkg/services/kmsproviders/ @grafana/grafana-operator-experience-squad
|
||||
|
@ -435,6 +436,7 @@
|
|||
/packages/grafana-ui/src/graveyard/GraphNG/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/graveyard/TimeSeries/ @grafana/dataviz-squad
|
||||
/packages/grafana-ui/src/utils/storybook/ @grafana/grafana-frontend-platform
|
||||
/packages/grafana-alerting/ @grafana/alerting-frontend
|
||||
|
||||
# root files, mostly frontend
|
||||
/.browserslistrc @grafana/frontend-ops
|
||||
|
@ -814,6 +816,8 @@ embed.go @grafana/grafana-as-code
|
|||
/.github/workflows/core-plugins-build-and-release.yml @grafana/plugins-platform-frontend @grafana/plugins-platform-backend
|
||||
/.github/workflows/i18n-crowdin-upload.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/i18n-crowdin-download.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/i18n-crowdin-create-tasks.yml @grafana/grafana-frontend-platform
|
||||
/.github/workflows/scripts/crowdin/create-tasks.js @grafana/grafana-frontend-platform
|
||||
/.github/workflows/pr-go-workspace-check.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/pr-dependabot-update-go-workspace.yml @grafana/grafana-app-platform-squad
|
||||
/.github/workflows/pr-k8s-codegen-check.yml @grafana/grafana-app-platform-squad
|
||||
|
|
|
@ -21,7 +21,7 @@ jobs:
|
|||
# Note: Github will not trigger other actions from this because it uses
|
||||
# the GITHUB_TOKEN token
|
||||
- name: Run auto-milestone
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@main
|
||||
uses: grafana/grafana-github-actions-go/auto-milestone@d4c452f92ed826d515dccf1f62923e537953acd8 # main
|
||||
with:
|
||||
pr: ${{ github.event.pull_request.number }}
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
@ -11,7 +11,9 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: "Generate token"
|
||||
id: generate_token
|
||||
uses: tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
|
||||
|
@ -20,8 +22,12 @@ jobs:
|
|||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
- run: git config --global user.email '132647405+grafana-delivery-bot[bot]@users.noreply.github.com'
|
||||
- run: git config --global user.name 'grafana-delivery-bot[bot]'
|
||||
- run: git remote set-url origin "https://grafana-delivery-bot:${{ steps.generate_token.outputs.token }}@github.com/grafana/grafana.git"
|
||||
- name: Set remote URL
|
||||
env:
|
||||
GIT_TOKEN: ${{ steps.generate_token.outputs.token }}
|
||||
run: |
|
||||
git remote set-url origin "https://grafana-delivery-bot:$GIT_TOKEN@github.com/grafana/grafana.git"
|
||||
- name: Run backport
|
||||
uses: grafana/grafana-github-actions-go/backport@main
|
||||
uses: grafana/grafana-github-actions-go/backport@d4c452f92ed826d515dccf1f62923e537953acd8 # main
|
||||
with:
|
||||
token: ${{ steps.generate_token.outputs.token }}
|
||||
|
|
|
@ -1,149 +0,0 @@
|
|||
name: When epic issues changed in Platform UX squad projects, check if epic is part of specified child projects and update on Platform UX parent project
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, closed, edited, reopened, assigned, unassigned, labeled, unlabeled]
|
||||
labels:
|
||||
- 'type/epic'
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_BOT_PROJECTS_ACCESS_TOKEN }}
|
||||
ORGANIZATION: ${{ github.repository_owner }}
|
||||
REPO: ${{ github.event.repository.name }}
|
||||
PARENT_PROJECT: 304
|
||||
CHILD_PROJECT_1: 78
|
||||
CHILD_PROJECT_2: 111
|
||||
CHILD_PROJECT_3: 202
|
||||
|
||||
concurrency:
|
||||
group: issue-add-to-parent-project-${{ github.event.number }}
|
||||
jobs:
|
||||
config:
|
||||
runs-on: "ubuntu-latest"
|
||||
outputs:
|
||||
has-secrets: ${{ steps.check.outputs.has-secrets }}
|
||||
steps:
|
||||
- name: "Check for secrets"
|
||||
id: check
|
||||
shell: bash
|
||||
run: |
|
||||
if [ -n "${{ (secrets.GH_BOT_PROJECTS_ACCESS_TOKEN != '') || '' }}" ]; then
|
||||
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
main:
|
||||
needs: config
|
||||
if: needs.config.outputs.has-secrets && contains(github.event.issue.labels.*.name, 'type/epic')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if issue is in child or parent projects
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $repo: String!) {
|
||||
repository(name: $repo, owner: $org) {
|
||||
issue (number: ${{ github.event.issue.number }}) {
|
||||
projectItems(first:20) {
|
||||
nodes {
|
||||
id,
|
||||
project {
|
||||
number,
|
||||
title
|
||||
},
|
||||
fieldValueByName(name:"Status") {
|
||||
... on ProjectV2ItemFieldSingleSelectValue {
|
||||
optionId
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -f org=$ORGANIZATION -f repo=$REPO > projects_data.json
|
||||
|
||||
echo 'IN_PARENT_PROJ='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .project != null' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'PARENT_PROJ_STATUS_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | select(.fieldValueByName != null) | .fieldValueByName.optionId' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'ITEM_ID='$(jq '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.PARENT_PROJECT }}) | .id' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'IN_CHILD_PROJ='$(jq 'first(.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | .project != null)' projects_data.json) >> $GITHUB_ENV
|
||||
echo 'CHILD_PROJ_STATUS='$(jq -r '.data.repository.issue.projectItems.nodes[] | select(.project.number==${{ env.CHILD_PROJECT_1 }} or .project.number==${{ env.CHILD_PROJECT_2 }} or .project.number==${{ env.CHILD_PROJECT_3 }}) | select(.fieldValueByName != null) | .fieldValueByName.name' projects_data.json) >> $GITHUB_ENV
|
||||
- name: Get parent project project data
|
||||
if: env.IN_CHILD_PROJ
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
query($org: String!, $number: Int!) {
|
||||
organization(login: $org){
|
||||
projectV2(number: $number) {
|
||||
id
|
||||
fields(first:20) {
|
||||
nodes {
|
||||
... on ProjectV2Field {
|
||||
id
|
||||
name
|
||||
}
|
||||
... on ProjectV2SingleSelectField {
|
||||
id
|
||||
name
|
||||
options {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}' -f org=$ORGANIZATION -F number=$PARENT_PROJECT > project_data.json
|
||||
|
||||
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'STATUS_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'TODO_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Todo") |.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'PROGRESS_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="In Progress") |.id' project_data.json) >> $GITHUB_ENV
|
||||
echo 'DONE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Status") | .options[] | select(.name=="Done") |.id' project_data.json) >> $GITHUB_ENV
|
||||
- name: Add issue to parent project
|
||||
if: env.IN_CHILD_PROJ && !env.IN_PARENT_PROJ
|
||||
run: |
|
||||
item_id="$( gh api graphql -f query='
|
||||
mutation($project:ID!, $issue:ID!) {
|
||||
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
|
||||
item {
|
||||
id
|
||||
}
|
||||
}
|
||||
}' -f project=$PROJECT_ID -f issue=${{ github.event.issue.node_id }} --jq '.data.addProjectV2ItemById.item.id')"
|
||||
|
||||
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
|
||||
- name: Set parent project status Done
|
||||
if: contains(env.CHILD_PROJ_STATUS, 'Done')
|
||||
run: |
|
||||
echo 'OPTION_ID='$DONE_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set parent project status In Progress
|
||||
if: contains(env.CHILD_PROJ_STATUS, 'In ') || contains(env.CHILD_PROJ_STATUS, 'Blocked')
|
||||
run: |
|
||||
echo 'OPTION_ID='$PROGRESS_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set parent project status To do
|
||||
if: env.CHILD_PROJ_STATUS && !contains(env.CHILD_PROJ_STATUS, 'In ') && !contains(env.CHILD_PROJ_STATUS, 'Blocked') && ! contains(env.CHILD_PROJ_STATUS, 'Done')
|
||||
run: |
|
||||
echo 'OPTION_ID='$TODO_OPTION_ID >> $GITHUB_ENV
|
||||
- name: Set issue status in parent project
|
||||
if: env.OPTION_ID && (env.OPTION_ID != env.PARENT_PROJ_STATUS_ID)
|
||||
run: |
|
||||
gh api graphql -f query='
|
||||
mutation (
|
||||
$project: ID!
|
||||
$item: ID!
|
||||
$status_field: ID!
|
||||
$status_value: String!
|
||||
) {
|
||||
set_status: updateProjectV2ItemFieldValue(input: {
|
||||
projectId: $project
|
||||
itemId: $item
|
||||
fieldId: $status_field
|
||||
value: {
|
||||
singleSelectOptionId: $status_value
|
||||
}
|
||||
}) {
|
||||
projectV2Item {
|
||||
id
|
||||
}
|
||||
}
|
||||
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f status_field=$STATUS_FIELD_ID -f status_value=${{ env.OPTION_ID }} --silent
|
|
@ -6,6 +6,10 @@ on:
|
|||
- main
|
||||
- release-*.*.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
lint-frontend-verify-i18n:
|
||||
name: Verify i18n
|
||||
|
@ -30,6 +34,9 @@ jobs:
|
|||
exit 1
|
||||
fi
|
||||
lint-frontend-prettier:
|
||||
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`,
|
||||
# the `lint-frontend-prettier-enterprise` workflow will run instead
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -42,7 +49,29 @@ jobs:
|
|||
- run: yarn install --immutable --check-cache
|
||||
- run: yarn run prettier:check
|
||||
- run: yarn run lint
|
||||
lint-frontend-prettier-enterprise:
|
||||
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks)
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: 'yarn.lock'
|
||||
- name: Setup Enterprise
|
||||
uses: ./.github/actions/setup-enterprise
|
||||
with:
|
||||
github-app-name: 'grafana-ci-bot'
|
||||
- run: yarn install --immutable --check-cache
|
||||
- run: yarn run prettier:check
|
||||
- run: yarn run lint
|
||||
lint-frontend-typecheck:
|
||||
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`,
|
||||
# the `lint-frontend-typecheck-enterprise` workflow will run instead
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
|
||||
name: Typecheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -54,6 +83,24 @@ jobs:
|
|||
cache-dependency-path: 'yarn.lock'
|
||||
- run: yarn install --immutable --check-cache
|
||||
- run: yarn run typecheck
|
||||
lint-frontend-typecheck-enterprise:
|
||||
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks)
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
||||
name: Typecheck
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: 'yarn.lock'
|
||||
- name: Setup Enterprise
|
||||
uses: ./.github/actions/setup-enterprise
|
||||
with:
|
||||
github-app-name: 'grafana-ci-bot'
|
||||
- run: yarn install --immutable --check-cache
|
||||
- run: yarn run typecheck
|
||||
lint-frontend-betterer:
|
||||
name: Betterer
|
||||
runs-on: ubuntu-latest
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
name: Crowdin Create Tasks
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# schedule:
|
||||
# - cron: "0 0 * * *"
|
||||
|
||||
jobs:
|
||||
create-tasks-in-crowdin:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Create tasks
|
||||
env:
|
||||
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
|
||||
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
|
||||
run: node ./.github/workflows/scripts/crowdin/create-tasks.js
|
|
@ -6,8 +6,15 @@ on:
|
|||
- main
|
||||
- release-*.*.*
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
frontend-unit-tests:
|
||||
# Run this workflow only for PRs from forks; if it gets merged into `main` or `release-*`,
|
||||
# the `frontend-unit-tests-enterprise` workflow will run instead
|
||||
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
name: "Unit tests (${{ matrix.chunk }} / 8)"
|
||||
strategy:
|
||||
|
@ -27,3 +34,30 @@ jobs:
|
|||
TEST_MAX_WORKERS: 2
|
||||
TEST_SHARD: ${{ matrix.chunk }}
|
||||
TEST_SHARD_TOTAL: 8
|
||||
|
||||
frontend-unit-tests-enterprise:
|
||||
# Run this workflow for non-PR events (like pushes to `main` or `release-*`) OR for internal PRs (PRs not from forks)
|
||||
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork == false
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
name: "Unit tests (${{ matrix.chunk }} / 8)"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
chunk: [1, 2, 3, 4, 5, 6, 7, 8]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version-file: '.nvmrc'
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: 'yarn.lock'
|
||||
- name: Setup Enterprise
|
||||
uses: ./.github/actions/setup-enterprise
|
||||
with:
|
||||
github-app-name: 'grafana-ci-bot'
|
||||
- run: yarn install --immutable --check-cache
|
||||
- run: yarn run test:ci
|
||||
env:
|
||||
TEST_MAX_WORKERS: 2
|
||||
TEST_SHARD: ${{ matrix.chunk }}
|
||||
TEST_SHARD_TOTAL: 8
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
name: Dispatch check for patch conflicts
|
||||
run-name: dispatch-check-patch-conflicts-${{ github.base_ref }}-${{ github.head_ref }}
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
types:
|
||||
- opened
|
||||
- reopened
|
||||
|
@ -17,6 +17,13 @@ on:
|
|||
# target branch onto the source branch, to verify compatibility before merging.
|
||||
jobs:
|
||||
dispatch-job:
|
||||
env:
|
||||
HEAD_REF: ${{ github.head_ref }}
|
||||
BASE_REF: ${{ github.base_ref }}
|
||||
REPO: ${{ github.repository }}
|
||||
SENDER: ${{ github.event.sender.login }}
|
||||
SHA: ${{ github.sha }}
|
||||
PR_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: "Generate token"
|
||||
|
@ -26,24 +33,25 @@ jobs:
|
|||
# App needs Actions: Read/Write for the grafana/security-patch-actions repo
|
||||
app_id: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
|
||||
private_key: ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
|
||||
|
||||
- name: "Dispatch job"
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ steps.generate_token.outputs.token }}
|
||||
script: |
|
||||
const {HEAD_REF, BASE_REF, REPO, SENDER, SHA, PR_COMMIT_SHA} = process.env;
|
||||
|
||||
await github.rest.actions.createWorkflowDispatch({
|
||||
owner: 'grafana',
|
||||
repo: 'security-patch-actions',
|
||||
workflow_id: 'test-patches-event.yml',
|
||||
ref: 'main',
|
||||
inputs: {
|
||||
src_repo: "${{ github.repository }}",
|
||||
src_ref: "${{ github.head_ref }}",
|
||||
src_merge_sha: "${{ github.sha }}",
|
||||
src_pr_commit_sha: "${{ github.event.pull_request.head.sha }}",
|
||||
patch_repo: "${{ github.repository }}-security-patches",
|
||||
patch_ref: "${{ github.base_ref }}",
|
||||
triggering_github_handle: "${{ github.event.sender.login }}"
|
||||
src_repo: REPO,
|
||||
src_ref: HEAD_REF,
|
||||
src_merge_sha: SHA,
|
||||
src_pr_commit_sha: PR_COMMIT_SHA,
|
||||
patch_repo: REPO + '-security-patches',
|
||||
patch_ref: BASE_REF,
|
||||
triggering_github_handle: SENDER
|
||||
}
|
||||
})
|
||||
|
|
|
@ -23,22 +23,9 @@ jobs:
|
|||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Restore GOCACHE
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-sqlite
|
||||
restore-keys: |
|
||||
go-test-cache-${{ github.base_ref }}-sqlite
|
||||
go-test-cache-main-sqlite
|
||||
path: /home/runner/.cache/go-build
|
||||
- run: |
|
||||
make gen-go
|
||||
go test -tags=sqlite -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
|
||||
- name: Save GOCACHE
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-sqlite
|
||||
path: /home/runner/.cache/go-build
|
||||
mysql:
|
||||
name: MySQL
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
|
@ -64,24 +51,11 @@ jobs:
|
|||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Restore GOCACHE
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-mysql
|
||||
restore-keys: |
|
||||
go-test-cache-${{ github.base_ref }}-mysql
|
||||
go-test-cache-main-mysql
|
||||
path: /home/runner/.cache/go-build
|
||||
- run: |
|
||||
sudo apt-get update -yq && sudo apt-get install mariadb-client
|
||||
cat devenv/docker/blocks/mysql_tests/setup.sql | mariadb -h 127.0.0.1 -P 3306 -u root -prootpass --disable-ssl-verify-server-cert
|
||||
make gen-go
|
||||
go test -tags=mysql -p=1 -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
|
||||
- name: Save GOCACHE
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-mysql
|
||||
path: /home/runner/.cache/go-build
|
||||
postgres:
|
||||
name: Postgres
|
||||
runs-on: ubuntu-latest-8-cores
|
||||
|
@ -102,14 +76,6 @@ jobs:
|
|||
with:
|
||||
go-version-file: go.mod
|
||||
cache: true
|
||||
- name: Restore GOCACHE
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-postgres
|
||||
restore-keys: |
|
||||
go-test-cache-${{ github.base_ref }}-postgres
|
||||
go-test-cache-main-postgres
|
||||
path: /home/runner/.cache/go-build
|
||||
- env:
|
||||
GRAFANA_TEST_DB: postgres
|
||||
PGPASSWORD: grafanatest
|
||||
|
@ -119,8 +85,3 @@ jobs:
|
|||
psql -p 5432 -h 127.0.0.1 -U grafanatest -d grafanatest -f devenv/docker/blocks/postgres_tests/setup.sql
|
||||
make gen-go
|
||||
go test -p=1 -tags=postgres -timeout=5m -run '^TestIntegration' $(find ./pkg -type f -name '*_test.go' -exec grep -l '^func TestIntegration' '{}' '+' | grep -o '\(.*\)/' | sort -u)
|
||||
- name: Save GOCACHE
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
key: go-test-cache-${{ github.ref_name }}-postgres
|
||||
path: /home/runner/.cache/go-build
|
||||
|
|
|
@ -0,0 +1,84 @@
|
|||
const crowdin = require('@crowdin/crowdin-api-client');
|
||||
const TRANSLATED_CONNECTOR_DESCRIPTION = '{{tos_service_type: premium}}';
|
||||
|
||||
const API_TOKEN = process.env.CROWDIN_PERSONAL_TOKEN;
|
||||
if (!API_TOKEN) {
|
||||
console.error('Error: CROWDIN_PERSONAL_TOKEN environment variable is not set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const PROJECT_ID = process.env.CROWDIN_PROJECT_ID;
|
||||
if (!PROJECT_ID) {
|
||||
console.error('Error: CROWDIN_PROJECT_ID environment variable is not set');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const { tasksApi, projectsGroupsApi, sourceFilesApi } = new crowdin.default({
|
||||
token: API_TOKEN,
|
||||
organization: 'grafana'
|
||||
});
|
||||
|
||||
const languages = await getLanguages();
|
||||
const fileIds = await getFileIds();
|
||||
console.log('Languages: ', languages);
|
||||
console.log('File IDs: ', fileIds);
|
||||
|
||||
// for (const language of languages) {
|
||||
// const { name, id } = language;
|
||||
// await createTask(`Translate to ${name}`, id, fileIds);
|
||||
// }
|
||||
|
||||
async function getLanguages() {
|
||||
try {
|
||||
const project = await projectsGroupsApi.getProject(PROJECT_ID);
|
||||
const languages = project.data.targetLanguages;
|
||||
return languages;
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch languages: ', error.message);
|
||||
if (error.response && error.response.data) {
|
||||
console.error('Error details: ', JSON.stringify(error.response.data, null, 2));
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function getFileIds() {
|
||||
try {
|
||||
const response = await sourceFilesApi.listProjectFiles(PROJECT_ID);
|
||||
const files = response.data;
|
||||
const fileIds = files.map(file => file.data.id);
|
||||
return fileIds;
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch file IDs: ', error.message);
|
||||
if (error.response && error.response.data) {
|
||||
console.error('Error details: ', JSON.stringify(error.response.data, null, 2));
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
async function createTask(title, languageId, fileIds) {
|
||||
try {
|
||||
const taskParams = {
|
||||
title,
|
||||
description: TRANSLATED_CONNECTOR_DESCRIPTION,
|
||||
languageId,
|
||||
type: 2, // Translation by vendor
|
||||
workflowStepId: 78, // Translation step ID
|
||||
skipAssignedStrings: true,
|
||||
fileIds,
|
||||
};
|
||||
|
||||
console.log(`Creating Crowdin task: "${title}" for language ${languageId}`);
|
||||
|
||||
const response = await tasksApi.addTask(PROJECT_ID, taskParams);
|
||||
console.log(`Task created successfully! Task ID: ${response.data.id}`);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Failed to create Crowdin task: ', error.message);
|
||||
if (error.response && error.response.data) {
|
||||
console.error('Error details: ', JSON.stringify(error.response.data, null, 2));
|
||||
}
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
|
@ -82,6 +82,16 @@
|
|||
"cwd": "${workspaceFolder}",
|
||||
"args": ["server", "target", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Run Frontend Server",
|
||||
"type": "go",
|
||||
"request": "launch",
|
||||
"mode": "auto",
|
||||
"program": "${workspaceFolder}/pkg/cmd/grafana/",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"env": { "GF_DEFAULT_TARGET": "frontend-server", "GF_SERVER_HTTP_PORT": "3003" },
|
||||
"args": ["server", "target", "--homepath", "${workspaceFolder}", "--packaging", "dev"]
|
||||
},
|
||||
{
|
||||
"name": "Attach to Chrome",
|
||||
"port": 9222,
|
||||
|
|
225
CHANGELOG.md
225
CHANGELOG.md
|
@ -1,3 +1,228 @@
|
|||
<!-- 11.6.1 START -->
|
||||
|
||||
# 11.6.1 (2025-04-23)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update JWT library (CVE-2025-30204) [#102727](https://github.com/grafana/grafana/pull/102727), [@grambbledook](https://github.com/grambbledook)
|
||||
- **DashboardScenePage:** Correct slug in self referencing data links [#103854](https://github.com/grafana/grafana/pull/103854), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
|
||||
- **Dependencies:** Bump github.com/redis/go-redis/v9 to 9.7.3 to address CVE-2025-29923 [#102863](https://github.com/grafana/grafana/pull/102863), [@macabu](https://github.com/macabu)
|
||||
- **Go:** Bump to 1.24.2 [#103523](https://github.com/grafana/grafana/pull/103523), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
- **GrafanaUI:** Use safePolygon close handler for interactive tooltips instead of a delay [#102869](https://github.com/grafana/grafana/pull/102869), [@mthorning](https://github.com/mthorning)
|
||||
- **Prometheus:** Add support for cloud partners Prometheus data sources [#103941](https://github.com/grafana/grafana/pull/103941), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alertmanager:** Add Role-Based Access Control via reqAction Field [#103479](https://github.com/grafana/grafana/pull/103479), [@olegpixel](https://github.com/olegpixel)
|
||||
- **GrafanaUI:** Remove blurred background from overlay backdrops to improve performance [#103647](https://github.com/grafana/grafana/pull/103647), [@joshhunt](https://github.com/joshhunt)
|
||||
- **InfluxDB:** Fix nested variable interpolation [#104096](https://github.com/grafana/grafana/pull/104096), [@aangelisc](https://github.com/aangelisc)
|
||||
- **LDAP test:** Fix page crash [#102684](https://github.com/grafana/grafana/pull/102684), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Org redirection:** Fix linking between orgs [#102870](https://github.com/grafana/grafana/pull/102870), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
- **Security:** Fix CVE-2025-3260
|
||||
|
||||
<!-- 11.6.1 END -->
|
||||
<!-- 11.5.4 START -->
|
||||
|
||||
# 11.5.4 (2025-04-23)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Azure Monitor:** Filter namespaces by resource group [#103654](https://github.com/grafana/grafana/pull/103654), [@alyssabull](https://github.com/alyssabull)
|
||||
- **Azure:** Add support for custom namespace and custom metrics variable queries [#103650](https://github.com/grafana/grafana/pull/103650), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Resource picker improvements [#103638](https://github.com/grafana/grafana/pull/103638), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Support more complex variable interpolation [#103651](https://github.com/grafana/grafana/pull/103651), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Azure:** Variable editor and resource picker improvements [#103657](https://github.com/grafana/grafana/pull/103657), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Chore:** Update CVE-affected dependencies [#102709](https://github.com/grafana/grafana/pull/102709), [@grambbledook](https://github.com/grambbledook)
|
||||
- **DashboardScenePage:** Correct slug in self referencing data links [#103853](https://github.com/grafana/grafana/pull/103853), [@Sergej-Vlasov](https://github.com/Sergej-Vlasov)
|
||||
- **Dependencies:** Bump github.com/redis/go-redis/v9 to 9.6.3 to address CVE-2025-29923 [#102865](https://github.com/grafana/grafana/pull/102865), [@macabu](https://github.com/macabu)
|
||||
- **Go:** Bump to 1.24.2 [#103525](https://github.com/grafana/grafana/pull/103525), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
- **Prometheus:** Add support for cloud partners Prometheus data sources [#103942](https://github.com/grafana/grafana/pull/103942), [@kevinwcyu](https://github.com/kevinwcyu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **InfluxDB:** Fix nested variable interpolation [#104095](https://github.com/grafana/grafana/pull/104095), [@aangelisc](https://github.com/aangelisc)
|
||||
- **LDAP test:** Fix page crash [#102683](https://github.com/grafana/grafana/pull/102683), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.5.4 END -->
|
||||
<!-- 11.4.4 START -->
|
||||
|
||||
# 11.4.4 (2025-04-23)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.4.4 END -->
|
||||
<!-- 11.3.6 START -->
|
||||
|
||||
# 11.3.6 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update libs with CVE in dependencies [#102710](https://github.com/grafana/grafana/pull/102710), [@grambbledook](https://github.com/grambbledook)
|
||||
- **Go:** Bump to 1.24.2 [#103528](https://github.com/grafana/grafana/pull/103528), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fix SAML user IsExternallySynced not being set correctly [#103101](https://github.com/grafana/grafana/pull/103101), [@volcanonoodle](https://github.com/volcanonoodle)
|
||||
- **AuthN:** Refetch user on "ErrUserAlreadyExists" [#102983](https://github.com/grafana/grafana/pull/102983), [@kalleep](https://github.com/kalleep)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.3.6 END -->
|
||||
<!-- 11.2.9 START -->
|
||||
|
||||
# 11.2.9 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Update libs with CVE in dependencies [#102712](https://github.com/grafana/grafana/pull/102712), [@grambbledook](https://github.com/grambbledook)
|
||||
- **Go:** Bump to 1.24.2 [#103529](https://github.com/grafana/grafana/pull/103529), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fix SAML user IsExternallySynced not being set correctly [#103102](https://github.com/grafana/grafana/pull/103102), [@volcanonoodle](https://github.com/volcanonoodle)
|
||||
- **AuthN:** Refetch user on "ErrUserAlreadyExists" [#102982](https://github.com/grafana/grafana/pull/102982), [@kalleep](https://github.com/kalleep)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.2.9 END -->
|
||||
<!-- 10.4.18 START -->
|
||||
|
||||
# 10.4.18 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump golang-jwt/jwt/v4 and golang-jwt/jwt/v5 to address security issues [#102762](https://github.com/grafana/grafana/pull/102762), [@macabu](https://github.com/macabu)
|
||||
- **Go:** Bump to 1.24.2 [#103531](https://github.com/grafana/grafana/pull/103531), [@Proximyst](https://github.com/Proximyst)
|
||||
- **Go:** Bump to 1.24.2 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Auth:** Fix SAML user IsExternallySynced not being set correctly (#98487) [#103177](https://github.com/grafana/grafana/pull/103177), [@volcanonoodle](https://github.com/volcanonoodle)
|
||||
- **AuthN:** Refetch user on "ErrUserAlreadyExists" [#102981](https://github.com/grafana/grafana/pull/102981), [@kalleep](https://github.com/kalleep)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
|
||||
<!-- 10.4.18 END -->
|
||||
<!-- 11.6.0+security-01 START -->
|
||||
|
||||
# 11.6.0+security-01 (2025-04-22)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
- **Security:** Fix CVE-2025-3260
|
||||
|
||||
<!-- 11.6.0+security-01 END -->
|
||||
<!-- 11.5.3+security-01 START -->
|
||||
|
||||
# 11.5.3+security-01 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.23.7 [#101581](https://github.com/grafana/grafana/pull/101581), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go to 1.23.7 (Enterprise)
|
||||
- **Chore:** Update CVE-affected dependencies [#102709](https://github.com/grafana/grafana/pull/102709), [@grambbledook](https://github.com/grambbledook)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix token-based Slack image upload to work with channel names [#101078](https://github.com/grafana/grafana/pull/101078), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **Auth:** Fix AzureAD config UI's ClientAuthentication dropdown [#100869](https://github.com/grafana/grafana/pull/100869), [@mgyongyosi](https://github.com/mgyongyosi)
|
||||
- **Dashboard:** Fix the unintentional time range and variables updates on saving [#101671](https://github.com/grafana/grafana/pull/101671), [@harisrozajac](https://github.com/harisrozajac)
|
||||
- **Dashboards:** Fix missing `v/e/i` keybindings to return back to dashboard [#102365](https://github.com/grafana/grafana/pull/102365), [@mdvictor](https://github.com/mdvictor)
|
||||
- **InfluxDB:** Improve handling of template variables contained in regular expressions (InfluxQL) [#100977](https://github.com/grafana/grafana/pull/100977), [@aangelisc](https://github.com/aangelisc)
|
||||
- **LDAP test:** Fix page crash [#102683](https://github.com/grafana/grafana/pull/102683), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Org redirection:** Fix linking between orgs [#102089](https://github.com/grafana/grafana/pull/102089), [@ashharrison90](https://github.com/ashharrison90)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.5.3+security-01 END -->
|
||||
<!-- 11.4.3+security-01 START -->
|
||||
|
||||
# 11.4.3+security-01 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.23.7 [#101582](https://github.com/grafana/grafana/pull/101582), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go to 1.23.7 (Enterprise)
|
||||
- **Chore:** Update CVE-affected golang-gwt dependencies [#102704](https://github.com/grafana/grafana/pull/102704), [@grambbledook](https://github.com/grambbledook)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix token-based Slack image upload to work with channel names [#101072](https://github.com/grafana/grafana/pull/101072), [@JacobsonMT](https://github.com/JacobsonMT)
|
||||
- **InfluxDB:** Improve handling of template variables contained in regular expressions (InfluxQL) [#100987](https://github.com/grafana/grafana/pull/100987), [@aangelisc](https://github.com/aangelisc)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101790](https://github.com/grafana/grafana/pull/101790), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.4.3+security-01 END -->
|
||||
<!-- 11.3.5+security-01 START -->
|
||||
|
||||
# 11.3.5+security-01 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go to 1.23.7 [#101583](https://github.com/grafana/grafana/pull/101583), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go to 1.23.7 (Enterprise)
|
||||
- **Chore:** Update libs with CVE in dependencies [#102710](https://github.com/grafana/grafana/pull/102710), [@grambbledook](https://github.com/grambbledook)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Fix token-based Slack image upload to work with channel names [#101488](https://github.com/grafana/grafana/pull/101488), [@moustafab](https://github.com/moustafab)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101791](https://github.com/grafana/grafana/pull/101791), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.3.5+security-01 END -->
|
||||
<!-- 11.2.8+security-01 START -->
|
||||
|
||||
# 11.2.8+security-01 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go version to 1.23.7 [#101294](https://github.com/grafana/grafana/pull/101294), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go version to 1.23.7 (Enterprise)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Update slack image upload to use new API [#101487](https://github.com/grafana/grafana/pull/101487), [@moustafab](https://github.com/moustafab)
|
||||
- **CloudMigrations:** Fix OrderBy clause in GetSnapshotList sql handler [#102351](https://github.com/grafana/grafana/pull/102351), [@mmandrus](https://github.com/mmandrus)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101795](https://github.com/grafana/grafana/pull/101795), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
- **Security:** Fix CVE-2025-2703
|
||||
|
||||
<!-- 11.2.8+security-01 END -->
|
||||
<!-- 10.4.17+security-01 START -->
|
||||
|
||||
# 10.4.17+security-01 (2025-04-22)
|
||||
|
||||
### Features and enhancements
|
||||
|
||||
- **Chore:** Bump Go version to 1.23.7 [#101565](https://github.com/grafana/grafana/pull/101565), [@macabu](https://github.com/macabu)
|
||||
- **Chore:** Bump Go version to 1.23.7 (Enterprise)
|
||||
- **Chore:** Bump golang-jwt/jwt/v4 and golang-jwt/jwt/v5 to address security issues [#102762](https://github.com/grafana/grafana/pull/102762), [@macabu](https://github.com/macabu)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- **Alerting:** Update slack image upload to use new API [#101483](https://github.com/grafana/grafana/pull/101483), [@moustafab](https://github.com/moustafab)
|
||||
- **Service Accounts:** Do not show error pop-ups for Service Account and Renderer UI flows [#101804](https://github.com/grafana/grafana/pull/101804), [@IevaVasiljeva](https://github.com/IevaVasiljeva)
|
||||
- **Security:** Fix CVE-2025-3454
|
||||
|
||||
<!-- 10.4.17+security-01 END -->
|
||||
<!-- 11.6.0 START -->
|
||||
|
||||
# 11.6.0 (2025-03-25)
|
||||
|
|
|
@ -70,7 +70,6 @@ COPY .citools/swagger .citools/swagger
|
|||
|
||||
# Include vendored dependencies
|
||||
COPY pkg/util/xorm pkg/util/xorm
|
||||
COPY pkg/apis/folder pkg/apis/folder
|
||||
COPY pkg/apis/secret pkg/apis/secret
|
||||
COPY pkg/apiserver pkg/apiserver
|
||||
COPY pkg/apimachinery pkg/apimachinery
|
||||
|
|
12
Makefile
12
Makefile
|
@ -148,12 +148,12 @@ gen-cue: ## Do all CUE/Thema code generation
|
|||
@echo "generate code from .cue files"
|
||||
go generate ./kinds/gen.go
|
||||
go generate ./public/app/plugins/gen.go
|
||||
@echo "// This file is managed by Grafana - DO NOT EDIT MANUALLY" > apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue
|
||||
@echo "// Source: kinds/dashboard/dashboard_kind.cue" >> apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue
|
||||
@echo "// To sync changes, run: make gen-cue" >> apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue
|
||||
@echo "" >> apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue
|
||||
@cat kinds/dashboard/dashboard_kind.cue >> apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue
|
||||
@cp apps/dashboard/pkg/apis/dashboard/v1alpha1/dashboard_kind.cue apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_kind.cue
|
||||
@echo "// This file is managed by Grafana - DO NOT EDIT MANUALLY" > apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue
|
||||
@echo "// Source: kinds/dashboard/dashboard_kind.cue" >> apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue
|
||||
@echo "// To sync changes, run: make gen-cue" >> apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue
|
||||
@echo "" >> apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue
|
||||
@cat kinds/dashboard/dashboard_kind.cue >> apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue
|
||||
@cp apps/dashboard/pkg/apis/dashboard/v1beta1/dashboard_kind.cue apps/dashboard/pkg/apis/dashboard/v0alpha1/dashboard_kind.cue
|
||||
|
||||
|
||||
.PHONY: gen-cuev2
|
||||
|
|
|
@ -36,6 +36,8 @@ check: {
|
|||
stepID: string
|
||||
// Human readable identifier of the item that failed
|
||||
item: string
|
||||
// ID of the item that failed
|
||||
itemID: string
|
||||
// Links to actions that can be taken to resolve the failure
|
||||
links: [...#ErrorLink]
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@ type CheckReportFailure struct {
|
|||
StepID string `json:"stepID"`
|
||||
// Human readable identifier of the item that failed
|
||||
Item string `json:"item"`
|
||||
// ID of the item that failed
|
||||
ItemID string `json:"itemID"`
|
||||
// Links to actions that can be taken to resolve the failure
|
||||
Links []CheckErrorLink `json:"links"`
|
||||
}
|
||||
|
|
|
@ -183,6 +183,14 @@ func schema_pkg_apis_advisor_v0alpha1_CheckReportFailure(ref common.ReferenceCal
|
|||
Format: "",
|
||||
},
|
||||
},
|
||||
"itemID": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "ID of the item that failed",
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"links": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Links to actions that can be taken to resolve the failure",
|
||||
|
@ -198,7 +206,7 @@ func schema_pkg_apis_advisor_v0alpha1_CheckReportFailure(ref common.ReferenceCal
|
|||
},
|
||||
},
|
||||
},
|
||||
Required: []string{"severity", "stepID", "item", "links"},
|
||||
Required: []string{"severity", "stepID", "item", "itemID", "links"},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
rawSchemaCheckv0alpha1 = []byte(`{"spec":{"properties":{"data":{"additionalProperties":{"type":"string"},"description":"Generic data input that a check can receive","type":"object"}},"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"},"report":{"properties":{"count":{"description":"Number of elements analyzed","type":"integer"},"failures":{"description":"List of failures","items":{"properties":{"item":{"description":"Human readable identifier of the item that failed","type":"string"},"links":{"description":"Links to actions that can be taken to resolve the failure","items":{"properties":{"message":{"description":"Human readable error message","type":"string"},"url":{"description":"URL to a page with more information about the error","type":"string"}},"required":["url","message"],"type":"object"},"type":"array"},"severity":{"description":"Severity of the failure","enum":["high","low"],"type":"string"},"stepID":{"description":"Step ID that the failure is associated with","type":"string"}},"required":["severity","stepID","item","links"],"type":"object"},"type":"array"}},"required":["count","failures"],"type":"object"}},"required":["report"],"type":"object","x-kubernetes-preserve-unknown-fields":true}}`)
|
||||
rawSchemaCheckv0alpha1 = []byte(`{"spec":{"properties":{"data":{"additionalProperties":{"type":"string"},"description":"Generic data input that a check can receive","type":"object"}},"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"},"report":{"properties":{"count":{"description":"Number of elements analyzed","type":"integer"},"failures":{"description":"List of failures","items":{"properties":{"item":{"description":"Human readable identifier of the item that failed","type":"string"},"itemID":{"description":"ID of the item that failed","type":"string"},"links":{"description":"Links to actions that can be taken to resolve the failure","items":{"properties":{"message":{"description":"Human readable error message","type":"string"},"url":{"description":"URL to a page with more information about the error","type":"string"}},"required":["url","message"],"type":"object"},"type":"array"},"severity":{"description":"Severity of the failure","enum":["high","low"],"type":"string"},"stepID":{"description":"Step ID that the failure is associated with","type":"string"}},"required":["severity","stepID","item","itemID","links"],"type":"object"},"type":"array"}},"required":["count","failures"],"type":"object"}},"required":["report"],"type":"object","x-kubernetes-preserve-unknown-fields":true}}`)
|
||||
versionSchemaCheckv0alpha1 app.VersionSchema
|
||||
_ = json.Unmarshal(rawSchemaCheckv0alpha1, &versionSchemaCheckv0alpha1)
|
||||
rawSchemaCheckTypev0alpha1 = []byte(`{"spec":{"properties":{"name":{"type":"string"},"steps":{"items":{"properties":{"description":{"type":"string"},"resolution":{"type":"string"},"stepID":{"type":"string"},"title":{"type":"string"}},"required":["title","description","stepID","resolution"],"type":"object"},"type":"array"}},"required":["name","steps"],"type":"object"},"status":{"properties":{"additionalFields":{"description":"additionalFields is reserved for future use","type":"object","x-kubernetes-preserve-unknown-fields":true},"operatorStates":{"additionalProperties":{"properties":{"descriptiveState":{"description":"descriptiveState is an optional more descriptive state field which has no requirements on format","type":"string"},"details":{"description":"details contains any extra information that is operator-specific","type":"object","x-kubernetes-preserve-unknown-fields":true},"lastEvaluation":{"description":"lastEvaluation is the ResourceVersion last evaluated","type":"string"},"state":{"description":"state describes the state of the lastEvaluation.\nIt is limited to three possible states for machine evaluation.","enum":["success","in_progress","failed"],"type":"string"}},"required":["lastEvaluation","state"],"type":"object"},"description":"operatorStates is a map of operator ID to operator state evaluations.\nAny operator which consumes this kind SHOULD add its state evaluation information to this field.","type":"object"}},"type":"object","x-kubernetes-preserve-unknown-fields":true}}`)
|
||||
|
|
|
@ -74,6 +74,21 @@ func New(cfg app.Config) (app.App, error) {
|
|||
}
|
||||
}()
|
||||
}
|
||||
if req.Action == resource.AdmissionActionUpdate {
|
||||
go func() {
|
||||
log.Debug("Updating check", "namespace", req.Object.GetNamespace(), "name", req.Object.GetName())
|
||||
requester, err := identity.GetRequester(ctx)
|
||||
if err != nil {
|
||||
log.Error("Error getting requester", "error", err)
|
||||
return
|
||||
}
|
||||
ctx = identity.WithRequester(context.Background(), requester)
|
||||
err = processCheckRetry(ctx, client, req.Object, check)
|
||||
if err != nil {
|
||||
log.Error("Error processing check retry", "error", err)
|
||||
}
|
||||
}()
|
||||
}
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
|
|
@ -62,6 +62,17 @@ func (c *check) Items(ctx context.Context) ([]any, error) {
|
|||
return res, nil
|
||||
}
|
||||
|
||||
func (c *check) Item(ctx context.Context, id string) (any, error) {
|
||||
requester, err := identity.GetRequester(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c.DatasourceSvc.GetDataSource(ctx, &datasources.GetDataSourceQuery{
|
||||
UID: id,
|
||||
OrgID: requester.GetOrgID(),
|
||||
})
|
||||
}
|
||||
|
||||
func (c *check) ID() string {
|
||||
return CheckID
|
||||
}
|
||||
|
@ -113,6 +124,7 @@ func (s *uidValidationStep) Run(ctx context.Context, obj *advisor.CheckSpec, i a
|
|||
advisor.CheckReportFailureSeverityLow,
|
||||
s.ID(),
|
||||
fmt.Sprintf("%s (%s)", ds.Name, ds.UID),
|
||||
ds.UID,
|
||||
[]advisor.CheckErrorLink{},
|
||||
), nil
|
||||
}
|
||||
|
@ -181,6 +193,7 @@ func (s *healthCheckStep) Run(ctx context.Context, obj *advisor.CheckSpec, i any
|
|||
advisor.CheckReportFailureSeverityHigh,
|
||||
s.ID(),
|
||||
ds.Name,
|
||||
ds.UID,
|
||||
[]advisor.CheckErrorLink{
|
||||
{
|
||||
Message: "Fix me",
|
||||
|
@ -241,6 +254,7 @@ func (s *missingPluginStep) Run(ctx context.Context, obj *advisor.CheckSpec, i a
|
|||
advisor.CheckReportFailureSeverityHigh,
|
||||
s.ID(),
|
||||
ds.Name,
|
||||
ds.UID,
|
||||
links,
|
||||
), nil
|
||||
}
|
||||
|
|
|
@ -10,6 +10,8 @@ import (
|
|||
type Check interface {
|
||||
// ID returns the unique identifier of the check
|
||||
ID() string
|
||||
// Item returns the item that will be checked
|
||||
Item(ctx context.Context, id string) (any, error)
|
||||
// Items returns the list of items that will be checked
|
||||
Items(ctx context.Context) ([]any, error)
|
||||
// Steps returns the list of steps that will be executed
|
||||
|
|
|
@ -61,6 +61,14 @@ func (c *check) Items(ctx context.Context) ([]any, error) {
|
|||
return res, nil
|
||||
}
|
||||
|
||||
func (c *check) Item(ctx context.Context, id string) (any, error) {
|
||||
p, exists := c.PluginStore.Plugin(ctx, id)
|
||||
if !exists {
|
||||
return nil, fmt.Errorf("plugin %s not found", id)
|
||||
}
|
||||
return p, nil
|
||||
}
|
||||
|
||||
func (c *check) Steps() []checks.Step {
|
||||
return []checks.Step{
|
||||
&deprecationStep{
|
||||
|
@ -118,6 +126,7 @@ func (s *deprecationStep) Run(ctx context.Context, _ *advisor.CheckSpec, it any)
|
|||
return checks.NewCheckReportFailure(
|
||||
advisor.CheckReportFailureSeverityHigh,
|
||||
s.ID(),
|
||||
p.Name,
|
||||
p.ID,
|
||||
[]advisor.CheckErrorLink{
|
||||
{
|
||||
|
@ -190,6 +199,7 @@ func (s *updateStep) Run(ctx context.Context, _ *advisor.CheckSpec, i any) (*adv
|
|||
return checks.NewCheckReportFailure(
|
||||
advisor.CheckReportFailureSeverityLow,
|
||||
s.ID(),
|
||||
p.Name,
|
||||
p.ID,
|
||||
[]advisor.CheckErrorLink{
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Deprecated plugin",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin1", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin1", Name: "Plugin 1", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin1": {Status: "deprecated"},
|
||||
|
@ -45,7 +45,8 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
Severity: advisor.CheckReportFailureSeverityHigh,
|
||||
StepID: "deprecation",
|
||||
Item: "plugin1",
|
||||
Item: "Plugin 1",
|
||||
ItemID: "plugin1",
|
||||
Links: []advisor.CheckErrorLink{
|
||||
{
|
||||
Url: "/plugins/plugin1",
|
||||
|
@ -58,7 +59,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Plugin with update",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin2", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin2", Name: "Plugin 2", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin2": {Status: "active"},
|
||||
|
@ -70,7 +71,8 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
Severity: advisor.CheckReportFailureSeverityLow,
|
||||
StepID: "update",
|
||||
Item: "plugin2",
|
||||
Item: "Plugin 2",
|
||||
ItemID: "plugin2",
|
||||
Links: []advisor.CheckErrorLink{
|
||||
{
|
||||
Url: "/plugins/plugin2?page=version-history",
|
||||
|
@ -83,7 +85,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Plugin with update (non semver)",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin2", Info: plugins.Info{Version: "alpha"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin2", Name: "Plugin 2", Info: plugins.Info{Version: "alpha"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin2": {Status: "active"},
|
||||
|
@ -95,7 +97,8 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
Severity: advisor.CheckReportFailureSeverityLow,
|
||||
StepID: "update",
|
||||
Item: "plugin2",
|
||||
Item: "Plugin 2",
|
||||
ItemID: "plugin2",
|
||||
Links: []advisor.CheckErrorLink{
|
||||
{
|
||||
Url: "/plugins/plugin2?page=version-history",
|
||||
|
@ -108,7 +111,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Plugin pinned",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin3", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin3", Name: "Plugin 3", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin3": {Status: "active"},
|
||||
|
@ -122,7 +125,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Managed plugin",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin4", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin4", Name: "Plugin 4", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin4": {Status: "active"},
|
||||
|
@ -136,7 +139,7 @@ func TestRun(t *testing.T) {
|
|||
{
|
||||
name: "Provisioned plugin",
|
||||
plugins: []pluginstore.Plugin{
|
||||
{JSONData: plugins.JSONData{ID: "plugin5", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
{JSONData: plugins.JSONData{ID: "plugin5", Name: "Plugin 5", Info: plugins.Info{Version: "1.0.0"}}},
|
||||
},
|
||||
pluginInfo: map[string]*repo.PluginInfo{
|
||||
"plugin5": {Status: "active"},
|
||||
|
|
|
@ -14,6 +14,7 @@ import (
|
|||
const (
|
||||
TypeLabel = "advisor.grafana.app/type"
|
||||
StatusAnnotation = "advisor.grafana.app/status"
|
||||
RetryAnnotation = "advisor.grafana.app/retry"
|
||||
StatusAnnotationError = "error"
|
||||
StatusAnnotationProcessed = "processed"
|
||||
)
|
||||
|
@ -22,12 +23,14 @@ func NewCheckReportFailure(
|
|||
severity advisor.CheckReportFailureSeverity,
|
||||
stepID string,
|
||||
item string,
|
||||
itemID string,
|
||||
links []advisor.CheckErrorLink,
|
||||
) *advisor.CheckReportFailure {
|
||||
return &advisor.CheckReportFailure{
|
||||
Severity: severity,
|
||||
StepID: stepID,
|
||||
Item: item,
|
||||
ItemID: itemID,
|
||||
Links: links,
|
||||
}
|
||||
}
|
||||
|
@ -47,6 +50,10 @@ func GetStatusAnnotation(obj resource.Object) string {
|
|||
return obj.GetAnnotations()[StatusAnnotation]
|
||||
}
|
||||
|
||||
func GetRetryAnnotation(obj resource.Object) string {
|
||||
return obj.GetAnnotations()[RetryAnnotation]
|
||||
}
|
||||
|
||||
func SetStatusAnnotation(ctx context.Context, client resource.Client, obj resource.Object, status string) error {
|
||||
annotations := obj.GetAnnotations()
|
||||
if annotations == nil {
|
||||
|
|
|
@ -94,6 +94,10 @@ func (r *Runner) Run(ctx context.Context) error {
|
|||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: t.ID(),
|
||||
Namespace: r.namespace,
|
||||
Annotations: map[string]string{
|
||||
// Flag to indicate feature availability
|
||||
checks.RetryAnnotation: "1",
|
||||
},
|
||||
},
|
||||
Spec: advisorv0alpha1.CheckTypeSpec{
|
||||
Name: t.ID(),
|
||||
|
|
|
@ -4,6 +4,7 @@ import (
|
|||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"slices"
|
||||
"sync"
|
||||
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
|
@ -76,6 +77,72 @@ func processCheck(ctx context.Context, client resource.Client, obj resource.Obje
|
|||
}, resource.PatchOptions{}, obj)
|
||||
}
|
||||
|
||||
func processCheckRetry(ctx context.Context, client resource.Client, obj resource.Object, check checks.Check) error {
|
||||
status := checks.GetStatusAnnotation(obj)
|
||||
if status == "" || status == checks.StatusAnnotationError {
|
||||
// Check not processed yet or errored
|
||||
return nil
|
||||
}
|
||||
// Get the item to retry from the annotation
|
||||
itemToRetry := checks.GetRetryAnnotation(obj)
|
||||
if itemToRetry == "" {
|
||||
// No item to retry, nothing to do
|
||||
return nil
|
||||
}
|
||||
c, ok := obj.(*advisorv0alpha1.Check)
|
||||
if !ok {
|
||||
return fmt.Errorf("invalid object type")
|
||||
}
|
||||
// Get the items to check
|
||||
item, err := check.Item(ctx, itemToRetry)
|
||||
if err != nil {
|
||||
setErr := checks.SetStatusAnnotation(ctx, client, obj, checks.StatusAnnotationError)
|
||||
if setErr != nil {
|
||||
return setErr
|
||||
}
|
||||
return fmt.Errorf("error initializing check: %w", err)
|
||||
}
|
||||
// Run the steps
|
||||
steps := check.Steps()
|
||||
failures, err := runStepsInParallel(ctx, &c.Spec, steps, []any{item})
|
||||
if err != nil {
|
||||
setErr := checks.SetStatusAnnotation(ctx, client, obj, checks.StatusAnnotationError)
|
||||
if setErr != nil {
|
||||
return setErr
|
||||
}
|
||||
return fmt.Errorf("error running steps: %w", err)
|
||||
}
|
||||
// Pull failures from the report for the items to retry
|
||||
c.CheckStatus.Report.Failures = slices.DeleteFunc(c.CheckStatus.Report.Failures, func(f advisorv0alpha1.CheckReportFailure) bool {
|
||||
if f.ItemID == itemToRetry {
|
||||
for _, newFailure := range failures {
|
||||
if newFailure.StepID == f.StepID {
|
||||
// Same failure found, keep it
|
||||
return false
|
||||
}
|
||||
}
|
||||
// Failure no longer found, remove it
|
||||
return true
|
||||
}
|
||||
// Failure not in the list of items to retry, keep it
|
||||
return false
|
||||
})
|
||||
// Delete the retry annotation to mark the check as processed
|
||||
annotations := obj.GetAnnotations()
|
||||
delete(annotations, checks.RetryAnnotation)
|
||||
return client.PatchInto(ctx, obj.GetStaticMetadata().Identifier(), resource.PatchRequest{
|
||||
Operations: []resource.PatchOperation{{
|
||||
Operation: resource.PatchOpAdd,
|
||||
Path: "/status/report",
|
||||
Value: c.CheckStatus.Report,
|
||||
}, {
|
||||
Operation: resource.PatchOpAdd,
|
||||
Path: "/metadata/annotations",
|
||||
Value: annotations,
|
||||
}},
|
||||
}, resource.PatchOptions{}, obj)
|
||||
}
|
||||
|
||||
func runStepsInParallel(ctx context.Context, spec *advisorv0alpha1.CheckSpec, steps []checks.Step, items []any) ([]advisorv0alpha1.CheckReportFailure, error) {
|
||||
reportFailures := []advisorv0alpha1.CheckReportFailure{}
|
||||
var internalErr error
|
||||
|
@ -91,7 +158,16 @@ func runStepsInParallel(ctx context.Context, spec *advisorv0alpha1.CheckSpec, st
|
|||
go func(step checks.Step, item any) {
|
||||
defer wg.Done()
|
||||
defer func() { <-limit }()
|
||||
stepErr, err := step.Run(ctx, spec, item)
|
||||
var stepErr *advisorv0alpha1.CheckReportFailure
|
||||
var err error
|
||||
func() {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
err = fmt.Errorf("panic recovered in step %s: %v", step.ID(), r)
|
||||
}
|
||||
}()
|
||||
stepErr, err = step.Run(ctx, spec, item)
|
||||
}()
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
if err != nil {
|
||||
|
|
|
@ -129,6 +129,100 @@ func TestProcessCheck_RunError(t *testing.T) {
|
|||
assert.Equal(t, "error", obj.GetAnnotations()[checks.StatusAnnotation])
|
||||
}
|
||||
|
||||
func TestProcessCheck_RunRecoversFromPanic(t *testing.T) {
|
||||
obj := &advisorv0alpha1.Check{}
|
||||
obj.SetAnnotations(map[string]string{})
|
||||
meta, err := utils.MetaAccessor(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
meta.SetCreatedBy("user:1")
|
||||
client := &mockClient{}
|
||||
ctx := context.TODO()
|
||||
|
||||
check := &mockCheck{
|
||||
items: []any{"item"},
|
||||
runPanics: true,
|
||||
}
|
||||
|
||||
err = processCheck(ctx, client, obj, check)
|
||||
assert.Error(t, err)
|
||||
assert.Contains(t, err.Error(), "panic recovered in step")
|
||||
assert.Equal(t, "error", obj.GetAnnotations()[checks.StatusAnnotation])
|
||||
}
|
||||
|
||||
func TestProcessCheckRetry_NoRetry(t *testing.T) {
|
||||
obj := &advisorv0alpha1.Check{}
|
||||
obj.SetAnnotations(map[string]string{})
|
||||
meta, err := utils.MetaAccessor(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
meta.SetCreatedBy("user:1")
|
||||
client := &mockClient{}
|
||||
ctx := context.TODO()
|
||||
|
||||
check := &mockCheck{}
|
||||
|
||||
err = processCheckRetry(ctx, client, obj, check)
|
||||
assert.NoError(t, err)
|
||||
}
|
||||
|
||||
func TestProcessCheckRetry_RetryError(t *testing.T) {
|
||||
obj := &advisorv0alpha1.Check{}
|
||||
obj.SetAnnotations(map[string]string{
|
||||
checks.RetryAnnotation: "item",
|
||||
checks.StatusAnnotation: "processed",
|
||||
})
|
||||
meta, err := utils.MetaAccessor(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
meta.SetCreatedBy("user:1")
|
||||
client := &mockClient{}
|
||||
ctx := context.TODO()
|
||||
|
||||
check := &mockCheck{
|
||||
items: []any{"item"},
|
||||
err: errors.New("retry error"),
|
||||
}
|
||||
|
||||
err = processCheckRetry(ctx, client, obj, check)
|
||||
assert.Error(t, err)
|
||||
assert.Equal(t, "error", obj.GetAnnotations()[checks.StatusAnnotation])
|
||||
}
|
||||
|
||||
func TestProcessCheckRetry_Success(t *testing.T) {
|
||||
obj := &advisorv0alpha1.Check{}
|
||||
obj.SetAnnotations(map[string]string{
|
||||
checks.RetryAnnotation: "item",
|
||||
checks.StatusAnnotation: "processed",
|
||||
})
|
||||
obj.CheckStatus.Report.Failures = []advisorv0alpha1.CheckReportFailure{
|
||||
{
|
||||
ItemID: "item",
|
||||
StepID: "step",
|
||||
},
|
||||
}
|
||||
meta, err := utils.MetaAccessor(obj)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
meta.SetCreatedBy("user:1")
|
||||
client := &mockClient{}
|
||||
ctx := context.TODO()
|
||||
|
||||
check := &mockCheck{
|
||||
items: []any{"item"},
|
||||
}
|
||||
|
||||
err = processCheckRetry(ctx, client, obj, check)
|
||||
assert.NoError(t, err)
|
||||
assert.Equal(t, "processed", obj.GetAnnotations()[checks.StatusAnnotation])
|
||||
assert.Empty(t, obj.GetAnnotations()[checks.RetryAnnotation])
|
||||
assert.Empty(t, obj.CheckStatus.Report.Failures)
|
||||
}
|
||||
|
||||
type mockClient struct {
|
||||
resource.Client
|
||||
lastValue any
|
||||
|
@ -140,8 +234,9 @@ func (m *mockClient) PatchInto(ctx context.Context, id resource.Identifier, req
|
|||
}
|
||||
|
||||
type mockCheck struct {
|
||||
err error
|
||||
items []any
|
||||
err error
|
||||
items []any
|
||||
runPanics bool
|
||||
}
|
||||
|
||||
func (m *mockCheck) ID() string {
|
||||
|
@ -152,17 +247,25 @@ func (m *mockCheck) Items(ctx context.Context) ([]any, error) {
|
|||
return m.items, nil
|
||||
}
|
||||
|
||||
func (m *mockCheck) Item(ctx context.Context, id string) (any, error) {
|
||||
return m.items[0], nil
|
||||
}
|
||||
|
||||
func (m *mockCheck) Steps() []checks.Step {
|
||||
return []checks.Step{
|
||||
&mockStep{err: m.err},
|
||||
&mockStep{err: m.err, panics: m.runPanics},
|
||||
}
|
||||
}
|
||||
|
||||
type mockStep struct {
|
||||
err error
|
||||
err error
|
||||
panics bool
|
||||
}
|
||||
|
||||
func (m *mockStep) Run(ctx context.Context, obj *advisorv0alpha1.CheckSpec, items any) (*advisorv0alpha1.CheckReportFailure, error) {
|
||||
if m.panics {
|
||||
panic("panic")
|
||||
}
|
||||
if m.err != nil {
|
||||
return nil, m.err
|
||||
}
|
||||
|
|
|
@ -39,8 +39,8 @@ post-generate-cleanup: ## Clean up the generated code
|
|||
@cp ./tshack/v0alpha1_spec_gen.ts ../../packages/grafana-schema/src/schema/dashboard/v0alpha1/types.spec.gen.ts
|
||||
|
||||
# Same for v1alpha1
|
||||
@rm ../../packages/grafana-schema/src/schema/dashboard/v1alpha1/types.spec.gen.ts
|
||||
@cp ./tshack/v1alpha1_spec_gen.ts ../../packages/grafana-schema/src/schema/dashboard/v1alpha1/types.spec.gen.ts
|
||||
@rm ../../packages/grafana-schema/src/schema/dashboard/v1beta1/types.spec.gen.ts
|
||||
@cp ./tshack/v1alpha1_spec_gen.ts ../../packages/grafana-schema/src/schema/dashboard/v1beta1/types.spec.gen.ts
|
||||
|
||||
# Remove auto-generated DeepCopy and DeepCopyInto methods for Spec for v0alpha1.
|
||||
@sed -e '/\/\/ DeepCopy creates a full deep copy of Spec/,+5d' ./pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go > ./pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go.tmp
|
||||
|
@ -49,10 +49,10 @@ post-generate-cleanup: ## Clean up the generated code
|
|||
@mv ./pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go.tmp2 ./pkg/apis/dashboard/v0alpha1/dashboard_object_gen.go
|
||||
|
||||
# Remove auto-generated DeepCopy and DeepCopyInto methods for Spec for v1alpha1.
|
||||
@sed -e '/\/\/ DeepCopy creates a full deep copy of Spec/,+5d' ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go > ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go.tmp
|
||||
@sed -e '/\/\/ DeepCopyInto deep copies Spec into another Spec object/,+3d' ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go.tmp > ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go.tmp2
|
||||
@rm ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go.tmp
|
||||
@mv ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go.tmp2 ./pkg/apis/dashboard/v1alpha1/dashboard_object_gen.go
|
||||
@sed -e '/\/\/ DeepCopy creates a full deep copy of Spec/,+5d' ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go > ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go.tmp
|
||||
@sed -e '/\/\/ DeepCopyInto deep copies Spec into another Spec object/,+3d' ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go.tmp > ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go.tmp2
|
||||
@rm ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go.tmp
|
||||
@mv ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go.tmp2 ./pkg/apis/dashboard/v1beta1/dashboard_object_gen.go
|
||||
|
||||
# Copy dashboard/v2alpha1 spec so we can use it for schema validation
|
||||
@echo "// This file is managed by grafana-app-sdk - DO NOT EDIT MANUALLY" > ./pkg/apis/dashboard/v2alpha1/dashboard_spec.cue
|
||||
|
|
|
@ -2,7 +2,7 @@ package kinds
|
|||
|
||||
import (
|
||||
v0 "github.com/grafana/grafana/sdkkinds/dashboard/v0alpha1"
|
||||
v1 "github.com/grafana/grafana/sdkkinds/dashboard/v1alpha1"
|
||||
v1 "github.com/grafana/grafana/sdkkinds/dashboard/v1beta1"
|
||||
v2 "github.com/grafana/grafana/sdkkinds/dashboard/v2alpha1"
|
||||
)
|
||||
|
||||
|
@ -31,7 +31,7 @@ ConversionStatus: {
|
|||
dashboard: {
|
||||
kind: "Dashboard"
|
||||
pluralName: "Dashboards"
|
||||
current: "v0alpha1"
|
||||
current: "v1beta1"
|
||||
|
||||
codegen: {
|
||||
ts: {
|
||||
|
@ -55,7 +55,7 @@ dashboard: {
|
|||
status: DashboardStatus
|
||||
}
|
||||
}
|
||||
"v1alpha1": {
|
||||
"v1beta1": {
|
||||
schema: {
|
||||
spec: v1.DashboardSpec
|
||||
status: DashboardStatus
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
// TODO: this outputs nothing.
|
||||
// For now, we use unstructured for the spec,
|
|
@ -78,7 +78,7 @@ AnnotationPanelFilter: {
|
|||
exclude?: bool | *false
|
||||
|
||||
// Panel IDs that should be included or excluded
|
||||
ids: [...uint8]
|
||||
ids: [...uint32]
|
||||
}
|
||||
|
||||
// "Off" for no shared crosshair or tooltip (default).
|
||||
|
@ -704,6 +704,10 @@ VariableRefresh: *"never" | "onDashboardLoad" | "onTimeRangeChanged"
|
|||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing).
|
||||
VariableHide: *"dontHide" | "hideLabel" | "hideVariable"
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
// Accepted values are `dashboard` (filter originated from dashboard), or `scope` (filter originated from scope).
|
||||
FilterOrigin: "dashboard" | "scope"
|
||||
|
||||
// FIXME: should we introduce this? --- Variable value option
|
||||
VariableValueOption: {
|
||||
label: string
|
||||
|
@ -915,6 +919,7 @@ AdHocFilterWithLabels: {
|
|||
keyLabel?: string
|
||||
valueLabels?: [...string]
|
||||
forceEdit?: bool
|
||||
origin?: FilterOrigin
|
||||
// @deprecated
|
||||
condition?: string
|
||||
}
|
||||
|
|
|
@ -1,175 +0,0 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
|
||||
import (
|
||||
url "net/url"
|
||||
unsafe "unsafe"
|
||||
|
||||
dashboard "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
localSchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddGeneratedConversionFunc((*AnnotationActions)(nil), (*dashboard.AnnotationActions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(a.(*AnnotationActions), b.(*dashboard.AnnotationActions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.AnnotationActions)(nil), (*AnnotationActions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(a.(*dashboard.AnnotationActions), b.(*AnnotationActions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*AnnotationPermission)(nil), (*dashboard.AnnotationPermission)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_AnnotationPermission_To_dashboard_AnnotationPermission(a.(*AnnotationPermission), b.(*dashboard.AnnotationPermission), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.AnnotationPermission)(nil), (*AnnotationPermission)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(a.(*dashboard.AnnotationPermission), b.(*AnnotationPermission), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardAccess)(nil), (*dashboard.DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(a.(*DashboardAccess), b.(*dashboard.DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardAccess)(nil), (*DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(a.(*dashboard.DashboardAccess), b.(*DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_url_Values_To_v1alpha1_VersionsQueryOptions(a.(*url.Values), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(in *AnnotationActions, out *dashboard.AnnotationActions, s conversion.Scope) error {
|
||||
out.CanAdd = in.CanAdd
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanDelete = in.CanDelete
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(in *AnnotationActions, out *dashboard.AnnotationActions, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(in *dashboard.AnnotationActions, out *AnnotationActions, s conversion.Scope) error {
|
||||
out.CanAdd = in.CanAdd
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanDelete = in.CanDelete
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions is an autogenerated conversion function.
|
||||
func Convert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(in *dashboard.AnnotationActions, out *AnnotationActions, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_AnnotationPermission_To_dashboard_AnnotationPermission(in *AnnotationPermission, out *dashboard.AnnotationPermission, s conversion.Scope) error {
|
||||
if err := Convert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1alpha1_AnnotationActions_To_dashboard_AnnotationActions(&in.Organization, &out.Organization, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_AnnotationPermission_To_dashboard_AnnotationPermission is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_AnnotationPermission_To_dashboard_AnnotationPermission(in *AnnotationPermission, out *dashboard.AnnotationPermission, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_AnnotationPermission_To_dashboard_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(in *dashboard.AnnotationPermission, out *AnnotationPermission, s conversion.Scope) error {
|
||||
if err := Convert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_dashboard_AnnotationActions_To_v1alpha1_AnnotationActions(&in.Organization, &out.Organization, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission is an autogenerated conversion function.
|
||||
func Convert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(in *dashboard.AnnotationPermission, out *AnnotationPermission, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_AnnotationPermission_To_v1alpha1_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
out.CanSave = in.CanSave
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanAdmin = in.CanAdmin
|
||||
out.CanStar = in.CanStar
|
||||
out.CanDelete = in.CanDelete
|
||||
out.AnnotationsPermissions = (*dashboard.AnnotationPermission)(unsafe.Pointer(in.AnnotationsPermissions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess is an autogenerated conversion function.
|
||||
func Convert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
return autoConvert_v1alpha1_DashboardAccess_To_dashboard_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(in *dashboard.DashboardAccess, out *DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
out.CanSave = in.CanSave
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanAdmin = in.CanAdmin
|
||||
out.CanStar = in.CanStar
|
||||
out.CanDelete = in.CanDelete
|
||||
out.AnnotationsPermissions = (*AnnotationPermission)(unsafe.Pointer(in.AnnotationsPermissions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(in *dashboard.DashboardAccess, out *DashboardAccess, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardAccess_To_v1alpha1_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_url_Values_To_v1alpha1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
// WARNING: Field TypeMeta does not have json tag, skipping.
|
||||
|
||||
if values, ok := map[string][]string(*in)["path"]; ok && len(values) > 0 {
|
||||
if err := runtime.Convert_Slice_string_To_string(&values, &out.Path, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Path = ""
|
||||
}
|
||||
if values, ok := map[string][]string(*in)["version"]; ok && len(values) > 0 {
|
||||
if err := runtime.Convert_Slice_string_To_int64(&values, &out.Version, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Version = 0
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_url_Values_To_v1alpha1_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_url_Values_To_v1alpha1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_url_Values_To_v1alpha1_VersionsQueryOptions(in, out, s)
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
|
@ -6,7 +6,7 @@ const (
|
|||
// Group is the API group used by all kinds in this package
|
||||
Group = "dashboard.grafana.app"
|
||||
// Version is the API version used by all kinds in this package
|
||||
Version = "v1alpha1"
|
||||
Version = "v1beta1"
|
||||
)
|
||||
|
||||
var (
|
|
@ -2,7 +2,7 @@
|
|||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"encoding/json"
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
time "time"
|
|
@ -2,7 +2,7 @@
|
|||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"fmt"
|
|
@ -2,7 +2,7 @@
|
|||
// Code generated by grafana-app-sdk. DO NOT EDIT.
|
||||
//
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"github.com/grafana/grafana-app-sdk/resource"
|
||||
|
@ -10,7 +10,7 @@ import (
|
|||
|
||||
// schema is unexported to prevent accidental overwrites
|
||||
var (
|
||||
schemaDashboard = resource.NewSimpleSchema("dashboard.grafana.app", "v1alpha1", &Dashboard{}, &DashboardList{}, resource.WithKind("Dashboard"),
|
||||
schemaDashboard = resource.NewSimpleSchema("dashboard.grafana.app", "v1beta1", &Dashboard{}, &DashboardList{}, resource.WithKind("Dashboard"),
|
||||
resource.WithPlural("dashboards"), resource.WithScope(resource.NamespacedScope))
|
||||
kindDashboard = resource.Kind{
|
||||
Schema: schemaDashboard,
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
|
@ -1,6 +1,6 @@
|
|||
// Code generated - EDITING IS FUTILE. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
// ConversionStatus is the status of the conversion of the dashboard.
|
||||
// +k8s:openapi-gen=true
|
|
@ -7,4 +7,4 @@
|
|||
// because grafana-app-sdk already provides deepcopy functions.
|
||||
// Kinds which are not generated by the SDK are explicitly opted in to deepcopy generation.
|
||||
|
||||
package v1alpha1 // import "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1"
|
||||
package v1beta1 // import "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1"
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
@ -13,7 +13,7 @@ import (
|
|||
|
||||
const (
|
||||
GROUP = "dashboard.grafana.app"
|
||||
VERSION = "v1alpha1"
|
||||
VERSION = "v1beta1"
|
||||
APIVERSION = GROUP + "/" + VERSION
|
||||
|
||||
// Resource constants
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
@ -1,4 +1,4 @@
|
|||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
|
@ -13,6 +13,7 @@ import (
|
|||
"cuelang.org/go/cue/cuecontext"
|
||||
"cuelang.org/go/cue/errors"
|
||||
cuejson "cuelang.org/go/encoding/json"
|
||||
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
)
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
//go:build !ignore_autogenerated
|
||||
// +build !ignore_autogenerated
|
||||
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
// Code generated by conversion-gen. DO NOT EDIT.
|
||||
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
url "net/url"
|
||||
unsafe "unsafe"
|
||||
|
||||
dashboard "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard"
|
||||
conversion "k8s.io/apimachinery/pkg/conversion"
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
)
|
||||
|
||||
func init() {
|
||||
localSchemeBuilder.Register(RegisterConversions)
|
||||
}
|
||||
|
||||
// RegisterConversions adds conversion functions to the given scheme.
|
||||
// Public to allow building arbitrary schemes.
|
||||
func RegisterConversions(s *runtime.Scheme) error {
|
||||
if err := s.AddGeneratedConversionFunc((*AnnotationActions)(nil), (*dashboard.AnnotationActions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(a.(*AnnotationActions), b.(*dashboard.AnnotationActions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.AnnotationActions)(nil), (*AnnotationActions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(a.(*dashboard.AnnotationActions), b.(*AnnotationActions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*AnnotationPermission)(nil), (*dashboard.AnnotationPermission)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_AnnotationPermission_To_dashboard_AnnotationPermission(a.(*AnnotationPermission), b.(*dashboard.AnnotationPermission), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.AnnotationPermission)(nil), (*AnnotationPermission)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_AnnotationPermission_To_v1beta1_AnnotationPermission(a.(*dashboard.AnnotationPermission), b.(*AnnotationPermission), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*DashboardAccess)(nil), (*dashboard.DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_v1beta1_DashboardAccess_To_dashboard_DashboardAccess(a.(*DashboardAccess), b.(*dashboard.DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*dashboard.DashboardAccess)(nil), (*DashboardAccess)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_dashboard_DashboardAccess_To_v1beta1_DashboardAccess(a.(*dashboard.DashboardAccess), b.(*DashboardAccess), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := s.AddGeneratedConversionFunc((*url.Values)(nil), (*VersionsQueryOptions)(nil), func(a, b interface{}, scope conversion.Scope) error {
|
||||
return Convert_url_Values_To_v1beta1_VersionsQueryOptions(a.(*url.Values), b.(*VersionsQueryOptions), scope)
|
||||
}); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(in *AnnotationActions, out *dashboard.AnnotationActions, s conversion.Scope) error {
|
||||
out.CanAdd = in.CanAdd
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanDelete = in.CanDelete
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions is an autogenerated conversion function.
|
||||
func Convert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(in *AnnotationActions, out *dashboard.AnnotationActions, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(in *dashboard.AnnotationActions, out *AnnotationActions, s conversion.Scope) error {
|
||||
out.CanAdd = in.CanAdd
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanDelete = in.CanDelete
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions is an autogenerated conversion function.
|
||||
func Convert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(in *dashboard.AnnotationActions, out *AnnotationActions, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_AnnotationPermission_To_dashboard_AnnotationPermission(in *AnnotationPermission, out *dashboard.AnnotationPermission, s conversion.Scope) error {
|
||||
if err := Convert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_v1beta1_AnnotationActions_To_dashboard_AnnotationActions(&in.Organization, &out.Organization, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_AnnotationPermission_To_dashboard_AnnotationPermission is an autogenerated conversion function.
|
||||
func Convert_v1beta1_AnnotationPermission_To_dashboard_AnnotationPermission(in *AnnotationPermission, out *dashboard.AnnotationPermission, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_AnnotationPermission_To_dashboard_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_AnnotationPermission_To_v1beta1_AnnotationPermission(in *dashboard.AnnotationPermission, out *AnnotationPermission, s conversion.Scope) error {
|
||||
if err := Convert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(&in.Dashboard, &out.Dashboard, s); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := Convert_dashboard_AnnotationActions_To_v1beta1_AnnotationActions(&in.Organization, &out.Organization, s); err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_AnnotationPermission_To_v1beta1_AnnotationPermission is an autogenerated conversion function.
|
||||
func Convert_dashboard_AnnotationPermission_To_v1beta1_AnnotationPermission(in *dashboard.AnnotationPermission, out *AnnotationPermission, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_AnnotationPermission_To_v1beta1_AnnotationPermission(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_v1beta1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
out.CanSave = in.CanSave
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanAdmin = in.CanAdmin
|
||||
out.CanStar = in.CanStar
|
||||
out.CanDelete = in.CanDelete
|
||||
out.AnnotationsPermissions = (*dashboard.AnnotationPermission)(unsafe.Pointer(in.AnnotationsPermissions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_v1beta1_DashboardAccess_To_dashboard_DashboardAccess is an autogenerated conversion function.
|
||||
func Convert_v1beta1_DashboardAccess_To_dashboard_DashboardAccess(in *DashboardAccess, out *dashboard.DashboardAccess, s conversion.Scope) error {
|
||||
return autoConvert_v1beta1_DashboardAccess_To_dashboard_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_dashboard_DashboardAccess_To_v1beta1_DashboardAccess(in *dashboard.DashboardAccess, out *DashboardAccess, s conversion.Scope) error {
|
||||
out.Slug = in.Slug
|
||||
out.Url = in.Url
|
||||
out.CanSave = in.CanSave
|
||||
out.CanEdit = in.CanEdit
|
||||
out.CanAdmin = in.CanAdmin
|
||||
out.CanStar = in.CanStar
|
||||
out.CanDelete = in.CanDelete
|
||||
out.AnnotationsPermissions = (*AnnotationPermission)(unsafe.Pointer(in.AnnotationsPermissions))
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_dashboard_DashboardAccess_To_v1beta1_DashboardAccess is an autogenerated conversion function.
|
||||
func Convert_dashboard_DashboardAccess_To_v1beta1_DashboardAccess(in *dashboard.DashboardAccess, out *DashboardAccess, s conversion.Scope) error {
|
||||
return autoConvert_dashboard_DashboardAccess_To_v1beta1_DashboardAccess(in, out, s)
|
||||
}
|
||||
|
||||
func autoConvert_url_Values_To_v1beta1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
// WARNING: Field TypeMeta does not have json tag, skipping.
|
||||
|
||||
if values, ok := map[string][]string(*in)["path"]; ok && len(values) > 0 {
|
||||
if err := runtime.Convert_Slice_string_To_string(&values, &out.Path, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Path = ""
|
||||
}
|
||||
if values, ok := map[string][]string(*in)["version"]; ok && len(values) > 0 {
|
||||
if err := runtime.Convert_Slice_string_To_int64(&values, &out.Version, s); err != nil {
|
||||
return err
|
||||
}
|
||||
} else {
|
||||
out.Version = 0
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// Convert_url_Values_To_v1beta1_VersionsQueryOptions is an autogenerated conversion function.
|
||||
func Convert_url_Values_To_v1beta1_VersionsQueryOptions(in *url.Values, out *VersionsQueryOptions, s conversion.Scope) error {
|
||||
return autoConvert_url_Values_To_v1beta1_VersionsQueryOptions(in, out, s)
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
// Code generated by deepcopy-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana-plugin-sdk-go/experimental/apis/data/v0alpha1"
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
// Code generated by defaulter-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
runtime "k8s.io/apimachinery/pkg/runtime"
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
// Code generated by openapi-gen. DO NOT EDIT.
|
||||
|
||||
package v1alpha1
|
||||
package v1beta1
|
||||
|
||||
import (
|
||||
v0alpha1 "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
|
@ -15,28 +15,28 @@ import (
|
|||
|
||||
func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition {
|
||||
return map[string]common.OpenAPIDefinition{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationActions": schema_pkg_apis_dashboard_v1alpha1_AnnotationActions(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationPermission": schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.Dashboard": schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardAccess": schema_pkg_apis_dashboard_v1alpha1_DashboardAccess(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardConversionStatus": schema_pkg_apis_dashboard_v1alpha1_DashboardConversionStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardJSONCodec": schema_pkg_apis_dashboard_v1alpha1_DashboardJSONCodec(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardList": schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardMetadata": schema_pkg_apis_dashboard_v1alpha1_DashboardMetadata(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardStatus": schema_pkg_apis_dashboard_v1alpha1_DashboardStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardVersionInfo": schema_pkg_apis_dashboard_v1alpha1_DashboardVersionInfo(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardVersionList": schema_pkg_apis_dashboard_v1alpha1_DashboardVersionList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardWithAccessInfo": schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanel": schema_pkg_apis_dashboard_v1alpha1_LibraryPanel(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelList": schema_pkg_apis_dashboard_v1alpha1_LibraryPanelList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelSpec": schema_pkg_apis_dashboard_v1alpha1_LibraryPanelSpec(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelStatus": schema_pkg_apis_dashboard_v1alpha1_LibraryPanelStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.VersionsQueryOptions": schema_pkg_apis_dashboard_v1alpha1_VersionsQueryOptions(ref),
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured": v0alpha1.Unstructured{}.OpenAPIDefinition(),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationActions": schema_pkg_apis_dashboard_v1beta1_AnnotationActions(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationPermission": schema_pkg_apis_dashboard_v1beta1_AnnotationPermission(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.Dashboard": schema_pkg_apis_dashboard_v1beta1_Dashboard(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardAccess": schema_pkg_apis_dashboard_v1beta1_DashboardAccess(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardConversionStatus": schema_pkg_apis_dashboard_v1beta1_DashboardConversionStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardJSONCodec": schema_pkg_apis_dashboard_v1beta1_DashboardJSONCodec(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardList": schema_pkg_apis_dashboard_v1beta1_DashboardList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardMetadata": schema_pkg_apis_dashboard_v1beta1_DashboardMetadata(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardStatus": schema_pkg_apis_dashboard_v1beta1_DashboardStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardVersionInfo": schema_pkg_apis_dashboard_v1beta1_DashboardVersionInfo(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardVersionList": schema_pkg_apis_dashboard_v1beta1_DashboardVersionList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardWithAccessInfo": schema_pkg_apis_dashboard_v1beta1_DashboardWithAccessInfo(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanel": schema_pkg_apis_dashboard_v1beta1_LibraryPanel(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelList": schema_pkg_apis_dashboard_v1beta1_LibraryPanelList(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelSpec": schema_pkg_apis_dashboard_v1beta1_LibraryPanelSpec(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelStatus": schema_pkg_apis_dashboard_v1beta1_LibraryPanelStatus(ref),
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.VersionsQueryOptions": schema_pkg_apis_dashboard_v1beta1_VersionsQueryOptions(ref),
|
||||
"github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured": v0alpha1.Unstructured{}.OpenAPIDefinition(),
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_AnnotationActions(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_AnnotationActions(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -70,7 +70,7 @@ func schema_pkg_apis_dashboard_v1alpha1_AnnotationActions(ref common.ReferenceCa
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_AnnotationPermission(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -79,13 +79,13 @@ func schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref common.Referenc
|
|||
"dashboard": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationActions"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationActions"),
|
||||
},
|
||||
},
|
||||
"organization": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationActions"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationActions"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -93,11 +93,11 @@ func schema_pkg_apis_dashboard_v1alpha1_AnnotationPermission(ref common.Referenc
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationActions"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationActions"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_Dashboard(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -132,7 +132,7 @@ func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback)
|
|||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardStatus"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -140,11 +140,11 @@ func schema_pkg_apis_dashboard_v1alpha1_Dashboard(ref common.ReferenceCallback)
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardStatus", "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardStatus", "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardAccess(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardAccess(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -202,7 +202,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardAccess(ref common.ReferenceCall
|
|||
},
|
||||
"annotationsPermissions": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationPermission"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationPermission"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -210,11 +210,11 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardAccess(ref common.ReferenceCall
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.AnnotationPermission"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.AnnotationPermission"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardConversionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardConversionStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -252,7 +252,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardConversionStatus(ref common.Ref
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardJSONCodec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardJSONCodec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -263,7 +263,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardJSONCodec(ref common.ReferenceC
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -296,7 +296,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref common.ReferenceCallba
|
|||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.Dashboard"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.Dashboard"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -307,11 +307,11 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardList(ref common.ReferenceCallba
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.Dashboard", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.Dashboard", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -407,7 +407,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardMetadata(ref common.ReferenceCa
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -416,18 +416,18 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardStatus(ref common.ReferenceCall
|
|||
"conversion": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Optional conversion status.",
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardConversionStatus"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardConversionStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardConversionStatus"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardConversionStatus"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardVersionInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardVersionInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -477,7 +477,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardVersionInfo(ref common.Referenc
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardVersionList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -510,7 +510,7 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardVersionList(ref common.Referenc
|
|||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardVersionInfo"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardVersionInfo"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -520,11 +520,11 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardVersionList(ref common.Referenc
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardVersionInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardVersionInfo", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_DashboardWithAccessInfo(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -560,13 +560,13 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref common.Refer
|
|||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardStatus"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardStatus"),
|
||||
},
|
||||
},
|
||||
"access": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardAccess"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardAccess"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -574,11 +574,11 @@ func schema_pkg_apis_dashboard_v1alpha1_DashboardWithAccessInfo(ref common.Refer
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardAccess", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.DashboardStatus", "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardAccess", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.DashboardStatus", "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1.Unstructured", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_LibraryPanel(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_LibraryPanel(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -609,13 +609,13 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanel(ref common.ReferenceCallbac
|
|||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Panel properties",
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelSpec"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelSpec"),
|
||||
},
|
||||
},
|
||||
"status": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Status will show errors",
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelStatus"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelStatus"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -623,11 +623,11 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanel(ref common.ReferenceCallbac
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelSpec", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanelStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelSpec", "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanelStatus", "k8s.io/apimachinery/pkg/apis/meta/v1.ObjectMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_LibraryPanelList(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -660,7 +660,7 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelList(ref common.ReferenceCal
|
|||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: map[string]interface{}{},
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanel"),
|
||||
Ref: ref("github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanel"),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
@ -670,11 +670,11 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelList(ref common.ReferenceCal
|
|||
},
|
||||
},
|
||||
Dependencies: []string{
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1.LibraryPanel", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1.LibraryPanel", "k8s.io/apimachinery/pkg/apis/meta/v1.ListMeta"},
|
||||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_LibraryPanelSpec(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -754,7 +754,7 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelSpec(ref common.ReferenceCal
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_LibraryPanelStatus(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
|
@ -789,7 +789,7 @@ func schema_pkg_apis_dashboard_v1alpha1_LibraryPanelStatus(ref common.ReferenceC
|
|||
}
|
||||
}
|
||||
|
||||
func schema_pkg_apis_dashboard_v1alpha1_VersionsQueryOptions(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
func schema_pkg_apis_dashboard_v1beta1_VersionsQueryOptions(ref common.ReferenceCallback) common.OpenAPIDefinition {
|
||||
return common.OpenAPIDefinition{
|
||||
Schema: spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
|
@ -1,3 +1,3 @@
|
|||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1,DashboardMetadata,Finalizers
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1,LibraryPanelStatus,Warnings
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1,DashboardMetadata,Finalizers
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1,LibraryPanelStatus,Warnings
|
||||
API rule violation: names_match,github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1,Unstructured,Object
|
|
@ -82,7 +82,7 @@ AnnotationPanelFilter: {
|
|||
exclude?: bool | *false
|
||||
|
||||
// Panel IDs that should be included or excluded
|
||||
ids: [...uint8]
|
||||
ids: [...uint32]
|
||||
}
|
||||
|
||||
// "Off" for no shared crosshair or tooltip (default).
|
||||
|
@ -708,6 +708,10 @@ VariableRefresh: *"never" | "onDashboardLoad" | "onTimeRangeChanged"
|
|||
// Accepted values are `dontHide` (show label and value), `hideLabel` (show value only), `hideVariable` (show nothing).
|
||||
VariableHide: *"dontHide" | "hideLabel" | "hideVariable"
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
// Accepted values are `dashboard` (filter originated from dashboard), or `scope` (filter originated from scope).
|
||||
FilterOrigin: "dashboard" | "scope"
|
||||
|
||||
// FIXME: should we introduce this? --- Variable value option
|
||||
VariableValueOption: {
|
||||
label: string
|
||||
|
@ -919,6 +923,7 @@ AdHocFilterWithLabels: {
|
|||
keyLabel?: string
|
||||
valueLabels?: [...string]
|
||||
forceEdit?: bool
|
||||
origin?: FilterOrigin
|
||||
// @deprecated
|
||||
condition?: string
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ type DashboardAnnotationPanelFilter struct {
|
|||
// Should the specified panels be included or excluded
|
||||
Exclude *bool `json:"exclude,omitempty"`
|
||||
// Panel IDs that should be included or excluded
|
||||
Ids []uint8 `json:"ids"`
|
||||
Ids []uint32 `json:"ids"`
|
||||
}
|
||||
|
||||
// NewDashboardAnnotationPanelFilter creates a new DashboardAnnotationPanelFilter object.
|
||||
|
@ -1665,13 +1665,14 @@ func NewDashboardAdhocVariableSpec() *DashboardAdhocVariableSpec {
|
|||
// Define the AdHocFilterWithLabels type
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardAdHocFilterWithLabels struct {
|
||||
Key string `json:"key"`
|
||||
Operator string `json:"operator"`
|
||||
Value string `json:"value"`
|
||||
Values []string `json:"values,omitempty"`
|
||||
KeyLabel *string `json:"keyLabel,omitempty"`
|
||||
ValueLabels []string `json:"valueLabels,omitempty"`
|
||||
ForceEdit *bool `json:"forceEdit,omitempty"`
|
||||
Key string `json:"key"`
|
||||
Operator string `json:"operator"`
|
||||
Value string `json:"value"`
|
||||
Values []string `json:"values,omitempty"`
|
||||
KeyLabel *string `json:"keyLabel,omitempty"`
|
||||
ValueLabels []string `json:"valueLabels,omitempty"`
|
||||
ForceEdit *bool `json:"forceEdit,omitempty"`
|
||||
Origin *DashboardFilterOrigin `json:"origin,omitempty"`
|
||||
// @deprecated
|
||||
Condition *string `json:"condition,omitempty"`
|
||||
}
|
||||
|
@ -1681,6 +1682,16 @@ func NewDashboardAdHocFilterWithLabels() *DashboardAdHocFilterWithLabels {
|
|||
return &DashboardAdHocFilterWithLabels{}
|
||||
}
|
||||
|
||||
// Determine the origin of the adhoc variable filter
|
||||
// Accepted values are `dashboard` (filter originated from dashboard), or `scope` (filter originated from scope).
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardFilterOrigin string
|
||||
|
||||
const (
|
||||
DashboardFilterOriginDashboard DashboardFilterOrigin = "dashboard"
|
||||
DashboardFilterOriginScope DashboardFilterOrigin = "scope"
|
||||
)
|
||||
|
||||
// Define the MetricFindValue type
|
||||
// +k8s:openapi-gen=true
|
||||
type DashboardMetricFindValue struct {
|
||||
|
|
|
@ -380,6 +380,12 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardAdHocFilterWithLabels(ref commo
|
|||
Format: "",
|
||||
},
|
||||
},
|
||||
"origin": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
"condition": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "@deprecated",
|
||||
|
@ -538,7 +544,7 @@ func schema_pkg_apis_dashboard_v2alpha1_DashboardAnnotationPanelFilter(ref commo
|
|||
SchemaProps: spec.SchemaProps{
|
||||
Default: 0,
|
||||
Type: []string{"integer"},
|
||||
Format: "byte",
|
||||
Format: "int64",
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,6 +3,7 @@ API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/
|
|||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardAdhocVariableSpec,BaseFilters
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardAdhocVariableSpec,DefaultKeys
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardAdhocVariableSpec,Filters
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardAnnotationPanelFilter,Ids
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardAutoGridLayoutSpec,Items
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardConditionalRenderingGroupSpec,Items
|
||||
API rule violation: list_type_missing,github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1,DashboardCustomVariableSpec,Options
|
||||
|
|
|
@ -25,7 +25,7 @@ var appManifestData = app.ManifestData{
|
|||
},
|
||||
|
||||
{
|
||||
Name: "v1alpha1",
|
||||
Name: "v1beta1",
|
||||
},
|
||||
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
dashv0 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1"
|
||||
dashv1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1"
|
||||
dashv1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1"
|
||||
dashv2 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1"
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration"
|
||||
"github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"k8s.io/apimachinery/pkg/runtime"
|
||||
|
||||
dashv0 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v0alpha1"
|
||||
dashv1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1alpha1"
|
||||
dashv1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1"
|
||||
dashv2 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v2alpha1"
|
||||
common "github.com/grafana/grafana/pkg/apimachinery/apis/common/v0alpha1"
|
||||
"github.com/grafana/grafana/pkg/apimachinery/utils"
|
||||
|
|
|
@ -2,9 +2,9 @@ package migration
|
|||
|
||||
import "github.com/grafana/grafana/apps/dashboard/pkg/migration/schemaversion"
|
||||
|
||||
func Migrate(dash map[string]interface{}, targetVersion int) error {
|
||||
func Migrate(dash map[string]any, targetVersion int) error {
|
||||
if dash == nil {
|
||||
dash = map[string]interface{}{}
|
||||
dash = map[string]any{}
|
||||
}
|
||||
inputVersion := schemaversion.GetSchemaVersion(dash)
|
||||
dash["schemaVersion"] = inputVersion
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
)
|
||||
|
||||
func GetAuthorizer() authorizer.Authorizer {
|
||||
return authorizer.AuthorizerFunc(func(
|
||||
ctx context.Context, attr authorizer.Attributes,
|
||||
) (authorized authorizer.Decision, reason string, err error) {
|
||||
if !attr.IsResourceRequest() {
|
||||
return authorizer.DecisionNoOpinion, "", nil
|
||||
}
|
||||
|
||||
u, err := identity.GetRequester(ctx)
|
||||
if err != nil {
|
||||
return authorizer.DecisionDeny, "valid user is required", err
|
||||
}
|
||||
|
||||
p := u.GetPermissions()
|
||||
if len(p) == 0 {
|
||||
return authorizer.DecisionDeny, "no permissions", nil
|
||||
}
|
||||
|
||||
_, ok := p[accesscontrol.ActionDatasourcesExplore]
|
||||
if !ok {
|
||||
// defer to the default authorizer if datasources:explore is not present
|
||||
return authorizer.DecisionNoOpinion, "", nil
|
||||
}
|
||||
|
||||
return authorizer.DecisionAllow, "", nil
|
||||
})
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/grafana/grafana/pkg/apimachinery/identity"
|
||||
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"k8s.io/apiserver/pkg/authorization/authorizer"
|
||||
)
|
||||
|
||||
func TestGetAuthorizer(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
ctx context.Context
|
||||
attr authorizer.Attributes
|
||||
expectedDecision authorizer.Decision
|
||||
expectedReason string
|
||||
expectedErr error
|
||||
}{
|
||||
{
|
||||
name: "non-resource request",
|
||||
ctx: context.TODO(),
|
||||
attr: &mockAttributes{resourceRequest: false},
|
||||
expectedDecision: authorizer.DecisionNoOpinion,
|
||||
expectedReason: "",
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "user has datasources:explore permission",
|
||||
ctx: identity.WithRequester(context.TODO(), &mockUser{permissions: map[string][]string{accesscontrol.ActionDatasourcesExplore: {}}}),
|
||||
attr: &mockAttributes{resourceRequest: true},
|
||||
expectedDecision: authorizer.DecisionAllow,
|
||||
expectedReason: "",
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "user does not have datasources:explore permission",
|
||||
ctx: identity.WithRequester(context.TODO(), &mockUser{}),
|
||||
attr: &mockAttributes{resourceRequest: true},
|
||||
expectedDecision: authorizer.DecisionDeny,
|
||||
expectedReason: "no permissions",
|
||||
expectedErr: nil,
|
||||
},
|
||||
{
|
||||
name: "user does not have datasources:explore permission",
|
||||
ctx: identity.WithRequester(context.TODO(), &mockUser{permissions: map[string][]string{"foo": {}}}),
|
||||
attr: &mockAttributes{resourceRequest: true},
|
||||
expectedDecision: authorizer.DecisionNoOpinion,
|
||||
expectedReason: "",
|
||||
expectedErr: nil,
|
||||
},
|
||||
}
|
||||
|
||||
for _, tt := range tests {
|
||||
t.Run(tt.name, func(t *testing.T) {
|
||||
auth := GetAuthorizer()
|
||||
decision, reason, err := auth.Authorize(tt.ctx, tt.attr)
|
||||
assert.Equal(t, tt.expectedDecision, decision)
|
||||
assert.Equal(t, tt.expectedReason, reason)
|
||||
assert.Equal(t, tt.expectedErr, err)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
type mockAttributes struct {
|
||||
authorizer.Attributes
|
||||
resourceRequest bool
|
||||
}
|
||||
|
||||
func (m *mockAttributes) IsResourceRequest() bool {
|
||||
return m.resourceRequest
|
||||
}
|
||||
|
||||
// Implement other methods of authorizer.Attributes as needed
|
||||
|
||||
type mockUser struct {
|
||||
identity.Requester
|
||||
permissions map[string][]string
|
||||
}
|
||||
|
||||
func (m *mockUser) GetPermissions() map[string][]string {
|
||||
return m.permissions
|
||||
}
|
||||
|
||||
// Implement other methods of identity.Requester as needed
|
|
@ -18,7 +18,7 @@ func New(cfg app.Config) (app.App, error) {
|
|||
Name: "investigation",
|
||||
KubeConfig: cfg.KubeConfig,
|
||||
InformerConfig: simple.AppInformerConfig{
|
||||
ErrorHandler: func(ctx context.Context, err error) {
|
||||
ErrorHandler: func(_ context.Context, err error) {
|
||||
klog.ErrorS(err, "Informer processing error")
|
||||
},
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "dashboard.grafana.app/v1alpha1",
|
||||
"apiVersion": "dashboard.grafana.app/v1beta1",
|
||||
"metadata": {
|
||||
"name": "sample-dash",
|
||||
"annotations": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"kind": "Dashboard",
|
||||
"apiVersion": "dashboard.grafana.app/v1alpha1",
|
||||
"apiVersion": "dashboard.grafana.app/v1beta1",
|
||||
"metadata": {
|
||||
"name": "dashboard-nested",
|
||||
"annotations": {
|
||||
|
|
|
@ -101,10 +101,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -179,10 +176,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -257,10 +251,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -335,10 +326,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -42,10 +42,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -159,10 +156,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -69,10 +69,7 @@
|
|||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 26,
|
||||
"w": 6,
|
||||
|
@ -56,10 +53,7 @@
|
|||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
|
@ -87,10 +81,7 @@
|
|||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
|
@ -120,10 +111,7 @@
|
|||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 26,
|
||||
"w": 6,
|
||||
|
@ -153,10 +141,7 @@
|
|||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
|
@ -186,10 +171,7 @@
|
|||
"type": "dashlist"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 13,
|
||||
"w": 6,
|
||||
|
|
|
@ -195,10 +195,7 @@
|
|||
"bars": false,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
|
@ -291,10 +288,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
@ -329,10 +323,7 @@
|
|||
"bars": true,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
|
@ -429,10 +420,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
@ -568,10 +556,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
@ -606,10 +591,7 @@
|
|||
"bars": true,
|
||||
"dashLength": 10,
|
||||
"dashes": false,
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"unit": "short"
|
||||
|
@ -704,10 +686,7 @@
|
|||
}
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
@ -739,10 +718,7 @@
|
|||
},
|
||||
{
|
||||
"columns": [],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fontSize": "100%",
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
|
@ -816,10 +792,7 @@
|
|||
"type": "table-old"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 8,
|
||||
|
@ -857,10 +830,7 @@
|
|||
"rgba(237, 129, 40, 0.89)",
|
||||
"#d44a3a"
|
||||
],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"format": "areaF2",
|
||||
"gauge": {
|
||||
"maxValue": 100,
|
||||
|
@ -930,10 +900,7 @@
|
|||
"valueName": "avg"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"mappings": [
|
||||
|
@ -1002,10 +969,7 @@
|
|||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 8,
|
||||
|
@ -1036,10 +1000,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 16,
|
||||
|
@ -1089,10 +1050,7 @@
|
|||
"type": "grafana-piechart-panel"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 8,
|
||||
|
@ -1267,10 +1225,7 @@
|
|||
"valueName": "total"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 10,
|
||||
"w": 8,
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -110,10 +107,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "Should be smaller given the longer value",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -193,10 +187,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -274,10 +265,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -436,10 +424,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -518,10 +503,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -124,10 +121,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -244,10 +238,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -328,10 +319,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -413,10 +401,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -542,10 +527,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -684,10 +666,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -805,10 +784,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -948,10 +924,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1035,10 +1008,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1122,10 +1092,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1209,10 +1176,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -358,10 +358,7 @@
|
|||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -465,10 +462,7 @@
|
|||
"type": "barchart"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -125,10 +122,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -238,10 +232,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -351,10 +342,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -464,10 +452,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -577,10 +562,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -690,10 +672,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -845,10 +824,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1023,10 +999,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1096,10 +1069,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1169,10 +1139,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1242,10 +1209,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1320,10 +1284,7 @@
|
|||
"type": "bargauge"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -177,10 +174,7 @@
|
|||
"type": "candlestick"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -266,10 +260,7 @@
|
|||
"type": "candlestick"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -355,10 +346,7 @@
|
|||
"type": "candlestick"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -2225,10 +2225,7 @@
|
|||
"type": "canvas"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2857,10 +2854,7 @@
|
|||
"type": "canvas"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -50,10 +50,7 @@
|
|||
},
|
||||
"type": "canvas",
|
||||
"title": "Wind Energy",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"pluginVersion": "9.4.0-pre",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -1144,10 +1141,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 6,
|
||||
|
@ -1182,10 +1176,7 @@
|
|||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -3330,10 +3321,7 @@
|
|||
"type": "canvas"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 18,
|
||||
"w": 6,
|
||||
|
@ -3368,10 +3356,7 @@
|
|||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -3608,10 +3593,7 @@
|
|||
"type": "canvas"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 6,
|
||||
|
@ -3633,10 +3615,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -3824,10 +3803,7 @@
|
|||
"type": "canvas"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 15,
|
||||
"w": 6,
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 12,
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 14,
|
||||
"w": 24,
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -92,10 +92,7 @@
|
|||
"csvContent": "lat,lon,alt\n45,0,0\n40,5,5\n35,10,10\n30,15, 15\n25,20,20"
|
||||
}
|
||||
],
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"options": {
|
||||
"view": {
|
||||
"allLayers": true,
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -129,10 +126,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -215,10 +209,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -322,10 +319,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -130,10 +127,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -236,10 +230,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -334,10 +325,7 @@
|
|||
"type": "geomap"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -40,10 +40,7 @@
|
|||
"mode": "opacity"
|
||||
},
|
||||
"dataFormat": "tsbuckets",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 7,
|
||||
|
@ -96,10 +93,7 @@
|
|||
"mode": "spectrum"
|
||||
},
|
||||
"dataFormat": "timeseries",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 9,
|
||||
|
@ -157,10 +151,7 @@
|
|||
"mode": "spectrum"
|
||||
},
|
||||
"dataFormat": "timeseries",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
@ -213,10 +204,7 @@
|
|||
"mode": "opacity"
|
||||
},
|
||||
"dataFormat": "tsbuckets",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 7,
|
||||
|
@ -327,10 +315,7 @@
|
|||
"mode": "spectrum"
|
||||
},
|
||||
"dataFormat": "timeseries",
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 11,
|
||||
"w": 8,
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -168,10 +165,7 @@
|
|||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -251,10 +245,7 @@
|
|||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -334,10 +325,7 @@
|
|||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -429,10 +417,7 @@
|
|||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -516,10 +501,7 @@
|
|||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -601,10 +583,7 @@
|
|||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -686,10 +665,7 @@
|
|||
"type": "histogram"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -22,10 +22,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -182,10 +182,7 @@
|
|||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -332,10 +329,7 @@
|
|||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -472,10 +466,7 @@
|
|||
"type": "table"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
|
@ -64,10 +61,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
|
@ -99,10 +93,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
|
@ -134,10 +125,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 9,
|
||||
"w": 12,
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -131,10 +128,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -237,10 +231,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "Should show gaps",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -343,10 +334,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -211,10 +208,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -288,10 +282,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -29,10 +29,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -96,10 +93,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -171,10 +165,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -246,10 +237,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -345,10 +333,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -453,10 +438,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -574,10 +556,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -641,10 +620,7 @@
|
|||
"type": "state-timeline"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -803,10 +803,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"gridPos": {
|
||||
"h": 8,
|
||||
"w": 5,
|
||||
|
@ -828,10 +825,7 @@
|
|||
"type": "text"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -1385,10 +1385,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1476,10 +1473,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1571,10 +1565,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1664,10 +1655,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1757,10 +1745,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1850,10 +1835,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1943,10 +1925,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2036,10 +2015,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2237,10 +2213,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2332,10 +2305,7 @@
|
|||
"type": "trend"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
|
@ -28,10 +28,7 @@
|
|||
"liveNow": false,
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -308,10 +305,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -612,10 +606,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -942,10 +933,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -1498,10 +1486,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -1848,10 +1833,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -2065,10 +2047,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"description": "",
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
|
@ -2177,10 +2156,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2498,10 +2474,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2634,10 +2607,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2770,10 +2740,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -2906,10 +2873,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -3145,10 +3109,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
@ -3384,10 +3345,7 @@
|
|||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "testdata",
|
||||
"uid": "PD8C576611E62080A"
|
||||
},
|
||||
"datasource": { "type": "testdata" },
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"color": {
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue