added bundled dashboards

This commit is contained in:
Torkel Ödegaard
2017-11-30 16:51:06 +01:00
parent b2add1977a
commit b1a2344be1
4 changed files with 86 additions and 91 deletions

View File

@@ -13,12 +13,6 @@
{{dash.title}} {{dash.title}}
</span> </span>
</td> </td>
<td>
<span>
Revision: {{dash.revision}}
<span ng-if="dash.imported" class="small">(Imported: {{dash.importedRevision}})</span>
<span>
</td>
<td style="text-align: right"> <td style="text-align: right">
<button class="btn btn-secondary btn-small" ng-click="ctrl.import(dash, false)" ng-show="!dash.imported"> <button class="btn btn-secondary btn-small" ng-click="ctrl.import(dash, false)" ng-show="!dash.imported">
Import Import

View File

@@ -30,77 +30,79 @@
<div class="page-container page-body"> <div class="page-container page-body">
<h3 class="page-sub-heading" ng-hide="ctrl.isNew">Edit Data Source</h3>
<h3 class="page-sub-heading" ng-show="ctrl.isNew">New Data Source</h3>
<div ng-if="ctrl.current.readOnly" class="page-action-bar"> <div ng-if="ctrl.current.readOnly" class="page-action-bar">
<div class="grafana-info-box span8"> <div class="grafana-info-box span8">
Disclaimer. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource. Disclaimer. This datasource was added by config and cannot be modified using the UI. Please contact your server admin to update this datasource.
</div> </div>
</div> </div>
<div ng-if="ctrl.tabIndex === 0"> <h3 class="page-sub-heading" ng-hide="ctrl.isNew">Edit Data Source</h3>
<form name="ctrl.editForm" ng-if="ctrl.current"> <h3 class="page-sub-heading" ng-show="ctrl.isNew">New Data Source</h3>
<div class="gf-form-group">
<div class="gf-form-inline">
<div class="gf-form max-width-30">
<span class="gf-form-label width-7">Name</span>
<input class="gf-form-input max-width-23" type="text" ng-model="ctrl.current.name" placeholder="name" required>
<info-popover offset="0px -135px" mode="right-absolute">
The name is used when you select the data source in panels.
The <em>Default</em> data source is preselected in new
panels.
</info-popover>
</div>
<gf-form-switch class="gf-form" label="Default" checked="ctrl.current.isDefault" switch-class="max-width-6"></gf-form-switch>
</div>
<div class="gf-form"> <form name="ctrl.editForm" ng-if="ctrl.current">
<span class="gf-form-label width-7">Type</span> <div class="gf-form-group">
<div class="gf-form-select-wrapper max-width-23"> <div class="gf-form-inline">
<select class="gf-form-input" ng-model="ctrl.current.type" ng-options="v.id as v.name for v in ctrl.types" ng-change="ctrl.userChangedType()"></select> <div class="gf-form max-width-30">
</div> <span class="gf-form-label width-7">Name</span>
</div> <input class="gf-form-input max-width-23" type="text" ng-model="ctrl.current.name" placeholder="name" required>
</div> <info-popover offset="0px -135px" mode="right-absolute">
The name is used when you select the data source in panels.
The <em>Default</em> data source is preselected in new
panels.
</info-popover>
</div>
<gf-form-switch class="gf-form" label="Default" checked="ctrl.current.isDefault" switch-class="max-width-6"></gf-form-switch>
</div>
<div class="alert alert-info gf-form-group" ng-if="ctrl.datasourceMeta.state === 'alpha'"> <div class="gf-form">
This plugin is marked as being in alpha state, which means it is in early development phase and <span class="gf-form-label width-7">Type</span>
updates will include breaking changes. <div class="gf-form-select-wrapper max-width-23">
</div> <select class="gf-form-input" ng-model="ctrl.current.type" ng-options="v.id as v.name for v in ctrl.types" ng-change="ctrl.userChangedType()"></select>
</div>
</div>
</div>
<rebuild-on-change property="ctrl.datasourceMeta.id"> <div class="alert alert-info gf-form-group" ng-if="ctrl.datasourceMeta.state === 'alpha'">
<plugin-component type="datasource-config-ctrl"> This plugin is marked as being in alpha state, which means it is in early development phase and
</plugin-component> updates will include breaking changes.
</rebuild-on-change> </div>
<div ng-if="ctrl.testing" class="gf-form-group section"> <rebuild-on-change property="ctrl.datasourceMeta.id">
<h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5> <plugin-component type="datasource-config-ctrl">
<div class="alert-{{ctrl.testing.status}} alert" ng-show="ctrl.testing.done"> </plugin-component>
<div class="alert-icon"> </rebuild-on-change>
<i class="fa fa-exclamation-triangle" ng-show="ctrl.testing.status === 'error'"></i>
<i class="fa fa-check" ng-show="ctrl.testing.status !== 'error'"></i>
</div>
<div class="alert-body">
<div class="alert-title">{{ctrl.testing.message}}</div>
</div>
</div>
</div>
<div class="gf-form-button-row"> <div ng-if="ctrl.hasDashboards">
<button type="submit" class="btn btn-success" ng-disabled="ctrl.current.readOnly" ng-click="ctrl.saveChanges()">Save</button> <h3 class="section-heading">Bundled Plugin Dashboards</h3>
<button type="submit" class="btn btn-danger" ng-disabled="ctrl.current.readOnly" ng-show="!ctrl.isNew" ng-click="ctrl.delete()"> <div class="section">
Delete <dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list>
</button> </div>
<a class="btn btn-link" href="datasources">Cancel</a> </div>
</div>
<br /> <div ng-if="ctrl.testing" class="gf-form-group section">
<br /> <h5 ng-show="!ctrl.testing.done">Testing.... <i class="fa fa-spiner fa-spin"></i></h5>
<br /> <div class="alert-{{ctrl.testing.status}} alert" ng-show="ctrl.testing.done">
<div class="alert-icon">
<i class="fa fa-exclamation-triangle" ng-show="ctrl.testing.status === 'error'"></i>
<i class="fa fa-check" ng-show="ctrl.testing.status !== 'error'"></i>
</div>
<div class="alert-body">
<div class="alert-title">{{ctrl.testing.message}}</div>
</div>
</div>
</div>
</form> <div class="gf-form-button-row">
</div> <button type="submit" class="btn btn-success" ng-disabled="ctrl.current.readOnly" ng-click="ctrl.saveChanges()">Save</button>
<div ng-if="ctrl.tabIndex === 1"> <button type="submit" class="btn btn-danger" ng-disabled="ctrl.current.readOnly" ng-show="!ctrl.isNew" ng-click="ctrl.delete()">
<dashboard-import-list plugin="ctrl.datasourceMeta" datasource="ctrl.current"></dashboard-import-list> Delete
</div> </button>
<a class="btn btn-link" href="datasources">Cancel</a>
</div>
<br />
<br />
<br />
</form>
</div> </div>

View File

@@ -39,38 +39,37 @@
</div> </div>
<h3 class="section-heading">Auth</h3> <h3 class="section-heading">Auth</h3>
<div class="gf-form-group"> <div class="gf-form-group">
<div class="gf-form-inline">
<gf-form-switch class="gf-form" label="Basic Auth" checked="current.basicAuth" label-class="width-8" switch-class="max-width-6"></gf-form-switch>
<gf-form-switch class="gf-form" label="With Credentials" tooltip="Whether credentials such as cookies or auth headers should be sent with cross-site requests." checked="current.withCredentials" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
</div>
<div class="gf-form-inline">
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="TLS Client Auth" label-class="width-8" checked="current.jsonData.tlsAuth" switch-class="max-width-6"></gf-form-switch>
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="With CA Cert" tooltip="Needed for verifing self-signed TLS Certs" checked="current.jsonData.tlsAuthWithCACert" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
</div>
</div>
<div class="gf-form-inline"> <div class="gf-form-inline">
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="Skip TLS Verification (Insecure)" label-class="width-16" checked="current.jsonData.tlsSkipVerify" switch-class="max-width-6"></gf-form-switch> <gf-form-switch class="gf-form" label="Basic Auth" checked="current.basicAuth" label-class="width-8" switch-class="max-width-6"></gf-form-switch>
<gf-form-switch class="gf-form" label="With Credentials" tooltip="Whether credentials such as cookies or auth headers should be sent with cross-site requests." checked="current.withCredentials" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
</div> </div>
<div class="gf-form-inline">
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="TLS Client Auth" label-class="width-8" checked="current.jsonData.tlsAuth" switch-class="max-width-6"></gf-form-switch>
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="With CA Cert" tooltip="Needed for verifing self-signed TLS Certs" checked="current.jsonData.tlsAuthWithCACert" label-class="width-11" switch-class="max-width-6"></gf-form-switch>
</div>
</div>
<div class="gf-form-inline">
<gf-form-switch class="gf-form" ng-if="current.access=='proxy'" label="Skip TLS Verification (Insecure)" label-class="width-16" checked="current.jsonData.tlsSkipVerify" switch-class="max-width-6"></gf-form-switch>
</div> </div>
</div> </div>
<div class="gf-form-group" ng-if="current.basicAuth"> <div class="gf-form-group" ng-if="current.basicAuth">
<h6>Basic Auth Details</h6> <h6>Basic Auth Details</h6>
<div class="gf-form" ng-if="current.basicAuth"> <div class="gf-form" ng-if="current.basicAuth">
<span class="gf-form-label width-7"> <span class="gf-form-label width-7">
User User
</span> </span>
<input class="gf-form-input max-width-21" type="text" ng-model='current.basicAuthUser' placeholder="user" required></input> <input class="gf-form-input max-width-21" type="text" ng-model='current.basicAuthUser' placeholder="user" required></input>
</div> </div>
<div class="gf-form"> <div class="gf-form">
<span class="gf-form-label width-7"> <span class="gf-form-label width-7">
Password Password
</span> </span>
<input class="gf-form-input max-width-21" type="password" ng-model='current.basicAuthPassword' placeholder="password" required></input> <input class="gf-form-input max-width-21" type="password" ng-model='current.basicAuthPassword' placeholder="password" required></input>
</div> </div>
</div> </div>
<div class="gf-form-group" ng-if="(current.jsonData.tlsAuth || current.jsonData.tlsAuthWithCACert) && current.access=='proxy'"> <div class="gf-form-group" ng-if="(current.jsonData.tlsAuth || current.jsonData.tlsAuthWithCACert) && current.access=='proxy'">

View File

@@ -3,7 +3,7 @@
suggest-url="http://localhost:8080"> suggest-url="http://localhost:8080">
</datasource-http-settings> </datasource-http-settings>
<h3 class="page-heading">Graphite details</h3> <h3 class="section-heading">Graphite details</h3>
<div class="gf-form-group"> <div class="gf-form-group">
<div class="gf-form"> <div class="gf-form">