Remove generic controller settings API endpoint.

This commit is contained in:
grossmj committed 2018-11-14 16:24:30 +08:00
1 parent cebb56387a
commit 98f04365b7
15 files changed
+120 -118

No files matched your search

+10 -9
View File
@@ -271,16 +271,17 @@ class Node:
if self._label is None:
# Apply to label user style or default
try:
style = qt_font_to_style(self._project.controller.settings["GraphicsView"]["default_label_font"],
self._project.controller.settings["GraphicsView"]["default_label_color"])
style = None # FIXME: allow configuration of default label font & color on controller
#style = qt_font_to_style(self._project.controller.settings["GraphicsView"]["default_label_font"],
# self._project.controller.settings["GraphicsView"]["default_label_color"])
except KeyError:
style = "font-size: 10;font-familly: Verdana"
style = "font-family: TypeWriter;font-size: 10.0;font-weight: bold;fill: #000000;fill-opacity: 1.0;"
self._label = {
"y": round(self._height / 2 + 10) * -1,
"text": html.escape(self._name),
"style": style,
"x": None, # None: mean the client should center it
"style": style, # None: means the client will apply its default style
"x": None, # None: means the client should center it
"rotation": 0
}
@@ -483,11 +484,11 @@ class Node:
try:
# For IOU we need to send the licence everytime
if self.node_type == "iou":
try:
licence = self._project.controller.settings["IOU"]["iourc_content"]
except KeyError:
license_check = self._project.controller.iou_license.get("license_check", True)
iourc_content = self._project.controller.iou_license.get("iourc_content", None)
if license_check and not iourc_content:
raise aiohttp.web.HTTPConflict(text="IOU licence is not configured")
await self.post("/start", timeout=240, data={"iourc_content": licence})
await self.post("/start", timeout=240, data={"license_check": license_check, "iourc_content": iourc_content})
else:
await self.post("/start", data=data, timeout=240)
except asyncio.TimeoutError: