Skip to content

Commit

Permalink
主机列表为空时, 默认显示安装 agent 命令
Browse files Browse the repository at this point in the history
  • Loading branch information
neargle committed Apr 25, 2018
1 parent cbb77cb commit 0e005da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/static/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,10 @@ hostw.controller('hostlist', function ($scope, $http, Notification) {
$scope.toggle_command = function () {
$scope.command_show = !$scope.command_show;
}
// hosts 为空时,默认显示安装 agent 命令
if ($scope.hosts.length == 0) {
$scope.toggle_command();
}

default_history = ["windows", "linux", "web", "db", "offline", "online", "can-not-push"]
$scope.history = default_history.concat(localStorage.host_filter_history.split(":::"));
Expand Down

0 comments on commit 0e005da

Please sign in to comment.