HEX
Server: LiteSpeed
System: Linux baran.dnsprotection.me 4.18.0-553.83.1.lve.el8.x86_64 #1 SMP Wed Nov 12 10:04:12 UTC 2025 x86_64
User: ddir12 (3618)
PHP: 8.3.31
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/glances/outputs/static/js/components/plugin-wifi.vue
<template>
    <section class="plugin" id="wifi">
        <div class="table-row" v-if="hotspots.length > 0">
            <div class="table-cell text-left title">WIFI</div>
            <div class="table-cell"></div>
            <div class="table-cell">dBm</div>
        </div>
        <div class="table-row" v-for="(hotspot, hotspotId) in hotspots" :key="hotspotId">
            <div class="table-cell text-left">
                {{ $filters.limitTo(hotspot.ssid, 20) }}
                <span v-if="hotspot.encrypted">
                    {{ hotspot.encryption_type }}
                </span>
            </div>
            <div class="table-cell"></div>
            <div class="table-cell" :class="getDecoration(hotspot, 'signal')">
                {{ hotspot.signal }}
            </div>
        </div>
    </section>
</template>

<script>
import { orderBy } from 'lodash';

export default {
    props: {
        data: {
            type: Object
        }
    },
    computed: {
        stats() {
            return this.data.stats['wifi'];
        },
        view() {
            return this.data.views['wifi'];
        },
        hotspots() {
            const hotspots = this.stats
                .map((hotspotData) => {
                    if (hotspotData['ssid'] === '') {
                        return;
                    }
                    return {
                        ssid: hotspotData['ssid'],
                        encrypted: hotspotData['encrypted'],
                        signal: hotspotData['signal'],
                        encryption_type: hotspotData['encryption_type']
                    };
                })
                .filter(Boolean);
            return orderBy(hotspots, ['ssid']);
        }
    },
    methods: {
        getDecoration(hotpost, field) {
            if (this.view[hotpost.ssid][field] === undefined) {
                return;
            }
            return this.view[hotpost.ssid][field].decoration.toLowerCase();
        }
    }
};
</script>