def get_flag_list(): """ Get the list of platforms """ data = current_app.system.get_flags() payload = Helper.get_list("flags.html", request, data) return payload, status.OK
def create(platform_id, manufacturer, model, serial_number): return Helper.create(request, current_app.system.create_sensor, { "platform_id": platform_id, "manufacturer": manufacturer, "model": model, "serial_number": serial_number })
def get_platform_list(): """ Get the list of platforms """ current_app.logger.debug("get_platform_list()") data = current_app.system.get_platforms() payload = Helper.get_list("platforms.html", request, data) return payload, status.OK
def create(platform_id, manufacturer, model, serial_number, phenomena): return Helper.create(request, current_app.system.create_parameter, { "platform_id": platform_id, "manufacturer": manufacturer, "model": model, "serial_number": serial_number, "phenomena": phenomena })
def get_platform(platform_id): """ Get a specific platform """ current_app.logger.debug("get(%s)" % platform_id) data = current_app.system.get_platform(platform_id) if Helper.want_json(request): payload = flask.jsonify(data) else: payload = render_template("platform.html", platform_id=platform_id, data=data) current_app.logger.debug("payload: " + str(payload)) return payload, status.OK
def create(term): return Helper.create(request, current_app.system.create_flag, {"term": term})
def put_info(platform_id): data = current_app.system.get_platform(platform_id) update_function = current_app.system.update_platform return Helper.put_info(data, request, update_function)
def get_info(platform_id): data = current_app.system.get_platform(platform_id) return Helper.info_redirect(data)
def create(platform_id): return Helper.create(request, current_app.system.create_platform, {"platform_id": platform_id})
def get_list_platform_manufacturer_model(platform_id, manufacturer, model): data = current_app.system.get_sensors(platform_id, manufacturer, model) payload = Helper.get_list("sensors.html", request, data) return payload, status.OK
def get_list_platform(platform_id): data = current_app.system.get_sensors(platform_id) payload = Helper.get_list("sensors.html", request, data) return payload, status.OK
def put_info(platform_id, manufacturer, model, serial_number): data = current_app.system.get_sensor(platform_id, manufacturer, model, serial_number) update_function = current_app.system.update_sensor return Helper.put_info(data, request, update_function)
def get_info(platform_id, manufacturer, model, serial_number): data = current_app.system.get_sensor(platform_id, manufacturer, model, serial_number) return Helper.info_redirect(data)
def get_list_platform_manufacturer_model_serial_number(platform_id, manufacturer, model, serial_number): data = current_app.system.get_parameters(platform_id, manufacturer, model, serial_number) payload = Helper.get_list("parameters.html", request, data) return payload, status.OK
def get_list(): data = current_app.system.get_parameters() payload = Helper.get_list("parameters.html", request, data) return payload, status.OK
def create(term): return Helper.create(request, current_app.system.create_phenomena, {"term": term})