|
1 | 1 | from dash import Dash, html, dcc, dash_table |
2 | 2 | from dash.dependencies import Input, Output, State |
3 | 3 | import dash_mantine_components as dmc |
4 | | -# import plotly.express as px |
5 | 4 | import pandas as pd |
6 | 5 | from scr import conv |
7 | 6 | from flask import Flask |
8 | 7 | import datetime as dt |
9 | 8 | import logging |
10 | 9 |
|
11 | | -# ---------------- Logging Setup ---------------- |
| 10 | + |
12 | 11 | logger = logging.getLogger('ct') |
13 | 12 | logger.setLevel(logging.DEBUG) |
14 | 13 | ch = logging.StreamHandler() |
|
17 | 16 | ch.setFormatter(formatter) |
18 | 17 | logger.addHandler(ch) |
19 | 18 |
|
20 | | -# ---------------- Flask/Dash Setup ---------------- |
| 19 | + |
21 | 20 | server = Flask(__name__) |
22 | 21 | external_stylesheets = ['https://fonts.googleapis.com/css2?family=Play&display=swap'] |
23 | 22 |
|
|
29 | 28 | ) |
30 | 29 | app.title = 'MS-FP' |
31 | 30 |
|
32 | | -# ---------------- App Layout ---------------- |
| 31 | + |
33 | 32 | app.layout = dmc.MantineProvider([ |
34 | 33 | html.Div([ |
35 | 34 | html.H1('MS file parser', style={"font-family": "'Play'"}), |
36 | 35 | dmc.Group([ |
37 | | - dmc.Chips( |
| 36 | + dmc.ChipGroup( |
38 | 37 | id="vartype", |
39 | | - data=[ |
40 | | - {"value": "Conc.", "label": "Concentration"}, |
41 | | - {"value": "Response", "label": "Response"}, |
42 | | - {"value": "Area", "label": "Area"} |
| 38 | + value="Conc.", |
| 39 | + multiple=False, |
| 40 | + children=[ |
| 41 | + dmc.Chip(value="Conc.", label="Concentration"), |
| 42 | + dmc.Chip(value="Response", label="Response"), |
| 43 | + dmc.Chip(value="Area", label="Area"), |
43 | 44 | ], |
44 | | - value="Conc." |
45 | 45 | ), |
46 | 46 | dmc.Checkbox(id="includeIS", label="Include internal Stds") |
47 | | - ], position='left'), |
| 47 | + ], justify='flex-start'), |
48 | 48 |
|
49 | 49 | dmc.Space(h=10), |
50 | 50 |
|
|
76 | 76 | ]) |
77 | 77 | ]) |
78 | 78 |
|
79 | | -# ---------------- Callbacks ---------------- |
| 79 | + |
80 | 80 | @app.callback( |
81 | 81 | Output("download-dataframe-csv", "data"), |
82 | 82 | Input("btn_csv", "n_clicks"), |
|
0 commit comments