Giter VIP home page Giter VIP logo

Comments (4)

robinovitch61 avatar robinovitch61 commented on May 29, 2024 3

@yuankaiyu this feature is now merged to the next branch.

You can try it out with

go install github.com/robinovitch61/wander@next

By default, the jq query is:

wander_event_jq_query: >
  .Events[] | {
      "1:Index": .Index,
      "2:Topic": .Topic,
      "3:Type": .Type,
      "4:Name": .Payload | (.Job // .Allocation // .Deployment // .Evaluation) | (.JobID // .ID),
      "5:AllocID": .Payload | (.Allocation // .Deployment // .Evaluation).ID[:8]
  }

As mentioned in the README of next, the numbering exists to preserve ordering, as https://github.com/itchyny/gojq does not keep the order of object keys unfortunately.

Use the following to get back the previous behavior:

wander_event_jq_query: .

Feel free to experiment with the query in your config file and let me know if you have suggestions to improve the default query. I'll probably release this feature broadly sometime in the middle of this week.

from wander.

yuankaiyu avatar yuankaiyu commented on May 29, 2024 1

Ya I'd like to watch the events rolling.
The fields I'm interested in are topic, type, alloc id, task id etc. Probably a general queriability is better because the fields needed may change over time.
Thanks for the quick response!

from wander.

robinovitch61 avatar robinovitch61 commented on May 29, 2024

Hi @yuankaiyu , thanks for opening an issue! This would be cool, and probably doable.

One workflow I could imagine today is saving the event log of interest with ctrl + s.

If you have wander_copy_save_path set to "true", the saved path will be copied to your clipboard on save.

Then you could run cat <paste path> | jq <your query>.

Probably still worth a native-in-wander solution. If you have a good idea for what default jq query for events might be best, let me know.

from wander.

robinovitch61 avatar robinovitch61 commented on May 29, 2024

Closed in 1793de1

Upgrade to >=v0.8.0 to use this feature

from wander.

Related Issues (20)

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.