<commit_before><!doctype html>
<html xmlns:ng="http://angularjs.org" ng-app="mapproxy_gui">
    <head>
        <title>Mapproxy GUI</title>
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/custom.css">
        <link rel="stylesheet" href="css/smoothness/jquery-ui-1.10.0.custom.min.css">

        <!--[if lte IE 8]>
            <script type="text/javascript" src="js/ie8_fixtures.js"></script>
        <![endif]-->

        <script type="text/javascript" src="js/lib/angular.js"></script>

        <!-- jquery and jqueryUI -->
        <script type="text/javascript" src="js/lib/jquery-1.9.0.js"></script>
        <script type="text/javascript" src="js/lib/jquery-ui-1.10.0.custom.js"></script>
        <script type="text/javascript" src="js/services.js"></script>
        <script type="text/javascript" src="js/directives.js"></script>
        <script type="text/javascript" src="js/controllers.js"></script>
        <script type="text/javascript">
            /* add directives and services*/
            var app = angular.module('mapproxy_gui', ['mapproxy_gui.directives', 'mapproxy_gui.services']);
        </script>

    </head>
    <body>
        <div tabs>
            <div pane title="Source">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxySourceListCtrl">
                        <h3>Mapproxy Sources</h3>
                        <ul>
                            <li class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                >
                                <span ng-click="editSource(source)">{{source.name}}</span>
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeSource(source)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span4 well">
                        <h3>Edit Source</h3>
                        <form class="form-horizontal" name="source_form" ng-model="source" ng-controller="MapproxySourceFormCtrl" novalidate>
                            <div
                                style="display:none;"
                                id="confirm_url_change_dialog"
                                title="confirm url change">
                                <p>Replace service URL deletes all layers depends to it!</p>
                            </div>
                    <!-- name -->
                            <div labeled-control-group name-for="source_form.name" text="Name">
                                <input type="text" required ng-model="source.name" name="source_form.name"/>
                            </div>
                    <!-- req -->
                        <!-- url -->
                            <div labeled-control-group name-for="source_form.req_url" text="URL">
                                <!-- change-callback MUST provide parameters callback and new_data -->
                                <!-- if an input field should be droppable, it must be wraped in an other element.
                                     otherwise input field value will not be updated when something is dropped in.-->
                                <div droppable change-callback="openDialog(callback, new_data)" class="droppable_input_wrapper"
                                    accepts="wms_source" use-key-for-value="url" ng-model="source.req.url">
                                    <input type="url" value="{{source.wms_source}}" name="source_form.req_url"
                                        required ng-model="source.req.url" />
                                </div>
                            </div>
                        <!-- layer -->
                            <div labeled-control-group name-for="source_form.req_layer" text="Layer">
                                <div
                                    droppable
                                    required
                                    accepts="wms_layer"
                                    allow-array="true"
                                    ng-model="source.req.layer"
                                    name="source_form.req_layers"
                                    use-key-for-value="name"
                                    class="insertable_multi">
                                    <div sortable ng-model="source.req.layer" >
                                        <div ng-repeat="layer in source.req.layer">
                                            {{layer}} <span ng-show="layerTitle(layer)">({{layerTitle(layer)}})</span>
                                            <button class="btn btn-mini btn-danger right" ng-click="remove(layer)">X</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div labeled-control-group name-for="add_layer_manual" text="Manual add layer">
                                <input type="text" id="add_layer_manual" name="add_layer_manual" ng-model="custom.layer_manual">
                                <button class="btn btn-small" ng-click="addLayerManual($event)">Add</button>
                            </div>

                        <!-- transparent -->
                            <!--<label for="source_form.req_transparent">Transparent:</label>-->
                            <div labeled-control-group name-for="source_form.req_transparent" text="Transparent">
                                <input type="checkbox" ng-model="source.req.transparent" name="source_form.req_transparent">
                            </div>
                    <!-- supported_formats -->
                            <!-- XXXkai: replace by received list of supported formats -->
                            <div labeled-control-group name-for="source_form.supported_formats" text="Supported formats">
                                <select name="source_form.supported_formats" multiple="multiple" ng-model="source.supported_formats">
                                    <option value="PNG">PNG</option>
                                    <option value="JPEG">JPEG</option>
                                    <option value="GIF">GIF</option>
                                </select>
                            </div>
                    <!-- supported_srs -->
                            <!-- XXXkai: replace by received list of supported srs -->
                            <div labeled-control-group name-for="source_form.supported_srs" text="Supported SRS">
                                <select name="source_form.supported_srs" multiple="multiple" ng-model="source.supported_srs">
                                    <option value="EPSG:3857">EPSG:3857</option>
                                    <option value="EPSG:4326">EPSG:4326</option>
                                    <option value="EPSG:900913">EPSG:900913</option>
                                </select>
                            </div>
                    <!-- min_scale -->
                            <div labeled-control-group name-for="source_form.min_scale" text="Min. Scale">
                                <input type="text" ng-model="source.min_scale" name="source_form.min_scale">
                            </div>
                    <!-- max_scale -->
                            <div labeled-control-group name-for="source_form.max_scale" text="Max. Scale">
                                <input type="text" ng-model="source.max_scale" name="source_form.max_scale">
                            </div>
                    <!-- min_res -->
                            <div labeled-control-group name-for="source_form.min_res" text="Min. Resolution">
                                <input type="text" ng-model="source.min_res" name="source_form.min_res">
                            </div>
                    <!-- max_res -->
                            <div labeled-control-group name-for="source_form.max_res" text="Max. Resolution">
                                <input type="text" ng-model="source.max_res" name="source_form.max_res">
                            </div>
                    <!-- concurent_requests -->
                            <div labeled-control-group name-for="source_form.concurrent_requests" text="Concurrent requests">
                                <input type="text" ng-model="source.concurrent_requests" name="source_form.concurrent_requests">
                            </div>
                    <!-- wms_opts -->
                        <!-- version -->
                            <div labeled-control-group name-for="source_form.wms_version" text="Version">
                                <select name="source_form.wms_version" ng-model="source.wms_opts.version">
                                    <option value="1.0.0">1.0.0</option>
                                    <option value="1.1.0">1.1.0</option>
                                    <option value="1.1.1">1.1.1</option>
                                    <option value="1.3.0">1.3.0</option>
                                </select>
                            </div>
                        <!-- map -->
                            <div labeled-control-group name-for="source_form.wms_map" text="Map">
                                <input type="checkbox" name="source_form.wms_map" ng-model="source.wms_opts.map">
                            </div>
                        <!-- featureinfo -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo" text="Featureinfo">
                                <input type="checkbox" name="source_form.wms_featureinfo" ng-model="source.wms_opts.featureinfo">
                            </div>
                        <!-- featureinfo_format -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo_format" text="Featureinfo format">
                                <input type="text" name="source_form.wms_featureinfo_format" ng-model="source.wms_opts.featureinfo_format">
                            </div>
                        <!-- featureinfo_xslt -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo_xslt" text="Featureinfo XSLT">
                                <input type="text" name="source_form.wms_featureinfo_xslt" ng-model="source.wms_opts.featureinfo_xslt">
                            </div>
                        <!-- legendgraphic -->
                            <div labeled-control-group name-for="source_form.wms_legendgraphic" text="Legendgraphic">
                                <input type="checkbox" name="source_form.wms_legendgraphic" ng-model="source.wms_opts.legendgraphic">
                            </div>
                        <!-- legendurl -->
                            <div labeled-control-group name-for="source_form.wms_legendurl" text="Legend URL">
                                <input type="url" name="source_form.wms_legendurl" ng-model="source.wms_opts.legendurl">
                            </div>
                        <!-- buttons -->
                            <button class="btn btn-small" ng-click="addSource($event)" ng-disabled="!source_form.$valid">Save</button>
                            <button class="btn btn-small" ng-click="resetForm($event)">Reset</button>
                        </form>
                    </div>

                    <div class="span4 well" ng-controller="TreeCtrl">
                        <h3>Available WMS</h3>
                        <script type="text/ng-template"  id="wms_layer_renderer.html">
                            <div ng-click="show_infos(layer)" class="layer_infos">
                                <h6>{{layer.title}}</h6>
                                <span ng-show="layer.name">Name: {{layer.name}}</span>
                            </div>
                            <div
                                ng-repeat="layer in layer.layers"
                                ng-include="'wms_layer_renderer.html'"
                                draggable
                                item-data="{{itemData(layer)}}"
                                class="wms_layer grp_layer label"></div>
                        </script>
                        <div toggle-group mode='hideOther'>
                            <div ng-repeat="wms in wms_list" class="wms label label-success" >
                                <h5 draggable item-data="{{wms}}" class="wms_source" toggle-element="next">{{wms.title}}</h5>
                                <div ng-show="$first">
                                    <p>URL: {{wms.url}}</p>
                                    <div
                                        ng-repeat="layer in wms.layers"
                                        ng-include="'wms_layer_renderer.html'"
                                        draggable item-data="{{itemData(layer)}}"
                                        class="wms_layer layer label label-info"></div>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <label for="input_wms">Capabilities:</label><input name="input_wms" ng-model="capabilities">
                        <button class="btn btn-small" ng-click="loadData(capabilities)">GetCapabilities</button><!-- add new wms -->
                    </div>

                </div>
            </div>
            <div pane title="Cache">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxyCacheListCtrl">
                        <h3>Mapproxy Cache</h3>
                        <ul>
                            <li
                                class="mapproxy_cache label"
                                ng-repeat="cache in mapproxy_caches | orderBy:'name'"
                                ng-click="editCache(cache)">
                                {{cache.name}}
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeCache(cache)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span3 well" ng-controller="MapproxyCacheFormCtrl">
                        <h3>Edit Cache</h3>
                        <form name="cache_form" ng-model="cache">
                            <label for="cache_name">Name:</label>
                            <input required type="text" required ng-model="cache.name" name="cache_name"/><br>
                            <!-- change-callback MUST provide parameters callback and new_data -->
                            <label for="cache_sources">Sources:</label>
                            <div
                                droppable
                                required
                                accepts="mapproxy_source"
                                allow-array="true"
                                ng-model="cache.sources"
                                name="cache_sources"
                                class="insertable_multi">
                                <div sortable ng-model="cache.sources" >
                                    <div ng-repeat="source in cache.sources">
                                        {{source.name}}
                                        <button class="btn btn-mini btn-danger right" ng-click="remove(source)">X</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <button class="btn btn-small" ng-click="addCache()" ng-disabled="!cache_form.$valid">Save</button>
                        <button class="btn btn-small" ng-click="resetForm()">Reset</button>
                    </div>

                    <div class="span3 well" ng-controller="MapproxySourceListCtrl">
                        <h3>Mapproxy Sources</h3>
                        <ul>
                            <li
                                draggable
                                class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                item-data="{{source}}">
                                {{source.name}}
                            </li>
                        </ul>
                    </div>

                </div>
            </div>
            <div pane title="Layer">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxyLayerListCtrl">
                        <h3>Mapproxy Layer</h3>
                        <ul sortable ng-model="mapproxy_layers">
                            <li class="mapproxy_layer label" ng-repeat="layer in mapproxy_layers">
                                <span ng-click="editLayer(layer)">{{layer.name}}</span>
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeLayer(layer)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span3 well" ng-controller="MapproxyLayerFormCtrl">
                        <h3>Edit Layer</h3>
                        <form name="layer_form" ng-model="layer">
                            <label for="layer_name">Name:</label>
                            <input required type="text" required ng-model="layer.name" name="layer_name"/><br>
                            <!-- change-callback MUST provide parameters callback and new_data -->
                            <label for="layer_sources">Sources:</label>
                            <div
                                droppable
                                required
                                accepts="mapproxy_source,mapproxy_cache"
                                allow-array="true"
                                ng-model="layer.sources"
                                name="layer_sources"
                                class="insertable_multi">
                                <div sortable ng-model="layer.sources" >
                                    <div ng-repeat="source in layer.sources">
                                        {{source.name}}
                                        <button class="btn btn-mini btn-danger right" ng-click="remove(source)">X</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <button class="btn btn-small" ng-click="addLayer()" ng-disabled="!layer_form.$valid">Save</button>
                        <button class="btn btn-small" ng-click="resetForm()">Reset</button>
                    </div>

                    <div class="span3 well">
                        <h3>Mapproxy Sources</h3>
                        <ul ng-controller="MapproxySourceListCtrl">
                            <li
                                draggable
                                class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                item-data="{{source}}">
                                {{source.name}}
                            </li>
                        </ul>
                        <hr>
                        <h3>Mapproxy Caches</h3>
                        <ul ng-controller="MapproxyCacheListCtrl">
                            <li
                                draggable
                                class="mapproxy_cache label"
                                ng-repeat="cache in mapproxy_caches | orderBy:'name'"
                                item-data="{{cache}}">
                                {{cache.name}}
                            </li>
                        </ul>
                    </div>

                </div>
            </div>
        </div>
    </body>
</html>
<commit_msg>Used validators<commit_after><!doctype html>
<html xmlns:ng="http://angularjs.org" ng-app="mapproxy_gui">
    <head>
        <title>Mapproxy GUI</title>
        <link rel="stylesheet" href="css/bootstrap.css">
        <link rel="stylesheet" href="css/custom.css">
        <link rel="stylesheet" href="css/smoothness/jquery-ui-1.10.0.custom.min.css">

        <!--[if lte IE 8]>
            <script type="text/javascript" src="js/ie8_fixtures.js"></script>
        <![endif]-->

        <script type="text/javascript" src="js/lib/angular.js"></script>

        <!-- jquery and jqueryUI -->
        <script type="text/javascript" src="js/lib/jquery-1.9.0.js"></script>
        <script type="text/javascript" src="js/lib/jquery-ui-1.10.0.custom.js"></script>
        <script type="text/javascript" src="js/validators.js"></script>
        <script type="text/javascript" src="js/services.js"></script>
        <script type="text/javascript" src="js/directives.js"></script>
        <script type="text/javascript" src="js/controllers.js"></script>
        <script type="text/javascript">
            /* add directives and services*/
            var app = angular.module('mapproxy_gui', ['mapproxy_gui.directives', 'mapproxy_gui.services', 'mapproxy_gui.validators']);
        </script>

    </head>
    <body>
        <div tabs>
            <div pane title="Source">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxySourceListCtrl">
                        <h3>Mapproxy Sources</h3>
                        <ul>
                            <li class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                >
                                <span ng-click="editSource(source)">{{source.name}}</span>
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeSource(source)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span4 well">
                        <h3>Edit Source</h3>
                        <form class="form-horizontal" name="source_form" ng-model="source" ng-controller="MapproxySourceFormCtrl" novalidate>
                            <div
                                style="display:none;"
                                id="confirm_url_change_dialog"
                                title="confirm url change">
                                <p>Replace service URL deletes all layers depends to it!</p>
                            </div>
                    <!-- name -->
                            <div labeled-control-group name-for="source_form.name" text="Name">
                                <input type="text" required ng-model="source.name" name="source_form.name"/>
                            </div>
                    <!-- req -->
                        <!-- url -->
                            <div labeled-control-group name-for="source_form.req_url" text="URL">
                                <!-- change-callback MUST provide parameters callback and new_data -->
                                <!-- if an input field should be droppable, it must be wraped in an other element.
                                     otherwise input field value will not be updated when something is dropped in.-->
                                <div droppable change-callback="openDialog(callback, new_data)" class="droppable_input_wrapper"
                                    accepts="wms_source" use-key-for-value="url" ng-model="source.req.url">
                                    <input type="url" value="{{source.wms_source}}" name="source_form.req_url"
                                        required ng-model="source.req.url" />
                                </div>
                            </div>
                        <!-- layer -->
                            <div labeled-control-group name-for="source_form.req_layer" text="Layer">
                                <div
                                    droppable
                                    required
                                    accepts="wms_layer"
                                    allow-array="true"
                                    ng-model="source.req.layer"
                                    name="source_form.req_layers"
                                    use-key-for-value="name"
                                    class="insertable_multi">
                                    <div sortable ng-model="source.req.layer" >
                                        <div ng-repeat="layer in source.req.layer">
                                            {{layer}} <span ng-show="layerTitle(layer)">({{layerTitle(layer)}})</span>
                                            <button class="btn btn-mini btn-danger right" ng-click="remove(layer)">X</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div labeled-control-group name-for="add_layer_manual" text="Manual add layer">
                                <input type="text" id="add_layer_manual" name="add_layer_manual" ng-model="custom.layer_manual">
                                <button class="btn btn-small" ng-click="addLayerManual($event)">Add</button>
                            </div>

                        <!-- transparent -->
                            <!--<label for="source_form.req_transparent">Transparent:</label>-->
                            <div labeled-control-group name-for="source_form.req_transparent" text="Transparent">
                                <input type="checkbox" ng-model="source.req.transparent" name="source_form.req_transparent">
                            </div>
                    <!-- supported_formats -->
                            <!-- XXXkai: replace by received list of supported formats -->
                            <div labeled-control-group name-for="source_form.supported_formats" text="Supported formats">
                                <select name="source_form.supported_formats" multiple="multiple" ng-model="source.supported_formats">
                                    <option value="PNG">PNG</option>
                                    <option value="JPEG">JPEG</option>
                                    <option value="GIF">GIF</option>
                                </select>
                            </div>
                    <!-- supported_srs -->
                            <!-- XXXkai: replace by received list of supported srs -->
                            <div labeled-control-group name-for="source_form.supported_srs" text="Supported SRS">
                                <select name="source_form.supported_srs" multiple="multiple" ng-model="source.supported_srs">
                                    <option value="EPSG:3857">EPSG:3857</option>
                                    <option value="EPSG:4326">EPSG:4326</option>
                                    <option value="EPSG:900913">EPSG:900913</option>
                                </select>
                            </div>
                    <!-- min_scale -->
                            <div labeled-control-group name-for="source_form.min_scale" text="Min. Scale">
                                <input float type="number" ng-model="source.min_scale" name="source_form.min_scale">
                            </div>
                    <!-- max_scale -->
                            <div labeled-control-group name-for="source_form.max_scale" text="Max. Scale">
                                <input float type="number" ng-model="source.max_scale" name="source_form.max_scale">
                            </div>
                    <!-- min_res -->
                            <div labeled-control-group name-for="source_form.min_res" text="Min. Resolution">
                                <input float type="number" ng-model="source.min_res" name="source_form.min_res">
                            </div>
                    <!-- max_res -->
                            <div labeled-control-group name-for="source_form.max_res" text="Max. Resolution">
                                <input float type="number" ng-model="source.max_res" name="source_form.max_res">
                            </div>
                    <!-- concurent_requests -->
                            <div labeled-control-group name-for="source_form.concurrent_requests" text="Concurrent requests">
                                <input type="number" integer min=0 type="text" ng-model="source.concurrent_requests" name="source_form.concurrent_requests">
                            </div>
                    <!-- wms_opts -->
                        <!-- version -->
                            <div labeled-control-group name-for="source_form.wms_version" text="Version">
                                <select name="source_form.wms_version" ng-model="source.wms_opts.version">
                                    <option value="1.0.0">1.0.0</option>
                                    <option value="1.1.0">1.1.0</option>
                                    <option value="1.1.1">1.1.1</option>
                                    <option value="1.3.0">1.3.0</option>
                                </select>
                            </div>
                        <!-- map -->
                            <div labeled-control-group name-for="source_form.wms_map" text="Map">
                                <input type="checkbox" name="source_form.wms_map" ng-model="source.wms_opts.map">
                            </div>
                        <!-- featureinfo -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo" text="Featureinfo">
                                <input type="checkbox" name="source_form.wms_featureinfo" ng-model="source.wms_opts.featureinfo">
                            </div>
                        <!-- featureinfo_format -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo_format" text="Featureinfo format">
                                <input type="text" name="source_form.wms_featureinfo_format" ng-model="source.wms_opts.featureinfo_format">
                            </div>
                        <!-- featureinfo_xslt -->
                            <div labeled-control-group name-for="source_form.wms_featureinfo_xslt" text="Featureinfo XSLT">
                                <input type="text" name="source_form.wms_featureinfo_xslt" ng-model="source.wms_opts.featureinfo_xslt">
                            </div>
                        <!-- legendgraphic -->
                            <div labeled-control-group name-for="source_form.wms_legendgraphic" text="Legendgraphic">
                                <input type="checkbox" name="source_form.wms_legendgraphic" ng-model="source.wms_opts.legendgraphic">
                            </div>
                        <!-- legendurl -->
                            <div labeled-control-group name-for="source_form.wms_legendurl" text="Legend URL">
                                <input type="url" name="source_form.wms_legendurl" ng-model="source.wms_opts.legendurl">
                            </div>
                        <!-- buttons -->
                            <button class="btn btn-small" ng-click="addSource($event)" ng-disabled="!source_form.$valid">Save</button>
                            <button class="btn btn-small" ng-click="resetForm($event)">Reset</button>
                        </form>
                    </div>

                    <div class="span4 well" ng-controller="TreeCtrl">
                        <h3>Available WMS</h3>
                        <script type="text/ng-template"  id="wms_layer_renderer.html">
                            <div ng-click="show_infos(layer)" class="layer_infos">
                                <h6>{{layer.title}}</h6>
                                <span ng-show="layer.name">Name: {{layer.name}}</span>
                            </div>
                            <div
                                ng-repeat="layer in layer.layers"
                                ng-include="'wms_layer_renderer.html'"
                                draggable
                                item-data="{{itemData(layer)}}"
                                class="wms_layer grp_layer label"></div>
                        </script>
                        <div toggle-group mode='hideOther'>
                            <div ng-repeat="wms in wms_list" class="wms label label-success" >
                                <h5 draggable item-data="{{wms}}" class="wms_source" toggle-element="next">{{wms.title}}</h5>
                                <div ng-show="$first">
                                    <p>URL: {{wms.url}}</p>
                                    <div
                                        ng-repeat="layer in wms.layers"
                                        ng-include="'wms_layer_renderer.html'"
                                        draggable item-data="{{itemData(layer)}}"
                                        class="wms_layer layer label label-info"></div>
                                </div>
                            </div>
                        </div>
                        <hr>
                        <label for="input_wms">Capabilities:</label><input name="input_wms" ng-model="capabilities">
                        <button class="btn btn-small" ng-click="loadData(capabilities)">GetCapabilities</button><!-- add new wms -->
                    </div>

                </div>
            </div>
            <div pane title="Cache">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxyCacheListCtrl">
                        <h3>Mapproxy Cache</h3>
                        <ul>
                            <li
                                class="mapproxy_cache label"
                                ng-repeat="cache in mapproxy_caches | orderBy:'name'"
                                ng-click="editCache(cache)">
                                {{cache.name}}
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeCache(cache)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span3 well" ng-controller="MapproxyCacheFormCtrl">
                        <h3>Edit Cache</h3>
                        <form name="cache_form" ng-model="cache">
                            <label for="cache_name">Name:</label>
                            <input required type="text" required ng-model="cache.name" name="cache_name"/><br>
                            <!-- change-callback MUST provide parameters callback and new_data -->
                            <label for="cache_sources">Sources:</label>
                            <div
                                droppable
                                required
                                accepts="mapproxy_source"
                                allow-array="true"
                                ng-model="cache.sources"
                                name="cache_sources"
                                class="insertable_multi">
                                <div sortable ng-model="cache.sources" >
                                    <div ng-repeat="source in cache.sources">
                                        {{source.name}}
                                        <button class="btn btn-mini btn-danger right" ng-click="remove(source)">X</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <button class="btn btn-small" ng-click="addCache()" ng-disabled="!cache_form.$valid">Save</button>
                        <button class="btn btn-small" ng-click="resetForm()">Reset</button>
                    </div>

                    <div class="span3 well" ng-controller="MapproxySourceListCtrl">
                        <h3>Mapproxy Sources</h3>
                        <ul>
                            <li
                                draggable
                                class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                item-data="{{source}}">
                                {{source.name}}
                            </li>
                        </ul>
                    </div>

                </div>
            </div>
            <div pane title="Layer">
                <div class="row-fluid">

                    <div class="span3 well" ng-controller="MapproxyLayerListCtrl">
                        <h3>Mapproxy Layer</h3>
                        <ul sortable ng-model="mapproxy_layers">
                            <li class="mapproxy_layer label" ng-repeat="layer in mapproxy_layers">
                                <span ng-click="editLayer(layer)">{{layer.name}}</span>
                                <button
                                    class="btn btn-mini btn-danger right"
                                    ask-dialog
                                    dialog-title="Confirm!"
                                    dialog-text="Shold i do it?"
                                    callback="removeLayer(layer)">X</button>
                            </li>
                        </ul>
                    </div>

                    <div class="span3 well" ng-controller="MapproxyLayerFormCtrl">
                        <h3>Edit Layer</h3>
                        <form name="layer_form" ng-model="layer">
                            <label for="layer_name">Name:</label>
                            <input required type="text" required ng-model="layer.name" name="layer_name"/><br>
                            <!-- change-callback MUST provide parameters callback and new_data -->
                            <label for="layer_sources">Sources:</label>
                            <div
                                droppable
                                required
                                accepts="mapproxy_source,mapproxy_cache"
                                allow-array="true"
                                ng-model="layer.sources"
                                name="layer_sources"
                                class="insertable_multi">
                                <div sortable ng-model="layer.sources" >
                                    <div ng-repeat="source in layer.sources">
                                        {{source.name}}
                                        <button class="btn btn-mini btn-danger right" ng-click="remove(source)">X</button>
                                    </div>
                                </div>
                            </div>
                        </form>
                        <button class="btn btn-small" ng-click="addLayer()" ng-disabled="!layer_form.$valid">Save</button>
                        <button class="btn btn-small" ng-click="resetForm()">Reset</button>
                    </div>

                    <div class="span3 well">
                        <h3>Mapproxy Sources</h3>
                        <ul ng-controller="MapproxySourceListCtrl">
                            <li
                                draggable
                                class="mapproxy_source label"
                                ng-repeat="source in mapproxy_sources | orderBy:'name'"
                                item-data="{{source}}">
                                {{source.name}}
                            </li>
                        </ul>
                        <hr>
                        <h3>Mapproxy Caches</h3>
                        <ul ng-controller="MapproxyCacheListCtrl">
                            <li
                                draggable
                                class="mapproxy_cache label"
                                ng-repeat="cache in mapproxy_caches | orderBy:'name'"
                                item-data="{{cache}}">
                                {{cache.name}}
                            </li>
                        </ul>
                    </div>

                </div>
            </div>
        </div>
    </body>
</html>

{'fraction_non_alphanumeric': 0.11260779702088233, 'fraction_numerical': 0.004680113082935405, 'mean_word_length': 0.9915783497350492, 'pattern_counts': {'":': 0, '<': 645, '<?xml version=': 0, '>': 645, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 128, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4367846', 'n_tokens_mistral': 9943, 'n_tokens_neox': 9404, 'n_words': 1598}