-
Notifications
You must be signed in to change notification settings - Fork 0
Draft: Add features to popups #4
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
Open
elro444
wants to merge
8
commits into
master
Choose a base branch
from
improve-popups
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
4736bcd to
315417b
Compare
6a03dff to
161a55b
Compare
Owner
Author
Owner
Author
Owner
Author
|
The general design is like this: @popup_maker(Status.DOWN)
@component
def _popup_down(details: 'cell.CellDetails'):
return html.div(
{
'style': {
'width': POPUP_WIDTH,
},
},
f'The interface in cell {details.cell_id} is ',
colorize('DOWN', COLORS[Status.DOWN]),
'. Please make sure the cable is connected!',
)
@popup_maker(Status.MISCONFIGURED)
@component
def _popup_misconfigured(details: 'cell.CellDetails'):
# TODO: Improve the styling on the button in this component
def quick_fix(_):
# TODO: Reconfigure the DB
...
return html.div(
{
'style': {
'width': POPUP_WIDTH,
},
},
# TODO: Fix this message
f'Device #100 is in this cell, but is configured to cell A-1.\n',
f'Click the button below to move it to {details.cell_id}\n',
PopupButton('Quick Fix', quick_fix),
)There will be a function for each "status", that is responsible for creating the popup contents, with the details and/or the buttons for additional actions related to this cell. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


TODO: