Commit fc5e1d97 by bergquist

ux(dashboard_links): start migration to gf-form

parent 85041d29
<div class="editor-row"> <div class="editor-row">
<h5>Links and Dash Navigation</h5> <h5 class="page-heading">Links and Dash Navigation</h5>
<div ng-repeat="link in dashboard.links" style="margin-top: 10px;"> <div ng-repeat="link in dashboard.links">
<div class="tight-form"> <div class="gf-form-group" style="/*background: #292929; border-bottom: 2px solid #1f1d1d; padding: 10px; margin-bottom: 5px;*/">
<ul class="tight-form-list pull-right"> <div class="gf-form-inline pull-right">
<li class="tight-form-item"> <div class="gf-form-buttons-row">
<i ng-click="moveLink($index, -1)" ng-hide="$first" class="pointer fa fa-arrow-up"></i> <button class="btn btn-inverse btn-mini" ng-hide="$first"><i ng-click="moveLink($index, -1)" class="fa fa-arrow-up"></i></button>
<i ng-click="moveLink($index, 1)" ng-hide="$last" class="pointer fa fa-fw fa-arrow-down"></i> <button class="btn btn-inverse btn-mini" ng-hide="$last"><i ng-click="moveLink($index, 1)" class="fa fa-arrow-down"></i></button>
</li> <button class="btn btn-inverse btn-mini"><i class="fa fa-remove" ng-click="deleteLink($index)"></i></button>
<li class="tight-form-item last"> </div>
<i class="fa fa-remove pointer" ng-click="deleteLink($index)"></i> </div>
</li>
</ul>
<ul class="tight-form-list"> <div class="gf-form-inline">
<li class="tight-form-item" style="width: 20px"> <div class="gf-form width-2">
<i class="fa fa-fw fa-unlink"></i> <i class="fa fa-fw fa-unlink"></i>
</li> </div>
<li class="tight-form-item">Type</li> <div class="gf-form">
<li> <span class="gf-form-label width-6">Type</span>
<select class="input-medium tight-form-input" style="width: 150px;" ng-model="link.type" ng-options="f for f in ['dashboards','link']" ng-change="updated()"></select> <div class="gf-form-select-wrapper width-10">
</li> <select class="gf-form-input" ng-model="link.type" ng-options="f for f in ['dashboards','link']" ng-change="updated()"></select>
</div>
</div>
<li class="tight-form-item" ng-show="link.type === 'dashboards'">With tags</li> <div class="gf-form" ng-show="link.type === 'dashboards'">
<li ng-show="link.type === 'dashboards'"> <span class="gf-form-label">With tags</span>
<bootstrap-tagsinput ng-model="link.tags" tagclass="label label-tag" placeholder="add tags"> <bootstrap-tagsinput ng-model="link.tags" tagclass="label label-tag" placeholder="add tags"></bootstrap-tagsinput>
</bootstrap-tagsinput> </div>
</li>
<li class="tight-form-item" ng-show="link.type === 'dashboards'"> <div class="gf-form" ng-show="link.type === 'dashboards' && link.asDropdown">
<span class="gf-form-label width-6">Title</span>
<input type="text" ng-model="link.title" class="gf-form-input max-width-10" ng-model-onblur ng-change="updated()">
</div>
<div class="gf-form" ng-show="link.type === 'dashboards'">
<editor-checkbox text="As dropdown" model="link.asDropdown" change="updated()"></editor-checkbox> <editor-checkbox text="As dropdown" model="link.asDropdown" change="updated()"></editor-checkbox>
</li> </div>
<li class="tight-form-item" ng-show="link.type === 'dashboards' && link.asDropdown">
Title <div class="gf-form" ng-show="link.type === 'link'">
</li> <li class="gf-form-label width-6">Url</li>
<li ng-show="link.type === 'dashboards' && link.asDropdown"> <input type="text" ng-model="link.url" class="gf-form-input max-width-10" ng-model-onblur ng-change="updated()">
<input type="text" ng-model="link.title" class="input-medium tight-form-input" ng-model-onblur ng-change="updated()">
</li>
<li class="tight-form-item" ng-show="link.type === 'link'" style="width: 51px">Url</li>
<li ng-show="link.type === 'link'">
<input type="text" ng-model="link.url" class="input-xlarge tight-form-input" style="width: 302px;" ng-model-onblur ng-change="updated()">
</li>
<li class="tight-form-item" ng-show="link.type === 'link'">
<editor-checkbox text="Open in new tab " model="link.targetBlank" change="updated()"></editor-checkbox> <editor-checkbox text="Open in new tab " model="link.targetBlank" change="updated()"></editor-checkbox>
</li> </div>
</ul> </div>
<div class="clearfix"></div>
</div> <div class="gf-form-inline" ng-show="link.type === 'link'">
<div class="tight-form" ng-if="link.type === 'link'"> <div class="gf-form width-2">
<ul class="tight-form-list">
<li class="tight-form-item" style="width: 20px">
<i class="fa fa-fw fa-unlink invisible"></i> <i class="fa fa-fw fa-unlink invisible"></i>
</li> </div>
<li class="tight-form-item" ng-show="link.type === 'link'" style="width: 31px">Title</li> <div class="gf-form">
<li ng-show="link.type === 'link'"> <span class="gf-form-label width-6">Title</span>
<input type="text" ng-model="link.title" class="input-medium tight-form-input" ng-model-onblur ng-change="updated()"> <input type="text" ng-model="link.title" class="gf-form-input max-width-10" ng-model-onblur ng-change="updated()">
</li> </div>
<li class="tight-form-item" ng-show="link.type === 'link'" style="width: 51px">Tooltip</li>
<li ng-show="link.type === 'link'"> <div class="gf-form">
<input type="text" ng-model="link.tooltip" class="input-medium tight-form-input" style="width: 151px" placeholder="Open dashboard" ng-model-onblur ng-change="updated()"> <span class="gf-form-label width-6">Tooltip</span>
</li> <input type="text" ng-model="link.tooltip" class="gf-form-input max-width-10" placeholder="Open dashboard" ng-model-onblur ng-change="updated()">
<li class="tight-form-item" ng-show="link.type === 'link'">Icon</li> </div>
<li ng-show="link.type === 'link'">
<select class="input-medium tight-form-input" style="width: 110px;" ng-model="link.icon" ng-options="k as k for (k, v) in iconMap" ng-change="updated()"></select> <div class="gf-form">
</li> <span class="gf-form-label width-6">Icon</span>
</ul> <div class="gf-form-select-wrapper max-width-10">
<div class="clearfix"></div> <select class="gf-form-input" ng-model="link.icon" ng-options="k as k for (k, v) in iconMap" ng-change="updated()"></select>
</div> </div>
<div class="tight-form last"> </div>
<ul class="tight-form-list"> </div>
<li class="tight-form-item" style="width: 20px">
<div class="gf-form-inline">
<div class="gf-form width-1">
<i class="fa fa-fw fa-unlink invisible"></i> <i class="fa fa-fw fa-unlink invisible"></i>
</li> </div>
<li class="tight-form-item"> <div class="gf-form">
<editor-checkbox text="Keep current time range" model="link.keepTime" change="updated()"></editor-checkbox> <editor-checkbox text="Keep current time range" model="link.keepTime" change="updated()"></editor-checkbox>
</li>
<li class="tight-form-item">
<editor-checkbox text="Add current variable values" model="link.includeVars" change="updated()"></editor-checkbox> <editor-checkbox text="Add current variable values" model="link.includeVars" change="updated()"></editor-checkbox>
</li> </div>
</ul> </div>
<div class="clearfix"></div>
</div> </div>
</div> </div>
</div> </div>
<div class="editor-row">
<br>
<button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>
</div>
<button class="btn btn-inverse" ng-click="addLink()"><i class="fa fa-plus"></i> Add link</button>
...@@ -9,12 +9,6 @@ $gf-form-label-margin: 0.25rem; ...@@ -9,12 +9,6 @@ $gf-form-label-margin: 0.25rem;
align-items: center; align-items: center;
text-align: left; text-align: left;
.checkbox-label {
display: inline;
cursor: pointer;
padding: 8px 7px 8px 4px;
}
.cr1 { .cr1 {
margin-left: 8px; margin-left: 8px;
} }
...@@ -58,6 +52,15 @@ $gf-form-label-margin: 0.25rem; ...@@ -58,6 +52,15 @@ $gf-form-label-margin: 0.25rem;
.gf-form-checkbox { .gf-form-checkbox {
flex-shrink: 0; flex-shrink: 0;
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
.checkbox-label {
display: inline;
cursor: pointer;
padding: $input-padding-y $input-padding-x;
line-height: $input-line-height;
}
} }
.gf-form-input { .gf-form-input {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment