From 92a5537cc4a5f75fa7e42cc283c885662b72081b Mon Sep 17 00:00:00 2001 From: Lyn Nagara Date: Tue, 20 Jun 2023 09:36:38 -0700 Subject: [PATCH] ref: Remove dead code (#4371) --- README.rst | 2 +- requirements.txt | 1 - snuba/web/static/config.html | 178 ------------------ snuba/web/static/css/base.css | 25 --- snuba/web/static/css/toggle.css | 56 ------ snuba/web/static/dashboard.html | 323 -------------------------------- snuba/web/static/img/snuba.svg | 1 - snuba/web/views.py | 18 -- 8 files changed, 1 insertion(+), 603 deletions(-) delete mode 100644 snuba/web/static/config.html delete mode 100644 snuba/web/static/css/base.css delete mode 100644 snuba/web/static/css/toggle.css delete mode 100644 snuba/web/static/dashboard.html delete mode 100644 snuba/web/static/img/snuba.svg diff --git a/README.rst b/README.rst index 6e5a77518d..47fb41f2a1 100644 --- a/README.rst +++ b/README.rst @@ -1,4 +1,4 @@ -.. image:: https://github.com/getsentry/snuba/raw/master/snuba/web/static/img/snuba.svg +.. image:: https://github.com/getsentry/snuba/raw/master/snuba/admin/dist/snuba.svg :width: 280 Snuba is a service that provides a rich data model on top of Clickhouse diff --git a/requirements.txt b/requirements.txt index a62348fa4e..28e22a0d37 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,6 @@ honcho==1.1.0 python-jose[cryptography]==3.3.0 jsonschema==4.16.0 fastjsonschema==2.16.2 -Markdown==3.4.1 packaging==21.3 # Do not update parsimonious, there is a performance issue in newer versions parsimonious==0.8.1 diff --git a/snuba/web/static/config.html b/snuba/web/static/config.html deleted file mode 100644 index 6438c26189..0000000000 --- a/snuba/web/static/config.html +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - - - - -
-

Current Configuration

-
-
-
-

Recent Changes

-
-
- - diff --git a/snuba/web/static/css/base.css b/snuba/web/static/css/base.css deleted file mode 100644 index 67bf350438..0000000000 --- a/snuba/web/static/css/base.css +++ /dev/null @@ -1,25 +0,0 @@ -body { - font-family: "Verdana" -} -code { - background-color: #EEE; -} -pre { - margin: 1em; - padding: 1em; - background-color: #EEE; -} - -.option { - margin-bottom: 5px; -} - -.option.disabled { - pointer-events:none; - opacity:0.3; -} - -.option label{ - display:inline-block; - width: 340px; -} diff --git a/snuba/web/static/css/toggle.css b/snuba/web/static/css/toggle.css deleted file mode 100644 index 599af242aa..0000000000 --- a/snuba/web/static/css/toggle.css +++ /dev/null @@ -1,56 +0,0 @@ - -.tgl { - display: none; -} -.tgl, .tgl:after, .tgl:before, .tgl *, .tgl *:after, .tgl *:before, .tgl + .tgl-btn { - box-sizing: border-box; -} -.tgl::-moz-selection, .tgl:after::-moz-selection, .tgl:before::-moz-selection, .tgl *::-moz-selection, .tgl *:after::-moz-selection, .tgl *:before::-moz-selection, .tgl + .tgl-btn::-moz-selection { - background: none; -} -.tgl::selection, .tgl:after::selection, .tgl:before::selection, .tgl *::selection, .tgl *:after::selection, .tgl *:before::selection, .tgl + .tgl-btn::selection { - background: none; -} -.tgl + .tgl-btn { - outline: 0; - display: block; - width: 3em; - height: 1.5em; - position: relative; - cursor: pointer; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} -.tgl + .tgl-btn:after, .tgl + .tgl-btn:before { - position: relative; - display: block; - content: ""; - width: 50%; - height: 100%; -} -.tgl + .tgl-btn:after { - left: 0; -} -.tgl + .tgl-btn:before { - display: none; -} -.tgl:checked + .tgl-btn:after { - left: 50%; -} - -.tgl-light + .tgl-btn { - background: #f0f0f0; - border-radius: 1.5em; - padding: 2px; - transition: all .4s ease; -} -.tgl-light + .tgl-btn:after { - border-radius: 50%; - background: #fff; - transition: all .2s ease; -} -.tgl-light:checked + .tgl-btn { - background: #9FD6AE; -} diff --git a/snuba/web/static/dashboard.html b/snuba/web/static/dashboard.html deleted file mode 100644 index 3e4761d390..0000000000 --- a/snuba/web/static/dashboard.html +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - - - - - - - - - - -
- - diff --git a/snuba/web/static/img/snuba.svg b/snuba/web/static/img/snuba.svg deleted file mode 100644 index f074a3359a..0000000000 --- a/snuba/web/static/img/snuba.svg +++ /dev/null @@ -1 +0,0 @@ - diff --git a/snuba/web/views.py b/snuba/web/views.py index 0ed73be1a8..aac3a1d23a 100644 --- a/snuba/web/views.py +++ b/snuba/web/views.py @@ -33,7 +33,6 @@ from arroyo.types import BrokerValue, Message, Partition, Topic from flask import Flask, Request, Response, redirect, render_template from flask import request as http_request -from markdown import markdown from werkzeug import Response as WerkzeugResponse from werkzeug.exceptions import InternalServerError @@ -307,23 +306,6 @@ def handle_internal_server_error(exception: InternalServerError) -> Response: ) -@application.route("/") -def root() -> str: - with open("README.rst") as f: - return render_template("index.html", body=markdown(f.read())) - - -@application.route("/css/") -def send_css(path: str) -> Response: - return application.send_static_file(os.path.join("css", path)) - - -@application.route("/img/") -@application.route("/snuba/web/static/img/") -def send_img(path: str) -> Response: - return application.send_static_file(os.path.join("img", path)) - - @application.route("/health_envoy") def health_envoy() -> Response: """K8s can decide to shut down the pod, at which point it will write the down file.