diff --git a/src/cli/one_helper.rb b/src/cli/one_helper.rb index e644c3c404..1a76dc888b 100644 --- a/src/cli/one_helper.rb +++ b/src/cli/one_helper.rb @@ -649,13 +649,13 @@ user #{self.rname} of the user identified by the username EOT end - def self.table_conf - path = "#{ENV["HOME"]}/.one/cli/#{self.conf_file}" + def self.table_conf(conf_file=self.conf_file) + path = "#{ENV["HOME"]}/.one/cli/#{conf_file}" if File.exists?(path) return path else - return "#{TABLE_CONF_PATH}/#{self.conf_file}" + return "#{TABLE_CONF_PATH}/#{conf_file}" end end diff --git a/src/cli/one_helper/oneacct_helper.rb b/src/cli/one_helper/oneacct_helper.rb index 00471f0d71..0dbcd0d1b2 100644 --- a/src/cli/one_helper/oneacct_helper.rb +++ b/src/cli/one_helper/oneacct_helper.rb @@ -114,7 +114,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper ACCT_OPTIONS = [START_TIME_ACCT, END_TIME_ACCT, USERFILTER, GROUP, HOST, XPATH, XML, JSON, SPLIT] SHOWBACK_OPTIONS = [START_TIME_SHOWBACK, END_TIME_SHOWBACK, USERFILTER, GROUP, XML, JSON] - ACCT_TABLE = CLIHelper::ShowTable.new("oneacct.yaml", nil) do + ACCT_TABLE = CLIHelper::ShowTable.new(self.table_conf("oneacct.yaml"), nil) do column :UID, "User ID", :size=>4 do |d| d["UID"] end @@ -190,7 +190,7 @@ class AcctHelper < OpenNebulaHelper::OneHelper default :VID, :HOSTNAME, :ACTION, :REASON, :START_TIME, :END_TIME, :MEMORY, :CPU, :NETRX, :NETTX, :TOTAL_DISK_SIZE end - SHOWBACK_TABLE = CLIHelper::ShowTable.new("oneshowback.yaml", nil) do + SHOWBACK_TABLE = CLIHelper::ShowTable.new(self.table_conf("oneshowback.yaml"), nil) do column :UID, "User ID", :size=>4 do |d| d["UID"] end