|
|
@@ -19,15 +19,15 @@
|
|
|
<div class="tight-form" ng-if="panel.transform === 'json'">
|
|
|
<ul class="tight-form-list">
|
|
|
<li class="tight-form-item" style="width: 140px">
|
|
|
- Fields
|
|
|
+ Columns
|
|
|
</li>
|
|
|
- <li class="tight-form-item" ng-repeat="field in panel.fields">
|
|
|
- <i class="pointer fa fa-remove" ng-click="removeJsonField(field)"></i>
|
|
|
+ <li class="tight-form-item" ng-repeat="column in panel.columns">
|
|
|
+ <i class="pointer fa fa-remove" ng-click="removeColumn(column)"></i>
|
|
|
<span>
|
|
|
- {{field.name}}
|
|
|
+ {{column.name}}
|
|
|
</span>
|
|
|
</li>
|
|
|
- <li class="dropdown" dropdown-typeahead="jsonFieldsMenu" dropdown-typeahead-on-select="addJsonField($item, $subItem)">
|
|
|
+ <li class="dropdown" dropdown-typeahead="columnsMenu" dropdown-typeahead-on-select="addColumn($item, $subItem)">
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
@@ -67,11 +67,11 @@
|
|
|
<h5>Column Styles</h5>
|
|
|
|
|
|
<div class="tight-form-container">
|
|
|
- <div ng-repeat="column in panel.columns">
|
|
|
+ <div ng-repeat="style in panel.styles">
|
|
|
<div class="tight-form">
|
|
|
<ul class="tight-form-list pull-right">
|
|
|
<li class="tight-form-item last">
|
|
|
- <i class="fa fa-remove pointer" ng-click="removeColumnStyle(column)"></i>
|
|
|
+ <i class="fa fa-remove pointer" ng-click="removeColumnStyle(style)"></i>
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
@@ -80,38 +80,38 @@
|
|
|
Name or regex
|
|
|
</li>
|
|
|
<li>
|
|
|
- <input type="text" ng-model="column.pattern" bs-typeahead="getColumnNames" ng-blur="render()" data-min-length=0 data-items=100 class="input-medium tight-form-input">
|
|
|
+ <input type="text" ng-model="style.pattern" bs-typeahead="getColumnNames" ng-blur="render()" data-min-length=0 data-items=100 class="input-medium tight-form-input">
|
|
|
</li>
|
|
|
<li class="tight-form-item" style="width: 86px">
|
|
|
Type
|
|
|
</li>
|
|
|
<li>
|
|
|
<select class="input-small tight-form-input"
|
|
|
- ng-model="column.type"
|
|
|
+ ng-model="style.type"
|
|
|
ng-options="c.value as c.text for c in columnTypes"
|
|
|
ng-change="render()"
|
|
|
style="width: 150px"
|
|
|
></select>
|
|
|
</li>
|
|
|
</ul>
|
|
|
- <ul class="tight-form-list" ng-if="column.type === 'date'">
|
|
|
+ <ul class="tight-form-list" ng-if="style.type === 'date'">
|
|
|
<li class="tight-form-item">
|
|
|
Format
|
|
|
</li>
|
|
|
<li>
|
|
|
- <metric-segment-model property="column.dateFormat" options="dateFormats" on-change="render()" custom="true"></metric-segment-model>
|
|
|
+ <metric-segment-model property="style.dateFormat" options="dateFormats" on-change="render()" custom="true"></metric-segment-model>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
- <div class="tight-form" ng-if="column.type === 'number'">
|
|
|
+ <div class="tight-form" ng-if="style.type === 'number'">
|
|
|
<ul class="tight-form-list">
|
|
|
<li class="tight-form-item text-right" style="width: 93px">
|
|
|
Coloring
|
|
|
</li>
|
|
|
<li>
|
|
|
<select class="input-small tight-form-input"
|
|
|
- ng-model="column.colorMode"
|
|
|
+ ng-model="style.colorMode"
|
|
|
ng-options="c.value as c.text for c in colorModes"
|
|
|
ng-change="render()"
|
|
|
style="width: 150px"
|
|
|
@@ -121,34 +121,34 @@
|
|
|
Thresholds<tip>Comma seperated values</tip>
|
|
|
</li>
|
|
|
<li>
|
|
|
- <input type="text" class="input-small tight-form-input" style="width: 150px" ng-model="column.thresholds" ng-blur="render()" placeholder="0,50,80" array-join></input>
|
|
|
+ <input type="text" class="input-small tight-form-input" style="width: 150px" ng-model="style.thresholds" ng-blur="render()" placeholder="0,50,80" array-join></input>
|
|
|
</li>
|
|
|
<li class="tight-form-item" style="width: 60px">
|
|
|
Colors
|
|
|
</li>
|
|
|
<li class="tight-form-item">
|
|
|
- <spectrum-picker ng-model="column.colors[0]" ng-change="render()" ></spectrum-picker>
|
|
|
- <spectrum-picker ng-model="column.colors[1]" ng-change="render()" ></spectrum-picker>
|
|
|
- <spectrum-picker ng-model="column.colors[2]" ng-change="render()" ></spectrum-picker>
|
|
|
+ <spectrum-picker ng-model="style.colors[0]" ng-change="render()" ></spectrum-picker>
|
|
|
+ <spectrum-picker ng-model="style.colors[1]" ng-change="render()" ></spectrum-picker>
|
|
|
+ <spectrum-picker ng-model="style.colors[2]" ng-change="render()" ></spectrum-picker>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
</div>
|
|
|
- <div class="tight-form" ng-if="column.type === 'number'">
|
|
|
+ <div class="tight-form" ng-if="style.type === 'number'">
|
|
|
<ul class="tight-form-list">
|
|
|
<li class="tight-form-item text-right" style="width: 93px">
|
|
|
Unit
|
|
|
</li>
|
|
|
<li class="dropdown" style="width: 150px"
|
|
|
- ng-model="column.unit"
|
|
|
+ ng-model="style.unit"
|
|
|
dropdown-typeahead="unitFormats"
|
|
|
- dropdown-typeahead-on-select="setUnitFormat(column, $subItem)">
|
|
|
+ dropdown-typeahead-on-select="setUnitFormat(style, $subItem)">
|
|
|
</li>
|
|
|
<li class="tight-form-item" style="width: 86px">
|
|
|
Decimals
|
|
|
</li>
|
|
|
<li style="width: 105px">
|
|
|
- <input type="number" class="input-mini tight-form-input" ng-model="column.decimals" ng-change="render()" ng-model-onblur>
|
|
|
+ <input type="number" class="input-mini tight-form-input" ng-model="style.decimals" ng-change="render()" ng-model-onblur>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<div class="clearfix"></div>
|
|
|
@@ -158,7 +158,7 @@
|
|
|
</div>
|
|
|
|
|
|
<button class="btn btn-inverse" style="margin-top: 20px" ng-click="addColumnStyle()">
|
|
|
- Add column display rule
|
|
|
+ Add style display rule
|
|
|
</button>
|
|
|
</div>
|
|
|
|