added success message alert
This commit is contained in:
@@ -1,15 +1,23 @@
|
|||||||
from dash import html
|
from __future__ import annotations
|
||||||
|
|
||||||
import dash_bootstrap_components as dbc
|
import dash_bootstrap_components as dbc
|
||||||
|
from dash import html
|
||||||
|
|
||||||
|
|
||||||
alerts_element = html.Div(
|
alerts_element = html.Div(
|
||||||
children=[
|
children=[
|
||||||
dbc.Alert(
|
dbc.Alert(
|
||||||
children="",
|
children='',
|
||||||
id="alert-element",
|
id='alert-element',
|
||||||
dismissable=True,
|
dismissable=True,
|
||||||
fade=False,
|
fade=False,
|
||||||
is_open=False,
|
is_open=False,
|
||||||
)
|
),
|
||||||
]
|
dbc.Alert(
|
||||||
|
children='',
|
||||||
|
id='success-element',
|
||||||
|
is_open=False,
|
||||||
|
duration=1000,
|
||||||
|
),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
from dash import html, dcc
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
storage_type = "session"
|
from dash import dcc
|
||||||
if "ENV" in os.environ and os.getenv("ENV") == "DEV":
|
from dash import html
|
||||||
storage_type = "memory"
|
|
||||||
|
storage_type = 'session'
|
||||||
|
if 'ENV' in os.environ and os.getenv('ENV') == 'DEV':
|
||||||
|
storage_type = 'memory'
|
||||||
logging.info(
|
logging.info(
|
||||||
"ENV=DEV -> dcc.Stores changed to storage_type=%s",
|
'ENV=DEV -> dcc.Stores changed to storage_type=%s',
|
||||||
storage_type
|
storage_type,
|
||||||
)
|
)
|
||||||
|
|
||||||
stores_element = html.Div(
|
stores_element = html.Div(
|
||||||
children=[
|
children=[
|
||||||
dcc.Store(id="alert-message", storage_type=storage_type, data=""),
|
dcc.Store(id='alert-message', storage_type=storage_type, data=''),
|
||||||
dcc.Store(id="vis-com-name", storage_type=storage_type, data=""),
|
dcc.Store(id='success-message', storage_type=storage_type, data=''),
|
||||||
]
|
dcc.Store(id='vis-com-name', storage_type=storage_type, data=''),
|
||||||
|
],
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user