20200330_jeffrey - silenceuncrio/diary GitHub Wiki

0900

這個禮拜的 review list


M300 - task

M300 - issue

M300 - bug

  • [30%] firmware upgrade 卡在 40%
    • pc 網卡直連 M300 lan 端
    • 檔案上傳慢到(1分鐘100KB)前端的 javascript 慢慢跑到 40% 在等著上傳檔案完成 - 一小時也等不到
  • [0%] ospf 的 network 要設自己的 ip 很讓人困惑

M330 - task

  • [70%] P4 - CTCU - Web UI: GPS Track drawing(Server)
    • 應該可以被合併到 M350-C - task - [0%] ISMS Support - web ui
  • [0%] P4 - Airtel - BGP Attributers shall be supported
    • 可以問 winston 試著跟他那邊的 bgp 進度同步一下
  • [0%] P4 - Airtel - GUI Display LTE Signal strength indicator
  • [0%] P4 - Airtel - Upon Failure of above comparision, ...

M330 - issue

  • [100%] 0000985: when applying a route with gateway in policy route, gateway disappear

M330 - bug

  • [0%] firmware upgrade 上傳成 M300 的 firmware 第一次失敗後到至後續上傳正確的也會失敗
    • lighttpd 回 request entity too large

M350-C - task

  • [0%] release v0.03 - 2020-04-09

  • [10%] ISMS Support - web ui

    • npx create-react-app web
    • npm install react-router-dom
    • React Router - Basic Routing
    • include React Bootstrap
      • npm install react-bootstrap bootstrap
    • react-fontawesome
    • [RWD] apply 'Fixed Bootstrap 4 Vertical Sidebar Navigation'
    • [RWD] each content page has a button to toggle the sidebar
  • [30%] WiFi 5GHz web page

    • 801.11ac
    • [100%] WiFi (5 GHz) > WiFi Config
    • [0%] WiFi (5 GHz) > MAC Filter
    • [0%] WiFi (5 GHz) > Client List
    • [0%] 原本的 WiFi 要改成 WiFi (2.4 GHz) - 等 v0.03 release 後再改

M350-C - issue

  • [100%] 0000986: when applying a route with gateway in policy route, gateway disappear

M350-C - bug

  • [20%] web ui openvpn wizard 會讓 lighttpd process 被 kill 掉
    • M330 不會
    • M330 的 lighttpd 為 1.4.30
    • M350 的 lighttpd 為 1.4.40
  • [100%] 修改 menu.html.src 透過 web upgrade 後會 cache 舊的 menu
    • ng-include="'menu.html?v={{UUID}}'" 無效
    • ng-include="'menu.html?uuid=' + Math.random()" 待驗證
      • 實際 browser 的 request 是 menu.html?uuid=
    • 可以套用至全平台

M350-C - misc

  • [30%] 跨 repository 間 code 的 sync - 培養功力
    • 起手式
      git format-patch -k --stdout ${A_COMMIT_HASH}..${B_COMMIT_HASH} > xxx.patch
      git am -k -3 < xxx.patch
      
    • git am 失敗的時候該怎麼辦? git apply --reject

M360P - task

M360P - issue

  • [60%] 0000936: some routes learned via bgp, then they disappear then appear again after a few seconds, and again and again...
  • [60%] 0000787: when local ethernet link is 100 half, firmware upgrade via web ui fail

M360P - bug

  • [30%] - 0000908: sometimes first time modify LTE NET mode or APN on dual APN will apply fail - root cause 是 lighttpd 重啟了
    • M360P 的 lighttpd 為 1.4.30

task

  • [80%] P2 - 幫公司繳 apple 年費
    • 雙重認證 搞定了 但登入後沒有出現 renew 帳號的按鈕
    • 等收到電子發票再去請款
  • [0%] P2 - 病假待補證明 - 碘 131 隔離期間
  • [80%] Vmware jubuntu compile 環境
    • [60%] M300
      • Building the Docker image - build-m300 - 失敗
        • 放棄
      • load docker image from exported tar from jbox
        • 成功
        • 進 container 後 source proenv.sh fail
    • [100%] M330
    • [100%] M350
    • [100%] M350-C
    • [100%] M360P

0935

M350-C - task - [0%] ISMS Support - web ui

放棄使用 Docker Image node

參考 How to Install Latest Node.js and NPM on Ubuntu with PPA

直接在 jubuntu 作安裝

➜  ~ curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -

## Installing the NodeSource Node.js 13.x repo...


## Populating apt-get cache...

+ apt-get update
Hit:1 http://tw.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://tw.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://tw.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Hit:4 https://download.docker.com/linux/ubuntu xenial InRelease
Get:5 http://tw.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [322 kB]
Get:6 http://tw.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [233 kB]
Get:7 http://tw.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [276 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:9 http://tw.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [420 kB]
Get:10 http://tw.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [5976 B]
Get:11 http://tw.archive.ubuntu.com/ubuntu xenial-updates/multiverse DEP-11 64x64 Icons [14.3 kB]
Get:12 http://tw.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3328 B]
Get:13 http://tw.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 DEP-11 Metadata [5324 B]
Get:14 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [74.8 kB]
Get:15 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [83.8 kB]
Get:16 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [124 kB]
Get:17 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [194 kB]
Get:18 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 DEP-11 Metadata [2468 B]
Fetched 2084 kB in 2s (730 kB/s)
Reading package lists... Done

## Confirming "xenial" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_13.x/dists/xenial/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js 13.x repo...

+ echo 'deb https://deb.nodesource.com/node_13.x xenial main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_13.x xenial main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
Hit:1 http://tw.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://tw.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:3 http://tw.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:4 https://download.docker.com/linux/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Get:6 https://deb.nodesource.com/node_13.x xenial InRelease [4584 B]
Get:7 https://deb.nodesource.com/node_13.x xenial/main amd64 Packages [765 B]
Fetched 5349 B in 0s (6327 B/s)
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 13.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn



使用 sudo apt-get install -y nodejs 安裝 Node.js 13.x

➜  ~ sudo apt-get install -y nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.13.0-36 linux-headers-4.13.0-36-generic linux-headers-4.15.0-76 linux-headers-4.15.0-76-generic linux-image-4.13.0-36-generic linux-image-4.15.0-76-generic linux-image-extra-4.13.0-36-generic
  linux-modules-4.15.0-76-generic linux-modules-extra-4.15.0-76-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  nodejs
0 upgraded, 1 newly installed, 0 to remove and 177 not upgraded.
Need to get 24.2 MB of archives.
After this operation, 117 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_13.x xenial/main amd64 nodejs amd64 13.12.0-1nodesource1 [24.2 MB]
Fetched 24.2 MB in 4s (5330 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... 290804 files and directories currently installed.)
Preparing to unpack .../nodejs_13.12.0-1nodesource1_amd64.deb ...
Unpacking nodejs (13.12.0-1nodesource1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up nodejs (13.12.0-1nodesource1) ...

確認安裝

➜  ~ node -v
v13.12.0
➜  ~ npm -v
6.14.4
➜  ~ npx -v
6.14.4

繼續 w3schools.com - React Tutorial

使用 npm install -g create-react-app 會出錯

➜  ~ npm install -g create-react-app
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR!  [Error: EACCES: permission denied, access '/usr/lib/node_modules'] {
npm ERR!   stack: "Error: EACCES: permission denied, access '/usr/lib/node_modules'",
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/lib/node_modules'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/jeffrey/.npm/_logs/2020-03-30T02_18_57_377Z-debug.log
➜  ~ sudo npm install -g create-react-app
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/usr/bin/create-react-app -> /usr/lib/node_modules/create-react-app/index.js
+ [email protected]
added 99 packages from 47 contributors in 4.594s

要使用 sudo npm install -g create-react-app

1315

task - [80%] P2 - 幫公司繳 apple 年費 - 等收到電子發票再去請款

1345

0935

M350-C - task - [0%] ISMS Support - web ui

繼續 w3schools.com - React Tutorial

快速的複習 react 的基本知識

1425

M350-C - task - [0%] ISMS Support - web ui

花點時間看一下 React Bootstrap

都使用 react 了

bootstrap 當然要選擇 react 專屬的 React Bootstrap 因為非 react 專屬的 Bootstrap 修改的是 DOM 而不是 React 標榜的 Virtual DOM

1445

花點時間吸收一下新觀念 A Complete Guide to Flexbox

1615

可以參考 Google Play Console 來設計 ISMS 的 layout

尤其是 RWD 的方面

1735

Google Play Console 左側的選單寬度是固定的

參考 Bootstrap 4 layout with one width fixed column