|
|
@@ -22,6 +22,9 @@ column_width_map = {
|
|
|
"记录数": "80px",
|
|
|
}
|
|
|
|
|
|
+header_template = ["blue", "wathet", "turquoise", "green", "yellow", "orange"]
|
|
|
+header_template_index = 0
|
|
|
+
|
|
|
|
|
|
def build_table_json(df: pandas.DataFrame, title: str) -> Dict[str, Any]:
|
|
|
columns = []
|
|
|
@@ -43,7 +46,7 @@ def build_table_json(df: pandas.DataFrame, title: str) -> Dict[str, Any]:
|
|
|
"title": {
|
|
|
"content": title
|
|
|
},
|
|
|
- "template": "green",
|
|
|
+ "template": header_template[header_template_index % len(header_template)],
|
|
|
},
|
|
|
"body": {
|
|
|
"elements": [
|
|
|
@@ -203,12 +206,14 @@ def workflow_status_stat(ts: int, workflow_id: str, workflow_name: str):
|
|
|
|
|
|
|
|
|
def main():
|
|
|
+ global header_template_index
|
|
|
today_midnight = datetime.now().replace(hour=0, minute=0, second=0, microsecond=0)
|
|
|
timestamp_ms = int(today_midnight.timestamp() * 1000)
|
|
|
workflows = mysql_helper.execute_query('select id, name from supply_workflow;')
|
|
|
for workflow in workflows:
|
|
|
task_exe_step_stat(timestamp_ms, workflow['id'], workflow['name'])
|
|
|
workflow_status_stat(timestamp_ms, workflow['id'], workflow['name'])
|
|
|
+ header_template_index = header_template_index + 1
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|