Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix admin interface #3236

Merged
merged 4 commits into from
Jul 4, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions shared/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ <h3 class="panel-title">Connection Settings</h3>
<!-- /.container -->
<div id="footer">
<div class="container">
<p class="text-muted text-right credit"><b>InfluxDB</b> v0.9.1</p>
<p class="text-muted text-right credit"><b>InfluxDB</b> v0.9.2-pre</p>
</div>
</div>

Expand Down Expand Up @@ -192,7 +192,6 @@ <h4 class="modal-title" id="myModalLabel">Write Data to InfluxDB</h4>
<script src="js/vendor/react-0.13.3.min.js"></script>
<script src="js/vendor/jquery-2.1.4.min.js"></script>
<script src="js/vendor/bootstrap-3.3.5.min.js"></script>
<script src="js/vendor/dropdowns-enhancement.js"></script>
<script src="js/admin.js"></script>
</body>

Expand Down
18 changes: 16 additions & 2 deletions shared/admin/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,28 @@ var TableBody = React.createClass({

var TableRow = React.createClass({
render: function() {
var tableData = this.props.data.map(function (data) {
return React.createElement("td", null, data)
var tableData = this.props.data.map(function (data, index) {
if (index == 0) {
return React.createElement("td", {className: "timestamp"}, null, data);
} else {
return React.createElement("td", null, pretty(data));
}
});

return React.createElement("tr", null, tableData);
}
});

var pretty = function(val) {
if (typeof val == 'string') {
return "\"" + val + "\"";
} else if (typeof val == 'boolean' ){
return val.toString();
} else {
return val;
}
}

var chooseDatabase = function (databaseName) {
currentlySelectedDatabase = databaseName;
document.getElementById("content-current-database").innerHTML = currentlySelectedDatabase;
Expand Down
267 changes: 0 additions & 267 deletions shared/admin/js/vendor/dropdowns-enhancement.js

This file was deleted.

4 changes: 2 additions & 2 deletions statik/statik.go

Large diffs are not rendered by default.