Skip to content

Commit

Permalink
Revert prettier formatting (#450)
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanbedi authored Oct 6, 2023
1 parent 8a5f6df commit 635257f
Show file tree
Hide file tree
Showing 93 changed files with 383 additions and 372 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
contact_links:
- name: Usage question or support
url: https://community.grafana.com/c/plugin-development/30
about: Join our community
about: Join our community
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ body:
label: Are you interested in contributing the solution?
options:
- label: 'Yes'
- label: 'No'
- label: 'No'
26 changes: 13 additions & 13 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
version: 2
updates:
# Check for updates to GitHub Actions every month
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'monthly'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
labels:
- 'github_actions'
- 'dependencies'
- 'no stalebot'
- "github_actions"
- "dependencies"
- "no stalebot"
# Check for updates to npm dependencies every month
- package-ecosystem: 'npm'
directory: '/'
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: 'monthly'
interval: "monthly"
# Specify labels for npm pull requests
labels:
- 'javascript'
- 'dependencies'
- 'no stalebot'
- "javascript"
- "dependencies"
- "no stalebot"
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.PLUGINS_PLATFORM_BOT_APP_ID }}
private_key: ${{ secrets.PLUGINS_PLATFORM_BOT_APP_PEM }}
private_key: ${{ secrets.PLUGINS_PLATFORM_BOT_APP_PEM }}

- uses: actions/checkout@v4
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-to-developer-portal-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Which branch to use?'
default: 'main'
description: "Which branch to use?"
default: "main"
jobs:
deploy:
name: Deploy docs to Developer Portal Bucket
Expand All @@ -25,10 +25,10 @@ jobs:

- name: Install dependencies
run: npm ci

- name: Build documentation website
run: npm run docs:build -- --config docusaurus.config.dev.js

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/deploy-to-developer-portal-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

- name: Install dependencies
run: npm ci

#mac: sed -i '' 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx
#mac: sed -i '' 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx
#mac: grep -rl "](/docs/" docusaurus/docs | xargs sed -i '' 's/](\/docs\//](\//g'
#linux: sed -i 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx
#linux: sed -i 's/title: Get started/title: Get started\nslug:\ \//g' ./docusaurus/docs/get-started/get-started.mdx
#linux: grep -rl "](/docs/" docusaurus/docs | xargs sed -i 's/](\/docs\//](\//g'
# - name: Make docs the homepage of this subsite
# run: |
Expand All @@ -35,7 +35,7 @@ jobs:
# grep -rl "](/docs/" docusaurus/docs | xargs sed -i 's/](\/docs\//](\//g'
- name: Build documentation website
run: npm run docs:build

- id: 'auth'
uses: 'google-github-actions/auth@v1'
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ jobs:
close-pr-message: >
This pull request has been automatically closed because it has not had
activity in the last 2 weeks. Please feel free to give a status update now, ping for review, or re-open when it's ready.
Thank you for your contributions!
Thank you for your contributions!
2 changes: 1 addition & 1 deletion .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ jobs:
cache: 'npm'

- name: Install dependencies
run: npm ci
run: npm ci
- name: Build documentation website (Dev Portal)
run: npm run docs:build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ yarn-error.log*
.cache-loader

# Allow vscode config inside templates
!packages/create-plugin/templates/*/.vscode
!packages/create-plugin/templates/*/.vscode
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
"singleQuote": true,
"useTabs": false,
"tabWidth": 2
}
}
28 changes: 14 additions & 14 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
Examples of behavior that contributes to creating a positive environment
include:

- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

- The use of sexualized language or imagery and unwelcome sexual attention or
advances
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Expand Down Expand Up @@ -73,4 +73,4 @@ available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.ht
[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
https://www.contributor-covenant.org/faq
10 changes: 5 additions & 5 deletions docusaurus/docs/create-a-plugin/develop-a-plugin/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"position": 1,
"label": "Develop a plugin",
"collapsible": true,
"collapsed": true
}
"position": 1,
"label": "Develop a plugin",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords:
- plugins
- plugin
- frontend
- CLI
- CLI
sidebar_position: 1
---

Expand Down
10 changes: 5 additions & 5 deletions docusaurus/docs/create-a-plugin/extend-a-plugin/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"position": 2,
"label": "Extend a plugin",
"collapsible": true,
"collapsed": true
}
"position": 2,
"label": "Extend a plugin",
"collapsible": true,
"collapsed": true
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ Configure your data source plugin to authenticate against a third-party API in o

## Encrypt data source configuration

Data source plugins have two ways of storing custom configuration: `jsonData` and `secureJsonData`.
Data source plugins have two ways of storing custom configuration: `jsonData` and `secureJsonData`.

Users with the Viewer role can access data source configuration such as the contents of `jsonData` in cleartext. If you've enabled anonymous access, anyone who can access Grafana in their browser can see the contents of `jsonData`.

Users of [Grafana Enterprise](https://grafana.com/products/enterprise/grafana/) can restrict access to data sources to specific users and teams. For more information, refer to [Data source permissions](https://grafana.com/docs/grafana/latest/enterprise/datasource_permissions). You can see the settings that the current user has access to by entering `window.grafanaBootData` in the developer console of your browser.
Users of [Grafana Enterprise](https://grafana.com/products/enterprise/grafana/) can restrict access to data sources to specific users and teams. For more information, refer to [Data source permissions](https://grafana.com/docs/grafana/latest/enterprise/datasource_permissions). You can see the settings that the current user has access to by entering `window.grafanaBootData` in the developer console of your browser.

:::caution

Expand Down Expand Up @@ -148,11 +148,11 @@ To forward requests through the Grafana proxy, you need to configure one or more
]
```

:::note
:::note

You need to restart the Grafana server every time you make a change to your `plugin.json` file.
You need to restart the Grafana server every time you make a change to your `plugin.json` file.

:::
:::

1. In the `DataSource`, extract the proxy URL from `instanceSettings` to a class property called `url`:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ tracing = true

Grafana supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing. If Grafana is configured to use a deprecated tracing system (Jaeger or OpenTracing), then tracing is disabled in the plugin provided by the SDK and configured when calling `datasource.Manage | app.Manage`.

OpenTelemetry must be enabled and configured for the Grafana instance. Refer to the [Grafana configuration documentation](https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana#tracingopentelemetry) for more information.
OpenTelemetry must be enabled and configured for the Grafana instance. Refer to the [Grafana configuration documentation](
https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana#tracingopentelemetry) for more information.

Refer to the [OpenTelemetry Go SDK](https://pkg.go.dev/go.opentelemetry.io/otel) for in-depth documentation about all the features provided by OpenTelemetry.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ keywords:
- plugins
- plugin
- advanced
- apps
- app plugins
- apps
- app plugins
- nested
---

Expand Down
14 changes: 7 additions & 7 deletions docusaurus/docs/get-started/folder-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,17 @@ myorg-myplugin-datasource/

You must have files with these exact filenames:

| Filename | Description |
| ------------------- | -------------------------------------------------------------------------------------------------------- |
| Filename | Description |
| ------------------- | ------------------------------------------------------------------------------------ |
| `./go.mod` | Go modules dependencies. Refer to [Golang documentation](https://golang.org/cmd/go/#hdr-The_go_mod_file) |
| `./src/plugin.json` | A JSON file describing the plugin. |
| `./src/module.ts` | The entry point of the frontend plugin. |
| `./pkg/main.go` | The entry point of the backend plugin. |
| `./src/plugin.json` | A JSON file describing the plugin. |
| `./src/module.ts` | The entry point of the frontend plugin. |
| `./pkg/main.go` | The entry point of the backend plugin. |

## Optional files

These files in your project are optional:

| Filename | Description |
| --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Filename | Description |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `./Magefile.go` | We strongly recommend using mage build files so that you can use the build targets provided by the backend plugin SDK. |
37 changes: 18 additions & 19 deletions docusaurus/docs/get-started/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,31 @@ To scaffold your plugin, follow these steps:

1. Run the following command:

{' '}
<CodeSnippets
snippets={[
{ component: ScaffoldNPM, label: 'npm' },
{ component: ScaffoldPNPM, label: 'pnpm' },
{ component: ScaffoldYarn, label: 'yarn' },
]}
groupId="package-manager"
queryString="current-package-manager"
/>
<CodeSnippets
snippets={[
{ component: ScaffoldNPM, label: 'npm' },
{ component: ScaffoldPNPM, label: 'pnpm' },
{ component: ScaffoldYarn, label: 'yarn' },
]}
groupId="package-manager"
queryString="current-package-manager"
/>

1. When prompted, enter answers to the given questions. For example:

```
? What is going to be the name of your plugin?: mongodb
? What is the organization name of your plugin?: grafana
? What type of plugin would you like?: datasource
```
```
? What is going to be the name of your plugin?: mongodb
? What is the organization name of your plugin?: grafana
? What type of plugin would you like?: datasource
```

If you enter those values for name, organization, and plugin type, then the directory and plugin ID will be named `grafana-mongodb-datasource`.
If you enter those values for name, organization, and plugin type, then the directory and plugin ID will be named `grafana-mongodb-datasource`.

:::note
:::note

If you have previously built a plugin with `@grafana/toolkit`, you can use our plugin tools to simplify migration. For more information, refer to [Migrate from toolkit](/migration-guides/migrate-from-toolkit.mdx).
If you have previously built a plugin with `@grafana/toolkit`, you can use our plugin tools to simplify migration. For more information, refer to [Migrate from toolkit](/migration-guides/migrate-from-toolkit.mdx).

:::
:::

### Before you begin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: Set up your development environment with Docker for Grafana plugin
- plugin
- create-plugin
- Docker
- setup
- setup
sidebar_position: 3
---

Expand Down
10 changes: 5 additions & 5 deletions docusaurus/docs/introduction/_category_.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"position": 1,
"label": "Introduction",
"collapsible": true,
"collapsed": true
}
"position": 1,
"label": "Introduction",
"collapsible": true,
"collapsed": true
}
4 changes: 2 additions & 2 deletions docusaurus/docs/introduction/backend.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ The Grafana HTTP API offers an endpoint (`/api/plugins/<plugin id>/metrics`) tha

#### Streaming

The streaming capability allows a backend plugin to handle data source queries that are streaming.
The streaming capability allows a backend plugin to handle data source queries that are streaming.

For more information, refer to the [Datasource Steaming Backend](https://github.com/grafana/grafana-plugin-examples/tree/main/examples/datasource-streaming-backend-websocket) example.
For more information, refer to the [Datasource Steaming Backend](https://github.com/grafana/grafana-plugin-examples/tree/main/examples/datasource-streaming-backend-websocket) example.
2 changes: 1 addition & 1 deletion docusaurus/docs/introduction/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ keywords:

import DocCardList from '@theme/DocCardList';

<DocCardList />
<DocCardList />
2 changes: 1 addition & 1 deletion docusaurus/docs/introduction/plugin-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ From time to time, Grafana will offer additions of services, messages, and field

Grafana will release new major versions of the plugin protocol alongside new major Grafana releases. When this happens, we'll support both the old and the new plugin protocol for some time to make sure existing backend plugins continue to work.

The plugin protocol attempts to follow Grafana's versioning. However, that doesn't mean we will automatically create a new major version of the plugin protocol when a new major release of Grafana is released.
The plugin protocol attempts to follow Grafana's versioning. However, that doesn't mean we will automatically create a new major version of the plugin protocol when a new major release of Grafana is released.
2 changes: 1 addition & 1 deletion docusaurus/docs/metadata.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The `plugin.json` file is required for all plugins. When Grafana starts, it scan
| `metrics` | boolean | No | For data source plugins, if the plugin supports metric queries. Used to enable the plugin in the panel editor. |
| `preload` | boolean | No | Initialize plugin on startup. By default, the plugin initializes on first use. Useful for app plugins that should load without user interaction. |
| `queryOptions` | [object](#queryoptions) | No | For data source plugins. There is a query options section in the plugin's query editor and these options can be turned on if needed. |
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](../docs/create-a-plugin/extend-a-plugin/add-authentication-for-data-source-plugins.md). |
| `routes` | [object](#routes)[] | No | For data source plugins. Proxy routes used for plugin authentication and adding headers to HTTP requests made by the plugin. For more information, refer to [Authentication for data source plugins](../docs/create-a-plugin/extend-a-plugin/add-authentication-for-data-source-plugins.md). |
| `skipDataQuery` | boolean | No | For panel plugins. Hides the query editor. |
| `state` | string | No | Marks a plugin as a pre-release. Possible values are: `alpha`, `beta`. |
| `streaming` | boolean | No | For data source plugins, if the plugin supports streaming. Used in Explore to start live streaming. |
Expand Down
Loading

0 comments on commit 635257f

Please sign in to comment.