mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-28 11:41:46 +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 argparse
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from glances import __version__, psutil_version
|
from glances import __version__, psutil_version
|
||||||
from glances.compat import input
|
from glances.compat import input
|
||||||
@ -170,7 +171,7 @@ Examples of use:
|
|||||||
dest='export_json_file',
|
dest='export_json_file',
|
||||||
help='file path for JSON exporter')
|
help='file path for JSON exporter')
|
||||||
parser.add_argument('--export-graph-path',
|
parser.add_argument('--export-graph-path',
|
||||||
default='/tmp',
|
default=tempfile.gettempdir(),
|
||||||
dest='export_graph_path',
|
dest='export_graph_path',
|
||||||
help='Folder for Graph exporter')
|
help='Folder for Graph exporter')
|
||||||
# Client/Server option
|
# Client/Server option
|
||||||
|
@ -4,14 +4,6 @@ export default function GlancesPluginDockerController($scope, GlancesStats) {
|
|||||||
vm.containers = [];
|
vm.containers = [];
|
||||||
vm.version = null;
|
vm.version = null;
|
||||||
|
|
||||||
vm.$onInit = function () {
|
|
||||||
loadData(GlancesStats.getData());
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.$on('data_refreshed', function (event, data) {
|
|
||||||
loadData(data);
|
|
||||||
});
|
|
||||||
|
|
||||||
var loadData = function (data) {
|
var loadData = function (data) {
|
||||||
var stats = data.stats['docker'];
|
var stats = data.stats['docker'];
|
||||||
vm.containers = [];
|
vm.containers = [];
|
||||||
@ -40,4 +32,12 @@ export default function GlancesPluginDockerController($scope, GlancesStats) {
|
|||||||
|
|
||||||
vm.version = stats['version']['Version'];
|
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