From f43983c3912d64a48193dd1c326c51fa6d0d5469 Mon Sep 17 00:00:00 2001 From: suyuan <175338101@qq.com> Date: Sun, 20 Sep 2020 22:45:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .circleci/config.yml | 751 -------- .github/workflows/main.yml | 20 +- luci-app-status/Makefile | 14 + .../resources/status/css/wanstatus.css | 335 ++++ .../resources/status/images/status-doing.png | Bin 0 -> 536 bytes .../resources/status/images/status-done.png | Bin 0 -> 607 bytes .../resources/status/images/status-error.png | Bin 0 -> 575 bytes .../resources/status/images/status-todo.png | Bin 0 -> 536 bytes .../resources/status/images/status-warn.png | Bin 0 -> 544 bytes .../resources/status/images/statusError.png | Bin 0 -> 1717 bytes .../resources/status/images/statusOK.png | Bin 0 -> 1637 bytes .../resources/status/images/statusWarning.png | Bin 0 -> 1323 bytes luci-app-status/luasrc/controller/status.lua | 313 ++++ luci-app-status/luasrc/view/status/server.htm | 94 + .../luasrc/view/status/wanstatus.htm | 1662 +++++++++++++++++ luci-app-status/po/templates/status.pot | 152 ++ luci-app-status/po/zh_Hans/status.po | 163 ++ .../share/luci/menu.d/luci-app-status.json | 13 + .../usr/share/rpcd/acl.d/luci-app-status.json | 14 + 19 files changed, 2770 insertions(+), 761 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 luci-app-status/Makefile create mode 100644 luci-app-status/htdocs/luci-static/resources/status/css/wanstatus.css create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/status-doing.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/status-done.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/status-error.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/status-todo.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/status-warn.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/statusError.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/statusOK.png create mode 100644 luci-app-status/htdocs/luci-static/resources/status/images/statusWarning.png create mode 100644 luci-app-status/luasrc/controller/status.lua create mode 100644 luci-app-status/luasrc/view/status/server.htm create mode 100644 luci-app-status/luasrc/view/status/wanstatus.htm create mode 100644 luci-app-status/po/templates/status.pot create mode 100644 luci-app-status/po/zh_Hans/status.po create mode 100644 luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json create mode 100644 luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index efc3cc25f..000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,751 +0,0 @@ -version: 2 -jobs: - prepare: - machine: - image: ubuntu-1604:201903-01 - - working_directory: ~/ - - steps: - - run: - name: Prepare - command: | - sudo rm -rf /var/lib/apt/lists/lock - sudo apt-get update - sudo rm -rf /var/lib/apt/lists/lock - sudo apt-get install -yq build-essential git unzip ncurses-dev libz-dev libssl-dev python subversion gettext gawk wget curl rsync perl libelf-dev python3.5 libpython3.5-stdlib liblzma-dev - pyenv global 3.5.2 - - build_x86_64: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: x86_64 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 50m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - sudo apt-get update - sudo apt-get install -yq libelf-dev - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 50m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_x86: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: x86 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi3: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi3 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_espressobin: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: espressobin - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_r2s: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: r2s - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi4: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi4 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_rpi2: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: rpi2 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile package/compile target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_bpi-r2: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: bpi-r2 - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: | - sudo apt-get update - sudo apt-get -yq install swig2.0 - make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_wrt3200acm: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_TARGET: wrt3200acm - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/$OMR_TARGET/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/$OMR_TARGET/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/$OMR_TARGET/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rm -rf ~/openmptcprouter/$OMR_TARGET/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - build_wrt32: - machine: - image: ubuntu-1604:201903-01 - - environment: - - OMR_VERSION: $CIRCLE_TAG - - OMR_KERNEL: 5.4 - - working_directory: ~/ - - steps: - - run: - name: cache - command: | - echo "cache 107 $OMR_KERNEL $OMR_TARGET" > /tmp/cache-target - echo "cache 108 $OMR_KERNEL $OMR_TARGET $OMR_VERSION" > /tmp/cache-version - - - restore_cache: - keys: - - cache-{{ checksum "/tmp/cache-version" }} - - cache-{{ checksum "/tmp/cache-target" }} - - - run: - name: Build toolchain wrt3200acm - no_output_timeout: 40m - command: | - git clone https://github.com/ysurac/openmptcprouter || true - cd openmptcprouter - git checkout ${CIRCLE_BRANCH:-$CIRCLE_TAG} || true - git pull || true - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_TARGET="wrt3200acm" - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt3200acm/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt3200acm/source/key-build.pub - - - save_cache: - key: cache-{{ checksum "/tmp/cache-target" }} - paths: - - openmptcprouter - - - run: - name: Build wrt3200acm - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt3200acm/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy wrt3200acm - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/wrt3200acm/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/wrt3200acm - rm -rf ~/openmptcprouter/wrt3200acm/source/bin - - - save_cache: - key: cache-{{ checksum "/tmp/cache-version" }} - paths: - - openmptcprouter - - - run: - name: Build toolchain wrt32x - no_output_timeout: 40m - command: | - cd ~/openmptcprouter/ - export OMR_PATH="$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_FEED_URL="$CIRCLE_REPOSITORY_URL" - export OMR_FEED_SRC="${CIRCLE_BRANCH:-$CIRCLE_TAG}" - export OMR_TARGET="wrt32x" - ln -s wrt3200acm wrt32x - pyenv global 3.5.2 - sh build.sh prepare {tools,toolchain}/install -j2 - echo -e "$OMR_PRIVKEY" > ~/openmptcprouter/wrt32x/source/key-build - echo -e "$OMR_PUBKEY" > ~/openmptcprouter/wrt32x/source/key-build.pub - - - run: - name: Build wrt32x - no_output_timeout: 40m - command: make IGNORE_ERRORS=m -C ~/openmptcprouter/wrt32x/source package/{compile,install,index} target/compile -j2 package/compile -j2 target/install -j2 - - - run: - name: Deploy wrt32x - command: | - ssh -p ${OMR_DEPLOY_PORT:-22} deploy@$OMR_DEPLOY_HOST mkdir -p deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/$OMR_TARGET - rsync -av --delete-after ~/openmptcprouter/wrt32x/source/bin/ -e "ssh -q -p ${OMR_DEPLOY_PORT:-22}" deploy@$OMR_DEPLOY_HOST:deploy/${CIRCLE_BRANCH:-release}/${CIRCLE_TAG:-$OMR_KERNEL}/wrt32x - -workflows: - version: 2 - main: - jobs: - - prepare: - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_x86_64: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_x86: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi4: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi3: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_espressobin: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_r2s: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_rpi2: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_bpi-r2: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop - - build_wrt32: - requires: - - prepare - filters: - tags: - only: /.*/ - branches: - only: - - develop diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9428eb7cf..e84d9bfb5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,8 +1,8 @@ -name: Build OpenMPTCProuter +name: Build antrouter on: [push] env: - REPO_URL: 'https://github.com/ysurac/openmptcprouter' + REPO_URL: 'https://github.com/suyuan168/3grouter' OMR_KERNEL: '5.4' jobs: @@ -28,7 +28,7 @@ jobs: - name: Clone source code working-directory: ../../ env: - REPO_URL: https://github.com/ysurac/openmptcprouter + REPO_URL: https://github.com/suyuan168/3grouter SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} GITHUB_WORKSPACE: ${{ steps.branch_name.outputs.WORKSPACE }} run: | @@ -44,7 +44,7 @@ jobs: - name: Build toolchain working-directory: ../../omr env: - OMR_FEED_URL: https://github.com/ysurac/openmptcprouter-feeds + OMR_FEED_URL: https://github.com/suyuan168/openmptcprouter-feeds SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} OMR_TARGET: ${{ matrix.OMR_TARGET }} run: | @@ -79,7 +79,7 @@ jobs: command: | mkdir -p deploy/release/${{env.SOURCE_TAG}}/${{matrix.OMR_TARGET}} host: ${{ secrets.OMR_DEPLOY_HOST }} - user: deploy + user: root port: ${{ secrets.OMR_DEPLOY_PORT }} key: ${{ secrets.PRIVATE_KEY }} - if: steps.branch_name.outputs.SOURCE_BRANCH != '' @@ -93,7 +93,7 @@ jobs: command: | mkdir -p deploy/${{env.SOURCE_BRANCH}}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}} host: ${{ secrets.OMR_DEPLOY_HOST }} - user: deploy + user: root port: ${{ secrets.OMR_DEPLOY_PORT }} key: ${{ secrets.PRIVATE_KEY }} - name: Move binaries for rsync @@ -108,10 +108,10 @@ jobs: uses: up9cloud/action-rsync@master env: ARGS: -av --delete-after - TARGET: deploy/release/${{steps.branch_name.outputs.SOURCE_TAG}}/${{matrix.OMR_TARGET}} + TARGET: root/release/${{steps.branch_name.outputs.SOURCE_TAG}}/${{matrix.OMR_TARGET}} SOURCE: ./bin/ KEY: ${{ secrets.PRIVATE_KEY }} - USER: deploy + user: root HOST: ${{ secrets.OMR_DEPLOY_HOST }} PORT: ${{ secrets.OMR_DEPLOY_PORT }} SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} @@ -123,10 +123,10 @@ jobs: uses: up9cloud/action-rsync@master env: ARGS: -av --delete-after - TARGET: deploy/${{ steps.branch_name.outputs.SOURCE_BRANCH }}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}} + TARGET: root/${{ steps.branch_name.outputs.SOURCE_BRANCH }}/${{env.OMR_KERNEL}}/${{matrix.OMR_TARGET}} SOURCE: ./bin/ KEY: ${{ secrets.PRIVATE_KEY }} - USER: deploy + user: root HOST: ${{ secrets.OMR_DEPLOY_HOST }} PORT: ${{ secrets.OMR_DEPLOY_PORT }} SOURCE_NAME: ${{ steps.branch_name.outputs.SOURCE_NAME }} diff --git a/luci-app-status/Makefile b/luci-app-status/Makefile new file mode 100644 index 000000000..debb5b67f --- /dev/null +++ b/luci-app-status/Makefile @@ -0,0 +1,14 @@ +# +# Copyright (C) 2020 Ycarus (Yannick Chabanois) +# +# + +include $(TOPDIR)/rules.mk + +LUCI_TITLE:=Aggregation status +LUCI_DEPENDS:=+luci-lib-json +luci-app-openmptcprouter +PKG_LICENSE:=GPLv3 + +include $(TOPDIR)/feeds/luci/luci.mk + +# call BuildPackage - OpenWrt buildroot signature diff --git a/luci-app-status/htdocs/luci-static/resources/status/css/wanstatus.css b/luci-app-status/htdocs/luci-static/resources/status/css/wanstatus.css new file mode 100644 index 000000000..38b1d6e26 --- /dev/null +++ b/luci-app-status/htdocs/luci-static/resources/status/css/wanstatus.css @@ -0,0 +1,335 @@ +.container { + /* container for entire page. fixes bootstrap theme's ridiculously small page width */ + max-width: 1044px; +} +#interface_field { + padding: 12px 20px 20px 20px; +} +#mwan_status_text { + display: table; + font-size: 14px; + margin: auto; + max-width: 1044px; + min-width: 246px; + width: 100%; +} +.wanon { + background-color: #1cc82c; +} +.wanoff { + background-color: #e55712; +} +.wanon, +.wanoff { + border-radius: 60px; + box-shadow: 0px 2px 5px -3px; + float: left; + margin: 8px 3px 0px 3px; + min-height: 30px; + min-width: 235px; + padding: 5px 10px 8px 10px; + text-align: center; +} +/* Mwan3 ligthed CSS */ +.container { + /* container for entire page. fixes bootstrap theme's ridiculously small page width */ + max-width: 1044px; +} +#interface_field { + padding: 0px; +} +#interface_field td { + padding: 0px; +} +#interface_status_text { + display: table; + font-size: 14px; + margin: auto; + max-width: 1044px; + min-width: 246px; + width: 100%; +} +ul { + margin: 0px; +} +/*Now the CSS*/ +.tree ul { + position: relative; + float: left; + transition: all 0.5s; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; +} +.tree li { + float: left; + text-align: left; + list-style-type: none; + position: relative; + padding: 5px 0px 5px 85px; + transition: all 0.5s; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; +} +.tree ul ul { + padding-left: 85px; + position: relative; +} +.tree > ul > li:first-child { + position: relative; + padding-left: 0px; +} +.tree > ul > li#first-child > a { + position: relative; + top: 50%; +} +/*We will use ::before and ::after to draw the connectors + Before: Bottom part of the element + After: Top part of the element +*/ +.tree ul ul li::before, +.tree ul ul li::after { + content: ''; + position: absolute; + top: 50%; + left: 0; + border-left: 2px solid black; + width: 85px; + height: 50%; + float: left; + /*z-index: -10;*/ + /* + position: absolute; + top: 0; + right: 50%; + border-top: 2px solid black; + width: 50%; + height: 20px; + background-color: red; +*/ +} +.tree ul ul li::after { + top: auto; + bottom: 50%; + border-left: 2px solid black; + border-bottom: 2px solid black; +} +.tree li:first-child { + position: relative; + top: 50%; +} +/*We need to remove first top and the last bottom border */ +.tree li:only-child::after { + display: none; +} +/*Remove space from the top of single children*/ +.tree li:only-child { + padding-top: 0; +} +/*Remove left connector from first child and +right connector from last child*/ +.tree li:first-child::after, +.tree li:last-child::before { + border-left: 0px; +} +/*Adding back the vertical connector to the last nodes*/ +/* +.tree li:last-child::before{ + //border-top: 2px solid black; + border-radius: 0 5px 0 0; + -webkit-border-radius: 0 5px 0 0; + -moz-border-radius: 0 5px 0 0; +} +.tree li:first-child::after{ + border-radius: 5px 0 0 0; + -webkit-border-radius: 5px 0 0 0; + -moz-border-radius: 5px 0 0 0; +} +*/ +/*Time to add right connectors from parents*/ +.tree ul ul::before { + content: ''; + position: absolute; + top: 50%; + left: 0; + border-top: 2px solid black; + width: 85px; + height: 100%; +} +.tree li a { + display: inline-block; + background-color: #f3f3f3; + text-decoration: none; + /* + border: 1px solid @color-bg-gray; + padding: 5px 10px; + + font-family: arial, verdana, tahoma; + font-size: 11px; + + border-radius: 5px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + + transition: all 0.5s; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + */ +} +/*Exception*/ +.tree li.remote-from-lease { + padding-bottom: 0px; +} +.tree li.remote-from-lease::before, +.tree li#networkRootNode::before { + display: none; +} +.tree li#networkRootNode::after { + border: none; +} +.tree li.remote-from-lease::after { + content: ''; + position: absolute; + left: 50%; + top: 83px; + border-left: 2px solid black; + border-bottom: none; + width: 2px; + height: 30px; + z-index: -10; +} +.remote-from-lease a { + height: 90px; +} +.tree li#networkRootNode { + padding: 25px 0 0 0; +} +.tree li.subnode-only-child::before { + content: ''; + position: absolute; + top: 50%; + left: 0; + border-top: 2px solid black; + width: 85px; + height: 0; +} +.tree ul li#networkRootNode:not(:first-child) tr.spaceline td { + content: ''; + position: absolute; + /*top: 0; + top: 75px;*/ + border-left: 2px solid black; + border-bottom: none; + width: 2px; + /*height: 50%;*/ + height: 55px; + left: 200px; + /* z-index: -10;*/ +} +/*Time for some hover effects*/ +/*We will apply the hover effect the the lineage of the element also*/ +/* +.tree li a:hover, .tree li a:hover+ul li a { + background: #c8e4f8; color: #000; border: 1px solid #94a0b4; +} +.tree li a:hover+ul li::after, +.tree li a:hover+ul li::before, +.tree li a:hover+ul::before, +.tree li a:hover+ul ul::before{ + border-color: #94a0b4; +} +*/ +/*Thats all. I hope you enjoyed it. +Thanks :)*/ +.network-node { + position: relative; + background-color: #f3f3f3; + padding: 12px; + width: 400px; + max-width: 400px; + box-sizing: border-box; + height: 170px; +} +.network-node .equipment-icon { + position: relative; + float: left; + width: 64px; + max-width: 64px; + box-sizing: border-box; +} +.network-node .equipment-icon emded, +.network-node .equipment-icon img { + width: 64px; + max-width: 64px; +} +.network-node .equipment-icon img { + position: relative; + top: 10px; +} +.network-node .status-icon { + position: relative; + float: left; + width: 30px; + max-width: 30px; + margin-left: 24px; + margin-rigth: 8px; + top: 20px; + box-sizing: border-box; +} +.network-node .status-icon img { + max-width: 30px; + width: 30px; +} +.network-node .info { + position: relative; + float: right; + width: 250px; + text-align: left; + font-size: 12px; + color: #757575; +} +.network-node .info .title { + display: block; + font-size: 17px; + font-weight: 700; + color: #333333; +} + +.network-node .info .title i { + font-weight: lighter; + font-size: 8em; + text-transform: uppercase; +} + +.network-node .info .status-message { + display: block; +} +.network-node .info .status-message.error { + color: #e55712; +} +.network-node .info .status-message.warning { + color: #eb9e10; +} +.network-node .info .content { + display: block; +} +#networkRootNode table td { + border-top: 0px; +} +.vertdash { + width:5px; + border-right:2px dotted black; + height:70px; + padding-right: 195px; +} +#omr { + height: 190px; +} +#omr-vps { + height: 160px; +} +.space { + height: 55px; +} +.spaceline { + height: 55px; +} diff --git a/luci-app-status/htdocs/luci-static/resources/status/images/status-doing.png b/luci-app-status/htdocs/luci-static/resources/status/images/status-doing.png new file mode 100644 index 0000000000000000000000000000000000000000..e71747272e631c618eb4446f9644552c154f18cb GIT binary patch literal 536 zcmV+z0_XjSP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGqB>(^xB>_oNB=7(L0j)_yK~y+Tl~YSE z15p^A|AcsKM6e{mLI{FHY*f(oVWOz*tv zbUGSFo7R_;%*~y1zWd$po{!SFN!ENgZ7w-L1DV3->NVg`AwbL2g{dN=*lp*=X_6FO zcCOecQl6J!{ie|GOrjZ~Nu@~ynZj8$>%#U86FoOkfLdUXu!snHo!l5r#>n`7J<)@EA89H@0alN5Eg0eq8BTPl` z{2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Mg1i-EZtb|}Nf&>XKrv|nRP|-Dh(AR@ j$Xi+OqRSllp8x{@?66g33*-8n00000NkvXXu0mjf3mop% literal 0 HcmV?d00001 diff --git a/luci-app-status/htdocs/luci-static/resources/status/images/statusWarning.png b/luci-app-status/htdocs/luci-static/resources/status/images/statusWarning.png new file mode 100644 index 0000000000000000000000000000000000000000..29ee04f01634803d9b035c0fd1ef0aaf8b1145b9 GIT binary patch literal 1323 zcmV+`1=RY9P)75q00009a7bBm000XU z000XU0RWnu7ytkO8FWQhbW?9;ba!ELWdK2BZ(?O2No`?gWm08fWO;GPWjp`?1h`2= zK~#9!>|E_p+dvRKZv!|p`Hwq*4hR**9Uv+|seq#c(Lf?PFcrj95K}?y-^om%0&>#(5TTaYvEm`{vumjx6^s;zX(lD&|awF^d4?OY@k z>fb9ee5l@APMx{jBv$p5a8#Prsp}4qkhR^`O;>uYUEd2+NX=<~aLd#k z&QjJLAQ5XNBfYLV^@Aakqs`d+1Q(@O%}B4oGd!l08%CN{Q(&3KSrS=SvP0&5q{LGEH4B$h0xG&{l) z=euAoC%vRc>1D&-BrPEb%vzl(boQ5|U$QZj-}u6ib*?ngw_3KtR@N>GjGr zlh9YoErHw7fxE{wQzrseq;TtmVy?+G^B~ejRQ5su*6KWVNu^f~cj2I}z9z%LT0$Y1 z+eWG%^bIName4$Fa4~;zt(#RY$nI$gHMujlwajy=0oLC$xLXH2vex99*@`?Pc-;X! z0o&U(lUSMsb?f+Iu1s7%@XB6alN)$otFLmRCxnBJTOoV1XS9kE@ z)`5YnX0B~-;`ZfMsG2ksp{Hi6me&8_3yTIX8b;=gMqn;Sg_PSP6SOD5gP z7|fLkCb5{>R|-#V9dJCW6(hZF#_*FUDe4a30PN`M2Lsr0XETLsCMWi` z-oZ7sZbU?DkY-KHyCZRB$hCy5=NBurpx#hlCe++<9>d&$m*T1;{q*I!j8SpJRJbLw zQ>Vg(&F6#V!6k9c;K8lP!JWjqVuscoY|=uC`oVJ?3;x%cmJ!oKZ?_IuNH5Mcvk_?{ zb`ienGr7SVmt<1c4C?3mp|iH9@4>lsmVKEkMINpheE_!|g>se1U{bj*ELgQ*`&%

wjU z(u{NKR3_%8zUyX;?A?2p&_5}L`Qk^x%S*gSGq4fECEOVOTz3G2Yo 1 then + if master == server then + ss_ip=server_ip + ucic:set("shadowsocks-libev","sss0","server",server_ip) + ucic:set("glorytun","vpn","host",server_ip) + ucic:set("dsvpn","vpn","host",server_ip) + ucic:set("mlvpn","general","host",server_ip) + ucic:set("ubond","general","host",server_ip) + luci.sys.call("uci -q del openvpn.omr.remote") + luci.sys.call("uci -q add_list openvpn.omr.remote=" .. server_ip) + ucic:set("qos","serverin","srchost",server_ip) + ucic:set("qos","serverout","dsthost",server_ip) + end + k = k + 1 + ucic:set("nginx-ha","ShadowSocks","enable","0") + ucic:set("nginx-ha","VPN","enable","0") + ucic:set("haproxy-tcp","general","enable","0") + ucic:set("openmptcprouter","settings","ha","1") + else + ucic:set("openmptcprouter","settings","ha","0") + ucic:set("nginx-ha","ShadowSocks","enable","0") + ucic:set("nginx-ha","VPN","enable","0") + ucic:set("shadowsocks-libev","sss0","server",server_ip) + ucic:set("glorytun","vpn","host",server_ip) + ucic:set("dsvpn","vpn","host",server_ip) + ucic:set("mlvpn","general","host",server_ip) + ucic:set("ubond","general","host",server_ip) + luci.sys.call("uci -q del openvpn.omr.remote") + luci.sys.call("uci -q add_list openvpn.omr.remote=" .. server_ip) + ucic:set("qos","serverin","srchost",server_ip) + ucic:set("qos","serverout","dsthost",server_ip) + end + end + end + ucic:save("qos") + ucic:commit("qos") + ucic:save("nginx-ha") + ucic:commit("nginx-ha") + ucic:save("openvpn") + ucic:commit("openvpn") + ucic:save("mlvpn") + ucic:save("ubond") + ucic:commit("mlvpn") + ucic:save("dsvpn") + ucic:commit("dsvpn") + ucic:save("glorytun") + ucic:commit("glorytun") + ucic:save("shadowsocks-libev") + ucic:commit("shadowsocks-libev") + luci.sys.call("(env -i /bin/ubus call network reload) >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/omr-tracker stop >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/mptcp restart >/dev/null 2>/dev/null") + if openmptcprouter_vps_key ~= "" then + luci.sys.call("/etc/init.d/openmptcprouter-vps restart >/dev/null 2>/dev/null") + os.execute("sleep 2") + end + luci.sys.call("/etc/init.d/shadowsocks-libev restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/glorytun restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/glorytun-udp restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/mlvpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/ubond restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/openvpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/dsvpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/omr-tracker start >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/omr-6in4 restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/mptcpovervpn restart >/dev/null 2>/dev/null") + luci.sys.call("/etc/init.d/vnstat restart >/dev/null 2>/dev/null") + luci.http.redirect(luci.dispatcher.build_url("admin/system/status/status")) +end + + +function interfaces_status() + local ut = require "luci.util" + local mArray = ut.ubus("openmptcprouter", "status", {}) or {_=0} + if mArray ~= nil and mArray.openmptcprouter ~= nil then + mArray.openmptcprouter["remote_addr"] = luci.http.getenv("REMOTE_ADDR") or "" + mArray.openmptcprouter["remote_from_lease"] = false + -- local leases=dhcp_leases_common(4) + -- for _, value in pairs(leases) do + -- if value["ipaddr"] == mArray.openmptcprouter["remote_addr"] then + -- mArray.openmptcprouter["remote_from_lease"] = true + -- mArray.openmptcprouter["remote_hostname"] = value["hostname"] + -- end + -- end + end + + luci.http.prepare_content("application/json") + luci.http.write_json(mArray) +end + +-- This function come from modules/luci-bbase/luasrc/tools/status.lua from old OpenWrt +-- Copyright 2011 Jo-Philipp Wich +-- Licensed to the public under the Apache License 2.0. +local function dhcp_leases_common(family) + local rv = { } + local nfs = require "nixio.fs" + local sys = require "luci.sys" + local leasefile = "/tmp/dhcp.leases" + + ucic:foreach("dhcp", "dnsmasq", + function(s) + if s.leasefile and nfs.access(s.leasefile) then + leasefile = s.leasefile + return false + end + end) + + local fd = io.open(leasefile, "r") + if fd then + while true do + local ln = fd:read("*l") + if not ln then + break + else + local ts, mac, ip, name, duid = ln:match("^(%d+) (%S+) (%S+) (%S+) (%S+)") + local expire = tonumber(ts) or 0 + if ts and mac and ip and name and duid then + if family == 4 and not ip:match(":") then + rv[#rv+1] = { + expires = (expire ~= 0) and os.difftime(expire, os.time()), + macaddr = ipc.checkmac(mac) or "00:00:00:00:00:00", + ipaddr = ip, + hostname = (name ~= "*") and name + } + elseif family == 6 and ip:match(":") then + rv[#rv+1] = { + expires = (expire ~= 0) and os.difftime(expire, os.time()), + ip6addr = ip, + duid = (duid ~= "*") and duid, + hostname = (name ~= "*") and name + } + end + end + end + end + fd:close() + end + + local lease6file = "/tmp/hosts/odhcpd" + ucic:foreach("dhcp", "odhcpd", + function(t) + if t.leasefile and nfs.access(t.leasefile) then + lease6file = t.leasefile + return false + end + end) + local fd = io.open(lease6file, "r") + if fd then + while true do + local ln = fd:read("*l") + if not ln then + break + else + local iface, duid, iaid, name, ts, id, length, ip = ln:match("^# (%S+) (%S+) (%S+) (%S+) (-?%d+) (%S+) (%S+) (.*)") + local expire = tonumber(ts) or 0 + if ip and iaid ~= "ipv4" and family == 6 then + rv[#rv+1] = { + expires = (expire >= 0) and os.difftime(expire, os.time()), + duid = duid, + ip6addr = ip, + hostname = (name ~= "-") and name + } + elseif ip and iaid == "ipv4" and family == 4 then + rv[#rv+1] = { + expires = (expire >= 0) and os.difftime(expire, os.time()), + macaddr = sys.net.duid_to_mac(duid) or "00:00:00:00:00:00", + ipaddr = ip, + hostname = (name ~= "-") and name + } + end + end + end + fd:close() + end + + if family == 6 then + local _, lease + local hosts = sys.net.host_hints() + for _, lease in ipairs(rv) do + local mac = sys.net.duid_to_mac(lease.duid) + local host = mac and hosts[mac] + if host then + if not lease.name then + lease.host_hint = host.name or host.ipv4 or host.ipv6 + elseif host.name and lease.hostname ~= host.name then + lease.host_hint = host.name + end + end + end + end + + return rv +end + +function interface_bandwidth(iface) + luci.http.prepare_content("application/json") + local bwc = io.popen("luci-bwc -i %q 2>/dev/null" % iface) + if bwc then + luci.http.write("[") + while true do + local ln = bwc:read("*l") + if not ln then break end + luci.http.write(ln) + end + luci.http.write("]") + bwc:close() + end +end + +function multipath_bandwidth() + local result = { }; + local uci = luci.model.uci.cursor() + + uci:foreach("network", "interface", function(s) + local intname = s[".name"] + local dev = get_device(intname) + if dev == "" then + dev = get_device(s["ifname"]) + end + local multipath = s["multipath"] or "" + if dev ~= "lo" and dev ~= "" then + if multipath == "" then + multipath = uci:get("openmptcprouter", intname, "multipath") or "" + end + if multipath == "" then + multipath = "off" + end + if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then + local bwc = luci.sys.exec("luci-bwc -i %q 2>/dev/null" % dev) or "" + if bwc ~= nil then + --result[dev] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" + result[intname] = "[" .. string.gsub(bwc, '[\r\n]', '') .. "]" + else + result[dev] = "[]" + end + end + end + end) + + luci.http.prepare_content("application/json") + luci.http.write_json(result) +end + +function get_device(interface) + local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {}) + if dump ~= nil then + return dump['l3_device'] + else + return "" + end +end \ No newline at end of file diff --git a/luci-app-status/luasrc/view/status/server.htm b/luci-app-status/luasrc/view/status/server.htm new file mode 100644 index 000000000..b7b367fce --- /dev/null +++ b/luci-app-status/luasrc/view/status/server.htm @@ -0,0 +1,94 @@ +<%+header%> + +<% + local uci = require("luci.model.uci").cursor() + local net = require "luci.model.network".init() + local fs = require "nixio.fs" + local sys = require "luci.sys" + local ut = require "luci.util" + local ifaces = sys.net:devices() + local servers_ip = {} + local server_ip = uci:get("shadowsocks-libev","sss0","server") + if server_ip == '127.0.0.1' then + local upstreams = uci:get("nginx-ha","ShadowSocks","upstreams") + for _, up in pairs(upstreams) do + local a = up:match("^([^:]+):") + table.insert(servers_ip,a) + end + else + table.insert(servers_ip,server_ip) + end +%> + + + +<% if stderr and #stderr > 0 then %>

<%=pcdata(stderr)%>
<% end %> +
+
+

<%:Wizard%>

+
+ <%:Server settings%> + <% + nbserver=0 + uci:foreach("openmptcprouter","server", function(s) + nbserver=nbserver+1 + end) + uci:foreach("openmptcprouter","server", function(s) + servername = s[".name"] + %> +
+ +
+

<%=servername%>

+
+
+ +
+ " data-optional="false"> +
+ <%:Server IP%> +
+
+
+
+
+ +
+ " data-optional="false"> +
+
+ <%:API username to retrieve personnalized settings from the server.%> +
+
+
+
+ +
+ " data-optional="false"> +
+
+ <%:Key to configure, retrieve others keys and settings from Server.%> +
+
+
+ <% + end) + %> +
+
+
+
+ + +
+
+ +<%+footer%> diff --git a/luci-app-status/luasrc/view/status/wanstatus.htm b/luci-app-status/luasrc/view/status/wanstatus.htm new file mode 100644 index 000000000..e3da853f5 --- /dev/null +++ b/luci-app-status/luasrc/view/status/wanstatus.htm @@ -0,0 +1,1662 @@ +<% +-- Copyright 2015 OVH (OverTheBox@ovh.net) +-- Simon Lelievre (simon.lelievre@corp.ovh.com) +-- Sebastien Duponcheel (sebastien.duponcheel@ovh.net) +-- +-- This file is part of OverTheBox for OpenWrt. +-- +-- OverTheBox is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- OverTheBox is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with OverTheBox. If not, see (http://www.gnu.org/licenses/) +-%> +<% +-- Copyright 2018 Ycarus (Yannick Chabanois) ycarus@zugaina.org +-- +-- Small changes to make this work with OpenMPTCProuter +-- New features: +-- * DNS detection +-- * IPv6 route received +-- * latest version available +-- * MPTCP server status +-- * Server status, errors,icon,... +-- * Many tests +-%> +<%- + local ntm = require "luci.model.network".init() + local uci = require "luci.model.uci".cursor() + + function get_device(interface) + local dump = require("luci.util").ubus("network.interface.%s" % interface, "status", {}) + if dump and dump['l3_device'] ~= "" then + return dump['l3_device'] + else + return interface + end + end + + local dev + local devices = { "all" } + for _, dev in ipairs(ntm:get_networks()) do + --if dev ~= "lo" and not ntm:ignore_interface(dev) then + local multipath = uci:get("network", dev:name(), "multipath") + if multipath == "on" or multipath == "master" or multipath == "backup" or multipath == "handover" then + devices[#devices+1] = dev:name() + end + --end + end + + local curifname = luci.http.formvalue("dev") or "all" +-%> +<%+header%> + + + + + + +

<%:Network overview%>

+
+ +
+
+
+
+

Settings

+
+
+ +
+ +
+
+
+
+
+ +

<%:Realtime Traffic%>

+ +
    + <% for _, dev in ipairs(devices) do + local ifname = get_device(dev) + %> + +
  • "><%=pcdata(dev)%>
  • + <% end %> +
+ +<% if curifname == "all" then %> + +<%:Download:%> + +
-
+ +
+ +<%:Upload:%> + +
-
+ +
+
+ +<% else %> + + +
-
+
+ + + + + + + + + + + + + + + + + + + + + + +
<%:Inbound:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Average:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Peak:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Outbound:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Average:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
<%:Peak:%>0 <%:kbit/s%>
(0 <%:kB/s%>)
+ +<% end %> +<%+footer%> \ No newline at end of file diff --git a/luci-app-status/po/templates/status.pot b/luci-app-status/po/templates/status.pot new file mode 100644 index 000000000..4e44d83b5 --- /dev/null +++ b/luci-app-status/po/templates/status.pot @@ -0,0 +1,152 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1395 +msgid "(%d minute window, %d second interval)" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:970 +#: luci-app-status/luasrc/view/status/wanstatus.htm:971 +msgid "(%d minutes window, %d seconds interval)" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:68 +msgid "API username to retrieve personnalized settings from the server." +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1027 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1066 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1561 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1571 +msgid "Average:" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1023 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1062 +msgid "Current:" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1537 +msgid "Download:" +msgstr "" + +#: luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json:3 +msgid "Grant UCI access for luci-app-status" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1558 +msgid "Inbound:" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:78 +msgid "Key to configure, retrieve others keys and settings from Server." +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:823 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1306 +msgid "MB/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:832 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1315 +msgid "Mbit/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1505 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1507 +msgid "Network overview" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1568 +msgid "Outbound:" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1031 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1070 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1564 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1574 +msgid "Peak:" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1524 +msgid "Realtime Traffic" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:90 +msgid "Save & Apply" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:53 +#: luci-app-status/luasrc/view/status/server.htm:55 +#: luci-app-status/luasrc/view/status/server.htm:57 +msgid "Server IP" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:73 +#: luci-app-status/luasrc/view/status/server.htm:75 +msgid "Server key" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:38 +msgid "Server settings" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:63 +#: luci-app-status/luasrc/view/status/server.htm:65 +msgid "Server username" +msgstr "" + +#: luci-app-status/luasrc/controller/status.lua:11 +#: luci-app-status/luasrc/controller/status.lua:12 +msgid "Settings" +msgstr "" + +#: luci-app-status/luasrc/controller/status.lua:13 +#: luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json:3 +msgid "Status" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1543 +msgid "Upload:" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:36 +msgid "Wizard" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:818 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1065 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1069 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1073 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1301 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1559 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1562 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1565 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1569 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1572 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1575 +msgid "kB/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:827 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1065 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1069 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1073 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1310 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1559 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1562 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1565 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1569 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1572 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1575 +msgid "kbit/s" +msgstr "" diff --git a/luci-app-status/po/zh_Hans/status.po b/luci-app-status/po/zh_Hans/status.po new file mode 100644 index 000000000..082cb7424 --- /dev/null +++ b/luci-app-status/po/zh_Hans/status.po @@ -0,0 +1,163 @@ +msgid "" +msgstr "" +"Content-Type: text/plain; charset=UTF-8\n" +"Project-Id-Version: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.3.1\n" +"Last-Translator: \n" +"Plural-Forms: nplurals=1; plural=0;\n" +"Language: zh_CN\n" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1395 +msgid "(%d minute window, %d second interval)" +msgstr "最近%d分钟信息, 每%d秒刷新" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:970 +#: luci-app-status/luasrc/view/status/wanstatus.htm:971 +msgid "(%d minutes window, %d seconds interval)" +msgstr "最近%d分钟信息, 每%d秒刷新" + +#: luci-app-status/luasrc/view/status/server.htm:68 +msgid "API username to retrieve personnalized settings from the server." +msgstr "API用户名,用于从服务器检索个性化设置." + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1027 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1066 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1561 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1571 +msgid "Average:" +msgstr "平均:" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1023 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1062 +msgid "Current:" +msgstr "当前:" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1537 +msgid "Download:" +msgstr "下载:" + +#: luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json:3 +msgid "Grant UCI access for luci-app-status" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1558 +msgid "Inbound:" +msgstr "入站:" + +#: luci-app-status/luasrc/view/status/server.htm:78 +msgid "Key to configure, retrieve others keys and settings from Server." +msgstr "用于配置的密钥,可从服务器检索其他密钥和设置." + +#: luci-app-status/luasrc/view/status/wanstatus.htm:823 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1306 +msgid "MB/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:832 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1315 +msgid "Mbit/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1505 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1507 +msgid "Network overview" +msgstr "网络概述" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1568 +msgid "Outbound:" +msgstr "出站:" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1031 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1070 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1564 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1574 +msgid "Peak:" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1524 +msgid "Realtime Traffic" +msgstr "实时流量" + +#: luci-app-status/luasrc/view/status/server.htm:90 +msgid "Save & Apply" +msgstr "保存&应用" + +#: luci-app-status/luasrc/view/status/server.htm:53 +#: luci-app-status/luasrc/view/status/server.htm:55 +#: luci-app-status/luasrc/view/status/server.htm:57 +msgid "Server IP" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:73 +#: luci-app-status/luasrc/view/status/server.htm:75 +msgid "Server key" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:38 +msgid "Server settings" +msgstr "" + +#: luci-app-status/luasrc/view/status/server.htm:63 +#: luci-app-status/luasrc/view/status/server.htm:65 +msgid "Server username" +msgstr "" + +#: luci-app-status/luasrc/controller/status.lua:11 +#: luci-app-status/luasrc/controller/status.lua:12 +msgid "Settings" +msgstr "设置" + +#: luci-app-status/luasrc/controller/status.lua:13 +#: luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json:3 +msgid "Status" +msgstr "状态" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:1543 +msgid "Upload:" +msgstr "上传:" + +#: luci-app-status/luasrc/view/status/server.htm:36 +msgid "Wizard" +msgstr "蚂蚁聚合设置向导" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:818 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1065 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1069 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1073 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1301 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1559 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1562 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1565 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1569 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1572 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1575 +msgid "kB/s" +msgstr "" + +#: luci-app-status/luasrc/view/status/wanstatus.htm:827 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1026 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1030 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1034 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1065 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1069 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1073 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1310 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1559 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1562 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1565 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1569 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1572 +#: luci-app-status/luasrc/view/status/wanstatus.htm:1575 +msgid "kbit/s" +msgstr "" diff --git a/luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json b/luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json new file mode 100644 index 000000000..bddbb5483 --- /dev/null +++ b/luci-app-status/root/usr/share/luci/menu.d/luci-app-status.json @@ -0,0 +1,13 @@ +{ + "admin/system/status": { + "title": "Status", + "order": 1, + "action": { + "type": "template", + "path": "status/wanstatus" + }, + "depends": { + "acl": [ "luci-app-status" ] + } + } +} diff --git a/luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json b/luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json new file mode 100644 index 000000000..f26e8525d --- /dev/null +++ b/luci-app-status/root/usr/share/rpcd/acl.d/luci-app-status.json @@ -0,0 +1,14 @@ +{ + "luci-app-status": { + "description": "Grant UCI access for luci-app-status", + "read": { + "uci": [ "*" ], + "ubus": { + "openmptcprouter": [ "*" ] + } + }, + "write": { + "uci": [ "*" ] + } + } +} \ No newline at end of file