cleanup shortcodes, asset paths (#34826)

This commit is contained in:
Robby Milo
2021-05-28 11:27:40 +02:00
committed by GitHub
parent 179eb0898e
commit 327fa124a4
134 changed files with 566 additions and 566 deletions

View File

@@ -31,7 +31,7 @@ throw new Error('An error occurred');
Grafana displays the error message in the top-left corner of the panel.
{{< docs-imagebox img="/img/docs/panel_error.png" class="docs-image--no-shadow" max-width="850px" >}}
{{< figure src="/static/img/docs/panel_error.png" class="docs-image--no-shadow" max-width="850px" >}}
Avoid displaying overly-technical error messages to the user. If you want to let technical users report an error, consider logging it instead.

View File

@@ -10,7 +10,7 @@ App plugins are Grafana plugins that can bundle data source and panel plugins wi
Data source and panel plugins will show up like normal plugins. The app pages will be available in the main menu.
{{< imgbox img="/img/docs/v3/app-in-main-menu.png" caption="App in Main Menu" >}}
{{< figure class="float-right" src="/static/img/docs/v3/app-in-main-menu.png" caption="App in Main Menu" >}}
## Enabling app plugins
@@ -45,7 +45,7 @@ ConfigCtrl.templateUrl = 'components/config/config.html';
If possible, a link to a dashboard or custom page should be shown after enabling the app to guide the user to the appropriate place.
{{< imgbox img="/img/docs/app_plugin_after_enable.png" caption="After enabling" >}}
{{< figure class="float-right" src="/static/img/docs/app_plugin_after_enable.png" caption="After enabling" >}}
### Develop your own App

View File

@@ -96,7 +96,7 @@ Then each pair, label and field is wrapped in a div with a gf-form class.
Note that there are some Angular attributes here. *ng-model* will update the panel data. *ng-change* will render the panel when you change the value. This change will occur on the onblur event due to the *ng-model-onblur* attribute. This means you can see the effect of your changes on the panel while editing.
{{< imgbox img="/assets/img/blog/clock-panel-editor.png" caption="Panel Editor" >}}
{{< figure class="float-right" src="/assets/img/blog/clock-panel-editor.png" caption="Panel Editor" >}}
On the editor tab we use a drop down for 12/24 hour clock, an input field for font size and a color picker for the background color.

View File

@@ -5,11 +5,11 @@ aliases = ["/docs/grafana/latest/plugins/developing/snapshot-mode/"]
# Legacy snapshot mode
{{< imgbox img="/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
{{< figure class="float-right" src="/static/img/docs/Grafana-snapshot-example.png" caption="A dashboard using snapshot data and not live data." >}}
Grafana has this great feature where you can [save a snapshot of your dashboard]({{< relref "../../../dashboards/json-model.md" >}}). Instead of sending a screenshot of a dashboard to someone, you can send them a working, interactive Grafana dashboard with the snapshot data embedded inside it. The snapshot can be saved on your Grafana server and is available to all your co-workers. Raintank also hosts a [snapshot server](http://snapshot.raintank.io/) if you want to send the snapshot to someone who does not have access to your Grafana server.
{{< imgbox img="/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
{{< figure class="float-right" src="/static/img/docs/animated_gifs/snapshots.gif" caption="Selecting a snapshot" >}}
This all works because Grafana saves a snapshot of the current data in the dashboard json instead of fetching the data from a data source. However, if you are building a custom panel plugin then this will not work straight out of the box. You will need to make some small (and easy!) changes first.
@@ -41,7 +41,7 @@ This will cover most use cases for snapshot support. Sometimes you will want to
Data that is not time series data from a Grafana data source is not saved automatically by Grafana. Saving custom data for snapshot mode has to be done manually.
{{< imgbox img="/img/docs/Grafana-save-snapshot.png" caption="Save snapshot" >}}
{{< figure class="float-right" src="/static/img/docs/Grafana-save-snapshot.png" caption="Save snapshot" >}}
Grafana gives us a chance to save data to the dashboard json when it is creating a snapshot. In the 'data-received' event handler, you can check the snapshot flag on the dashboard object. If this is true, then Grafana is creating a snapshot and you can manually save custom data to the panel json. In the example, a new field called snapshotLocationData in the panel json is initialized with a snapshot of the custom data.