mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-29 15:44:26 +00:00
fleet: Add --filter
, --no-header
, --no-truncate
, and --sort
options
Resolves: #2503 Change-type: minor Signed-off-by: Matthew Yarmolinsky <matthew-timothy@balena.io>
This commit is contained in:
parent
efe6fd22ce
commit
3cb35ea318
@ -333,6 +333,30 @@ Examples:
|
||||
|
||||
### Options
|
||||
|
||||
#### --fields FIELDS
|
||||
|
||||
only show provided fields (comma-separated)
|
||||
|
||||
#### -j, --json
|
||||
|
||||
output in json format
|
||||
|
||||
#### --filter FILTER
|
||||
|
||||
filter results by substring matching of a given field, eg: --filter field=foo
|
||||
|
||||
#### --no-header
|
||||
|
||||
hide table header from output
|
||||
|
||||
#### --no-truncate
|
||||
|
||||
do not truncate output to fit screen
|
||||
|
||||
#### --sort SORT
|
||||
|
||||
field to sort by (prepend '-' for descending order)
|
||||
|
||||
## fleet <fleet>
|
||||
|
||||
Display detailed information about a single fleet.
|
||||
|
@ -20,7 +20,6 @@ import { flags } from '@oclif/command';
|
||||
import Command from '../command';
|
||||
import * as cf from '../utils/common-flags';
|
||||
import { getBalenaSdk, stripIndent } from '../utils/lazy';
|
||||
import { isV14 } from '../utils/version';
|
||||
import type { DataSetOutputOptions } from '../framework';
|
||||
|
||||
interface ExtendedApplication extends ApplicationWithDeviceType {
|
||||
@ -49,7 +48,7 @@ export default class FleetsCmd extends Command {
|
||||
public static usage = 'fleets';
|
||||
|
||||
public static flags: flags.Input<FlagsDef> = {
|
||||
...(isV14() ? cf.dataSetOutputFlags : {}),
|
||||
...cf.dataSetOutputFlags,
|
||||
help: cf.help,
|
||||
};
|
||||
|
||||
|
@ -21,13 +21,3 @@ import { version } from '../../package.json';
|
||||
export function isVersionGTE(v: string): boolean {
|
||||
return semver.gte(process.env.BALENA_CLI_VERSION_OVERRIDE || version, v);
|
||||
}
|
||||
|
||||
let v14: boolean;
|
||||
|
||||
/** Feature switch for the next major version of the CLI */
|
||||
export function isV14(): boolean {
|
||||
if (v14 === undefined) {
|
||||
v14 = isVersionGTE('14.0.0');
|
||||
}
|
||||
return v14;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user