Skip to content

Commit fae8c17

Browse files
authored
Merge pull request #44 from alphagov/acw-69/see-similar-aliases
Add a page to view "similar" aliases
2 parents 4c02ce8 + fcfba7a commit fae8c17

4 files changed

Lines changed: 3434 additions & 1 deletion

File tree

app.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,12 @@ def get_status(job_id):
126126
return jsonify({"error": "Job ID not found"}), 404
127127
return jsonify(status_info), 200
128128

129+
@app.route("/outliers/similar-aliases", methods=["GET"])
130+
def see_similar_aliases():
131+
"""View aliases that are (syntactically) similar to other aliases of the same entity."""
132+
run_path_param = request.args.get("run_path", "")
133+
return render_template("similar_aliases.html", run_path=run_path_param)
134+
129135
@app.errorhandler(BadRequest)
130136
def handle_bad_request(e):
131137
return jsonify({"error": e.description}), 400

graph-viewmodel.json

Lines changed: 3009 additions & 1 deletion
Large diffs are not rendered by default.

static/css/metrics.css

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,3 +466,73 @@ tr.selected td:first-child {
466466
color: #6b7280;
467467
padding: 16px;
468468
}
469+
470+
/* Similarity Threshold Slider */
471+
.threshold-slider-container {
472+
display: flex;
473+
align-items: center;
474+
gap: 12px;
475+
margin-left: auto;
476+
margin-right: 20px;
477+
}
478+
479+
.threshold-slider-container label {
480+
font-size: 0.875rem;
481+
font-weight: 600;
482+
color: #374151;
483+
white-space: nowrap;
484+
}
485+
486+
.threshold-slider {
487+
width: 200px;
488+
height: 4px;
489+
border-radius: 2px;
490+
background: #e5e7eb;
491+
outline: none;
492+
-webkit-appearance: none;
493+
appearance: none;
494+
}
495+
496+
.threshold-slider::-webkit-slider-thumb {
497+
-webkit-appearance: none;
498+
appearance: none;
499+
width: 16px;
500+
height: 16px;
501+
border-radius: 50%;
502+
background: #3b82f6;
503+
cursor: pointer;
504+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
505+
}
506+
507+
.threshold-slider::-moz-range-thumb {
508+
width: 16px;
509+
height: 16px;
510+
border-radius: 50%;
511+
background: #3b82f6;
512+
cursor: pointer;
513+
border: none;
514+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
515+
}
516+
517+
.threshold-slider::-webkit-slider-thumb:hover {
518+
background: #2563eb;
519+
}
520+
521+
.threshold-slider::-moz-range-thumb:hover {
522+
background: #2563eb;
523+
}
524+
525+
.slider-with-labels {
526+
display: flex;
527+
flex-direction: column;
528+
gap: 4px;
529+
}
530+
531+
.slider-labels {
532+
display: flex;
533+
justify-content: space-between;
534+
width: 200px;
535+
font-size: 0.75rem;
536+
color: #6b7280;
537+
font-weight: 500;
538+
}

0 commit comments

Comments
 (0)