aleios-cloud / aleios-cloud/sls-dev-tools

Good First Issue: Ability to customise the sls-dev-tools HQ display

Ouverte
#236 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement good first issue
Langage dominant
JavaScript
Étoiles
871
Forks
45
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

**Why:** As the tool has a lot of features, being able to tailor the tool to your current project, by resizing or rearranging the grid panels, allows users to maximise its usefulness and minimise distractions.

**Expected Behaviour:**
- using a template as an example, write your desired panel sizes in slsdevtools.config.js
- on running the tool, if there is a config file then the grid uses the given sizes to resize/rearrange each panel

**External Library Used:**
- https://github.com/yaronn/blessed-contrib#grid

**Scope Limit:**
- Use the config file to set the width and height of panels, as well as their position
- It's not necessary to check if all rows and columns align correctly
- In a future issue/pr, the config may allow components to be removed entirely and for users to customise the order in which components are navigated using tab

Changes needed:
- Add a section to the config file for customising the layout, with a property for each component
- Update the slsdevtools.config.js.dst template file to show usage of this feature
- Where each component is added to the layout grid, use the parameters in the config file if specified, otherwise use the default
- Components are added using the grid.set() function which takes ```(row, col, rowSpan, colSpan, obj, opts)``` as arguments
- There are 8 panels in the tool, the grid.set() calls for each are linked below:
- [Title](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/CLIMain.js#L121)
- [Invocations Line Graph](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/CLIMain.js#L83)
- [Duration Bar Chart](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/components/durationBarChart.js#L21-L28)
- [Lambda Log](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/CLIMain.js#L103)
- [Console Logs](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/CLIMain.js#L112)
- [Map](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/components/map.js#L56)
- [Resource Table](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/components/resourceTable.js#L172)
- [Eventbridges Table](https://github.com/Theodo-UK/sls-dev-tools/blob/master/src/CLIMain.js#L93)
- update the readme docs

![image](https://user-images.githubusercontent.com/11080984/79673814-e4ce5a00-81d4-11ea-814b-1a66a2cabb17.png)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.