<commit_before><!--
 Copyright 2014 Solinea, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

 Author: <NAME>
 -->

{% extends "base.html" %}
{% load staticfiles %}
{% load custom_filters %}


{% block localcss %}
{% endblock %}

{% block localjs %}
    <script src="{% static 'cinder/js/cinder.js' %}"></script>
    <script>

$(document).ready(function () {
    var gnd = goldstone.cinder.discover,
        ns = goldstone.cinder.topology
    ns.data = JSON.parse({{ data|to_js }})
    ns.topologyTree = goldstone.charts.topologyTree._getInstance(ns)
    ns.leafDataUrls = {
        "services-leaf": "/cinder/services",
        "volumes-leaf": "/cinder/volumes",
        "backups-leaf": "/cinder/backups",
        "snapshots-leaf": "/cinder/snapshots",
        "transfers-leaf": "/cinder/transfers",
        "volume-types-leaf": "/cinder/volume_types"
    }
    ns.h = 400
    ns.location = '#cinder-topology-tree'
    ns.singleRsrcLocation = '#single-rsrc-table'
    ns.spinner = '#cinder-topology-spinner'
    ns.singleRsrcSpinner = '#single-rsrc-loading-indicator'
    ns.multiRsrcSpinner = '#multi-rsrc-loading-indicator'
    $(ns.spinner).hide()
    $(ns.singleRsrcSpinner).hide()
    $(ns.multiRsrcSpinner).hide()
    //ns.infoIcon = '#cinder-topology-info'

    // override the default filter for the multi resource table
    ns.topologyTree.filterMultiRsrcData = function (data) {
        "use strict";
        var newData = jQuery.extend(true, {}, data)
        newData = _.map(newData, function(d) {
            delete d['@timestamp']
            delete d['metadata']
            delete d['region']
            return d
        })
        return newData
    }
    ns.topologyTree.init()
})
    </script>

{% endblock %}


{% block content %}
    <div id="cinder-discover-r1" class="row">
        <div id="cinder-discover-r1-c1" class="col-md-6">
            <div id = "cinder-topology-panel" class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-tasks"></i> Cinder Topology
                            <i class="pull-right fa fa-info-circle panel-info"  id="cinder-topology-info"
                                    style="opacity: 0.0"></i>
                    </h3>
                </div>
                <div class="panel-body" style="height:400px">
                    <div id="cinder-topology-tree">
                        <img src="{% static 'images/ajax-loader-solinea-blue.gif' %}"
                             id="cinder-topology-spinner"
                             class="ajax-loader"/><commit_msg>finalized filters on mult-resource table for cinder (GOLD-360)<commit_after><!--
 Copyright 2014 Solinea, Inc.

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.

 Author: <NAME>
 -->

{% extends "base.html" %}
{% load staticfiles %}
{% load custom_filters %}


{% block localcss %}
{% endblock %}

{% block localjs %}
    <script src="{% static 'cinder/js/cinder.js' %}"></script>
    <script>

$(document).ready(function () {
    var gnd = goldstone.cinder.discover,
        ns = goldstone.cinder.topology
    ns.data = JSON.parse({{ data|to_js }})
    ns.topologyTree = goldstone.charts.topologyTree._getInstance(ns)
    ns.leafDataUrls = {
        "services-leaf": "/cinder/services",
        "volumes-leaf": "/cinder/volumes",
        "backups-leaf": "/cinder/backups",
        "snapshots-leaf": "/cinder/snapshots",
        "transfers-leaf": "/cinder/transfers",
        "volume-types-leaf": "/cinder/volume_types"
    }
    ns.h = 400
    ns.location = '#cinder-topology-tree'
    ns.singleRsrcLocation = '#single-rsrc-table'
    ns.spinner = '#cinder-topology-spinner'
    ns.singleRsrcSpinner = '#single-rsrc-loading-indicator'
    ns.multiRsrcSpinner = '#multi-rsrc-loading-indicator'
    $(ns.spinner).hide()
    $(ns.singleRsrcSpinner).hide()
    $(ns.multiRsrcSpinner).hide()
    //ns.infoIcon = '#cinder-topology-info'

    // override the default filter for the multi resource table
    ns.topologyTree.filterMultiRsrcData = function (data) {
        "use strict";
        var newData = jQuery.extend(true, {}, data)
        newData = _.map(newData, function(d) {
            delete d['@timestamp']
            delete d['metadata']
            delete d['region']
            delete d['extra_specs']
            delete d['display_description']
            delete d['os-extended-snapshot-attributes:progress']
            delete d['links']
            delete d['attachments']
            delete d['availability_zone']
            delete d['os-vol-mig-status-attr:migstat']
            delete d['os-vol-mig-status-attr:name_id']
            delete d['snapshot_id']
            delete d['source_volid']
            return d
        })
        return newData
    }
    ns.topologyTree.init()
})
    </script>

{% endblock %}


{% block content %}
    <div id="cinder-discover-r1" class="row">
        <div id="cinder-discover-r1-c1" class="col-md-6">
            <div id = "cinder-topology-panel" class="panel panel-primary">
                <div class="panel-heading">
                    <h3 class="panel-title"><i class="fa fa-tasks"></i> Cinder Topology
                            <i class="pull-right fa fa-info-circle panel-info"  id="cinder-topology-info"
                                    style="opacity: 0.0"></i>
                    </h3>
                </div>
                <div class="panel-body" style="height:400px">
                    <div id="cinder-topology-tree">
                        <img src="{% static 'images/ajax-loader-solinea-blue.gif' %}"
                             id="cinder-topology-spinner"
                             class="ajax-loader"/>
{'fraction_non_alphanumeric': 0.13739313034348283, 'fraction_numerical': 0.007049647517624119, 'mean_word_length': 2.2960949085516558, 'pattern_counts': {'":': 12, '<': 43, '<?xml version=': 0, '>': 43, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2762855', 'n_tokens_mistral': 2052, 'n_tokens_neox': 1956, 'n_words': 464}