mirror of
https://git.proxmox.com/git/proxmox
synced 2025-10-04 16:49:12 +00:00
use complete_file_name from proxmox-router 1.1
This commit is contained in:
parent
919ccf713a
commit
432374d024
@ -6,7 +6,7 @@ edition = "2018"
|
|||||||
description = "Simple RRD database implementation."
|
description = "Simple RRD database implementation."
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
proxmox-router = "1"
|
proxmox-router = "1.1"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
@ -7,7 +7,7 @@ use serde::{Serialize, Deserialize};
|
|||||||
use serde_json::json;
|
use serde_json::json;
|
||||||
|
|
||||||
use proxmox_router::RpcEnvironment;
|
use proxmox_router::RpcEnvironment;
|
||||||
use proxmox_router::cli::{run_cli_command, CliCommand, CliCommandMap, CliEnvironment};
|
use proxmox_router::cli::{run_cli_command, complete_file_name, CliCommand, CliCommandMap, CliEnvironment};
|
||||||
use proxmox_schema::{api, parse_property_string};
|
use proxmox_schema::{api, parse_property_string};
|
||||||
use proxmox_schema::{ApiStringFormat, ApiType, IntegerSchema, Schema, StringSchema};
|
use proxmox_schema::{ApiStringFormat, ApiType, IntegerSchema, Schema, StringSchema};
|
||||||
|
|
||||||
@ -350,55 +350,55 @@ fn main() -> Result<(), Error> {
|
|||||||
"create",
|
"create",
|
||||||
CliCommand::new(&API_METHOD_CREATE_RRD)
|
CliCommand::new(&API_METHOD_CREATE_RRD)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"dump",
|
"dump",
|
||||||
CliCommand::new(&API_METHOD_DUMP_RRD)
|
CliCommand::new(&API_METHOD_DUMP_RRD)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"fetch",
|
"fetch",
|
||||||
CliCommand::new(&API_METHOD_FETCH_RRD)
|
CliCommand::new(&API_METHOD_FETCH_RRD)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"first",
|
"first",
|
||||||
CliCommand::new(&API_METHOD_FIRST_UPDATE_TIME)
|
CliCommand::new(&API_METHOD_FIRST_UPDATE_TIME)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"info",
|
"info",
|
||||||
CliCommand::new(&API_METHOD_RRD_INFO)
|
CliCommand::new(&API_METHOD_RRD_INFO)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"last",
|
"last",
|
||||||
CliCommand::new(&API_METHOD_LAST_UPDATE_TIME)
|
CliCommand::new(&API_METHOD_LAST_UPDATE_TIME)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"lastupdate",
|
"lastupdate",
|
||||||
CliCommand::new(&API_METHOD_LAST_UPDATE)
|
CliCommand::new(&API_METHOD_LAST_UPDATE)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"resize",
|
"resize",
|
||||||
CliCommand::new(&API_METHOD_RESIZE_RRD)
|
CliCommand::new(&API_METHOD_RESIZE_RRD)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
.insert(
|
.insert(
|
||||||
"update",
|
"update",
|
||||||
CliCommand::new(&API_METHOD_UPDATE_RRD)
|
CliCommand::new(&API_METHOD_UPDATE_RRD)
|
||||||
.arg_param(&["path"])
|
.arg_param(&["path"])
|
||||||
//.completion_cb("path", pbs_tools::fs::complete_file_name)
|
.completion_cb("path", complete_file_name)
|
||||||
)
|
)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user