Skip to content

Commit f22be91

Browse files
committed
Release 0.0.6
1 parent 5ef0809 commit f22be91

14 files changed

+394
-2
lines changed

dist/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2018 Ryan McKinley
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

dist/README.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
## AJAX Panel for Grafana
2+
3+
[![CircleCI](https://circleci.com/gh/ryantxu/ajax-panel/tree/master.svg?style=svg)](https://circleci.com/gh/ryantxu/ajax-panel/tree/master)
4+
[![dependencies Status](https://david-dm.org/ryantxu/ajax-panel/status.svg)](https://david-dm.org/ryantxu/ajax-panel)
5+
[![devDependencies Status](https://david-dm.org/ryantxu/ajax-panel/dev-status.svg)](https://david-dm.org/ryantxu/ajax-panel?type=dev)
6+
7+
The AJAX Panel is a general way to load external content into a grafana dashboard.
8+
9+
### Options
10+
11+
* **Method**:
12+
13+
GET or POST or iframe
14+
15+
* **URL**:
16+
17+
The URL to request
18+
19+
* **Parameters**:
20+
21+
The parameters that will be passed in the request. This is a javascript object with access to the variables: - `ctrl` The control object.
22+
23+
### Screenshots
24+
25+
![Screenshot](https://raw.githubusercontent.com/ryantxu/ajax-panel/master/src/img/screenshot.png)
26+
![Options](https://raw.githubusercontent.com/ryantxu/ajax-panel/master/src/img/screenshot-ajax-options.png)
27+
![Examples](https://raw.githubusercontent.com/ryantxu/ajax-panel/master/src/img/screenshot-examples.png)
28+
29+
#### Changelog
30+
31+
##### v0.0.6 (not released yet)
32+
33+
* Support requests to /api (grafana internal API)
34+
* Adding circleci build
35+
* removing dist from master build (only add it on release branches)
36+
* Support empty text response (#9)
37+
* webpack build
38+
* Show query results
39+
* tested with grafana 6
40+
41+
42+
##### v0.0.5
43+
44+
* Support angular templates using AJAX response
45+
* Options to display as: HTML, Text, JSON, or preformatted text
46+
* Fixed display issue with 5.1
47+
* Support direct link rendered image
48+
* Show possible variables in editor
49+
50+
##### v0.0.4
51+
52+
* Support template variables in parameters (@linar-jether)
53+
* Improved error handling
54+
* Move ajax requests to 'issueQueries' block rather than refresh
55+
* Show loading spinner
56+
* Convert to TypeScript
57+
* Use datasources for complex authentication
58+
* Support loading images
59+
* Support header configuration
60+
* Support showing time info
61+
* Include various sample configurations
62+
63+
##### v0.0.3
64+
65+
* Support template variables in url (@linar-jether)
66+
* Adding iframe method (@linar-jether)
67+
68+
##### v0.0.2
69+
70+
* Quick and Dirty, but it works!

dist/img/ajax_panel_logo.svg

Lines changed: 1 addition & 0 deletions
Loading
113 KB
Loading

dist/img/screenshot-examples.png

170 KB
Loading

dist/img/screenshot.png

669 KB
Loading

dist/module.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/module.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/partials/editor.display.html

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<div class="editor-row">
2+
<div class="section gf-form-group">
3+
<h5 class="section-heading">Display</h5>
4+
<div class="gf-form">
5+
<span class="gf-form-label width-5">Mode</span>
6+
7+
8+
<div ng-if="ctrl.isIframe">
9+
<select class="gf-form-input" value="iframe">
10+
<option value="iframe">iframe</option>
11+
</select>
12+
</div>
13+
14+
<div ng-if="!ctrl.isIframe" class="gf-form-select-wrapper width-12">
15+
<select class="gf-form-input" ng-model="ctrl.panel.mode" ng-change="ctrl.updateTemplate()">
16+
<option value="html">Direct HTML</option>
17+
<option value="text">Escaped Text</option>
18+
<option value="pre">Preformatted Text</option>
19+
<option value="json">JSON Tree</option>
20+
<option value="template">Angular Template</option>
21+
</select>
22+
</div>
23+
</div>
24+
</div>
25+
26+
<div class="section gf-form-group">
27+
<h5 class="section-heading">Time</h5>
28+
<gf-form-switch class="gf-form" label="Show Time" label-class="width-7"
29+
checked="ctrl.panel.showTime"
30+
on-change="ctrl.onConfigChanged()"></gf-form-switch>
31+
<div ng-if="ctrl.panel.showTime">
32+
<div class="gf-form">
33+
<span class="gf-form-label width-7">Prefix</span>
34+
<input type="text" class="gf-form-input width-10" placeholder="prefix"
35+
ng-model="ctrl.panel.showTimePrefix" ng-change="ctrl.onConfigChanged()" ng-model-onblur />
36+
</div>
37+
<div class="gf-form">
38+
<span class="gf-form-label width-7">Value</span>
39+
<div class="gf-form-select-wrapper width-10">
40+
<select class="gf-form-input" ng-model="ctrl.panel.showTimeValue" ng-change="ctrl.onConfigChanged()">
41+
<option value="request">Request Time</option>
42+
<option value="recieve">Recieve Time</option>
43+
<!--
44+
<option value="header-Date">Date Header</option>
45+
<option value="header-Last-Modified">Last-Modified</option>
46+
<option value="header-Expires">Expires</option>
47+
-->
48+
<option value="">None</option>
49+
</select>
50+
</div>
51+
</div>
52+
<div class="gf-form" ng-if="ctrl.panel.showTimeValue">
53+
<span class="gf-form-label width-7">Format</span>
54+
<input type="text" class="gf-form-input width-10" placeholder="MomentJS" ng-model="ctrl.panel.showTimeFormat" ng-change="ctrl.onConfigChanged()" ng-model-onblur />
55+
<span bs-tooltip="'See documentation at:<br/>http://momentjs.com'">&nbsp;<a href="https://momentjs.com/docs/#/displaying/" target="_blank"><i class="fa fa-question-circle"></i></a></span>
56+
</div>
57+
</div>
58+
</div>
59+
</div>
60+
61+
<div class="editor-row" ng-if="ctrl.panel.mode === 'template'">
62+
<h5 class="section-heading">Angular Template</h5>
63+
64+
<div class="gf-form">
65+
<div class="gf-form gf-form--grow">
66+
<code-editor
67+
content="ctrl.panel.template"
68+
on-change="ctrl.updateTemplate()"
69+
data-mode="html"
70+
data-behaviours-enabled="true"
71+
data-snippets-enabled="false"
72+
data-max-lines="20"
73+
code-editor-focus="true" >
74+
</code-editor>
75+
</div>
76+
</div>
77+
<span>
78+
A dynamic angular template with the AJAX response bound to the variable: <code ng-non-bindable>{{ response }}</code>
79+
</span>
80+
</div>

dist/partials/editor.examples.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
3+
4+
<div class="dashlist">
5+
<div class="dashlist-section">
6+
<div class="dashlist-item" ng-repeat="example in ctrl.getStaticExamples()">
7+
<a class="dashlist-link"
8+
ng-click="ctrl.loadExample(example, $event);" href="#">
9+
<span class="dashlist-title">
10+
{{example.name}}
11+
</span>
12+
<span class="pluginlist-version">
13+
{{example.text}}
14+
</span>
15+
</a>
16+
</div>
17+
</div>
18+
19+
<div class="small-link">
20+
More examples? <a href="https://github.com/ryantxu/ajax-panel/fork">Contributions Welcome!</a>
21+
</div>

0 commit comments

Comments
 (0)