Пример #1
0
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output

from apps import home, codes, countries, businesses
from apps.sidebar import render_sidebar
from apps.navbar import Navbar
import pandas as pd
from app import app

server = app.server

sidebar = render_sidebar()
navbar = Navbar()

content = html.Div(id="content", className='content')

app.layout = html.Div(
    [dcc.Location(id="url", refresh=False), navbar, sidebar, content])


@app.callback(Output("content", "children"), [Input("url", "pathname")])
def render_page_content(pathname):
    if pathname in ["/", "/home"]:
        return home.layout
    elif pathname == "/codes":
        return codes.layout
    elif pathname == "/countries":
        return countries.layout
    elif pathname == "/businesses":
Пример #2
0
import dash
import dash_table
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
from dash.dependencies import Input, Output, State
import pandas as pd

from app import app
from apps.navbar import Navbar
from utils.inquire import host_queries
from utils.maps_tables import auto_exec_table, chrome_extensions_table, firefox_addons_table, services_table, sc_tasks_table, startup_items_table

nav = Navbar()

body = dbc.Container([
    dbc.Row(dbc.Col(html.H2("Persistence"))),
    dbc.Row(
        dbc.Col(
            html.Div([
                dcc.Dropdown(id='table_selector',
                             options=[
                                 {
                                     'label': 'AutoRun Executables',
                                     'value': 'autoexec'
                                 },
                                 {
                                     'label': 'Chromium-based Extensions',
                                     'value': 'chrome_extensions'
                                 },
                                 {
Пример #3
0
    [
        dbc.Row([
            Navbar
        ]),
        dbc.Row([
            dbc.Col([
                card
                ])
            ])
    ]
)
"""

# Although this is better for HTML5 five
app.layout = html.Div([
    html.Div([Navbar()], className="Row"),
    html.Div(
        [
            dcc.Location(
                id='url', refresh=False
            ),  # the 'pathname' variable for dcc is empty by default
            html.Div(id='page-content', children=[])
        ],
        className='Row')
])


#toggle pages callback
@app.callback(
    Output(component_id='page-content', component_property='children'),
    [Input(component_id='url', component_property='pathname')