mirror of
https://github.com/containers/podman.git
synced 2025-06-23 18:59:30 +08:00
api: fix doc for default ps_args
The libpod API does not set a default. Also PodTop is podman sepecific so we can just rmeove this extra branch there. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -362,17 +362,12 @@ func PodTop(w http.ResponseWriter, r *http.Request) {
|
||||
runtime := r.Context().Value(api.RuntimeKey).(*libpod.Runtime)
|
||||
decoder := r.Context().Value(api.DecoderKey).(*schema.Decoder)
|
||||
|
||||
psArgs := "-ef"
|
||||
if utils.IsLibpodRequest(r) {
|
||||
psArgs = ""
|
||||
}
|
||||
query := struct {
|
||||
Delay int `schema:"delay"`
|
||||
PsArgs string `schema:"ps_args"`
|
||||
Stream bool `schema:"stream"`
|
||||
}{
|
||||
Delay: 5,
|
||||
PsArgs: psArgs,
|
||||
}
|
||||
if err := decoder.Decode(&query, r.URL.Query()); err != nil {
|
||||
utils.Error(w, http.StatusBadRequest, fmt.Errorf("failed to parse parameters for %s: %w", r.URL.String(), err))
|
||||
|
@ -1174,7 +1174,7 @@ func (s *APIServer) registerContainersHandlers(r *mux.Router) error {
|
||||
// - in: query
|
||||
// name: ps_args
|
||||
// type: string
|
||||
// default: -ef
|
||||
// default:
|
||||
// description: |
|
||||
// arguments to pass to ps such as aux.
|
||||
// Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
|
||||
|
@ -309,7 +309,7 @@ func (s *APIServer) registerPodsHandlers(r *mux.Router) error {
|
||||
// - in: query
|
||||
// name: ps_args
|
||||
// type: string
|
||||
// default: -ef
|
||||
// default:
|
||||
// description: |
|
||||
// arguments to pass to ps such as aux.
|
||||
// Requires ps(1) to be installed in the container if no ps(1) compatible AIX descriptors are used.
|
||||
|
Reference in New Issue
Block a user