<div class="col-md-12">
    <div class="panel panel-default">
        <div class="panel-heading">Service Status</div>
        <div class="panel-body">
            <table class="table table-hover">
                <thead><tr>
                    {{#params}}<th>{{.getNiceName()}}</th>{{/params}}
                </tr></thead>
                {{#data}}
                <tr {{#.disabled}}class="active"{{/.disabled}}>
                    {{#.getConfiguration()}}
                        <td>
                            {{#.isTypeBoolean()}}
                                <input type="checkbox" {{#.getBoolean()}}checked{{/.getBoolean()}} disabled />
                            {{/.isTypeBoolean()}}
                            {{^.isTypeBoolean()}}{{.getString()}}{{/.isTypeBoolean()}}
                        </td>
                    {{/.getConfiguration()}}
                    <td class="text-right">
                        <button type="button" class="btn btn-default btn-xs" title="Edit">
                            <span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>&nbsp;
                        </button>
                        {{^.enabled}}
                        <button type="button" class="btn btn-default btn-xs" title="Disable">
                            <span class="glyphicon glyphicon-ban-circle" aria-hidden="true"></span>&nbsp;
                        </button>
                        {{/.enabled}}
                        {{#.enabled}}
                        <button type="button" class="btn btn-default btn-xs" title="Activate">
                            <span class="glyphicon glyphicon-ok-circle" aria-hidden="true"></span>&nbsp;
                        </button>
                        {{/.enabled}}
                        <button type="button" class="btn btn-default btn-xs" title="Remove">
                            <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>&nbsp;
                        </button>
                    </td>
                </tr>
                {{/data}}
            </table>
        </div>
        <div class="panel-footer clearfix">
            <button type="button" class="btn btn-default pull-left" data-toggle="modal" data-target="#configureModal">+</button>
            <button type="button" class="btn btn-primary pull-right">Apply Configuration</button>
        </div>
    </div>
</div>

<!-- Modal -->
<div class="modal fade" id="configureModal" tabindex="-1" role="dialog" aria-labelledby="configureModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="configureModalLabel">Configure</h4>
            </div>
            <div class="modal-body">
                <form class="form-horizontal">
                    {{#params}}
                    <div class="form-group">
                        <label for="{{.getName()}}" class="control-label col-xs-2">{{.getNiceName()}}</label>
                        <div class="col-xs-10">
                            {{#.isTypeString()}}
                            <input type="text" class="form-control" id="{{.getName()}}">
                            {{/.isTypeString()}}
                            {{#.isTypeInt()}}
                            <input type="number" class="form-control" id="{{.getName()}}">
                            {{/.isTypeInt()}}
                            {{#.isTypeBoolean()}}
                            <input type="checkbox" class="form-control" id="{{.getName()}}">
                            {{/.isTypeBoolean()}}
                            <!--
                            <select class="form-control" id="sselect" placeholder="">
                                <option value="volvo">-- Chose an Option --</option>
                                <option value="saab">Saab</option>
                            </select>
                            -->
                        </div>
                    </div>
                    {{/params}}
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="submit" class="btn btn-success">Save</button>
            </div>
        </div>
    </div>
</div>