chore: remove ambiguity button, format code
Browse files- pages/kubernetes_config.py +0 -10
- pages/omymodels.py +8 -20
pages/kubernetes_config.py
CHANGED
|
@@ -102,16 +102,6 @@ def main():
|
|
| 102 |
with c_text_yaml:
|
| 103 |
st.text_area("YAML", height=473, key="c_text_yaml", on_change=_on_yaml_to_env)
|
| 104 |
|
| 105 |
-
st.markdown(
|
| 106 |
-
r"""
|
| 107 |
-
> Tips: Change ENV or YAML then press `Ctrl + Enter`.
|
| 108 |
-
>
|
| 109 |
-
> Or using buttoms blow:
|
| 110 |
-
""".strip()
|
| 111 |
-
)
|
| 112 |
-
st.button("ENV -> YAML", on_click=_on_env_to_yaml)
|
| 113 |
-
st.button("YAML -> ENV", on_click=_on_yaml_to_env)
|
| 114 |
-
|
| 115 |
|
| 116 |
if __name__ == "__main__":
|
| 117 |
main()
|
|
|
|
| 102 |
with c_text_yaml:
|
| 103 |
st.text_area("YAML", height=473, key="c_text_yaml", on_change=_on_yaml_to_env)
|
| 104 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
if __name__ == "__main__":
|
| 107 |
main()
|
pages/omymodels.py
CHANGED
|
@@ -4,14 +4,14 @@ from st_pages import add_page_title
|
|
| 4 |
|
| 5 |
DDL_EXAMPLE = r"""
|
| 6 |
CREATE TABLE "material" (
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
);
|
| 16 |
""".strip()
|
| 17 |
|
|
@@ -35,18 +35,6 @@ def main():
|
|
| 35 |
|
| 36 |
ddl = c_text_ddl.text_area("DDL", value=DDL_EXAMPLE, height=473)
|
| 37 |
|
| 38 |
-
# ddl: Optional[str] = (None,)
|
| 39 |
-
# ddl_path: Optional[str] = (None,)
|
| 40 |
-
# dump: bool = (True,)
|
| 41 |
-
# dump_path: str = ("models.py",)
|
| 42 |
-
# singular: bool = (False,)
|
| 43 |
-
# naming_exceptions: Optional[List] = (None,)
|
| 44 |
-
# models_type: str = ("gino",)
|
| 45 |
-
# schema_global: Optional[bool] = (True,)
|
| 46 |
-
# defaults_off: Optional[bool] = (False,)
|
| 47 |
-
# exit_silent: Optional[bool] = (False,)
|
| 48 |
-
# no_auto_snake_case: Optional[bool] = False
|
| 49 |
-
|
| 50 |
result = create_models(
|
| 51 |
ddl,
|
| 52 |
models_type=c_selectbox_models_type,
|
|
|
|
| 4 |
|
| 5 |
DDL_EXAMPLE = r"""
|
| 6 |
CREATE TABLE "material" (
|
| 7 |
+
"id" SERIAL PRIMARY KEY,
|
| 8 |
+
"title" varchar NOT NULL,
|
| 9 |
+
"description" text,
|
| 10 |
+
"link" varchar NOT NULL,
|
| 11 |
+
"type" integer NOT NULL,
|
| 12 |
+
"additional_properties" json,
|
| 13 |
+
"created_at" timestamp DEFAULT (now()),
|
| 14 |
+
"updated_at" timestamp
|
| 15 |
);
|
| 16 |
""".strip()
|
| 17 |
|
|
|
|
| 35 |
|
| 36 |
ddl = c_text_ddl.text_area("DDL", value=DDL_EXAMPLE, height=473)
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
result = create_models(
|
| 39 |
ddl,
|
| 40 |
models_type=c_selectbox_models_type,
|