<commit_before><div class="container-fluid">
    <ol class="breadcrumb">
        <li><a href="#/storage">Storage</a></li>
        <li>Pools</li>
    </ol>
    <div class="page-header">
        <h1>Pools</h1>
    </div>
    <div class="row form-group" ng-if="storages.list.length > 0">
        <div class="col-md-3">
            <input type="text" class="form-control" placeholder="Search" ng-model="search">
        </div>
        <div class="col-md-6">
            <ul>
                <span class="list-inline" ng-repeat="(key, value) in storages.paramsObject">
                    <li ng-if="storages.isArray(value)" ng-repeat="subdata in value">
                        <span class="label label-info">
                        {{key}} : {{subdata}}
                         <a href="" ng-click="storages.clearSearchQuery(key,$index)"><span class="pficon pficon-close cross-button"></span></a>
                        </span>
                    </li>
                    <li ng-if="!storages.isArray(value)">
                        <span class="label label-info">
                        {{key}} : {{value}}
                         <a href="" ng-click="storages.clearSearchQuery(key,null)"><span class="pficon pficon-close cross-button"></span></a>
                        </span>
                    </li>
                </span>
            </ul>
        </div>
        <div class="col-md-3">
            <span class="pull-right">
                <button class="btn btn-primary btn-lg" ng-click="storages.create()">Add Storage</button>
            </span>
        </div>
    </div>
    <center ng-if="storages.clusters.length > 0 && storages.list.length == 0">
        <div class="blank-slate-pf">
            <div class="blank-slate-pf-icon">
                <i class="fa fa-database"></i>
            </div>
            <h1>Add Storage Pools</h1>
            <p> There are no storage pools currently defined. Click Add Storage to create RADOS object storage.</p>
            <div class="blank-slate-pf-main-action">
                <button class="btn btn-primary btn-lg" ng-click="storages.create()">
                Add Storage
                </button>
            </div>
        </div>
    </center>
    <center ng-if="storages.clusters.length == 0">
        <div class="blank-slate-pf">
            <div class="blank-slate-pf-icon">
                <i class="fa fa-database"></i>
            </div>
            <h1>Add Storage Pools</h1>
            <p> There are currently no Ceph clusters defined. Storage pools must be added to an existing cluster.</p>
            <p> Start by creating or importing a cluster.</p>
            <p> You may return here to add more pools after the cluster is created.</p>
            <div class="blank-slate-pf-main-action">
                <button class="btn btn-primary btn-lg" ng-click="storages.createCluster()">
                Create Cluster
                </button>
            </div>
        </div>
    </center>
    <div class="list-group list-view-pf storage-list">
        <div class="list-group-item listview list-view-pf-stacked" ng-repeat="storage in storages.list | filter:search">
            <div class="list-view-pf-actions">
                <div class="dropdown pull-right dropdown-kebab-pf">
                    <button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight-{{$index}}" bs-dropdown="dropdown" aria-haspopup="true"
                    aria-expanded="true">
                        <span class="fa fa-ellipsis-v"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownKebabRight-{{$index}}">
                        <li><a ng-click="storages.remove(storage)">Remove</a></li>
                        <li><a ng-click="(storages.edit(storage))" >Edit</a></li>
                    </ul>
                </div>
            </div>
            <div class="list-view-pf-main-info pool-list-main-info">
                <div class="list-view-pf-left">
                    <label class="pficon pficon-running" ng-if="storage.status !== 0"></label>
                    <label class="pficon pficon-ok" ng-if="storage.status === 0"></label>
                </div>
                <div class="list-view-pf-body">
                    <div class="list-view-pf-additional-info justify-equal-space-around">
                    <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                        <div>
                            <p>
                                <strong ng-bind="storage.name"></strong>
                                <small> on</small>
                                <strong ng-bind="storages.getClusterName(storage.clusterid)"></strong>
                            </p>
                        </div>
                        <div class="list-group-item-text">
                            <span ng-if="storage.type === 'erasure_coded'">Erasure Coded</span>
                            <span ng-if="storage.type === 'replicated'">Standard</span>
                        </div>
                    </div>

                        <div class="list-view-pf-additional-info-item">
                            <c3chart bindto-id="donut-pool-usage-chart-{{$index}}">
                                <chart-column column-id="Free" column-values="{{100 - storage.usage.percentused | number:1}}" column-color="#CCCCCC" column-type="donut"
                                />
                                <chart-column column-id="Using" column-values="{{storage.usage.percentused | number:1}}" column-color="{{storage.usage.percentused >= 90 ? '#CC0000' : storage.usage.percentused >= 80 ? '#EC7A08' : '#3F9C35'}}"
                                column-type="donut" />
                                <chart-donut title="{{storage.usage.percentused | number:1}}%" width="5" show-label="false" />
                                <chart-legend show-legend="false"></chart-legend>
                                <chart-size chart-height="80"></chart-size>
                                <chart-tooltip show-tooltip="false"></chart-tooltip>
                            </c3chart>
                            <div ng-class="{'overlap-donut-left' : (storage.usage.total > 0)}">
                            <strong ng-bind=" storage.usage.used | bytes "></strong> of {{ storage.usage.total | bytes }}
                            used
                            </div>
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Replicas</strong>{{storage.replicas }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>OSDs</strong>{{storage.slus.length }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>PGs</strong>{{storage.options1.pg_num }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Quotas</strong>
                            <span ng-if="storage.quota_enabled">
                                <span ng-if="storage.quota_params.quota_max_bytes !== undefined">{{storage.quota_params.quota_max_bytes/storage.usage.total*100}}%</span>
                            <span ng-if="storage.quota_params.quota_max_objects !== undefined">, {{storage.quota_params.quota_max_objects}} objects</span>
                            </span>
                            <span ng-if="!storage.quota_enabled">Disabled</span>
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Alerts</strong><commit_msg>Fixes quota size error in pool listing<commit_after><div class="container-fluid">
    <ol class="breadcrumb">
        <li><a href="#/storage">Storage</a></li>
        <li>Pools</li>
    </ol>
    <div class="page-header">
        <h1>Pools</h1>
    </div>
    <div class="row form-group" ng-if="storages.list.length > 0">
        <div class="col-md-3">
            <input type="text" class="form-control" placeholder="Search" ng-model="search">
        </div>
        <div class="col-md-6">
            <ul>
                <span class="list-inline" ng-repeat="(key, value) in storages.paramsObject">
                    <li ng-if="storages.isArray(value)" ng-repeat="subdata in value">
                        <span class="label label-info">
                        {{key}} : {{subdata}}
                         <a href="" ng-click="storages.clearSearchQuery(key,$index)"><span class="pficon pficon-close cross-button"></span></a>
                        </span>
                    </li>
                    <li ng-if="!storages.isArray(value)">
                        <span class="label label-info">
                        {{key}} : {{value}}
                         <a href="" ng-click="storages.clearSearchQuery(key,null)"><span class="pficon pficon-close cross-button"></span></a>
                        </span>
                    </li>
                </span>
            </ul>
        </div>
        <div class="col-md-3">
            <span class="pull-right">
                <button class="btn btn-primary btn-lg" ng-click="storages.create()">Add Storage</button>
            </span>
        </div>
    </div>
    <center ng-if="storages.clusters.length > 0 && storages.list.length == 0">
        <div class="blank-slate-pf">
            <div class="blank-slate-pf-icon">
                <i class="fa fa-database"></i>
            </div>
            <h1>Add Storage Pools</h1>
            <p> There are no storage pools currently defined. Click Add Storage to create RADOS object storage.</p>
            <div class="blank-slate-pf-main-action">
                <button class="btn btn-primary btn-lg" ng-click="storages.create()">
                Add Storage
                </button>
            </div>
        </div>
    </center>
    <center ng-if="storages.clusters.length == 0">
        <div class="blank-slate-pf">
            <div class="blank-slate-pf-icon">
                <i class="fa fa-database"></i>
            </div>
            <h1>Add Storage Pools</h1>
            <p> There are currently no Ceph clusters defined. Storage pools must be added to an existing cluster.</p>
            <p> Start by creating or importing a cluster.</p>
            <p> You may return here to add more pools after the cluster is created.</p>
            <div class="blank-slate-pf-main-action">
                <button class="btn btn-primary btn-lg" ng-click="storages.createCluster()">
                Create Cluster
                </button>
            </div>
        </div>
    </center>
    <div class="list-group list-view-pf storage-list">
        <div class="list-group-item listview list-view-pf-stacked" ng-repeat="storage in storages.list | filter:search">
            <div class="list-view-pf-actions">
                <div class="dropdown pull-right dropdown-kebab-pf">
                    <button class="btn btn-link dropdown-toggle" type="button" id="dropdownKebabRight-{{$index}}" bs-dropdown="dropdown" aria-haspopup="true"
                    aria-expanded="true">
                        <span class="fa fa-ellipsis-v"></span>
                    </button>
                    <ul class="dropdown-menu" role="menu" aria-labelledby="dropdownKebabRight-{{$index}}">
                        <li><a ng-click="storages.remove(storage)">Remove</a></li>
                        <li><a ng-click="(storages.edit(storage))" >Edit</a></li>
                    </ul>
                </div>
            </div>
            <div class="list-view-pf-main-info pool-list-main-info">
                <div class="list-view-pf-left">
                    <label class="pficon pficon-running" ng-if="storage.status !== 0"></label>
                    <label class="pficon pficon-ok" ng-if="storage.status === 0"></label>
                </div>
                <div class="list-view-pf-body">
                    <div class="list-view-pf-additional-info justify-equal-space-around">
                    <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                        <div>
                            <p>
                                <strong ng-bind="storage.name"></strong>
                                <small> on</small>
                                <strong ng-bind="storages.getClusterName(storage.clusterid)"></strong>
                            </p>
                        </div>
                        <div class="list-group-item-text">
                            <span ng-if="storage.type === 'erasure_coded'">Erasure Coded</span>
                            <span ng-if="storage.type === 'replicated'">Standard</span>
                        </div>
                    </div>

                        <div class="list-view-pf-additional-info-item">
                            <c3chart bindto-id="donut-pool-usage-chart-{{$index}}">
                                <chart-column column-id="Free" column-values="{{100 - storage.usage.percentused | number:1}}" column-color="#CCCCCC" column-type="donut"
                                />
                                <chart-column column-id="Using" column-values="{{storage.usage.percentused | number:1}}" column-color="{{storage.usage.percentused >= 90 ? '#CC0000' : storage.usage.percentused >= 80 ? '#EC7A08' : '#3F9C35'}}"
                                column-type="donut" />
                                <chart-donut title="{{storage.usage.percentused | number:1}}%" width="5" show-label="false" />
                                <chart-legend show-legend="false"></chart-legend>
                                <chart-size chart-height="80"></chart-size>
                                <chart-tooltip show-tooltip="false"></chart-tooltip>
                            </c3chart>
                            <div ng-class="{'overlap-donut-left' : (storage.usage.total > 0)}">
                            <strong ng-bind=" storage.usage.used | bytes "></strong> of {{ storage.usage.total | bytes }}
                            used
                            </div>
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Replicas</strong>{{storage.replicas }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>OSDs</strong>{{storage.slus.length }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>PGs</strong>{{storage.options1.pg_num }}
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Quotas</strong>
                            <span ng-if="storage.quota_enabled">
                                <span ng-if="storage.quota_params.quota_max_bytes !== undefined">{{storage.quota_params.quota_max_bytes | bytes}}</span>
                                <span ng-if="storage.quota_params.quota_max_bytes !== undefined && storage.quota_params.quota_max_objects !== undefined">, </span>
                            <span ng-if="storage.quota_params.quota_max_objects !== undefined">{{storage.quota_params.quota_max_objects}} objects</span>
                            </span>
                            <span ng-if="!storage.quota_enabled">Disabled</span>
                        </div>
                        <div class="list-view-pf-additional-info-item list-view-pf-additional-info-item-stacked">
                            <strong>Alerts</strong>
{'fraction_non_alphanumeric': 0.14863784515097472, 'fraction_numerical': 0.005473218129266343, 'mean_word_length': 1.4617014834998485, 'pattern_counts': {'":': 0, '<': 351, '<?xml version=': 0, '>': 361, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7054592', 'n_tokens_mistral': 4606, 'n_tokens_neox': 4346, 'n_words': 749}