Skip to content

Commit

Permalink
Correct some issues concerning #1985: make the podman object serializ…
Browse files Browse the repository at this point in the history
…able, update the webui, update the documentation
  • Loading branch information
nicolargo committed May 8, 2023
1 parent e3a1a77 commit 2ae676b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
28 changes: 14 additions & 14 deletions glances/outputs/static/js/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@
</div>
</div>
<div class="col-sm-18">
<glances-plugin-docker
v-if="!args.disable_docker"
<glances-plugin-containers
v-if="!args.disable_containers"
:data="data"
></glances-plugin-docker>
></glances-plugin-containers>
<glances-plugin-process :data="data"></glances-plugin-process>
<glances-plugin-alert
v-if="!args.disable_alert"
Expand All @@ -153,7 +153,7 @@ import GlancesPluginCloud from './components/plugin-cloud.vue';
import GlancesPluginConnections from './components/plugin-connections.vue';
import GlancesPluginCpu from './components/plugin-cpu.vue';
import GlancesPluginDiskio from './components/plugin-diskio.vue';
import GlancesPluginDocker from './components/plugin-docker.vue';
import GlancesPluginContainers from './components/plugin-containers.vue';
import GlancesPluginFolders from './components/plugin-folders.vue';
import GlancesPluginFs from './components/plugin-fs.vue';
import GlancesPluginGpu from './components/plugin-gpu.vue';
Expand Down Expand Up @@ -183,7 +183,7 @@ export default {
GlancesPluginConnections,
GlancesPluginCpu,
GlancesPluginDiskio,
GlancesPluginDocker,
GlancesPluginContainers,
GlancesPluginFolders,
GlancesPluginFs,
GlancesPluginGpu,
Expand Down Expand Up @@ -241,37 +241,37 @@ export default {
},
methods: {
setupHotKeys() {
// a => Sort processes/docker automatically
// a => Sort processes/containers automatically
hotkeys('a', () => {
this.store.args.sort_processes_key = null;
});
// c => Sort processes/docker by CPU%
// c => Sort processes/containers by CPU%
hotkeys('c', () => {
this.store.args.sort_processes_key = 'cpu_percent';
});
// m => Sort processes/docker by MEM%
// m => Sort processes/containers by MEM%
hotkeys('m', () => {
this.store.args.sort_processes_key = 'memory_percent';
});
// u => Sort processes/docker by user
// u => Sort processes/containers by user
hotkeys('u', () => {
this.store.args.sort_processes_key = 'username';
});
// p => Sort processes/docker by name
// p => Sort processes/containers by name
hotkeys('p', () => {
this.store.args.sort_processes_key = 'name';
});
// i => Sort processes/docker by I/O rate
// i => Sort processes/containers by I/O rate
hotkeys('i', () => {
this.store.args.sort_processes_key = 'io_counters';
});
// t => Sort processes/docker by time
// t => Sort processes/containers by time
hotkeys('t', () => {
this.store.args.sort_processes_key = 'timemillis';
});
Expand Down Expand Up @@ -331,9 +331,9 @@ export default {
this.store.args.process_short_name = !this.store.args.process_short_name;
});
// D => Enable/disable Docker stats
// D => Enable/disable containers stats
hotkeys('shift+D', () => {
this.store.args.disable_docker = !this.store.args.disable_docker;
this.store.args.disable_containers = !this.store.args.disable_containers;
});
// b => Bytes or bits for network I/O
Expand Down
2 changes: 1 addition & 1 deletion glances/outputs/static/js/components/help.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
{{ help.sort_io_rate }}
</div>
<div class="divTableCell">
{{ help.show_hide_docker }}
{{ help.show_hide_containers }}
</div>
<div class="divTableCell">
{{ help.toggle_used_free }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
{{ containers.length }} sorted by {{ sorter.getColumnLabel(sorter.column) }}
<div class="table">
<div class="table-row">
<div class="table-cell text-left">Engine</div>
<div class="table-cell text-left">Pod</div>
<div
class="table-cell text-left"
:class="['sortable', sorter.column === 'name' && 'sort']"
Expand Down Expand Up @@ -39,6 +41,8 @@
v-for="(container, containerId) in containers"
:key="containerId"
>
<div class="table-cell text-left">{{ container.engine }}</div>
<div class="table-cell text-left">{{ container.pod_id || '-' }}</div>
<div class="table-cell text-left">{{ container.name }}</div>
<div class="table-cell" :class="container.status == 'Paused' ? 'careful' : 'ok'">
{{ container.status }}
Expand Down Expand Up @@ -99,7 +103,7 @@ export default {
return this.args.sort_processes_key;
},
stats() {
return this.data.stats['docker'];
return this.data.stats['containers'];
},
containers() {
const { sorter } = this;
Expand All @@ -120,7 +124,9 @@ export default {
'tx': containerData.network.tx != undefined ? containerData.network.tx : '?',
'net_time_since_update': containerData.network.time_since_update,
'command': containerData.Command.join(' '),
'image': containerData.Image
'image': containerData.Image,
'engine': containerData.engine,
'pod_id': containerData.pod_id
};
});
return orderBy(
Expand Down
2 changes: 1 addition & 1 deletion glances/outputs/static/public/glances.js

Large diffs are not rendered by default.

0 comments on commit 2ae676b

Please sign in to comment.