Skip to content

Commit 380609f

Browse files
committed
task subgraphs selector
1 parent 60c3f49 commit 380609f

File tree

7 files changed

+118
-339
lines changed

7 files changed

+118
-339
lines changed

app.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
from routes.runtime_template import runtime_template_bp
2-
from routes.subgraphs import subgraphs_bp
32
from routes.worker_storage_consumption import worker_storage_consumption_bp
43
from routes.file_sizes import file_sizes_bp
54
from routes.file_concurrent_replicas import file_concurrent_replicas_bp
@@ -81,7 +80,6 @@ def log_response_info(response):
8180
app.register_blueprint(file_retention_time_bp)
8281

8382
# subgraphs
84-
app.register_blueprint(subgraphs_bp)
8583
app.register_blueprint(task_subgraphs_bp)
8684

8785
# runtime template

routes/subgraphs.py

Lines changed: 0 additions & 300 deletions
This file was deleted.

routes/task_subgraphs.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,22 @@ def plot_file2task_edge(dot, file, task):
113113
data['num_task_tries'] = len(task_tries)
114114
data['subgraph_svg_content'] = open(svg_file_path, 'r').read()
115115

116+
# legend: list of {'id': str(idx), 'label': ..., 'color': ..., 'checked': bool}, sorted by idx
117+
data['legend'] = [
118+
{
119+
'id': str(idx),
120+
'label': f"Subgraph {idx} ({count} task{'s' if count != 1 else ''})",
121+
'color': '',
122+
'checked': False
123+
}
124+
for idx, count in sorted(
125+
[(k, len(v)) for k, v in runtime_state.subgraphs.items()],
126+
key=lambda x: x[0]
127+
)
128+
]
129+
# check the current subgraph (subgraph_id is 1-based)
130+
data['legend'][subgraph_id - 1]['checked'] = True
131+
116132
return jsonify(data)
117133
except Exception as e:
118134
runtime_state.logger.error(f'Error in get_task_subgraphs: {e}')

static/css/report.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,8 @@ table.dataTable thead th {
394394
cursor: pointer;
395395
user-select: none;
396396
transition: opacity 0.2s;
397+
text-overflow: ellipsis;
398+
white-space: nowrap;
397399
color: #333;
398400
}
399401

static/js/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ async function fetchAllModulesData(folder) {
99
const tasks = moduleConfigs.map(({ id }) => {
1010
const module = moduleObjects[id];
1111
return (async () => {
12+
module.reset();
1213
await module.fetchData(folder);
1314
module.initLegend();
1415
module.initResetButton();

0 commit comments

Comments
 (0)