Correct Probable insecure usage of temp file/directory #820

This commit is contained in:
nicolargo 2018-06-03 16:25:49 +02:00
parent 7d3c085d72
commit 4675fff26d
2 changed files with 10 additions and 9 deletions

View File

@ -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

View File

@ -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);
});
}