提交 4675fff2 编写于 作者: N nicolargo

Correct Probable insecure usage of temp file/directory #820

上级 7d3c085d
......@@ -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);
});
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册