Giter VIP home page Giter VIP logo

elm's People

Contributors

dependabot[bot] avatar rdmarsh avatar

Stargazers

 avatar

Watchers

 avatar

elm's Issues

FileNotFoundError when dir doesn't exist

Describe the bug
If you use the "-o file" to output to a file and the directory doesn't exist you'll get this error: FileNotFoundError: [Errno 2] No such file or directory:

To Reproduce
Steps to reproduce the behavior:

  1. elm -o non_dir/file.out
  2. See error

Expected behavior
An error saying the dir doesn't exist: non_dir/file.out: No such file or directory

Screenshots
FileNotFoundError: [Errno 2] No such file or directory: 'non_dir/file.out'

Desktop (please complete the following information):

  • OS: macos 13.6 (22G120)
  • Terminal: GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin22.1.0)
  • Version: elm, version 1.0.4

Multiple filters aren't parsed correctly, text truncated

Describe the bug
When using mulitple filters that are seperated by commas, they aren't parsed correctly. The letter before the comma is truncated:

eg:

elm -vv CollectorGroupList -F autoBalance:false,numOfCollectors\>1 -f autoBalance,name,numOfCollectors

The "false" becomes "fals".

To Reproduce
Steps to reproduce the behavior:

  1. Run anything using multiple filters with debug (see example above)
  2. Look at debug to see the last char is being truncated (eg "fals")

Expected behavior
Using the comma to seperate filter items does not truncate text

Desktop (please complete the following information):

  • OS: macos 14.2.1
  • Version version 1.0.5

Stuck at make for elm - does not find jinja2

Running Ubuntu 22.04.3 on WSL2 in windows
I am unable to get elm to make

myusername@mylaptop:~/elm$ make
which curl
/usr/bin/curl
which jq
/usr/bin/jq
which python3
/usr/bin/python3
which jinja2
make: *** [Makefile:127: JINJA-exists] Error 1

Jinja2 is installed via pip
myusername@mylaptop~/elm$ pip install jinja2
WARNING: The directory '/home/mysername/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: jinja2 in /home/mysername/.local/lib/python3.11/site-packages (3.1.3)
Requirement already satisfied: MarkupSafe>=2.0 in /home/mysername/.local/lib/python3.11/site-packages (from jinja2) (2.1.4)

Both "no data" and "size limit" errors are displayed

Describe the bug
When there is no data found, there's no need to show the "size limit is less than" warning.

This is shown when you specify a field with -f that doesn't exist

Warning: no data found
Warning: size limit is less than total records, there is data you are not seeing.

To Reproduce
Steps to reproduce the behavior:

  1. elm DeviceList -f footer
  2. See error

Expected behavior
size limit warning is not shown if there is no data to display

python virtual environment

elm should install into a python virtual environment so as to not impact other packages with dependencies

requests.exceptions.HTTPError is not handled

Describe the bug
requests.exceptions.HTTPError throw a mess of error text

To Reproduce
Steps to reproduce the behavior:

  1. ./elm AdminById --id 1 (where id doesn't exist)

Expected behavior
Warning: no data found

Screenshots
requests.exceptions.HTTPError: 404 Client Error

Issues with regex in make file

The regex that creates the def files has an error:

awk: cmd. line:1: warning: regexp escape sequence `\"' is not a known regexp operator

Text string filter (--filter) can't filter using strings that contain a comma

Describe the bug
It is not possible to filter (-F/--filter) using a comma in the filter string.

To Reproduce
Steps to reproduce the behavior:

  1. Run any filer using -F/--filter that contains a comma.

Expected behavior
Be able to filter on fields that contain a comma.

Screenshots

$ elm DeviceList -F displayName~test,
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F displayName~test\,
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F "displayName~test\,"
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F "displayName~test,"
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F 'displayName~test,'
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F 'displayName~test,,'
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F 'displayName~test\\,'
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

$ elm DeviceList -F 'displayName~test\\\,'
Usage: elm DeviceList [OPTIONS]

Error: Invalid value for '--filter' / '-F': format must be 'FIELD[>:,<:,>,<,!:,:,~,!~]VALUE'

Desktop (please complete the following information):

  • OS: Mac 13.5.1 (22G90)
  • Shell: GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin22.1.0)

add a 'no-head' option

Describe the solution you'd like
Add a head/no-head option to show/hide the header. Default should be head

narrow tables with just Ids change to scientific notation

Describe the bug
Narrow tables with just Ids column change to scientific notation

To Reproduce
Steps to reproduce the behavior:

  1. elm -f txt DeviceGroupDatasourceList --deviceGroupId 1234 -F dataSourceDisplayName:NAMEHERE -f dataSourceId

Expected behavior
Ids not be converted to scientific notation

Screenshots
Output is:

  dataSourceId
   3.78008e+07
   3.78008e+07
   4.36687e+07

Name conflicts with the email client 'elm'

Is your feature request related to a problem? Please describe.
This name has a cli conflict with the email client elm: https://en.wikipedia.org/wiki/Elm_(email_client)

Describe the solution you'd like
A different cli command be chosen

Describe alternatives you've considered
This could be handle with an alias to change the local install cli name.

Additional context
elm email client has been around since 1986.

combining multiple filters doesn't work

Multiple filters are surounded by quotes, instead of each individual value. The comma is ignored:

eg this

-F disableAlerting:true,hostGroupIds~999

produces this:

'filter': 'disableAlerting:"false,hostGroupIds~999"'

instead of this:

'filter': 'disableAlerting:"false",hostGroupIds~"999"'

Local install so it's in the path

Is your feature request related to a problem? Please describe.
local install so it can be run anywhere in the path

Describe the solution you'd like
run prog from anywhere

Describe alternatives you've considered
Add git clone dir to path

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.