Skip to content

Commit

Permalink
Merge pull request #2181 from allmightyspiff/issues2153
Browse files Browse the repository at this point in the history
Improved the formatting of hardware details page
  • Loading branch information
allmightyspiff authored Aug 9, 2024
2 parents 332d3ea + c4bded1 commit a3352f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
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

0 comments on commit a3352f1

Please sign in to comment.