Commit 8a5a9748 by Rashid Khan

Change ng-show to ng-if for tabs to reduce watchers in settings modals

parent 0e035f93
......@@ -14,15 +14,15 @@
<ul class="dropdown-menu" style="padding:10px">
<li ng-show='dashboard.current.loader.load_elasticsearch'>
<li ng-if='dashboard.current.loader.load_elasticsearch'>
<form class="nomargin">
<input type="text" ng-model="elasticsearch.query" ng-change="elasticsearch_dblist('title:'+elasticsearch.query+'*')" placeholder="Type to filter"/>
</form>
<h6 ng-hide="elasticsearch.dashboards.length">No dashboards matching your query found</h6>
<table class="table table-condensed table-striped">
<tr ng-repeat="row in elasticsearch.dashboards | orderBy:['_id']">
<tr bindonce ng-repeat="row in elasticsearch.dashboards | orderBy:['_id']">
<td><a ng-click="elasticsearch_delete(row._id)"><i class="icon-remove"></i></a></td>
<td><a href="#/dashboard/elasticsearch/{{row._id}}">{{row._id}}</a></td>
<td><a href="#/dashboard/elasticsearch/{{row._id}}" bo-text="row._id"></a></td>
<td><a><i class="icon-share" ng-click="share = dashboard.share_link(row._id,'elasticsearch',row._id)" bs-modal="'app/panels/dashcontrol/share.html'"></i></a></td>
</tr>
</table>
......
......@@ -8,7 +8,7 @@
</div>
</div>
<div ng-show="editor.index == 0">
<div ng-if="editor.index == 0">
<div class="row-fluid">
<div class="span4">
<label class="small">Title</label><input type="text" class="input-large" ng-model='dashboard.current.title'></input>
......@@ -24,7 +24,7 @@
</div>
</div>
</div>
<div ng-show="editor.index == 1">
<div ng-if="editor.index == 1">
<div class="row-fluid">
<h4>Index Settings</h4>
<div ng-show="dashboard.current.index.interval != 'none'" class="row-fluid">
......@@ -69,7 +69,7 @@
</div>
</div>
<div ng-show="editor.index == 2">
<div ng-if="editor.index == 2">
<div class="row-fluid">
<div class="span12">
<table class="table table-condensed table-striped">
......@@ -105,7 +105,7 @@
</div>
</div>
<div ng-show="editor.index == 3">
<div ng-if="editor.index == 3">
<h5>Pulldowns</h5>
<div class="row-fluid">
<div class="span2" ng-repeat="pulldown in dashboard.current.pulldowns">
......@@ -117,7 +117,7 @@
</div>
</div>
<div ng-show="editor.index == 3" ng-controller="dashLoader">
<div ng-if="editor.index == 3" ng-controller="dashLoader">
<h5>Save to</h5>
<div class="row-fluid">
<div class="span2">
......
<div class="modal-body">
<div class="pull-right editor-title">{{panel.type}} settings</div>
<div bindonce class="modal-body">
<div class="pull-right editor-title" bo-text="panel.type+' settings'"></div>
<div ng-model="editor.index" bs-tabs>
<div ng-repeat="tab in setEditorTabs(panelMeta)" data-title="{{tab}}">
</div>
......
......@@ -6,7 +6,7 @@
</div>
</div>
<div class="row-fluid" ng-show="editor.index == 0">
<div class="row-fluid" ng-if="editor.index == 0">
<div class="span4">
<label class="small">Title</label><input type="text" class="input-medium" ng-model='row.title'></input>
</div>
......@@ -20,7 +20,7 @@
<label class="small"> Collapsable </label><input type="checkbox" ng-model="row.collapsable" ng-checked="row.collapsable" />
</div>
</div>
<div class="row-fluid" ng-show="editor.index == 1">
<div class="row-fluid" ng-if="editor.index == 1">
<div class="span12">
<h4>Panels <i class="icon-plus-sign link" bs-tooltip="'Add panel'" ng-click="editor.index = 2"></i></h4>
<table class="table table-condensed table-striped">
......@@ -45,7 +45,7 @@
</table>
</div>
</div>
<div class="row-fluid" ng-show="editor.index == 2">
<div class="row-fluid" ng-if="editor.index == 2">
<h4>Select Panel Type</h4>
<form class="form-inline">
<select class="input-medium" ng-model="panel.type" ng-options="panelType for panelType in dashboard.availablePanels|stringSort"></select>
......
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