2
0
Эх сурвалжийг харах

Merge branch 'laravel' of https://github.com/iapt-platform/mint into laravel

bhikkhu-kosalla-china 4 жил өмнө
parent
commit
66db368c87
50 өөрчлөгдсөн 2998 нэмэгдсэн , 60 устгасан
  1. 4 2
      .env.example
  2. 1 0
      .gitignore
  3. 5 0
      change-logs.md
  4. 10 0
      deploy/mint.yml
  5. 1 1
      deploy/roles/certbot-nginx/tasks/main.yml
  6. 14 16
      deploy/roles/mint-clone/tasks/main.yml
  7. 2 2
      deploy/roles/mint-clone/templates/config-v1.js.j2
  8. 3 3
      deploy/roles/mint-clone/templates/config-v1.php.j2
  9. 6 3
      deploy/roles/mint-clone/templates/env-v2.j2
  10. 27 0
      deploy/roles/mint-main/tasks/main.yml
  11. 8 0
      deploy/roles/mint-main/templates/index.html.j2
  12. 14 0
      deploy/roles/mint-main/templates/nginx.conf.j2
  13. 1 1
      deploy/roles/mint-www/templates/nginx.conf.j2
  14. 8 0
      deploy/roles/mint-zone/tasks/main.yml
  15. 24 0
      deploy/roles/mint-zone/templates/nginx.conf.j2
  16. 0 1
      deploy/roles/os/tasks/main.yml
  17. 0 0
      deploy/roles/ubuntu/tasks/init.yml
  18. 27 4
      deploy/roles/ubuntu/tasks/main.yml
  19. 6 0
      deploy/roles/ubuntu/tasks/zsh.yml
  20. 13 0
      deploy/scripts/sim_sent.sh
  21. 20 0
      deploy/scripts/sqlite_fix.sh
  22. 10 2
      public/app/article/article.js
  23. 3 2
      public/app/article/index.php
  24. 13 0
      public/app/article/templiates/glossary.tpl
  25. 22 0
      public/app/article/templiates/main.tpl
  26. 55 0
      public/app/article/templiates/readme.md
  27. 10 0
      public/app/article/templiates/sent.tpl
  28. 1 7
      public/app/config.sample.php
  29. 1 1
      public/app/course/lesson.js
  30. 2 2
      public/app/db/user.php
  31. 1 1
      public/app/dict/dict_lookup.php
  32. 23 0
      public/app/log/loglist.php
  33. 10 0
      public/app/log/performance.html
  34. 37 0
      public/app/log/pref_live.php
  35. 37 0
      public/app/log/pref_log.php
  36. 37 0
      public/app/log/pref_realtime_get.php
  37. 608 0
      public/app/log/showlog.js
  38. 86 0
      public/app/log/showlog.php
  39. 144 0
      public/app/log/showrealtime.js
  40. 124 0
      public/app/log/showrealtime.php
  41. 1 1
      public/app/studio/editor.php
  42. 1505 0
      public/app/studio/js/relation_list.js
  43. 3 2
      public/app/term/note.js
  44. 4 0
      public/app/term/popup_note.css
  45. 54 0
      public/app/term/term.js
  46. 2 2
      public/app/ucenter/invite.php
  47. 4 4
      public/app/users_guide/zh-cn/grammar_fut.md
  48. 0 0
      public/documents/gitmoji.html
  49. 2 1
      public/package.json
  50. 5 2
      v1/scripts/migrations/20211210160700_user_dict_copy.php

+ 4 - 2
.env.example

@@ -59,5 +59,7 @@ RPC_SERVER="https://rpc.wikipali.org"
 ASSETS_SERVER="https://assets-hk.wikipali.org"
 
 
-SNOWFLAKE_DATA_CENTER_ID = 1
-SNOWFLAKE_WORKER_ID = 1
+SNOWFLAKE_DATA_CENTER_ID=1
+SNOWFLAKE_WORKER_ID=1
+
+REDIS_NAMESPACE=

+ 1 - 0
.gitignore

@@ -17,3 +17,4 @@ yarn-error.log
 /package-lock.json
 /yarn.lock
 /composer.lock
+*.swp

+ 5 - 0
change-logs.md

@@ -52,3 +52,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - remove HELP_SERVER GRAMMAR_SERVER from .env.example
 - remove HELP_SERVER GRAMMAR_SERVER from config.sample.php
 - remove HELP_SERVER GRAMMAR_SERVER from config.sample.php
+
+## [1.0.7] - 2022-02-01
+
+- add REDIS_NAMESPACE to .env.example
+- add redis namespace to config.sample.php

+ 10 - 0
deploy/mint.yml

@@ -19,3 +19,13 @@
 - hosts: db
   roles:
     - mint-db
+
+- hosts: zone
+  roles:
+    - mint-zone
+    - certbot-nginx
+
+- hosts: main
+  roles:
+    - mint-main
+    - certbot-nginx

+ 1 - 1
deploy/roles/certbot-nginx/tasks/main.yml

@@ -7,7 +7,7 @@
 - name: add Let's Encrypt support
   become: true
   ansible.builtin.shell:
-    cmd: certbot --nginx --non-interactive --agree-tos -m {{ app_master_email }} --domains {{ inventory_hostname }}
+    cmd: certbot --nginx --non-interactive --agree-tos -m {{ app_master_email }} --domains {{ inventory_hostname }} "{{ '--redirect' if app_nginx_force_https else '' }}"
 
 - name: restart nginx
   become: true

+ 14 - 16
deploy/roles/mint-clone/tasks/main.yml

@@ -26,15 +26,14 @@
   args:
     chdir: "{{ app_deploy_target }}"
 
-# - name: Install v2 nodejs dependencies
-#   ansible.builtin.shell: npm install
-#   args:
-#     chdir: "{{ app_deploy_target }}"
 - name: Install v2 nodejs dependencies
-  ansible.builtin.file:
-    src: "/var/www/{{ inventory_hostname }}/node_modules/v2"
-    dest: "{{ app_deploy_target }}/node_modules"
-    state: link
+  # ansible.builtin.file:
+  #   src: "/var/www/{{ inventory_hostname }}/node_modules/v2"
+  #   dest: "{{ app_deploy_target }}/node_modules"
+  #   state: link
+  ansible.builtin.shell: npm install
+  args:
+    chdir: "{{ app_deploy_target }}"
 
 # TODO will remove in future
 - name: Install v1 php dependencies
@@ -43,15 +42,14 @@
     chdir: "{{ app_deploy_target }}/public"
 
 # TODO will remove in future
-# - name: Install v1 nodejs dependencies
-#   ansible.builtin.shell: npm install
-#   args:
-#     chdir: "{{ app_deploy_target }}/public"
 - name: Install v1 nodejs dependencies
-  ansible.builtin.file:
-    src: "/var/www/{{ inventory_hostname }}/node_modules/v1"
-    dest: "{{ app_deploy_target }}/public/node_modules"
-    state: link
+  # ansible.builtin.file:
+  #   src: "/var/www/{{ inventory_hostname }}/node_modules/v1"
+  #   dest: "{{ app_deploy_target }}/public/node_modules"
+  #   state: link
+  ansible.builtin.shell: npm install
+  args:
+    chdir: "{{ app_deploy_target }}/public"
 
 # TODO will remove in future
 - name: Install v1 tmp

+ 2 - 2
deploy/roles/mint-clone/templates/config-v1.js.j2

@@ -1,4 +1,4 @@
-var RPC_SERVER="https://rpc.wikipali.org";
+var RPC_SERVER="https://{{ app_rpc_host }}";
 
 /*
   |---------------
@@ -11,4 +11,4 @@ var RPC_SERVER="https://rpc.wikipali.org";
   |------------------------
 */
 
-var ASSETS_SERVER = "https://assets-{{ app_cluster_id }}.wikipali.org"
+var ASSETS_SERVER = "https://assets-{{ app_cluster_domain }}"

+ 3 - 3
deploy/roles/mint-clone/templates/config-v1.php.j2

@@ -1,8 +1,8 @@
 <?php
 
 #域名设置
-define("RPC_SERVER","https://rpc.wikipali.org");
-define("ASSETS_SERVER","https://assets-{{ app_cluster_id }}.wikipali.org");
+define("RPC_SERVER","https://{{ app_rpc_host }}");
+define("ASSETS_SERVER","https://assets-{{ app_cluster_domain }}");
 /*
 电子邮件设置
 PHPMailer
@@ -38,7 +38,7 @@ define("Redis",[
 	"host" => "{{ app_redis_host }}",
 	"port" => 6379,
 	"password" => "",
-	"prefix"=>"mint://"
+	"namespace" => "{{ app_redis_namespace }}"
 ]);
 
 # 雪花id

+ 6 - 3
deploy/roles/mint-clone/templates/env-v2.j2

@@ -12,7 +12,7 @@ LOG_CHANNEL=stack
 LOG_DEPRECATIONS_CHANNEL=null
 LOG_LEVEL=info
 
-DB_CONNECTION=postgresql
+DB_CONNECTION=pgsql
 DB_HOST={{ app_postgresql_host }}
 DB_PORT={{ app_postgresql_port }}
 DB_DATABASE={{ app_postgresql_name }}
@@ -31,6 +31,7 @@ MEMCACHED_HOST=127.0.0.1
 REDIS_HOST={{ app_redis_host }}
 REDIS_PASSWORD=null
 REDIS_PORT=6379
+REDIS_NAMESPACE="{{ app_redis_namespace }}"
 
 MAIL_MAILER=smtp
 MAIL_HOST=smtp.gmail.com
@@ -55,5 +56,7 @@ PUSHER_APP_CLUSTER=mt1
 MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
 MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
 
-ASSETS_SERVER="https://assets-{{ app_cluster_id }}.wikipali.org"
-RPC_SERVER="https://rpc.wikipali.org"
+ASSETS_SERVER="https://assets-{{ app_cluster_domain }}"
+RPC_SERVER="https://{{ app_rpc_host }}"
+SNOWFLAKE_DATA_CENTER_ID=1
+SNOWFLAKE_WORKER_ID=1

+ 27 - 0
deploy/roles/mint-main/tasks/main.yml

@@ -0,0 +1,27 @@
+- name: Creates deploy directory
+  become: true
+  file:
+    path: "{{ app_deploy_target }}"
+    state: directory
+    owner: "{{ ansible_user }}"
+
+- name: upload index.html
+  ansible.builtin.template:
+    src: index.html.j2
+    dest: "{{ app_deploy_target }}/index.html"
+    mode: '0444'
+
+- name: Create a current link
+  ansible.builtin.file:
+    src: "{{ app_deploy_target }}"
+    dest: /var/www/{{ inventory_hostname }}/current
+    state: link
+
+- name: upload nginx.conf
+  become: true
+  ansible.builtin.template:
+    src: nginx.conf.j2
+    dest: "/etc/nginx/sites-enabled/{{ inventory_hostname }}.conf"
+    owner: www-data
+    group: www-data
+    mode: '0400'

+ 8 - 0
deploy/roles/mint-main/templates/index.html.j2

@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta http-equiv="refresh" content="0; url='https://www-{{ app_cluster_domain }}'" />
+  </head>
+  <body>
+  </body>
+</html>

+ 14 - 0
deploy/roles/mint-main/templates/nginx.conf.j2

@@ -0,0 +1,14 @@
+server {
+    listen 80;
+    listen [::]:80;
+
+    gzip on;
+    server_name {{ inventory_hostname }};
+    root {{ app_deploy_target }};
+    client_max_body_size 16M;
+    index index.html;
+    charset utf-8;
+
+    access_log off;
+    error_log /var/log/nginx/{{ inventory_hostname }}.error.log warn;
+}

+ 1 - 1
deploy/roles/mint-www/templates/nginx.conf.j2

@@ -8,7 +8,7 @@ server {
     add_header X-Content-Type-Options "nosniff";
 
     gzip on;
-    server_name {{ inventory_hostname }};
+    server_name {{ inventory_hostname }} {% for it in groups['zone'] %} {{ it }} {% endfor %};
     root {{ app_deploy_target }}/public;
     client_max_body_size 16M;
     index index.php;

+ 8 - 0
deploy/roles/mint-zone/tasks/main.yml

@@ -0,0 +1,8 @@
+- name: upload nginx.conf
+  become: true
+  ansible.builtin.template:
+    src: nginx.conf.j2
+    dest: "/etc/nginx/sites-enabled/{{ inventory_hostname }}.conf"
+    owner: www-data
+    group: www-data
+    mode: '0400'

+ 24 - 0
deploy/roles/mint-zone/templates/nginx.conf.j2

@@ -0,0 +1,24 @@
+upstream {{ app_cluster_domain }} {
+{% for it in groups['www'] %}
+    server {{ it }};
+{% endfor %}
+    fair;
+}
+
+server {
+    listen 80;
+    listen [::]:80;
+
+    gzip on;
+    server_name {{ inventory_hostname }};
+    client_max_body_size 16M;
+    charset utf-8;
+
+    access_log off;
+    error_log /var/log/nginx/{{ inventory_hostname }}.error.log warn;
+
+    location / {
+        proxy_set_header Host $host;
+        proxy_pass http://{{ app_cluster_domain }};
+    }
+}

+ 0 - 1
deploy/roles/os/tasks/main.yml

@@ -1,4 +1,3 @@
-- import_tasks: init.yml
 - import_tasks: sshd.yml
 - import_tasks: ulimits.yml
 

+ 0 - 0
deploy/roles/os/tasks/init.yml → deploy/roles/ubuntu/tasks/init.yml


+ 27 - 4
deploy/roles/ubuntu/tasks/main.yml

@@ -19,6 +19,20 @@
 #     state: absent
 #     path: /etc/apt/sources.list.d
 
+- import_tasks: init.yml
+
+# https://github.com/nodesource/distributions#deb
+# - name: Download nodejs-ppa installer
+#   get_url:
+#     url: https://deb.nodesource.com/setup_lts.x
+#     dest: "{{ app_downloads }}/setup_node_lts.sh"
+#     mode: '0755'
+
+# - name: Install nodejs ppa
+#   become: true
+#   ansible.builtin.shell: "{{ app_downloads }}/setup_node_lts.sh"
+
+
 - name: add PPA for Ubuntu Toolchain
   become: true
   ansible.builtin.apt_repository:
@@ -78,26 +92,35 @@
       - zip
       - unzip
       - nginx
+      - libnginx-mod-http-upstream-fair
       - certbot
       - python3-certbot-nginx
       - openvpn
       - snmpd
+      - mutt
       - systemd-cron
-      - systemd-timesyncd
       - screen
       - tmux
       - hugo
+      - nodejs
       - python3
       - python3-pip
       - python3-distutils
       - python3-dev
-      - nodejs
-      - npm
-      - yarnpkg
       - libssl-dev
       - libpq-dev
       - libmysqlclient-dev
 
+- name: Install dependicy packages(>bionic)
+  become: true
+  apt:
+    pkg:
+      - systemd-timesyncd
+      - yarnpkg
+  # ansible_facts['distribution'] == "Ubuntu"
+  when: ansible_facts['distribution_major_version'] | int >= 20
+
+
 
 - import_tasks: locales.yml
 

+ 6 - 0
deploy/roles/ubuntu/tasks/zsh.yml

@@ -26,6 +26,12 @@
     path: "{{ansible_env.HOME}}/.zshrc"
     line: 'export PATH=$HOME/.local/bin:$PATH'
 
+
+- name: Setup EDITOR
+  ansible.builtin.lineinfile:
+    path: "{{ansible_env.HOME}}/.zshrc"
+    line: 'export EDITOR=vim'
+
 - name: Use zsh
   become: true
   shell: chsh -s /bin/zsh {{ansible_user}}

+ 13 - 0
deploy/scripts/sim_sent.sh

@@ -0,0 +1,13 @@
+#!/bin/sh
+
+set -e
+
+export SIM=$(pgrep -f "php sim_sent")
+
+echo "find pid $SIM"
+renice +19 $SIM
+ionice -c 2 -n 7 -p $SIM
+
+echo "done."
+
+exit 0

+ 20 - 0
deploy/scripts/sqlite_fix.sh

@@ -0,0 +1,20 @@
+#!/bin/sh
+
+set -e
+if [ $# -ne 1 ]
+then
+	echo "Usage: $0 DB"
+	exit 1
+fi
+
+if [ ! -f $1 ]
+then
+	echo "$1 not exists"
+	exit 1
+fi
+
+echo '.dump'|sqlite3 $1|sqlite3 $1_repaired
+mv -v $1 $1_corrupt
+mv -v $1_repaired $1
+
+exit 0

+ 10 - 2
public/app/article/article.js

@@ -51,8 +51,14 @@ function articel_load(id, collection_id) {
 						$("#contents").html(note_init(result.content,"",result.owner,result.lang));
 						//处理<code>标签作为气泡注释
 						popup_init();
-						guide_init();						
-						note_refresh_new();
+						guide_init();
+						note_refresh_new(function(){
+                            $.get('templiates/glossary.tpl',function(data){
+                                let TermData = term_get_used();
+                                let rendered = Mustache.render(data,TermData);
+                                $("#glossary").html(rendered);                                
+                            });
+                        });
 
 
 					}
@@ -66,6 +72,8 @@ function articel_load(id, collection_id) {
 	);
 }
 
+
+
 function collect_load(id) {
 	if (id == "") {
 		return;

+ 3 - 2
public/app/article/index.php

@@ -147,8 +147,8 @@ require_once "../pcdl/html_head.php";
 <link href="../../node_modules/jquery.fancytree/dist/skin-win7/ui.fancytree.css" rel="stylesheet" type="text/css" class="skinswitcher">
 <script src="../tree/jquery.fancytree.js" type="text/javascript"></script>
 <script src="../article/my_collect.js" type="text/javascript"></script>
-<script language="javascript" src="../article/article_add_dlg.js"></script>
-
+<script src="../article/article_add_dlg.js"></script>
+<script src="../../node_modules/mustache/mustache.js"></script>
 
 <style>
 ul.fancytree-container{
@@ -388,6 +388,7 @@ function set_toc_visible(isVisible){
 			<div id="contents" class="content_inner <?php echo $contentClass;?>">
 				<?php echo $_local->gui->loading; ?>...
 			</div>
+            <div id="glossary"></div>
 			<div id="contents_foot">
 				<div id="contents_nav" style="display:flex;justify-content: space-between;">
 					<div id="contents_nav_left" class="nav_bnt nav_left" onclick="goto_prev()">

+ 13 - 0
public/app/article/templiates/glossary.tpl

@@ -0,0 +1,13 @@
+<h2>Glossary</h2>
+{{#glossary.word}}
+<div>
+<b>{{pali}}</b>:{{meaning}}
+</div>
+{{/glossary.word}}
+
+<h2>术语表</h2>
+{{#glossary.meaning}}
+<div>
+<b>{{meaning}}</b>:{{pali}}
+</div>
+{{/glossary.meaning}}

+ 22 - 0
public/app/article/templiates/main.tpl

@@ -0,0 +1,22 @@
+<div>
+{{title}}
+</div>
+<div>
+{{subtitle}}
+</div>
+<div>
+{{editor.name}} at {{updated_at}}
+</div>
+<div class="content">
+{{content}}
+</div>
+
+<h2>Glossary</h2>
+{{#glossary}}
+<b>{{pali}}</b>:{{meaning}}
+{{/glossary}}
+
+<h2>ref</h2>
+{{#ref}}
+{{path}}
+{{/ref}}

+ 55 - 0
public/app/article/templiates/readme.md

@@ -0,0 +1,55 @@
+# 标题
+
+正文
+
+{{1-2-3-4}}
+
+<h1>标题</h1>
+<p></p>
+<p>{{1-2-3-4}}</p>
+
+<h1>标题</h1>
+<p></p>
+<p>
+<div class='sent'>
+    <div class='org'>
+        {{1-2-3-4.org}}
+    </div>
+    <div class='translation'>
+        {{#1-2-3-4.translation}}
+            <div>{{text}}</div>
+        {{/1-2-3-4.translation}}
+    </div>
+</div>
+</p>
+
+{
+    1-2-3-4:{
+        org:"pali text"
+        translation:[
+            {
+                text:"一句译文[[bhikkhu]]",
+                channel:"channel1"
+            },
+            {
+                text:"另一句译文[[bhikkhu]]",
+                channel:"channel2"
+            },
+        ]
+    }
+}
+
+<h1>标题</h1>
+<p></p>
+<p>
+<div class='sent'>
+    <div class='org'>
+        pali text
+    </div>
+    <div class='translation'>
+        <div>一句译文{{term.bhikkhu.channel1}}</div>
+        <div>一句译文{{term.bhikkhu.channel2}}</div>
+    </div>
+</div>
+</p>
+

+ 10 - 0
public/app/article/templiates/sent.tpl

@@ -0,0 +1,10 @@
+<div class='sent'>
+    <div class='org'>
+        {{org}}
+    </div>
+    <div class='translation'>
+        {{#translation}}
+            <div>{{text}}</div>
+        {{/translation}}
+    </div>
+</div>

+ 1 - 7
public/app/config.sample.php

@@ -46,13 +46,7 @@ define("Redis",[
 	"host" => "127.0.0.1",
 	"port" => 6379,
 	"password" => "",
-	"prefix"=>"aaa://"
-]);
-				
-# 雪花id
-define("SnowFlake",[
-	"DatacenterId"=>1,
-	"WorkerId"=>1
+	"namespace"=>"aaa://"
 ]);
 
 #目录设置,不能更改

+ 1 - 1
public/app/course/lesson.js

@@ -81,7 +81,7 @@ function lesson_show(id) {
             }
             $("#lesson_list").html(html);
 			note_refresh_new();
-            mermaid.initialize();
+            mermaid.initialize({startOnLoad:true});
         }
     );
 }

+ 2 - 2
public/app/db/user.php

@@ -175,8 +175,8 @@ class User extends Table
 			$ok = $this->_update(["reset_password_token"=>$resetToken],["reset_password_token"],["email"=>$email]);
 			if($ok){
 				#send email
-				$resetLink=WWW_SERVER."/app/ucenter/reset.php?token=".$resetToken;
-				$resetString=WWW_SERVER."/app/ucenter/reset.php";
+				$resetLink="https://".$_SERVER['SERVER_NAME']."/app/ucenter/reset.php?token=".$resetToken;
+				$resetString="https://".$_SERVER['SERVER_NAME']."/app/ucenter/reset.php";
 		
 				// 打开文件并读取数据
 				$irow=0;

+ 1 - 1
public/app/dict/dict_lookup.php

@@ -1,4 +1,4 @@
-<?php
+<?php
 //查询参考字典
 include("../log/pref_log.php");
 require_once __DIR__.'/../config.php';

+ 23 - 0
public/app/log/loglist.php

@@ -0,0 +1,23 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+</head>
+<body>
+<ol>
+<?php
+require_once("../config.php");
+$scan = scandir(_DIR_LOG_);
+$fileCounter = 0;
+
+foreach($scan as $filename) {
+	if (is_file(_DIR_LOG_."/".$filename)){
+		if(substr($filename,0,5)=='pref_'){
+			$date = substr($filename,5,-4);
+			echo "<li><a href='showlog.php?file={$filename}' target='log'>".$date.'</a></li>';
+		}
+	}
+}
+?>
+</ol>
+</body>
+</html>

+ 10 - 0
public/app/log/performance.html

@@ -0,0 +1,10 @@
+<html>
+
+<frameset cols="15%,85%">
+
+<frame src="./loglist.php">
+<frame src="" name="log">
+
+</frameset>
+
+</html>

+ 37 - 0
public/app/log/pref_live.php

@@ -0,0 +1,37 @@
+<?php
+require_once(__DIR__."/../config.php");
+require_once(__DIR__."/../redis/function.php");
+
+
+if(isset($_GET["item"])){
+    $item = $_GET["item"];
+}else{
+    return 1;
+}
+if(isset($_GET["api"])){
+    $api = $_GET["api"];
+}else{
+    $api = "all";
+}
+    $times = 10;
+    $key= "pref-s/";
+    $redis = redis_connect();
+    $currTime = time();
+    if($redis){
+        $begin = $currTime - $times - 1;
+        $value = 0;
+        for ($i=$begin; $i <= $currTime; $i++) { 
+            $keyAll = $key.$api."/".$i;
+            if($redis->exists($keyAll)){
+                if($item == 'average'){
+                    $value += intval($redis->hGet($keyAll,'delay') / $redis->hGet($keyAll,'count'));
+                }else{
+                    $value += (int)$redis->hGet($keyAll,$item);
+                }
+            }
+        }
+        $value = $value/$times;
+        echo $value;
+    }else{
+        echo 'redis error';
+    }

+ 37 - 0
public/app/log/pref_log.php

@@ -1,8 +1,33 @@
 <?php
 require_once("../config.php");
+require_once("../redis/function.php");
+
+
 $logstart = microtime(true)*1000;
+$iTime = time();
 $strstart = date("h:i:sa");
 function PrefLog(){
+    $delay = microtime(true)*1000-$GLOBALS['logstart'];
+    $redis = redis_connect();
+    $timeMinute = intval(time()/60);
+    $timeSecond = time();
+    if($redis){
+        $key= "pref/";
+        $keyAll = $key."all/".$timeMinute;
+        UpdateCache($redis,$keyAll,$delay);
+        $keyApi = $key.$_SERVER['PHP_SELF']."/".$timeMinute;
+        UpdateCache($redis,$keyApi,$delay);
+
+        $key= "pref-s/";
+        $keyAll = $key."all/".$timeSecond;
+        UpdateCache($redis,$keyAll,$delay,30);
+        $keyApi = $key.$_SERVER['PHP_SELF']."/".$timeSecond;
+        UpdateCache($redis,$keyApi,$delay,30);
+
+        $keyApiName = "pref-hour/api/".$_SERVER['PHP_SELF'];
+        $redis->set($keyApiName,1);
+        $redis->expire($keyApiName,3600);
+    }
 	$file = fopen(_DIR_LOG_."/pref_".date("Y-m-d").".log","a");
 	if($file){
 		fputcsv($file,[$_SERVER['PHP_SELF'],$GLOBALS['strstart'],sprintf("%d",microtime(true)*1000-$GLOBALS['logstart']),$_SERVER['REMOTE_ADDR']]);
@@ -10,5 +35,17 @@ function PrefLog(){
 	}
 }
 
+function UpdateCache($redis,$key,$delay,$expire=3600){
+
+        if($redis->exists($key)){
+            $redis->hSet($key,"count",$redis->hGet($key,"count")+1);
+            $redis->hSet($key,"delay",$redis->hGet($key,"delay")+$delay);
+        }else{
+            #没有,创建
+            $redis->hSet($key,"count",1);
+            $redis->hSet($key,"delay",$delay);
+            $redis->expire($key,$expire);
+        }
+}
 
 ?>

+ 37 - 0
public/app/log/pref_realtime_get.php

@@ -0,0 +1,37 @@
+<?php
+require_once("../config.php");
+require_once("../redis/function.php");
+
+echo "Time, Value".PHP_EOL;
+if(isset($_GET["item"])){
+    $item = $_GET["item"];
+}else{
+    return 1;
+}
+if(isset($_GET["api"])){
+    $api = $_GET["api"];
+}else{
+    $api = "all";
+}
+    $key= "pref/";
+    $redis = redis_connect();
+    $currMinute = intval(time()/60);
+    if($redis){
+        $begin = $currMinute - 60;
+        for ($i=$begin; $i < $currMinute; $i++) { 
+            $keyAll = $key.$api."/".$i;
+            if($redis->exists($keyAll)){
+                if($item == 'average'){
+                    $value = $redis->hGet($keyAll,'delay') / $redis->hGet($keyAll,'count');
+                }else{
+                    $value = $redis->hGet($keyAll,$item);
+                }
+            }else{
+                $value = 0;
+            }
+            $time = date("Y-m-d\TH:i:s.u\Z",$i*60);
+            echo "{$time},{$value}".PHP_EOL;
+        }
+    }else{
+        echo "Time, Value";
+    }

+ 608 - 0
public/app/log/showlog.js

@@ -0,0 +1,608 @@
+
+function getData(filename){
+	$.get("../../tmp/log/"+filename,
+	function(data,status){
+	  
+	//生成数据数组
+	  let rowData= data.split('\n');
+	  let arrData = new Array();
+	  for (const iterator of rowData) {
+		arrData.push(iterator.split(","));
+	  }
+	  console.log(arrData);
+	  let api = new Object;
+	  let delayInMinute
+	  
+	  //遍历所有数据
+	  for (const iterator of arrData) {
+		let delay = parseInt(iterator[2]);
+		if (api.hasOwnProperty.call(api, iterator[0])) {
+			let element = api[iterator[0]];
+			element.times++;
+			element.delay += delay;
+			try{
+				let hour = parseInt(iterator[1].split(':')[0]);
+				element.delayHour[hour] += delay;
+				if(delay>api[iterator[0]].delayMaxHour[hour]){
+					api[iterator[0]].delayMaxHour[hour] = delay;
+				}
+				if(delay < api[iterator[0]].delayMinHour[hour]){
+					api[iterator[0]].delayMinHour[hour] = delay;
+				}	
+				element.timesHour[hour] ++;
+				
+			}catch(e){
+
+			}
+
+		}else{
+			api[iterator[0]] = {
+				times:1,
+				timesHour:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
+				delay:delay,
+				//一小时总执行时间
+				delayHour:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
+				//一小时最高执行时间
+				delayMaxHour:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
+				//一小时最低执行时间
+				
+				delayMinHour:[30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000,30000],
+				//一小时平均执行时间
+				delayAverageHour:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
+			};
+			try{
+				let hour = parseInt(iterator[1].split(':')[0]);
+				api[iterator[0]].delayHour[hour] = parseInt(iterator[2]);
+				api[iterator[0]].delayMaxHour[hour] = parseInt(iterator[2]);
+				api[iterator[0]].delayMinHour[hour] = parseInt(iterator[2]);
+				api[iterator[0]].timesHour[hour] = 1;
+			}catch(e){
+
+			}
+
+		}
+	  }
+	  let api_timms = new Array();
+	  let api_delay = new Array();
+	  let ApiDelayInHour = new Array();
+	  let ApiTimesInHour = new Array();
+	  let ApiAverageInHour = new Array();
+	  let ohlc = new Array();
+	  let volume = new Array();
+	  for (const key in api) {
+		  if (api.hasOwnProperty.call(api, key)) {
+			  //计算每个小时的平均执行时间
+			  for (let index = 0; index < api[key].delayAverageHour.length; index++) {
+				  api[key].delayAverageHour[index] = api[key].delayHour[index]/api[key].timesHour[index];
+			  }
+			  const element = api[key];
+			  api_timms.push({
+				  name:key,
+				  y:element.times
+			  });
+			  api_delay.push({
+				name:key,
+				y:element.delay
+			  });
+			  ApiDelayInHour.push({
+				name:key,
+				data:element.delayHour
+			  });
+			  ApiTimesInHour.push({
+				name:key,
+				data:element.timesHour
+			  });
+			  ApiAverageInHour.push({
+				name:key,
+				data:element.delayAverageHour
+			  });
+			  for (let index = 1; index < api[key].delayAverageHour.length; index++) {
+				api[key].delayAverageHour[index] = api[key].delayHour[index]/api[key].timesHour[index];
+				if(key=="/app/uwbw/update.php"){
+					ohlc.push([
+						Date.UTC(2022,1,1,index,0,0,0), // the date
+						api[key].delayAverageHour[index-1], // open
+						api[key].delayMaxHour[index], // high
+						api[key].delayMinHour[index], // low
+						api[key].delayAverageHour[index] // close
+					]);
+			
+					volume.push([
+						Date.UTC(2022,1,1,index,0,0,0), // the date
+						element.timesHour[index] // the volume
+					]);
+				}				
+			  }
+
+		  }
+	  }
+
+	  chart_1(api_timms);
+	  chart_2(api_delay);
+	  chart_3(ApiDelayInHour);
+	  chart_3a(ApiAverageInHour);
+	  chart_4(ApiTimesInHour);
+	  chart_5(ohlc,volume);
+	  chart_6(ohlc,volume);
+	});
+  
+}
+
+function chart_1(data){
+	// Make monochrome colors
+var pieColors = (function () {
+    var colors = [],
+        base = Highcharts.getOptions().colors[0],
+        i;
+
+    for (i = 0; i < 10; i += 1) {
+        // Start out with a darkened base color (negative brighten), and end
+        // up with a much brighter color
+        colors.push(Highcharts.color(base).brighten((i - 3) / 7).get());
+    }
+    return colors;
+}());
+
+// Build the chart
+Highcharts.chart('chart-1', {
+    chart: {
+        plotBackgroundColor: null,
+        plotBorderWidth: null,
+        plotShadow: false,
+        type: 'pie'
+    },
+    title: {
+        text: 'API 执行次数'
+    },
+    tooltip: {
+        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
+    },
+    accessibility: {
+        point: {
+            valueSuffix: '%'
+        }
+    },
+    plotOptions: {
+        pie: {
+            allowPointSelect: true,
+            cursor: 'pointer',
+            colors: pieColors,
+            dataLabels: {
+                enabled: true,
+                format: '<b>{point.name}</b><br>{point.percentage:.1f} %',
+                distance: -50,
+                filter: {
+                    property: 'percentage',
+                    operator: '>',
+                    value: 4
+                }
+            }
+        }
+    },
+    series: [{
+        name: 'Share',
+        data: data
+    }]
+});
+}
+
+function chart_2(data){
+	// Make monochrome colors
+var pieColors = (function () {
+    var colors = [],
+        base = Highcharts.getOptions().colors[0],
+        i;
+
+    for (i = 0; i < 10; i += 1) {
+        // Start out with a darkened base color (negative brighten), and end
+        // up with a much brighter color
+        colors.push(Highcharts.color(base).brighten((i - 3) / 7).get());
+    }
+    return colors;
+}());
+
+// Build the chart
+Highcharts.chart('chart-2', {
+    chart: {
+        plotBackgroundColor: null,
+        plotBorderWidth: null,
+        plotShadow: false,
+        type: 'pie'
+    },
+    title: {
+        text: 'API 累积执行时间'
+    },
+    tooltip: {
+        pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
+    },
+    accessibility: {
+        point: {
+            valueSuffix: '%'
+        }
+    },
+    plotOptions: {
+        pie: {
+            allowPointSelect: true,
+            cursor: 'pointer',
+            colors: pieColors,
+            dataLabels: {
+                enabled: true,
+                format: '<b>{point.name}</b><br>{point.percentage:.1f} %',
+                distance: -50,
+                filter: {
+                    property: 'percentage',
+                    operator: '>',
+                    value: 4
+                }
+            }
+        }
+    },
+    series: [{
+        name: 'Share',
+        data: data
+    }]
+});
+}
+
+//按照小时计算的api 执行时间
+function chart_3(data){
+	Highcharts.chart('chart-3', {
+
+		title: {
+			text: '按照小时计算的 API 执行时间'
+		},
+	
+		subtitle: {
+			text: 'Source: thesolarfoundation.com'
+		},
+	
+		yAxis: {
+			title: {
+				text: '执行时间'
+			}
+		},
+	
+		xAxis: {
+			categories: [
+				'8',
+				'9',
+				'10',
+				'11',
+				'12',
+				'13',
+				'14',
+				'15',
+				'16',
+				'17',
+				'18',
+				'19',
+				'20',
+				'21',
+				'22',
+				'23',
+				'0',
+				'1',
+				'2',
+				'3',
+				'4',
+				'5',
+				'6',
+				'7'
+			],
+			accessibility: {
+				rangeDescription: 'Range: 0 to 23'
+			}
+		},
+	
+		legend: {
+			layout: 'vertical',
+			align: 'right',
+			verticalAlign: 'middle'
+		},
+	
+		plotOptions: {
+			series: {
+				label: {
+					connectorAllowed: false
+				},
+				pointStart: 0
+			}
+		},
+	
+		series: data,
+	
+		responsive: {
+			rules: [{
+				condition: {
+					maxWidth: 500
+				},
+				chartOptions: {
+					legend: {
+						layout: 'horizontal',
+						align: 'center',
+						verticalAlign: 'bottom'
+					}
+				}
+			}]
+		}
+	
+	});
+}
+function chart_3a(data){
+	Highcharts.chart('chart-3a', {
+
+		title: {
+			text: '按照小时计算的 API 平均执行时间'
+		},
+	
+		subtitle: {
+			text: '总执行时间/次数'
+		},
+	
+		yAxis: {
+			title: {
+				text: '执行时间'
+			}
+		},
+	
+		xAxis: {
+			categories: [
+				'8',
+				'9',
+				'10',
+				'11',
+				'12',
+				'13',
+				'14',
+				'15',
+				'16',
+				'17',
+				'18',
+				'19',
+				'20',
+				'21',
+				'22',
+				'23',
+				'0',
+				'1',
+				'2',
+				'3',
+				'4',
+				'5',
+				'6',
+				'7'
+			],
+			accessibility: {
+				rangeDescription: 'Range: 0 to 23'
+			}
+		},
+	
+		legend: {
+			layout: 'vertical',
+			align: 'right',
+			verticalAlign: 'middle'
+		},
+	
+		plotOptions: {
+			series: {
+				label: {
+					connectorAllowed: false
+				},
+				pointStart: 0
+			}
+		},
+	
+		series: data,
+	
+		responsive: {
+			rules: [{
+				condition: {
+					maxWidth: 500
+				},
+				chartOptions: {
+					legend: {
+						layout: 'horizontal',
+						align: 'center',
+						verticalAlign: 'bottom'
+					}
+				}
+			}]
+		}
+	
+	});
+}
+function chart_4(data){
+	Highcharts.chart('chart-4', {
+		chart: {
+			type: 'column'
+		},
+		title: {
+			text: 'API 执行次数'
+		},
+		subtitle: {
+			text: 'Source: WorldClimate.com'
+		},
+		xAxis: {
+			categories: [
+				'8',
+				'9',
+				'10',
+				'11',
+				'12',
+				'13',
+				'14',
+				'15',
+				'16',
+				'17',
+				'18',
+				'19',
+				'20',
+				'21',
+				'22',
+				'23',
+				'0',
+				'1',
+				'2',
+				'3',
+				'4',
+				'5',
+				'6',
+				'7'
+			],
+			crosshair: true
+		},
+		yAxis: {
+			min: 0,
+			title: {
+				text: '执行次数'
+			}
+		},
+		legend: {
+			layout: 'vertical',
+			align: 'right',
+			verticalAlign: 'middle'
+		},
+		tooltip: {
+			headerFormat: '<span style="font-size:10px">{point.key}</span><table>',
+			pointFormat: '<tr><td style="color:{series.color};padding:0">{series.name}: </td>' +
+				'<td style="padding:0"><b>{point.y} 次</b></td></tr>',
+			footerFormat: '</table>',
+			shared: true,
+			useHTML: true
+		},
+		plotOptions: {
+			column: {
+				pointPadding: 0.2,
+				borderWidth: 0
+			}
+		},
+		series: data
+	});
+}
+
+function chart_6(ohlc,volume){
+{
+
+    // create the chart
+    Highcharts.stockChart('chart-6', {
+
+
+        title: {
+            text: 'AAPL stock price by minute'
+        },
+
+        rangeSelector: {
+            buttons: [{
+                type: 'hour',
+                count: 1,
+                text: '1h'
+            }, {
+                type: 'day',
+                count: 1,
+                text: '1D'
+            }, {
+                type: 'all',
+                count: 1,
+                text: 'All'
+            }],
+            selected: 1,
+            inputEnabled: false
+        },
+
+        series: [{
+            name: 'AAPL',
+            type: 'candlestick',
+            data: ohlc,
+            tooltip: {
+                valueDecimals: 2
+            }
+        }]
+    });
+}
+}
+
+function chart_5(ohlc,volume){
+	  // create the chart
+	  groupingUnits = [[
+		'week',                         // unit name
+		[1]                             // allowed multiples
+	], [
+		'month',
+		[1, 2, 3, 4, 6]
+	]];
+	  Highcharts.stockChart('chart-5', {
+
+
+		rangeSelector: {
+		  selected: 2
+		},
+	
+		title: {
+		  text: 'progress_curve'
+		},
+			yAxis: [{
+				labels: {
+					align: 'right',
+					x: -3
+				},
+				title: {
+					text: 'EXP'
+				},
+				height: '60%',
+				lineWidth: 2,
+				resize: {
+					enabled: true
+				}
+			}, {
+				labels: {
+					align: 'right',
+					x: -3
+				},
+				title: {
+					text: 'action'
+				},
+				top: '65%',
+				height: '35%',
+				offset: 0,
+				lineWidth: 2
+			}],
+	
+		tooltip: {
+				shared: false,
+				useHTML: true,
+				pointFormatter: function() {
+					if(this.high){
+						return '<b><a href="../">'+this.series.name + ' : ' + this.high + '&nbsp;' +'gLocal.gui.h'+ '</a><br><a href="../">' +'gLocal.gui.day_EXP' + ' : ' + Math.round((this.high - this.low)*100)/100 + '&nbsp;' +'gLocal.gui.h'+'</a></b><br/>'; 
+					}
+					else{
+						return '<b><a href="../">'+this.series.name + ' : ' + this.y + '&nbsp;' +'gLocal.gui.times'+'</a><span style="display:none;">'+this.x+'</span></b>'; 
+					}
+				},
+				valueDecimals: 2,//保留两位小數
+				split: true
+			},
+	
+		series: [{
+		  type: 'ohlc',
+		  name: 'gLocal.gui.EXP_in_total',
+		  data: ohlc,
+		  dataGrouping: {
+			units: [[
+			  'week', // unit name
+			  [1] // allowed multiples
+			], [
+			  'month',
+			  [1, 2, 3, 4, 6]
+			]]
+		  }
+			}, {
+				type: 'column',
+				name: 'gLocal.gui.day_action',
+				data: volume,
+				yAxis: 1,
+				dataGrouping: {
+					units: groupingUnits
+				}
+			}]
+	  });
+}

+ 86 - 0
public/app/log/showlog.php

@@ -0,0 +1,86 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<script src="../../node_modules/jquery/dist/jquery.js"></script>
+
+	<style type="text/css">
+
+	.highcharts-figure, .highcharts-data-table table {
+		flex:1;
+		min-width: 220px; 
+		max-width: 100%;
+		margin: 1em auto;
+	}
+
+	.highcharts-data-table table {
+		font-family: Verdana, sans-serif;
+		border-collapse: collapse;
+		border: 1px solid #EBEBEB;
+		margin: 10px auto;
+		text-align: center;
+		width: 100%;
+		max-width: 500px;
+	}
+	.highcharts-data-table caption {
+		padding: 1em 0;
+		font-size: 1.2em;
+		color: #555;
+	}
+	.highcharts-data-table th {
+		font-weight: 600;
+		padding: 0.5em;
+	}
+	.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
+		padding: 0.5em;
+	}
+	.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
+		background: #f8f8f8;
+	}
+	.highcharts-data-table tr:hover {
+		background: #f1f7ff;
+	}
+	.chart_head_1 {
+		text-align: center;
+		font-size: x-large;
+		margin-bottom: 0;
+		font-weight: bold;
+	}
+	.highcharts-data-label {
+		font-size: small;
+	}
+	</style>
+
+	<script src="../../node_modules/highcharts/highstock.js"></script>
+	<script src="../../node_modules/highcharts/modules/data.js"></script>
+	<script src="../../node_modules/highcharts/modules/exporting.js"></script>
+
+	<script src="./showlog.js"></script>
+
+</head>
+<body>
+<h2><?php echo $_GET['file'];?></h2>
+<div style="display:flex;">
+<div id='chart-1'></div>
+<div id='chart-2'></div>
+</div>
+<div id='chart-3'></div>
+<div id='chart-4'></div>
+<div id='chart-3a'></div>
+<div id='chart-5'></div>
+
+<div id="chart-6"></div>
+
+
+
+
+<script>
+
+</script>
+
+<script type="text/javascript">
+getData('<?php echo $_GET['file'];?>');
+</script>
+</body>
+</html>

+ 144 - 0
public/app/log/showrealtime.js

@@ -0,0 +1,144 @@
+
+var apiName="all";
+
+function createChart(div,title,api,item) {
+    Highcharts.chart(div, {
+        chart: {
+            type: 'spline'
+        },
+        title: {
+            text: title
+        },
+        accessibility: {
+            announceNewData: {
+                enabled: true,
+                minAnnounceInterval: 15000,
+                announcementFormatter: function (allSeries, newSeries, newPoint) {
+                    if (newPoint) {
+                        return 'New point added. Value: ' + newPoint.y;
+                    }
+                    return false;
+                }
+            }
+        },
+        data: {
+            csvURL: './pref_realtime_get.php?api='+api+'&item='+item,
+            enablePolling: true,
+            dataRefreshRate: 60
+        }
+    });
+
+
+}
+
+
+
+function create_live(container,title,api){
+    Highcharts.chart(container, {
+
+    chart: {
+        type: 'gauge',
+        plotBackgroundColor: null,
+        plotBackgroundImage: null,
+        plotBorderWidth: 0,
+        plotShadow: false
+    },
+
+    title: {
+        text: title
+    },
+
+    pane: {
+        startAngle: -150,
+        endAngle: 150,
+        background: [{
+            backgroundColor: {
+                linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+                stops: [
+                    [0, '#FFF'],
+                    [1, '#333']
+                ]
+            },
+            borderWidth: 0,
+            outerRadius: '109%'
+        }, {
+            backgroundColor: {
+                linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+                stops: [
+                    [0, '#333'],
+                    [1, '#FFF']
+                ]
+            },
+            borderWidth: 1,
+            outerRadius: '107%'
+        }, {
+            // default background
+        }, {
+            backgroundColor: '#DDD',
+            borderWidth: 0,
+            outerRadius: '105%',
+            innerRadius: '103%'
+        }]
+    },
+
+    // the value axis
+    yAxis: {
+        min: 0,
+        max: 5000,
+
+        minorTickInterval: 'auto',
+        minorTickWidth: 1,
+        minorTickLength: 10,
+        minorTickPosition: 'inside',
+        minorTickColor: '#666',
+
+        tickPixelInterval: 30,
+        tickWidth: 2,
+        tickPosition: 'inside',
+        tickLength: 10,
+        tickColor: '#666',
+        labels: {
+            step: 2,
+            rotation: 'auto'
+        },
+        title: {
+            text: '毫秒/API'
+        },
+        plotBands: [{
+            from: 0,
+            to: 2000,
+            color: '#55BF3B' // green
+        }, {
+            from: 2000,
+            to: 3500,
+            color: '#DDDF0D' // yellow
+        }, {
+            from: 3500,
+            to: 5000,
+            color: '#DF5353' // red
+        }]
+    },
+
+    series: [{
+        name: 'Speed',
+        data: [80],
+        tooltip: {
+            valueSuffix: ' ms/s'
+        }
+    }]
+
+},
+// Add some life
+function (chart) {
+    if (!chart.renderer.forExport) {
+        setInterval(function () {
+            $.get("./pref_live.php?api="+api+"&item=average",function(data){
+                var point = chart.series[0].points[0];
+                newVal = parseInt(data);
+                point.update(newVal);
+            });
+        }, 3000);
+    }
+});
+
+}

+ 124 - 0
public/app/log/showrealtime.php

@@ -0,0 +1,124 @@
+<!DOCTYPE HTML>
+<html>
+<head>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1">
+	<script src="../../node_modules/jquery/dist/jquery.js"></script>
+
+	<style type="text/css">
+
+	.highcharts-figure, .highcharts-data-table table {
+		flex:1;
+		min-width: 220px; 
+		max-width: 100%;
+		margin: 1em auto;
+	}
+
+	.highcharts-data-table table {
+		font-family: Verdana, sans-serif;
+		border-collapse: collapse;
+		border: 1px solid #EBEBEB;
+		margin: 10px auto;
+		text-align: center;
+		width: 100%;
+		max-width: 500px;
+	}
+	.highcharts-data-table caption {
+		padding: 1em 0;
+		font-size: 1.2em;
+		color: #555;
+	}
+	.highcharts-data-table th {
+		font-weight: 600;
+		padding: 0.5em;
+	}
+	.highcharts-data-table td, .highcharts-data-table th, .highcharts-data-table caption {
+		padding: 0.5em;
+	}
+	.highcharts-data-table thead tr, .highcharts-data-table tr:nth-child(even) {
+		background: #f8f8f8;
+	}
+	.highcharts-data-table tr:hover {
+		background: #f1f7ff;
+	}
+	.chart_head_1 {
+		text-align: center;
+		font-size: x-large;
+		margin-bottom: 0;
+		font-weight: bold;
+	}
+	.highcharts-data-label {
+		font-size: small;
+	}
+	</style>
+
+
+
+<script src="../../node_modules/highcharts/highcharts.js"></script>
+<script src="../../node_modules/highcharts/highcharts-more.js"></script>
+<script src="../../node_modules/highcharts/modules/exporting.js"></script>
+<script src="../../node_modules/highcharts/modules/export-data.js"></script>
+<script src="../../node_modules/highcharts/modules/accessibility.js"></script>
+
+	<script src="../../node_modules/highcharts/modules/data.js"></script>
+	<script src="../../node_modules/highcharts/modules/exporting.js"></script>
+
+</head>
+<body>
+<h2>实时监控</h2>
+<?php
+require_once(__DIR__."/../config.php");
+require_once(__DIR__."/../redis/function.php");
+$redis = redis_connect();
+if($redis){
+    $key="pref-hour/api/";
+    $apis = $redis->keys($key.'*');
+    echo "<ol>";
+    echo "<li><a href='showrealtime.php?api=all'>all</a></li>";
+    foreach ($apis as  $value) {
+        $api = substr($value,strlen($key));
+        echo "<li><a  href='showrealtime.php?api={$api}'>".$api."</a></li>";
+    }
+    echo "</ol>";
+}
+?>
+<div class="ld-row" style="display:none;">
+	<label class="ld-label">
+		Enable Polling
+	</label>
+	<input type="checkbox" checked="checked" id="enablePolling"/>
+</div>
+<div style="display:flex;">
+    <div id='chart-1'></div>
+    <div id='chart-2'></div>
+</div>
+<div style="display:flex;">
+    <div id='chart-3'></div>
+    <div id='chart-4'></div>
+</div>
+<div id='chart-3a'></div>
+<div id='chart-5'></div>
+
+<div id="chart-6"></div>
+
+
+<script src="./showrealtime.js"></script>
+
+<script>
+<?php 
+    if(isset($_GET["api"])){
+        echo "apiName = '{$_GET["api"]}';";
+    }else{
+         echo "apiName = 'all';";
+    }
+    
+?>
+
+// Create the chart
+createChart("chart-1",'总请求次数/分钟',apiName,'count');
+createChart("chart-2",'总响应时间(毫秒/分钟)',apiName,'delay');
+createChart("chart-3",'平均响应时间(毫秒/API)',apiName,'average');
+create_live("chart-4","实时响应时间(毫秒/API)",apiName);
+</script>
+</body>
+</html>

+ 1 - 1
public/app/studio/editor.php

@@ -58,7 +58,7 @@ else{$currDevice="computer";}
 	<script language="javascript" src="js/dict.js"></script>
 	<script language="javascript" src="js/relation.js"></script>
 
-	<script language="javascript" src="js/relation_list.json"></script>
+	<script language="javascript" src="js/relation_list.js"></script>
 	
 	<script language="javascript" src="sent/sent.js"></script>
 	<script language="javascript" src="../public/js/notify.js"></script>

+ 1505 - 0
public/app/studio/js/relation_list.js

@@ -0,0 +1,1505 @@
+var list_relation=[
+    {
+        "id": "IAD",
+        "case": "",
+        "note": "Identical Adjective relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "IAD",
+        "case": "",
+        "note": "同类修饰",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IAD",
+        "case": "",
+        "note": "tulyādhikaraṇavisesana -> visesya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ASV",
+        "case": "",
+        "note": "Active Subject Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ASV",
+        "case": "",
+        "note": "施动者<主格> -> 动词<br>XX把…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ASV",
+        "case": "",
+        "note": "vuttakattar -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "AOV",
+        "case": ".nom.",
+        "note": "Active Object Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "AOV",
+        "case": ".nom.",
+        "note": "受动者<主格> -> 动词<br>XX被…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "AOV",
+        "case": ".nom.",
+        "note": "vuttakamma -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".nom.",
+        "note": "Double Active Subject <Ordinary> relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".nom.",
+        "note": "<字面>主语 -> 系动词<br>XX是…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".nom.",
+        "note": "pakati <vuttakattar> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".nom.",
+        "note": "Double Active Subject <Secondary> relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".nom.",
+        "note": "<字面>表语 -> 系动词<br>…是XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".nom.",
+        "note": "vikati <vuttakattar> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "NIO",
+        "case": ".nom.",
+        "note": "被描述 -> 定性<br>XX有…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "NIO",
+        "case": ".nom.",
+        "note": "tulyattha -> liṅgattha",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "NID",
+        "case": ".nom.",
+        "note": "Nominal Identity <Denominative> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "NID",
+        "case": ".nom.",
+        "note": "待命名 -> 命名<br>XX叫做…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "NID",
+        "case": ".nom.",
+        "note": "saññin <nāmin> -> saññā <nāma>",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".nom.",
+        "note": "Double Active Subject <Denominative> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".nom.",
+        "note": "<命名>主 -> 系<br>XX叫做…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".nom.",
+        "note": "pakati<saññin, nāmin> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".nom.",
+        "note": "Double Active Subject <Denominative> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".nom.",
+        "note": "<命名>表 -> 系<br>…叫做XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".nom.",
+        "note": "vikati<saññā,nāma> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DAO",
+        "case": ".nom.",
+        "note": "Double Active Object Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DAO",
+        "case": ".nom.",
+        "note": "双宾语主动",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DAO",
+        "case": ".nom.",
+        "note": "pakati <vuttakamma> -> vikati <vuttakamma>",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IOV",
+        "case": ".acc.",
+        "note": "Inactive Object Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "IOV",
+        "case": ".acc.",
+        "note": "受动者<非主格> -> 动词<br>…把XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IOV",
+        "case": ".acc.",
+        "note": "avuttakamma -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DIO-P",
+        "case": ".acc.",
+        "note": "Double Inactive Object -> Verb Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DIO-P",
+        "case": ".acc.",
+        "note": "双宾语<主要> -> 动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DIO-P",
+        "case": ".acc.",
+        "note": "pakati <avuttakamma> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DIO-S",
+        "case": ".acc.",
+        "note": "Double Inactive Object -> Verb Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DIO-S",
+        "case": ".acc.",
+        "note": "双宾语<次要> -> 动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DIO-S",
+        "case": ".acc.",
+        "note": "vikati <avuttakamma> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "STC",
+        "case": ".acc.",
+        "note": "Spatio-Temporal Continuity Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "STC",
+        "case": ".acc.",
+        "note": "时空连续 -> 持续动作",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "STC",
+        "case": ".acc.",
+        "note": "accantasaṃyoga -> accantasaṃyogavant",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ADV",
+        "case": ".acc.",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADV",
+        "case": ".acc.",
+        "note": "动词修饰词 -> 动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADV",
+        "case": ".acc.",
+        "note": "kiriyāvisesana -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IMP",
+        "case": ".inst.",
+        "note": "Implemental Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "IMP",
+        "case": ".inst.",
+        "note": "方式 -> 动词<br>以XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IMP",
+        "case": ".inst.",
+        "note": "karaṇa -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "SOE",
+        "case": ".inst.",
+        "note": "Sociative <Explicit> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "SOE",
+        "case": ".inst.",
+        "note": "<带连词>伴随关系<br>跟XX一起",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "SOE",
+        "case": ".inst.",
+        "note": "sahayoga <sahādiyoga> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "SOI",
+        "case": ".inst.",
+        "note": "Sociative <Implicit> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "SOI",
+        "case": ".inst.",
+        "note": "<无连词>伴随关系<br>与XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "SOI",
+        "case": ".inst.",
+        "note": "sahatthayoga",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ISV",
+        "case": ".inst.",
+        "note": "Inactive Subject Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ISV",
+        "case": ".inst.",
+        "note": "非主格施动者 -> 动词<br>被XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ISV",
+        "case": ".inst.",
+        "note": "avuttakattar -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "CAU",
+        "case": ".inst.",
+        "note": "Causality Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "CAU",
+        "case": ".inst.",
+        "note": "因 -> 果<br>根据XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "CAU",
+        "case": ".inst.",
+        "note": "hetu -> phala",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IOV",
+        "case": ".inst.",
+        "note": "被使役宾语 -> 动词<br>令XX…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IOV",
+        "case": ".inst.",
+        "note": "avuttakamma -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IOV",
+        "case": ".inst.",
+        "note": "Inactive Object Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADJ",
+        "case": ".inst.",
+        "note": "Adjectival Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADJ",
+        "case": ".inst.",
+        "note": "名词的形容 -> 被形容",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADJ",
+        "case": ".inst.",
+        "note": "nāmavisesana -> visesya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ADV",
+        "case": ".inst.",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADV",
+        "case": ".inst.",
+        "note": "修饰动作的副词 -> 动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADV",
+        "case": ".inst.",
+        "note": "kiriyāvisesana -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "REC",
+        "case": ".dat.",
+        "note": "Receptive Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "REC",
+        "case": ".dat.",
+        "note": "接收者 -> 授予<br>向XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "REC",
+        "case": ".dat.",
+        "note": "sampadāna -> sampadānin",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "PUR",
+        "case": ".dat.",
+        "note": "Purposive Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "PUR",
+        "case": ".dat.",
+        "note": "目的 -> 动词<br>为了…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "PUR",
+        "case": ".dat.",
+        "note": "tadattha <tumattha> sampadāna -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DET",
+        "case": ".abl.",
+        "note": "Detachment Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DET",
+        "case": ".abl.",
+        "note": "出发地 -> 出发<br>从XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DET",
+        "case": ".abl.",
+        "note": "apādāna -> apādānin",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "COC",
+        "case": ".abl.",
+        "note": "Contrastive Comparison Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "COC",
+        "case": ".abl.",
+        "note": "区分比较<br>比XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "COC",
+        "case": ".abl.",
+        "note": "Vibhattāpādāna -> Vibhattāpādānin",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "CAU",
+        "case": ".abl.",
+        "note": "Causality Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "CAU",
+        "case": ".abl.",
+        "note": "因 -> 果<br>由于XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "CAU",
+        "case": ".abl.",
+        "note": "hetu -> phala",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ADJ",
+        "case": ".abl.",
+        "note": "Adjectival Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADJ",
+        "case": ".abl.",
+        "note": "名词的形容 -> 被形容",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADJ",
+        "case": ".abl.",
+        "note": "nāmavisesana -> visesya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "POS",
+        "case": ".gen.",
+        "note": "Possessor Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "POS",
+        "case": ".gen.",
+        "note": "所有 -> 被所有<br>属于XX的",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "POS",
+        "case": ".gen.",
+        "note": "sambandha -> sambandhin",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "COI",
+        "case": ".gen.",
+        "note": "Collection -> Individual Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "COI",
+        "case": ".gen.",
+        "note": "包含[全集] -> 被包含[子集]元素<br>XX中的",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "COI",
+        "case": ".gen.",
+        "note": "niddhāraṇasamudāya -> niddhāraṇīya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ISV",
+        "case": ".gen.",
+        "note": "Inactive Subject Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ISV",
+        "case": ".gen.",
+        "note": "施动者<非主格> -> 动词<br>XX的…<动作>",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ISV",
+        "case": ".gen.",
+        "note": "avuttakattar -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IOV",
+        "case": ".gen.",
+        "note": "Inactive Object Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "IOV",
+        "case": ".gen.",
+        "note": "受动者<非主格> -> 动词<br>XX的被…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IOV",
+        "case": ".gen.",
+        "note": "avuttakamma -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "LOV",
+        "case": ".loc.",
+        "note": "Locus -> Verb Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "LOV",
+        "case": ".loc.",
+        "note": "容器 -> 动词<br>在…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "LOV",
+        "case": ".loc.",
+        "note": "ādhāra -> ādheyya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "MOT",
+        "case": ".loc.",
+        "note": "Motivational Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "MOT",
+        "case": ".loc.",
+        "note": "表现 -> 有表现",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "MOT",
+        "case": ".loc.",
+        "note": "nimitta -> nimittavant",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "WHP",
+        "case": ".loc.",
+        "note": "Whole -> Part Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "WHP",
+        "case": ".loc.",
+        "note": "整体 -> 局部<br>XX中的",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "WHP",
+        "case": ".loc.",
+        "note": "samudāya -> samudāyin",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "COI",
+        "case": ".loc.",
+        "note": "Collection -> Individual Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "COI",
+        "case": ".loc.",
+        "note": "集合 -> 个体元素<br>XXX中的一个",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "COI",
+        "case": ".loc.",
+        "note": "niddhāraṇasamudāya -> nidhāraṇīya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "IAD",
+        "case": ".caus.",
+        "note": "Identical Adjective relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "IAD",
+        "case": ".caus.",
+        "note": "同类修饰",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "IAD",
+        "case": ".caus.",
+        "note": "tulyādhikaraṇavisesana -> visesya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "PUR",
+        "case": ".inf.",
+        "note": "Purposive Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "PUR",
+        "case": ".inf.",
+        "note": "目的<br>用来XX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "PUR",
+        "case": ".inf.",
+        "note": "Purposive Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ASV",
+        "case": ".inf.",
+        "note": "Active Subject Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ASV",
+        "case": ".inf.",
+        "note": "施动者<主格> -> 动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ASV",
+        "case": ".inf.",
+        "note": "vuttakattar -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ADV",
+        "case": ".abs.",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADV",
+        "case": ".abs.",
+        "note": "副词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADV",
+        "case": ".abs.",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "CAU",
+        "case": ".abs.",
+        "note": "Causality Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "CAU",
+        "case": ".abs.",
+        "note": "使役",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "CAU",
+        "case": ".abs.",
+        "note": "Causality Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".abs.",
+        "note": "Double Active Subject <Ordinary> relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".abs.",
+        "note": "<字面>主语 -> 系动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASO-P",
+        "case": ".abs.",
+        "note": "pakati <vuttakattar> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".abs.",
+        "note": "Double Active Subject <Secondary> relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".abs.",
+        "note": "<字面>表语 -> 系动词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASO-S",
+        "case": ".abs.",
+        "note": "vikati <vuttakattar> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".abs.",
+        "note": "Double Active Subject <Denominative> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".abs.",
+        "note": "<命名>主 -> 系",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASD-P",
+        "case": ".abs.",
+        "note": "pakati<saññin, nāmin> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".abs.",
+        "note": "Double Active Subject <Denominative> Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".abs.",
+        "note": "<命名>表 -> 系",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DASD-S",
+        "case": ".abs.",
+        "note": "vikati<saññā,nāma> -> kiriyā",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "DEF",
+        "case": "",
+        "note": "Definitive Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "DEF",
+        "case": "",
+        "note": "特征限定<br>当…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "DEF",
+        "case": "",
+        "note": "lakkhaṇa -> lakkhya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "AC",
+        "case": "",
+        "note": "Absolute Clause",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "AC",
+        "case": "",
+        "note": "绝对从句",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "AC",
+        "case": "",
+        "note": "Absolute Clause",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "AVC",
+        "case": "",
+        "note": "Absolute Voice Clause",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "AVC",
+        "case": "",
+        "note": "绝对语态从句",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "AVC",
+        "case": "",
+        "note": "Absolute Voice Clause",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ADV",
+        "case": "",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ADV",
+        "case": "",
+        "note": "副词",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ADV",
+        "case": "",
+        "note": "Adverbial Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "QUS",
+        "case": "",
+        "note": "Quoted Speech Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "QUS",
+        "case": "",
+        "note": "引号内 -> 引号",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "QUS",
+        "case": "",
+        "note": "nidassetabba -> nidassana",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "QUM",
+        "case": "",
+        "note": "Quotation Marker relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "QUM",
+        "case": "",
+        "note": "引号 -> 引号外",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "QUM",
+        "case": "",
+        "note": "nidassana -> nidassanavant",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ENU",
+        "case": ".adv.",
+        "note": "enumerative relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ENU",
+        "case": ".adv.",
+        "note": "罗列 -> 破折号",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ENU",
+        "case": ".adv.",
+        "note": "enumerative relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "ENM",
+        "case": ".adv.",
+        "note": "enumeration marker Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "ENM",
+        "case": ".adv.",
+        "note": "破折号 -> 被罗列<br>- XXX",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "ENM",
+        "case": ".adv.",
+        "note": "enumeration marker Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "LOV",
+        "case": ".adv.",
+        "note": "Locus -> Verb Relation",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "LOV",
+        "case": ".adv.",
+        "note": "容纳 -> 被容纳<br>在…",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "LOV",
+        "case": ".adv.",
+        "note": "ādhāra -> ādheyya",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    },
+    {
+        "id": "CAU",
+        "case": ".adv.",
+        "note": "Causative particle",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "en"
+    },
+    {
+        "id": "CAU",
+        "case": ".adv.",
+        "note": "归因",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "zh-cn"
+    },
+    {
+        "id": "CAU",
+        "case": ".adv.",
+        "note": "Causative particle",
+        "sys_name": "Sadda Pan Goun",
+        "author": "Ven. Pandita Pariyatti Faculty ITBMU",
+        "editor": "Bhikkhu Kosalla sy1987",
+        "language": "default"
+    }
+];

+ 3 - 2
public/app/term/note.js

@@ -199,11 +199,12 @@ function note_refresh_new(callback = null) {
 						splite_pali_word();
 						//处理编辑框消息
 						tran_sent_textarea_event_init();
-						//初始化mermaid
-						mermaid.initialize();
 						if (callback) {
 							callback();
 						}
+						//初始化mermaid
+						mermaid.initialize({startOnLoad:true});
+
 					} catch (e) {
 						console.error(e);
 					}

+ 4 - 0
public/app/term/popup_note.css

@@ -98,3 +98,7 @@ code ol {
 	word-break: normal;
 	font-family: arial;
 }
+.guide_contence{
+    min-width: 20em;
+    max-width: 100%;
+}

+ 54 - 0
public/app/term/term.js

@@ -716,6 +716,60 @@ function term_get_dict() {
 	);
 }
 
+function term_get_used(){
+    let output = [];
+    $("term").each(function () {
+        let word = $(this).attr("pali");
+        let meaning = $(this).attr("mean");
+        if(word !== ""){
+            output[word] = {
+                pali:word,
+                pali_en:com_getPaliEn(word),
+                meaning:meaning
+            };
+        }
+
+    });
+
+    let arrWord=[];
+    for (const key in output) {
+        if (output.hasOwnProperty.call(output, key)) {
+            const element = output[key];
+            arrWord.push(element);
+        }
+    }
+    arrWord = arrWord.sort(function(a, b){
+	  var x = a.pali_en;
+	  var y = b.pali_en;
+	  if (x < y) {return -1;}
+	  if (x > y) {return 1;}
+	  return 0;
+        });
+
+    let arrMeaning=[];
+    for (const key in output) {
+        if (output.hasOwnProperty.call(output, key)) {
+            const element = output[key];
+            if(element.meaning != ""){
+                arrMeaning.push(element);
+            }
+        }
+    }
+    arrMeaning = arrMeaning.sort(function(a, b){
+	  var x = a.meaning;
+	  var y = b.meaning;
+	  if (x < y) {return -1;}
+	  if (x > y) {return 1;}
+	  return 0;
+        });
+
+    return {
+        glossary:{
+            word:arrWord,
+            meaning:arrMeaning
+        }
+    }
+}
 /*
 function term_popup_init() {
   $(".term_link").each(function () {

+ 2 - 2
public/app/ucenter/invite.php

@@ -23,8 +23,8 @@ if (PHP_SAPI == "cli") {
 		$invitecode = "invitecode://".$uuid;
 		$redis->set($invitecode,$email);
 		$redis->expire($invitecode,7*20*3600);
-		$SignUpLink=WWW_SERVER . "/app/ucenter/sign_up.php?invite=".$uuid;
-		$SignUpString=WWW_SERVER . "/app/ucenter/sign_up.php";
+		$SignUpLink="https://".$_SERVER['SERVER_NAME'] . "/app/ucenter/sign_up.php?invite=".$uuid;
+		$SignUpString="https://".$_SERVER['SERVER_NAME'] . "/app/ucenter/sign_up.php";
 
 			// 打开文件并读取数据
 		$irow=0;

+ 4 - 4
public/app/users_guide/zh-cn/grammar_fut.md

@@ -1,6 +1,6 @@
 # 将来时
 
-**动词**变位之一,表示将要发生或将要做(的事情),动作。相当于英语的各种将来有关的时态
+**动词**变位之一,表示将要发生或将要做(的事情),动作。相当于英语的一般将来时
 
 |语种|缩写|全称|
 |-|-|-|
@@ -12,6 +12,6 @@
 
 |将来时|单数|复数|
 | -- | -- | -- |
-|第三人称|-(i)ssati<br>TA**将**~|-(i)ssanti<br>TA们**将**~|
-|第二人称|-(i)ssasi<br>你**将**~|-(i)ssatha<br>你们**将**~|
-|第一人称|-(i)ssāmi<br>我**将**~|-(i)ssāma<br>我们**将**~|
+|第三人称|~(i)ssati<br>TA**将**~|~(i)ssanti<br>TA们**将**~|
+|第二人称|~(i)ssasi<br>你**将**~|~(i)ssatha<br>你们**将**~|
+|第一人称|~(i)ssāmi<br>我**将**~|~(i)ssāma<br>我们**将**~|

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
public/documents/gitmoji.html


+ 2 - 1
public/package.json

@@ -14,8 +14,9 @@
 		"jquery.fancytree": "^2.38.0",
 		"marked": "^2.1.3",
 		"mermaid": "^8.12.0",
-		"pqgridf": "^3.5.1",
 		"moment": "^2.29.1",
+		"mustache": "^4.2.0",
+		"pqgridf": "^3.5.1",
 		"tributejs": "^5.1.3",
 		"vue": "^3.2.8"
 	}

+ 5 - 2
v1/scripts/migrations/20211210160700_user_dict_copy.php

@@ -27,7 +27,10 @@ $dest_table=_PG_TABLE_DICT_WBW_;#目标表名
 
 echo "migarate user dict".PHP_EOL;
 #打开源数据库
-$PDO_SRC = new PDO($src_db,_DB_USERNAME_,_DB_PASSWORD_,array(PDO::ATTR_PERSISTENT=>true));
+$PDO_SRC = new PDO($src_db,_DB_USERNAME_,_DB_PASSWORD_,array(
+                                PDO::ATTR_PERSISTENT=>true,
+                                PDO::SQLITE_ATTR_OPEN_FLAGS => PDO::SQLITE_OPEN_READONLY
+                                ));
 $PDO_SRC->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
 echo "open src".PHP_EOL;
 
@@ -73,7 +76,7 @@ $allSrcCount = 0;
 $count = 0;
 
 #从源数据表中读取
-$query = "SELECT *  FROM ".$src_table." WHERE true ";
+$query = "SELECT *  FROM ".$src_table;
 $stmtSrc = $PDO_SRC->prepare($query);
 $stmtSrc->execute();
 while($srcData = $stmtSrc->fetch(PDO::FETCH_ASSOC)){

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно