Add cron helptext to source edit page

This commit is contained in:
Tim Van Baak 2023-06-21 19:04:59 -07:00
parent 96c657f0ee
commit dabc1f700b
3 changed files with 14 additions and 1 deletions

View File

@ -25,6 +25,15 @@ from intake.source import LocalSource, execute_action, Item
app = Flask(__name__)
CRON_HELPTEXT = """cron spec:
* * * * *
+-------------- minute (0 - 59)
+----------- hour (0 - 23)
+-------- day of month (1 - 31)
+----- month (1 - 12)
+-- day of week (0 Sun - 6 Sat)"""
def item_sort_key(item: Item):
return item.sort_key
@ -276,6 +285,7 @@ def source_edit(name):
subtitle=source.source_name,
config=config_str,
error_message=error_message,
helptext=CRON_HELPTEXT,
)

View File

@ -334,7 +334,6 @@ def cmd_run(cmd_args):
from intake.app import app
app.config["INTAKE_DATA"] = data_path
print(app.config)
app.run(port=args.port, debug=args.debug)
return 0
except Exception as ex:

View File

@ -79,6 +79,10 @@ span.error-message {
{% endif %}
</p>
</form>
{% if helptext -%}
<pre>{{ helptext }}
</pre>
{%- endif %}
</article>
</main>