mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-27 19:25:27 +03:00
Correct Probable insecure usage of temp file/directory #820
This commit is contained in:
parent
7d3c085d72
commit
4675fff26d
@ -21,6 +21,7 @@
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from glances import __version__, psutil_version
|
||||
from glances.compat import input
|
||||
@ -170,7 +171,7 @@ Examples of use:
|
||||
dest='export_json_file',
|
||||
help='file path for JSON exporter')
|
||||
parser.add_argument('--export-graph-path',
|
||||
default='/tmp',
|
||||
default=tempfile.gettempdir(),
|
||||
dest='export_graph_path',
|
||||
help='Folder for Graph exporter')
|
||||
# Client/Server option
|
||||
|
@ -4,14 +4,6 @@ export default function GlancesPluginDockerController($scope, GlancesStats) {
|
||||
vm.containers = [];
|
||||
vm.version = null;
|
||||
|
||||
vm.$onInit = function () {
|
||||
loadData(GlancesStats.getData());
|
||||
};
|
||||
|
||||
$scope.$on('data_refreshed', function (event, data) {
|
||||
loadData(data);
|
||||
});
|
||||
|
||||
var loadData = function (data) {
|
||||
var stats = data.stats['docker'];
|
||||
vm.containers = [];
|
||||
@ -40,4 +32,12 @@ export default function GlancesPluginDockerController($scope, GlancesStats) {
|
||||
|
||||
vm.version = stats['version']['Version'];
|
||||
}
|
||||
|
||||
vm.$onInit = function () {
|
||||
loadData(GlancesStats.getData());
|
||||
};
|
||||
|
||||
$scope.$on('data_refreshed', function (event, data) {
|
||||
loadData(data);
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user