Last active
August 29, 2015 14:11
-
-
Save gullitmiranda/dac6150bd1da8d8e67a5 to your computer and use it in GitHub Desktop.
Propostas para saida do `azk status`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Proposta para colunas customizáveis | |
| default_keys: status,system,instances,hostname,instances-ports,provisioned,image | |
| Options: | |
| --table : Imprime em formato tabela | |
| --text : Imprime em formato tabela sem bordas | |
| --json : Imprime em formato JSON | |
| --list : Imprime em formato lista | |
| Personalized Options (PROPOSES): | |
| 1. | |
| --[option]=[Keys] : Imprime as keys especificadas no formato selecionado | |
| Ex: | |
| --table=status,system,instances,hostname | |
| 2. | |
| --output=[format] : Define o formato da saida | |
| --keys=[default_keys] : Define as Keys que serão impresas | |
| Ex: | |
| --output=table | |
| --keys=status,system,instances,hostname | |
| Aplicável a todos os casos | |
| --long : Adiciona a key "Images" a default_keys | |
| ## Modo tabela | |
| ====== --table (Now) ================================================================================================== | |
| ┌───┬─────────────────┬────────────┬─────────────────────────┬────────────────────────────────────────────────────────────────────────────────────┬─────────────┬─────────────────────────┐ | |
| │ │ System │ Instancies │ Hostname │ Instances-Ports │ Provisioned │ Image │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────┼─────────────┼─────────────────────────┤ | |
| │ ↓ │ ruby21 │ 0 │ ruby21.azk.dev │ - │ - │ ruby:2.1 │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼────────────────────────────────────────────────────────────────────────────────────┼─────────────┼─────────────────────────┤ | |
| │ ↑ │ node010 │ 6 │ http://node010.azk.dev │ 6-http:49158, 5-http:49157, 4-http:49156, 3-http:49155, 2-http:49154, 1-http:49153 │ 5 days ago │ node:0.10 │ | |
| └───┴─────────────────┴────────────┴─────────────────────────┴────────────────────────────────────────────────────────────────────────────────────┴─────────────┴─────────────────────────┘ | |
| ====== --table (1) ==================================================================================================== | |
| NOTE: Sempre faz wrap a cada 2 portas | |
| ┌───┬─────────────────┬────────────┬─────────────────────────┬────────────────────────────┬─────────────┐ | |
| │ │ System │ Instancies │ Hostname │ Instances-Ports │ Provisioned │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼────────────────────────────┼─────────────┤ | |
| │ ↓ │ ruby21 │ 0 │ ruby21.azk.dev │ - │ - │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼────────────────────────────┼─────────────┤ | |
| │ ↑ │ node010 │ 6 │ http://node010.azk.dev │ 6-http:49158, 5-http:49157,│ 5 days ago │ | |
| │ │ │ │ │ 4-http:49156, 3-http:49155 │ │ | |
| │ │ │ │ │ 2-http:49154, 1-http:49153 │ │ | |
| └───┴─────────────────┴────────────┴─────────────────────────┴────────────────────────────┴─────────────┘ | |
| ====== --table (2) ==================================================================================================== | |
| NOTE: Faz wrap das portas conforme necessidade. | |
| ┌───┬─────────────────┬────────────┬─────────────────────────┬───────────────────────────────────────────┬─────────────┐ | |
| │ │ System │ Instancies │ Hostname │ Instances-Ports │ Provisioned │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼───────────────────────────────────────────┼─────────────┤ | |
| │ ↓ │ ruby21 │ 0 │ ruby21.azk.dev │ - │ - │ | |
| ├───┼─────────────────┼────────────┼─────────────────────────┼───────────────────────────────────────────┼─────────────┤ | |
| │ ↑ │ node010 │ 6 │ http://node010.azk.dev │ 6-http:49158, 5-http:49157, 4-http:49156, │ 5 days ago │ | |
| │ │ │ │ │ 3-http:49155, 2-http:49154, 1-http:49153 │ │ | |
| └───┴─────────────────┴────────────┴─────────────────────────┴───────────────────────────────────────────┴─────────────┘ | |
| ====== --table (3) ==================================================================================================== | |
| NOTE: Colunas multi-linha (sem wrap de portas) | |
| ┌───┬─────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────┐ | |
| │ │ System │ Instances-Ports │ | |
| │ │ Hostname │ Provisioned │ | |
| ├───┼─────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ ↓ │ ruby21 │ - │ | |
| | | ruby21.azk.dev | - │ | |
| ├───┼─────────────────────────┼─────────────────────────────────────────────────────────────────────────────────────┤ | |
| │ ↑ │ node010 │ 6-http:49158, 5-http:49157, 4-http:49156, 3-http:49155, 2-http:49154, 1-http:49153 │ | |
| │ │ http://node010.azk.dev │ 5 days ago │ | |
| └───┴─────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────┘ | |
| ====== --table (4) ==================================================================================================== | |
| NOTE: Colunas multi-linha (com wrap de portas conforme a necessidade) | |
| ┌───┬─────────────────────────┬───────────────────────────────────────────┐ | |
| │ │ System │ Instances-Ports │ | |
| │ │ Hostname │ Provisioned │ | |
| ├───┼─────────────────────────┼───────────────────────────────────────────┤ | |
| │ ↓ │ ruby21 │ - │ | |
| | | ruby21.azk.dev | - │ | |
| ├───┼─────────────────────────┼───────────────────────────────────────────┤ | |
| │ ↑ │ node010 │ 6-http:49158, 5-http:49157, 4-http:49156 │ | |
| │ │ │ 3-http:49155, 2-http:49154, 1-http:49153 │ | |
| │ │ http://node010.azk.dev │ 5 days ago │ | |
| └───┴─────────────────────────┴───────────────────────────────────────────┘ | |
| ## outras visualizações | |
| ====== --text ===================================================================================================== | |
| NOTE: Segue as mesmas regras do table (pode ser com ou sem os wrappes) | |
| System Instances-Ports | |
| Hostname Provisioned | |
| ↓ ruby21 - | |
| ruby21.azk.dev - | |
| ↑ node010 6-http:49158, 5-http:49157, 4-http:49156 | |
| 3-http:49155, 2-http:49154, 1-http:49153 | |
| http://node010.azk.dev 5 days ago | |
| ====== --list ========================================================================================================= | |
| PROPOSES: | |
| 1. Apenas quando o usuário definir o output como --list | |
| 2. Caso o tamanho da tela do usuário possua menos de 60 colunas o padrão é --list, | |
| porém o usuário pode forçar --table (ou --json, -no-table) | |
| System: ruby21 ↓ | |
| Hostname: ruby21.azk.dev | |
| Instances-Ports: - | |
| Provisioned: - | |
| Image: ruby:2.1 | |
| System: node010 ↑ | |
| Hostname: http://node010.azk.dev | |
| Instances-Ports: 6-http:49158, 5-http:49157, 4-http:49156, 3-http:49155, 2-http:49154, 1-http:49153 | |
| Provisioned: 5 days ago | |
| Image: node:0.10 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment