Giter VIP home page Giter VIP logo

Comments (6)

tjprescott avatar tjprescott commented on September 24, 2024 2

There's already color output in the CLI. -o jsonc

from azure-cli-extensions.

ahmedelnably avatar ahmedelnably commented on September 24, 2024

@tjprescott understood, this issue is not for the platform, the webapp new command doesn't use the color output of the CLI, this issue is used to track the addition of colors in the command

from azure-cli-extensions.

derekbekoe avatar derekbekoe commented on September 24, 2024

the webapp new command doesn't use the color output of the CLI

@ahmedelnably Can you clarify what you mean by this? The CLI infrastructure is what determines the output type of commands. As long as the user specifies -o jsonc, they would see json colored output.

from azure-cli-extensions.

ahmedelnably avatar ahmedelnably commented on September 24, 2024

I think I misspoke there, we want to use specific colors depending on the output we are showing to the user. This is mainly related on how the output of the command is formatted and colored.

from azure-cli-extensions.

derekbekoe avatar derekbekoe commented on September 24, 2024

we want to use specific colors depending on the output we are showing to the user

Would still like clarification on this before it is implemented if there is a plan to implement this soon.
As a core part of the CLI, commands do not / should not have control of changing outputs. This should be left up to the user.

This is mainly related on how the output of the command is formatted and colored.

Still don't fully understand this.

from azure-cli-extensions.

anthonychu avatar anthonychu commented on September 24, 2024

Currently, this command prints progress and a JSON representation of the resources created. It does this only using logger.warning and doesn't return anything from the command, so there's nothing that can be formatted using -o. Example:

bash-4.3# az webapp new -n test-webapp-new
Creating Resource group 'appsvc_rg_Windows_CentralUS' ...
Resource group creation complete
Creating App service plan 'appsvc_asp_Windows_CentralUS' ...
App service plan creation complete
Creating app 'test-webapp-new' ....
Webapp creation complete
Updating app settings to enable build after deployment
Creating zip with contents of dir /app/foo ...
Deploying and building contents to app.This operation can take some time to finish...
All done. {
    "location": "Central US",
    "name": "test-webapp-new",
    "os": "Windows",
    "resourcegroup": "appsvc_rg_Windows_CentralUS ",
    "serverfarm": "appsvc_asp_Windows_CentralUS",
    "sku": "FREE",
    "src_path": "/app/foo ",
    "version_detected": "2.0",
    "version_to_create": "dotnetcore|2.0"
}

IMHO, if this command prints JSON, it should return it as an object so that the user can format it with -o and use --query, etc. If the goal is to output nothing that can be formatted and print all output with logger.warning, what is printed should be human readable, not JSON.

from azure-cli-extensions.

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.