Giter VIP home page Giter VIP logo

Comments (3)

majormoses avatar majormoses commented on June 29, 2024

I definitely see the value although I think there should be an option for it but the default should be off.

Reasons why it should default off:

  • remaining backwards compatible
  • I think that is an excellent way to prompt people to start writing those tips/links/runbooks when they resolve the incident they should think about adding it.

from sensu-plugins-slack.

warmfusion avatar warmfusion commented on June 29, 2024

So would you be thinking of an ignore_field_if_missing: true flag?

Or perhaps a more structural change to fields themselves, eg

fields:
 {
      "list": nil,
      "clientkeys": "A default value",
      "to_render": 123
}

Such that the assigned value is used as a default, and if set to nil is simply omitted from display if no client value has set it.

Note; I have an extended use case/pull request to develop which will include event field custom values in this listing, such that events themselves can include metadata to submit on alerts

from sensu-plugins-slack.

majormoses avatar majormoses commented on June 29, 2024

How about include_missing_fields with a default of true. I generally dislike having "negative" variable/option names in code when dealing with booleans. The reason is that it is much clearer and avoids needing to eval true as false when I am quickly reviewing code/documentation I am unfamiliar with.

I suppose we could make a more structural change and have a render flag and if evals nil||true we would include it. If it evals as false we would not render.

from sensu-plugins-slack.

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.