Skip to content

Commit

Permalink
Remove unused manifest handler (#4169)
Browse files Browse the repository at this point in the history
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
  • Loading branch information
balloob and jesserockz committed Feb 9, 2023
1 parent 7810ad4 commit d20d494
Showing 1 changed file with 0 additions and 33 deletions.
33 changes: 0 additions & 33 deletions esphome/dashboard/dashboard.py
Expand Up @@ -540,38 +540,6 @@ def get(self, configuration=None):
self.finish()


class ManifestRequestHandler(BaseHandler):
@authenticated
@bind_config
def get(self, configuration=None):
args = ["esphome", "idedata", settings.rel_path(configuration)]
rc, stdout, _ = run_system_command(*args)

if rc != 0:
self.send_error(404 if rc == 2 else 500)
return

idedata = platformio_api.IDEData(json.loads(stdout))

firmware_offset = "0x10000" if idedata.extra_flash_images else "0x0"
flash_images = [
{
"path": f"./download.bin?configuration={configuration}&type=firmware.bin",
"offset": firmware_offset,
}
] + [
{
"path": f"./download.bin?configuration={configuration}&type={os.path.basename(image.path)}",
"offset": image.offset,
}
for image in idedata.extra_flash_images
]

self.set_header("Content-Type", "application/json")
self.write(json.dumps(flash_images))
self.finish()


def _list_dashboard_entries():
files = settings.list_yaml_files()
return [DashboardEntry(file) for file in files]
Expand Down Expand Up @@ -1149,7 +1117,6 @@ def set_extra_headers(self, path):
(f"{rel}info", InfoRequestHandler),
(f"{rel}edit", EditRequestHandler),
(f"{rel}download.bin", DownloadBinaryRequestHandler),
(f"{rel}manifest.json", ManifestRequestHandler),
(f"{rel}serial-ports", SerialPortRequestHandler),
(f"{rel}ping", PingRequestHandler),
(f"{rel}delete", DeleteRequestHandler),
Expand Down

0 comments on commit d20d494

Please sign in to comment.