Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improved the formatting of hardware details page #2181

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions SoftLayer/CLI/hardware/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,13 @@ def _bw_table(bw_data):


def _system_table(system_data):
table = formatting.Table(['Type', 'name'])
table = formatting.Table(['Type', 'Name'])
table.align['Type'] = 'r'
table.align['Name'] = 'l'
table.sortby = 'Type'
for system in system_data:
table.add_row([utils.lookup(system, 'hardwareComponentModel',
'hardwareGenericComponentModel',
'hardwareComponentType', 'keyName'),
utils.lookup(system, 'hardwareComponentModel', 'longDescription')])
c_type = utils.lookup(system, 'hardwareComponentModel', 'hardwareGenericComponentModel',
'hardwareComponentType', 'keyName')
c_name = utils.lookup(system, 'hardwareComponentModel', 'longDescription')
table.add_row([c_type, c_name])
return table
13 changes: 2 additions & 11 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,17 @@ adopt-info: slcli
summary: A CLI tool to interact with the SoftLayer API.
description: |
A command-line interface is also included and can be used to manage various SoftLayer products and services.
SLCLI documentation can be found here: https://softlayer-python.readthedocs.io/en/latest/

license: MIT

base: core22
grade: stable
confinement: strict

assumes:
- command-chain

apps:
slcli:
command: bin/slcli
command-chain:
- bin/homeishome-launch
environment:
LC_ALL: C.UTF-8
plugs:
Expand All @@ -38,9 +34,4 @@ parts:
- python3

stage-packages:
- python3

homeishome-launch:
plugin: nil
stage-snaps:
- homeishome-launch
- python3
Loading