├── LICENSE ├── README.md ├── container-webshell ├── conf │ └── app.conf ├── controllers │ ├── default.go │ └── wscontroller.go ├── go.mod ├── go.sum ├── main.go ├── models │ ├── getcontainerid.go │ └── ws.go ├── routers │ └── router.go ├── static │ ├── bootstrap.min.css │ ├── bootstrap.min.js │ ├── fullscreen.css │ ├── fullscreen.js │ ├── jquery.min.js │ ├── xterm.css │ ├── xterm.js │ └── xterm.js.map └── views │ └── index.html └── k8s-webshell ├── build.sh ├── conf └── app.conf ├── controllers ├── home.go ├── terminal.go └── terminalws.go ├── go.mod ├── go.sum ├── main.go ├── routers └── router.go ├── static ├── css │ ├── bk.css │ ├── bk_pack.css │ ├── bootstrap.min.css │ ├── font-awesome.css │ ├── fullscreen.css │ ├── kendo.common.min.css │ ├── kendo.default.min.css │ └── xterm.css ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── img │ ├── favicon.ico │ └── logo.png └── js │ ├── analysis.js │ ├── bk.js │ ├── bootstrap.min.js │ ├── echarts-all.js │ ├── fullscreen.js │ ├── html5shiv.min.js │ ├── jquery-1.10.2.min.js │ ├── jquery.min.js │ ├── kendo.all.min.js │ ├── reload.min.js │ ├── xterm.js │ └── xterm.js.map └── views ├── index.html └── terminal.html /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | Copyright © 2020 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## web-terminal-in-go 2 | 3 | ### k8s-webshell 4 | 5 | 通过web界面连接k8s容器,需要修改beego config配置,指定kubeconfig位置,设置为空则为incluster连接方式,需要传递以下参数: 6 | - context 7 | - namespace 8 | - podname 9 | - containername 10 | 11 | 12 | #### 功能 13 | 14 | - web终端实现 15 | - 多集群支持 16 | - 根据浏览器窗口调整tty大小 17 | 18 | *** 19 | 20 | ### container-webshell 21 | 22 | 23 | 通过web界面连接容器,需要开放docker api,需要传递以下参数: 24 | 25 | - host ip 26 | - docker port 27 | - container id 28 | 29 | ### 扫码关注我: 30 | 31 | ![微信](http://img.rocdu.top/20200528/qrcode_for_gh_7457c3b1bfab_258.jpg) 32 | -------------------------------------------------------------------------------- /container-webshell/conf/app.conf: -------------------------------------------------------------------------------- 1 | appname = container-webshell 2 | httpport = 8080 3 | runmode = dev 4 | -------------------------------------------------------------------------------- /container-webshell/controllers/default.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | ) 6 | 7 | type MainController struct { 8 | beego.Controller 9 | } 10 | 11 | func (c *MainController) Get() { 12 | c.TplName = "index.html" 13 | } 14 | -------------------------------------------------------------------------------- /container-webshell/controllers/wscontroller.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "fmt" 5 | "github.com/astaxie/beego" 6 | "github.com/du2016/web-terminal-in-go/container-webshell/models" 7 | "github.com/gorilla/websocket" 8 | "log" 9 | "net" 10 | ) 11 | 12 | type Wscontroller struct { 13 | beego.Controller 14 | } 15 | 16 | var upgrader = websocket.Upgrader{} 17 | 18 | func (self *Wscontroller) Get() { 19 | host := self.Input().Get("h") 20 | port := self.Input().Get("p") 21 | containerid := self.Input().Get(("containers_id")) 22 | rows := self.Input().Get("rows") 23 | cols := self.Input().Get("cols") 24 | execid := models.Getexecid(host, port, containerid) 25 | log.Println("execid is", execid) 26 | conn, err := net.Dial("tcp", fmt.Sprintf("%s:%s", host, port)) 27 | if err != nil { 28 | beego.Error(err) 29 | } 30 | data := "{\"Tty\":true}" 31 | _, err = conn.Write([]byte(fmt.Sprintf("POST /exec/%s/start HTTP/1.1\r\nHost: %s\r\nContent-Type: application/json\r\nContent-Length: %s\r\n\r\n%s", execid, fmt.Sprintf("%s:%s", host, port), fmt.Sprint(len([]byte(data))), data))) 32 | if err != nil { 33 | log.Println(err) 34 | } 35 | models.Resizecontainer(host, port, execid, rows, cols) 36 | ws, err := upgrader.Upgrade(self.Ctx.ResponseWriter, self.Ctx.Request, nil) 37 | c := &models.Connection{Send: make(chan []byte, 256), Ws: ws} 38 | go c.Writer(conn) 39 | c.Reader(conn) 40 | defer conn.Close() 41 | } 42 | -------------------------------------------------------------------------------- /container-webshell/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/du2016/web-terminal-in-go/container-webshell 2 | 3 | go 1.12 4 | 5 | exclude github.com/Sirupsen/logrus v1.3.0 6 | 7 | exclude github.com/Sirupsen/logrus v1.2.0 8 | 9 | exclude github.com/Sirupsen/logrus v1.1.1 10 | 11 | exclude github.com/Sirupsen/logrus v1.1.0 12 | 13 | require ( 14 | github.com/astaxie/beego v1.12.2 15 | github.com/gorilla/websocket v1.4.1 16 | ) 17 | -------------------------------------------------------------------------------- /container-webshell/go.sum: -------------------------------------------------------------------------------- 1 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 2 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= 3 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 4 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 5 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 6 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 7 | github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= 8 | github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= 9 | github.com/astaxie/beego v1.12.2 h1:CajUexhSX5ONWDiSCpeQBNVfTzOtPb9e9d+3vuU5FuU= 10 | github.com/astaxie/beego v1.12.2/go.mod h1:TMcqhsbhN3UFpN+RCfysaxPAbrhox6QSS3NIAEp/uzE= 11 | github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= 12 | github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= 13 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 14 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 15 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 16 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 17 | github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= 18 | github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= 19 | github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= 20 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 21 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= 22 | github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= 23 | github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= 24 | github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= 25 | github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= 26 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 27 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 28 | github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= 29 | github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= 30 | github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= 31 | github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= 32 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 33 | github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= 34 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 35 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 36 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 37 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 38 | github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= 39 | github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 40 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 41 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 42 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 43 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 44 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 45 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 46 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 47 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 48 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 49 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 50 | github.com/golang/protobuf v1.4.2 h1:+Z5KGCizgyZCbGh1KZqA0fcLLkwbsjIzS4aV2v7wJX0= 51 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 52 | github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 53 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 54 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 55 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 56 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 57 | github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4= 58 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 59 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 60 | github.com/gorilla/websocket v1.4.1 h1:q7AeDBpnBk8AogcD4DSag/Ukw/KV+YhzLj2bP5HvKCM= 61 | github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 62 | github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= 63 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 64 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 65 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 66 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 67 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 68 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 69 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 70 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 71 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 72 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 73 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 74 | github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= 75 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 76 | github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= 77 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= 78 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 79 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 80 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 81 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 82 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 83 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 84 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= 85 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 86 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 87 | github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= 88 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 89 | github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 90 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 91 | github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= 92 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 93 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 94 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 95 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 96 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 97 | github.com/prometheus/client_golang v1.7.0 h1:wCi7urQOGBsYcQROHqpUUX4ct84xp40t9R9JX0FuA/U= 98 | github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 99 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 100 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 101 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= 102 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 103 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 104 | github.com/prometheus/common v0.10.0 h1:RyRA7RzGXQZiW+tGMr7sxa85G1z0yOpM1qq5c8lNawc= 105 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 106 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 107 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 108 | github.com/prometheus/procfs v0.1.3 h1:F0+tqvhOksq22sc6iCHF5WGlWjdwj92p0udFh1VFBS8= 109 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 110 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= 111 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= 112 | github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= 113 | github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= 114 | github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= 115 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 116 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 117 | github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= 118 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 119 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 120 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 121 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 122 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 123 | github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= 124 | github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= 125 | github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= 126 | github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= 127 | github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= 128 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 129 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 130 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550 h1:ObdrDkeb4kJdCP557AjRjq69pTHfNouLtWZG7j9rPN8= 131 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 132 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 133 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 134 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 135 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 136 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 137 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= 138 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 139 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 140 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 141 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 142 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 143 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 144 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 145 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 146 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 147 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 148 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 149 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 150 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 151 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 152 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80= 153 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 154 | golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= 155 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 156 | golang.org/x/tools v0.0.0-20200117065230-39095c1d176c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 157 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 158 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= 159 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 160 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 161 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 162 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 163 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 164 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 165 | google.golang.org/protobuf v1.23.0 h1:4MY060fB1DLGMB/7MBTLnwQUY6+F09GEiz6SsrNqyzM= 166 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 167 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 168 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 169 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 170 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 171 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 172 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 173 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 174 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 175 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 176 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 177 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 178 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 179 | gopkg.in/yaml.v2 v2.2.8 h1:obN1ZagJSUGI0Ek/LBmuj4SNLPfIny3KsKFopxRdj10= 180 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 181 | -------------------------------------------------------------------------------- /container-webshell/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | _ "github.com/du2016/web-terminal-in-go/container-webshell/routers" 6 | ) 7 | 8 | func main() { 9 | beego.Run() 10 | } 11 | -------------------------------------------------------------------------------- /container-webshell/models/getcontainerid.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "io/ioutil" 7 | "log" 8 | "net/http" 9 | "strings" 10 | ) 11 | 12 | type Contect struct { 13 | Id string 14 | } 15 | 16 | func Getexecid(host string, port string, containerid string) string { 17 | log.SetFlags(log.Llongfile) 18 | client := &http.Client{} 19 | request, err := http.NewRequest("POST", 20 | fmt.Sprintf("http://%s:%s/containers/%s/exec", host, port, containerid), 21 | strings.NewReader("{\"Tty\": true, \"Cmd\": [\"/bin/sh\"], \"AttachStdin\": true, \"AttachStderr\": true, \"Privileged\": true, \"AttachStdout\": true}"), 22 | ) 23 | if err != nil { 24 | log.Println(err) 25 | } 26 | request.Header.Set("Content-Type", "application/json") 27 | resp, err := client.Do(request) 28 | if err != nil { 29 | log.Println(err) 30 | } 31 | content, err := ioutil.ReadAll(resp.Body) 32 | if err != nil { 33 | log.Println(err.Error()) 34 | } 35 | v := &Contect{} 36 | err = json.Unmarshal(content, v) 37 | if err != nil { 38 | log.Println(err) 39 | } 40 | return v.Id 41 | } 42 | 43 | func Resizecontainer(host string, port string, execid string, width string, height string) { 44 | request, err := http.NewRequest( 45 | "POST", 46 | fmt.Sprintf("http://%s:%s/exec/%s/resize?h=%s&w=%s", host, port, execid, width, height), 47 | nil, 48 | ) 49 | if err != nil { 50 | log.Println(err) 51 | } 52 | request.Header.Set("Content-Type", "text/plain") 53 | client := &http.Client{} 54 | _, err = client.Do(request) 55 | if err != nil { 56 | log.Println(err) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /container-webshell/models/ws.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/gorilla/websocket" 6 | "net" 7 | //"fmt" 8 | "encoding/json" 9 | "log" 10 | ) 11 | 12 | type Connection struct { 13 | // websocket 连接器 14 | Ws *websocket.Conn 15 | 16 | // 发送信息的缓冲 channel 17 | Send chan []byte 18 | } 19 | 20 | func (c *Connection) Reader(conn net.Conn) { 21 | 22 | for { 23 | _, message, err := c.Ws.ReadMessage() 24 | if err != nil { 25 | log.Println(err) 26 | } 27 | conn.Write(message) 28 | } 29 | } 30 | 31 | type tojson struct { 32 | Data string `json:"data"` 33 | } 34 | 35 | func (c *Connection) Writer(conn net.Conn) { 36 | //c.Ws.Close() 37 | for { 38 | b := make([]byte, 512) 39 | conn.Read(b) 40 | j := tojson{Data: string(b)} 41 | d, _ := json.Marshal(j) 42 | c.Ws.WriteMessage(websocket.TextMessage, d) 43 | beego.Error(string(b)) 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /container-webshell/routers/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/du2016/web-terminal-in-go/container-webshell/controllers" 6 | ) 7 | 8 | func init() { 9 | beego.Router("/", &controllers.MainController{}) 10 | beego.Router("/ws", &controllers.Wscontroller{}) 11 | } 12 | -------------------------------------------------------------------------------- /container-webshell/static/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>3)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.7",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a("#"===f?[]:f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.7",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c).prop(c,!0)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c).prop(c,!1))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target).closest(".btn");b.call(d,"toggle"),a(c.target).is('input[type="radio"], input[type="checkbox"]')||(c.preventDefault(),d.is("input,button")?d.trigger("focus"):d.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.7",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(a>this.$items.length-1||a<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){if(!this.sliding)return this.slide("next")},c.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.7",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.7",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),!c.isInStateTrue())return clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide()},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null,a.$element=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;!e&&/destroy|hide/.test(b)||(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.7",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.7",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.7",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return e=a-d&&"bottom"},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /container-webshell/static/fullscreen.css: -------------------------------------------------------------------------------- 1 | .xterm.fullscreen { 2 | position: fixed; 3 | top: 0; 4 | bottom: 0; 5 | left: 0; 6 | right: 0; 7 | width: auto; 8 | height: auto; 9 | z-index: 255; 10 | } 11 | -------------------------------------------------------------------------------- /container-webshell/static/fullscreen.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Fullscreen addon for xterm.js 3 | * @module xterm/addons/fullscreen/fullscreen 4 | * @license MIT 5 | */ 6 | (function (fullscreen) { 7 | if (typeof exports === 'object' && typeof module === 'object') { 8 | /* 9 | * CommonJS environment 10 | */ 11 | module.exports = fullscreen(require('../../Terminal').Terminal); 12 | } else if (typeof define == 'function') { 13 | /* 14 | * Require.js is available 15 | */ 16 | define(['../../xterm'], fullscreen); 17 | } else { 18 | /* 19 | * Plain browser environment 20 | */ 21 | fullscreen(window.Terminal); 22 | } 23 | })(function (Terminal) { 24 | var exports = {}; 25 | 26 | /** 27 | * Toggle the given terminal's fullscreen mode. 28 | * @param {Terminal} term - The terminal to toggle full screen mode 29 | * @param {boolean} fullscreen - Toggle fullscreen on (true) or off (false) 30 | */ 31 | exports.toggleFullScreen = function (term, fullscreen) { 32 | var fn; 33 | 34 | if (typeof fullscreen == 'undefined') { 35 | fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add'; 36 | } else if (!fullscreen) { 37 | fn = 'remove'; 38 | } else { 39 | fn = 'add'; 40 | } 41 | 42 | term.element.classList[fn]('fullscreen'); 43 | }; 44 | 45 | Terminal.prototype.toggleFullscreen = function (fullscreen) { 46 | exports.toggleFullScreen(this, fullscreen); 47 | }; 48 | 49 | return exports; 50 | }); 51 | -------------------------------------------------------------------------------- /container-webshell/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 27 | 28 | 29 | 30 |
31 |
32 | 33 |
34 |
35 | 36 |
37 |
38 | 39 |
40 | 41 | 42 |
43 |
44 |
45 |
46 |
47 |
48 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /k8s-webshell/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | GOOS=linux go build -o bin/k8s-webshell-linux 3 | GOOS=darwin go build -o bin/k8s-webshell-mac 4 | GOOS=windows go build -o bin/k8s-webshell.exe -------------------------------------------------------------------------------- /k8s-webshell/conf/app.conf: -------------------------------------------------------------------------------- 1 | appname = k8s-webshell 2 | httpport = 8080 3 | runmode = dev 4 | kubeconfig = your kubeconfig 5 | -------------------------------------------------------------------------------- /k8s-webshell/controllers/home.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | ) 6 | 7 | type HomeController struct { 8 | beego.Controller 9 | } 10 | 11 | func (c *HomeController) Get() { 12 | c.TplName = "index.html" 13 | } 14 | -------------------------------------------------------------------------------- /k8s-webshell/controllers/terminal.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | ) 6 | 7 | type TerminalController struct { 8 | beego.Controller 9 | } 10 | 11 | func (self *TerminalController) Get() { 12 | self.Data["context"] = self.GetString("context") 13 | self.Data["namespace"] = self.GetString("namespace") 14 | self.Data["pod"] = self.GetString("pod") 15 | self.Data["container"] = self.GetString("container") 16 | self.TplName = "terminal.html" 17 | } 18 | -------------------------------------------------------------------------------- /k8s-webshell/controllers/terminalws.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "github.com/astaxie/beego" 7 | "gopkg.in/igm/sockjs-go.v2/sockjs" 8 | "k8s.io/api/core/v1" 9 | "k8s.io/apimachinery/pkg/runtime" 10 | "k8s.io/apimachinery/pkg/runtime/schema" 11 | "k8s.io/client-go/kubernetes/scheme" 12 | "k8s.io/client-go/rest" 13 | "k8s.io/client-go/tools/clientcmd" 14 | "k8s.io/client-go/tools/remotecommand" 15 | "net/http" 16 | ) 17 | 18 | func (self TerminalSockjs) Read(p []byte) (int, error) { 19 | var reply string 20 | var msg map[string]uint16 21 | reply, err := self.conn.Recv() 22 | if err != nil { 23 | return 0, err 24 | } 25 | if err := json.Unmarshal([]byte(reply), &msg); err != nil { 26 | return copy(p, reply), nil 27 | } else { 28 | self.sizeChan <- &remotecommand.TerminalSize{ 29 | msg["cols"], 30 | msg["rows"], 31 | } 32 | return 0, nil 33 | } 34 | } 35 | 36 | func (self TerminalSockjs) Write(p []byte) (int, error) { 37 | err := self.conn.Send(string(p)) 38 | return len(p), err 39 | } 40 | 41 | type TerminalSockjs struct { 42 | conn sockjs.Session 43 | sizeChan chan *remotecommand.TerminalSize 44 | context string 45 | namespace string 46 | pod string 47 | container string 48 | } 49 | 50 | // 实现tty size queue 51 | func (self *TerminalSockjs) Next() *remotecommand.TerminalSize { 52 | size := <-self.sizeChan 53 | beego.Debug(fmt.Sprintf("terminal size to width: %d height: %d", size.Width, size.Height)) 54 | return size 55 | } 56 | 57 | func buildConfigFromContextFlags(context, kubeconfigPath string) (*rest.Config, error) { 58 | return clientcmd.NewNonInteractiveDeferredLoadingClientConfig( 59 | &clientcmd.ClientConfigLoadingRules{ExplicitPath: kubeconfigPath}, 60 | &clientcmd.ConfigOverrides{ 61 | CurrentContext: context, 62 | }).ClientConfig() 63 | } 64 | 65 | // 处理输入输出与sockjs 交互 66 | func Handler(t *TerminalSockjs, cmd string) error { 67 | config, err := buildConfigFromContextFlags(t.context, beego.AppConfig.String("kubeconfig")) 68 | if err != nil { 69 | return err 70 | } 71 | groupversion := schema.GroupVersion{ 72 | Group: "", 73 | Version: "v1", 74 | } 75 | config.GroupVersion = &groupversion 76 | config.APIPath = "/api" 77 | config.ContentType = runtime.ContentTypeJSON 78 | config.NegotiatedSerializer = scheme.Codecs 79 | restclient, err := rest.RESTClientFor(config) 80 | if err != nil { 81 | return err 82 | } 83 | req := restclient.Post(). 84 | Resource("pods"). 85 | Name(t.pod). 86 | Namespace(t.namespace). 87 | SubResource("exec"). 88 | Param("container", t.container). 89 | Param("stdin", "true"). 90 | Param("stdout", "true"). 91 | Param("stderr", "true"). 92 | Param("command", cmd).Param("tty", "true") 93 | req.VersionedParams( 94 | &v1.PodExecOptions{ 95 | Container: t.container, 96 | Command: []string{}, 97 | Stdin: true, 98 | Stdout: true, 99 | Stderr: true, 100 | TTY: true, 101 | }, 102 | scheme.ParameterCodec, 103 | ) 104 | executor, err := remotecommand.NewSPDYExecutor( 105 | config, http.MethodPost, req.URL(), 106 | ) 107 | if err != nil { 108 | return err 109 | } 110 | return executor.Stream(remotecommand.StreamOptions{ 111 | Stdin: t, 112 | Stdout: t, 113 | Stderr: t, 114 | Tty: true, 115 | TerminalSizeQueue: t, 116 | }) 117 | } 118 | 119 | // 实现http.handler 接口获取入参 120 | func (self TerminalSockjs) ServeHTTP(w http.ResponseWriter, r *http.Request) { 121 | context := r.FormValue("context") 122 | namespace := r.FormValue("namespace") 123 | pod := r.FormValue("pod") 124 | container := r.FormValue("container") 125 | Sockjshandler := func(session sockjs.Session) { 126 | t := &TerminalSockjs{session, make(chan *remotecommand.TerminalSize), 127 | context, namespace, pod, container} 128 | if err := Handler(t, "/bin/sh"); err != nil { 129 | beego.Error(err) 130 | beego.Error(Handler(t, "/bin/bash")) 131 | } 132 | } 133 | 134 | sockjs.NewHandler("/terminal/ws", sockjs.DefaultOptions, Sockjshandler).ServeHTTP(w, r) 135 | } 136 | -------------------------------------------------------------------------------- /k8s-webshell/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/du2016/web-terminal-in-go/k8s-webshell 2 | 3 | go 1.17 4 | 5 | require ( 6 | github.com/astaxie/beego v1.12.2 7 | golang.org/x/crypto v0.21.0 // indirect 8 | gopkg.in/igm/sockjs-go.v2 v2.1.0 9 | gopkg.in/yaml.v2 v2.3.0 // indirect 10 | k8s.io/api v0.18.14 11 | k8s.io/apimachinery v0.18.14 12 | k8s.io/client-go v0.18.14 13 | ) 14 | 15 | require ( 16 | github.com/beorn7/perks v1.0.1 // indirect 17 | github.com/cespare/xxhash/v2 v2.1.1 // indirect 18 | github.com/davecgh/go-spew v1.1.1 // indirect 19 | github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 // indirect 20 | github.com/gogo/protobuf v1.3.2 // indirect 21 | github.com/golang/protobuf v1.4.3 // indirect 22 | github.com/google/gofuzz v1.1.0 // indirect 23 | github.com/gorilla/websocket v1.4.2 // indirect 24 | github.com/hashicorp/golang-lru v0.5.4 // indirect 25 | github.com/imdario/mergo v0.3.5 // indirect 26 | github.com/json-iterator/go v1.1.11 // indirect 27 | github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect 28 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect 29 | github.com/modern-go/reflect2 v1.0.1 // indirect 30 | github.com/prometheus/client_golang v1.11.1 // indirect 31 | github.com/prometheus/client_model v0.2.0 // indirect 32 | github.com/prometheus/common v0.26.0 // indirect 33 | github.com/prometheus/procfs v0.6.0 // indirect 34 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect 35 | github.com/spf13/pflag v1.0.5 // indirect 36 | golang.org/x/net v0.23.0 // indirect 37 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 // indirect 38 | golang.org/x/sys v0.18.0 // indirect 39 | golang.org/x/term v0.18.0 // indirect 40 | golang.org/x/text v0.14.0 // indirect 41 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 // indirect 42 | google.golang.org/appengine v1.5.0 // indirect 43 | google.golang.org/protobuf v1.26.0-rc.1 // indirect 44 | gopkg.in/inf.v0 v0.9.1 // indirect 45 | k8s.io/klog v1.0.0 // indirect 46 | k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 // indirect 47 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0 // indirect 48 | sigs.k8s.io/yaml v1.2.0 // indirect 49 | ) 50 | 51 | replace ( 52 | k8s.io/api => github.com/kubernetes/api v0.18.2 53 | k8s.io/apimachinery => github.com/kubernetes/apimachinery v0.18.2 54 | ) 55 | -------------------------------------------------------------------------------- /k8s-webshell/go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= 5 | github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= 6 | github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= 7 | github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 8 | github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= 9 | github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= 10 | github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= 11 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 12 | github.com/Knetic/govaluate v3.0.0+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= 13 | github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= 14 | github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= 15 | github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= 16 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 17 | github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 18 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 19 | github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 20 | github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= 21 | github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6/go.mod h1:SGnFV6hVsYE877CKEZ6tDNTjaSXYUk6QqoIK6PrAtcc= 22 | github.com/alicebob/miniredis v2.5.0+incompatible/go.mod h1:8HZjEj4yU0dwhYHky+DxYx+6BMjkBbe5ONFIF1MXffk= 23 | github.com/astaxie/beego v1.12.2 h1:CajUexhSX5ONWDiSCpeQBNVfTzOtPb9e9d+3vuU5FuU= 24 | github.com/astaxie/beego v1.12.2/go.mod h1:TMcqhsbhN3UFpN+RCfysaxPAbrhox6QSS3NIAEp/uzE= 25 | github.com/beego/goyaml2 v0.0.0-20130207012346-5545475820dd/go.mod h1:1b+Y/CofkYwXMUU0OhQqGvsY2Bvgr4j6jfT699wyZKQ= 26 | github.com/beego/x2j v0.0.0-20131220205130-a0352aadc542/go.mod h1:kSeGC/p1AbBiEp5kat81+DSQrZenVBZXklMLaELspWU= 27 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 28 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 29 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= 30 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 31 | github.com/bradfitz/gomemcache v0.0.0-20180710155616-bc664df96737/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= 32 | github.com/casbin/casbin v1.7.0/go.mod h1:c67qKN6Oum3UF5Q1+BByfFxkwKvhwW57ITjqwtzR1KE= 33 | github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= 34 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= 35 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 36 | github.com/cloudflare/golz4 v0.0.0-20150217214814-ef862a3cdc58/go.mod h1:EOBUe0h4xcZ5GoxqC5SDxFQ8gwyZPKQoEzownBlhI80= 37 | github.com/couchbase/go-couchbase v0.0.0-20200519150804-63f3cdb75e0d/go.mod h1:TWI8EKQMs5u5jLKW/tsb9VwauIrMIxQG1r5fMsswK5U= 38 | github.com/couchbase/gomemcached v0.0.0-20200526233749-ec430f949808/go.mod h1:srVSlQLB8iXBVXHgnqemxUXqN6FCvClgCMPCsjBDR7c= 39 | github.com/couchbase/goutils v0.0.0-20180530154633-e865a1461c8a/go.mod h1:BQwMFlJzDjFDG3DJUdU0KORxn88UlsOULuxLExMh3Hs= 40 | github.com/cupcake/rdb v0.0.0-20161107195141-43ba34106c76/go.mod h1:vYwsqCOLxGiisLwp9rITslkFNpZD5rz43tf41QFkTWY= 41 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 42 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 43 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 44 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 45 | github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96 h1:cenwrSVm+Z7QLSV/BsnenAOcDXdX4cMv4wP0B/5QbPg= 46 | github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= 47 | github.com/edsrzf/mmap-go v0.0.0-20170320065105-0bce6a688712/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= 48 | github.com/elastic/go-elasticsearch/v6 v6.8.5/go.mod h1:UwaDJsD3rWLM5rKNFzv9hgox93HoX8utj1kxD9aFUcI= 49 | github.com/elazarl/go-bindata-assetfs v1.0.0 h1:G/bYguwHIzWq9ZoyUQqrjTmJbbYn3j3CKKpKinvZLFk= 50 | github.com/elazarl/go-bindata-assetfs v1.0.0/go.mod h1:v+YaWX3bdea5J/mo8dSETolEo7R71Vk1u8bnjau5yw4= 51 | github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153 h1:yUdfgN0XgIJw7foRItutHYUIhlcKzcSf5vDpdhQAKTc= 52 | github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= 53 | github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= 54 | github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 55 | github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= 56 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 57 | github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 58 | github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c/go.mod h1:Gja1A+xZ9BoviGJNA2E9vFkPjjsl+CoJxSXiQM1UXtw= 59 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 60 | github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 61 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= 62 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 63 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 64 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= 65 | github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= 66 | github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= 67 | github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= 68 | github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= 69 | github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= 70 | github.com/go-redis/redis v6.14.2+incompatible/go.mod h1:NAIEuMOZ/fxfXJIrKDQDz8wamY7mA7PouImQ2Jvg6kA= 71 | github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 72 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 73 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 74 | github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= 75 | github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= 76 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 77 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 78 | github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 79 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 80 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 81 | github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 82 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 83 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 84 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 85 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 86 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 87 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 88 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 89 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 90 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 91 | github.com/golang/protobuf v1.4.3 h1:JjCZWpVbqXDqFVmTfYWEVTMIYrL/NPdPSCHPJ0T/raM= 92 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 93 | github.com/golang/snappy v0.0.0-20170215233205-553a64147049/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 94 | github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= 95 | github.com/gomodule/redigo v2.0.0+incompatible/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4= 96 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 97 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 98 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 99 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 100 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 101 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 102 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 103 | github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= 104 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 105 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 106 | github.com/google/gofuzz v1.1.0 h1:Hsa8mG0dQ46ij8Sl2AYJDUv1oA9/d6Vk+3LG99Oe02g= 107 | github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 108 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 109 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 110 | github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 111 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 112 | github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= 113 | github.com/googleapis/gnostic v0.1.0/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= 114 | github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= 115 | github.com/gorilla/websocket v1.4.2 h1:+/TMaTYc4QFitKJxsQ7Yye35DkWvkdLcvGKqM+x0Ufc= 116 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 117 | github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= 118 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 119 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 120 | github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= 121 | github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= 122 | github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= 123 | github.com/imdario/mergo v0.3.5 h1:JboBksRwiiAJWvIYJVo46AfV+IAIKZpfrSzVKj42R4Q= 124 | github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= 125 | github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= 126 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 127 | github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 128 | github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 129 | github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= 130 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 131 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 132 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 133 | github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= 134 | github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= 135 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 136 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 137 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 138 | github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 139 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 140 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 141 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 142 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 143 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 144 | github.com/kubernetes/api v0.18.2 h1:0P2HxhYjYb0c3VE5jJtSLdBvq+lGAJNolJckcHmclds= 145 | github.com/kubernetes/api v0.18.2/go.mod h1:SJCWI7OLzhZSvbY7U8zwNl9UA4o1fizoug34OV/2r78= 146 | github.com/kubernetes/apimachinery v0.18.2 h1:OThNL21kjRV4n2erl+7jSwwBeFFade6PhHf1gCwESok= 147 | github.com/kubernetes/apimachinery v0.18.2/go.mod h1:9SnR/e11v5IbyPCGbvJViimtJ0SwHG4nfZFjU77ftcA= 148 | github.com/ledisdb/ledisdb v0.0.0-20200510135210-d35789ec47e6/go.mod h1:n931TsDuKuq+uX4v1fulaMbA/7ZLLhjc85h7chZGBCQ= 149 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= 150 | github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= 151 | github.com/mattn/go-sqlite3 v2.0.3+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= 152 | github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= 153 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 154 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 155 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= 156 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 157 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 158 | github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= 159 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 160 | github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= 161 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 162 | github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 163 | github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= 164 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= 165 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 166 | github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 167 | github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 168 | github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= 169 | github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= 170 | github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= 171 | github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= 172 | github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= 173 | github.com/pelletier/go-toml v1.0.1/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 174 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 175 | github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= 176 | github.com/peterh/liner v1.0.1-0.20171122030339-3681c2a91233/go.mod h1:xIteQHvHuaLYG9IFj6mSxM0fCKrs34IrEQUhOYuGPHc= 177 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 178 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 179 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 180 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 181 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 182 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 183 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 184 | github.com/prometheus/client_golang v1.7.0/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 185 | github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= 186 | github.com/prometheus/client_golang v1.11.1 h1:+4eQaD7vAZ6DsfsxB15hbE0odUjGI5ARs9yskGu1v4s= 187 | github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= 188 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 189 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 190 | github.com/prometheus/client_model v0.2.0 h1:uq5h0d+GuxiXLJLNABMgp2qUWDPiLvgCzz2dUR+/W/M= 191 | github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 192 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 193 | github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= 194 | github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= 195 | github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= 196 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 197 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 198 | github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= 199 | github.com/prometheus/procfs v0.6.0 h1:mxy4L2jP6qMonqmq+aTtOx1ifVWUgG/TAmntgbh3xv4= 200 | github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= 201 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 h1:X+yvsM2yrEktyI+b2qND5gpH8YhURn0k8OCaeRnkINo= 202 | github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644/go.mod h1:nkxAfR/5quYxwPZhyDxgasBMnRtBZd0FCEpawpjMUFg= 203 | github.com/siddontang/go v0.0.0-20170517070808-cb568a3e5cc0/go.mod h1:3yhqj7WBBfRhbBlzyOC3gUxftwsU0u8gqevxwIHQpMw= 204 | github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400/go.mod h1:DDcKzU3qCuvj/tPnimWSsZZzvk9qvkvrIL5naVBPh5s= 205 | github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d/go.mod h1:AMEsy7v5z92TR1JKMkLLoaOQk++LVnOKL3ScbJ8GNGA= 206 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 207 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= 208 | github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= 209 | github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= 210 | github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 211 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= 212 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 213 | github.com/ssdb/gossdb v0.0.0-20180723034631-88f6b59b84ec/go.mod h1:QBvMkMya+gXctz3kmljlUCu/yB3GZ6oee+dUozsezQE= 214 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 215 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 216 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 217 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 218 | github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= 219 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 220 | github.com/syndtr/goleveldb v0.0.0-20160425020131-cfa635847112/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= 221 | github.com/syndtr/goleveldb v0.0.0-20181127023241-353a9fca669c/go.mod h1:Z4AUp2Km+PwemOoO/VB5AOx9XSsIItzFjoJlOSiYmn0= 222 | github.com/ugorji/go v0.0.0-20171122102828-84cb69a8af83/go.mod h1:hnLbHMwcvSihnDhEfx2/BzKp2xb0Y+ErdfYcrs9tkJQ= 223 | github.com/wendal/errors v0.0.0-20130201093226-f66c77a7882b/go.mod h1:Q12BUT7DqIlHRmgv3RskH+UCM/4eqVMgI0EMmlSpAXc= 224 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 225 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 226 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 227 | github.com/yuin/gopher-lua v0.0.0-20171031051903-609c9cd26973/go.mod h1:aEV29XrmTYFr3CiRxZeGHpkvbwq+prZduBqMaascyCU= 228 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 229 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 230 | golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 231 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 232 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 233 | golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 234 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 235 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 236 | golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= 237 | golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= 238 | golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= 239 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 240 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 241 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 242 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 243 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 244 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 245 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 246 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 247 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= 248 | golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 249 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 250 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 251 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 252 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 253 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 254 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 255 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 256 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 257 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 258 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 259 | golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 260 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 261 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 262 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 263 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 264 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 265 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 266 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= 267 | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= 268 | golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= 269 | golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= 270 | golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= 271 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 272 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 273 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= 274 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 275 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 276 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 277 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 278 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 279 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 280 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 281 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 282 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 283 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 284 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 285 | golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 286 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 287 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 288 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 289 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 290 | golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 291 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 292 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 293 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 294 | golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 295 | golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 296 | golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 297 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 298 | golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 299 | golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 300 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 301 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 302 | golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 303 | golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 304 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 305 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 306 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 307 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 308 | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 309 | golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 310 | golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= 311 | golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= 312 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 313 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 314 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= 315 | golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= 316 | golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= 317 | golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= 318 | golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= 319 | golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 320 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 321 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 322 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 323 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 324 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 325 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 326 | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= 327 | golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= 328 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= 329 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 330 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4 h1:SvFZT6jyqRaOeXpc5h/JSfZenJ2O330aBsf7JfSUXmQ= 331 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 332 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 333 | golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 334 | golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 335 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 336 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 337 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 338 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 339 | golang.org/x/tools v0.0.0-20200117065230-39095c1d176c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 340 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 341 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 342 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 343 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= 344 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 345 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 346 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 347 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE= 348 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 349 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 350 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 351 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 352 | google.golang.org/appengine v1.5.0 h1:KxkO13IPW4Lslp2bz+KHP2E3gtFlrIGNThxkZQ3g+4c= 353 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 354 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 355 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 356 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 357 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 358 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 359 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 360 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 361 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 362 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 363 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 364 | google.golang.org/protobuf v1.26.0-rc.1 h1:7QnIQpGRHE5RnLKnESfDoxm2dTapTZua5a0kS0A+VXQ= 365 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 366 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 367 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 368 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 369 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 370 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 371 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 372 | gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= 373 | gopkg.in/igm/sockjs-go.v2 v2.1.0 h1:Ehqymxnfkkwi8R7SZIUARn77M0slA8vki0VgcfOdALw= 374 | gopkg.in/igm/sockjs-go.v2 v2.1.0/go.mod h1:9l1o9p5TJvh2l+Q0EGE8USVB69QPfcvI7fR0HmbCk/8= 375 | gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= 376 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= 377 | gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= 378 | gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= 379 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 380 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 381 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 382 | gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 383 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 384 | gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU= 385 | gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 386 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 387 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 388 | k8s.io/client-go v0.18.14 h1:9dWb5D0dBsuc2umLPuWVE07rPDmBNsggW3vvctDyJII= 389 | k8s.io/client-go v0.18.14/go.mod h1:fpZHBter1MB6bs+GISolsmIRsGlBEJyd0mllE0H9f2Y= 390 | k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= 391 | k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= 392 | k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= 393 | k8s.io/klog v1.0.0 h1:Pt+yjF5aB1xDSVbau4VsWe+dQNzA0qv1LlXdC2dF6Q8= 394 | k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= 395 | k8s.io/kube-openapi v0.0.0-20200121204235-bf4fb3bd569c/go.mod h1:GRQhZsXIAJ1xR0C9bd8UpWHZ5plfAS9fzPjJuQ6JL3E= 396 | k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89 h1:d4vVOjXm687F1iLSP2q3lyPPuyvTUt3aVoBpi2DqRsU= 397 | k8s.io/utils v0.0.0-20200324210504-a9aa75ae1b89/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= 398 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= 399 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0 h1:dOmIZBMfhcHS09XZkMyUgkq5trg3/jRyJYFZUiaOp8E= 400 | sigs.k8s.io/structured-merge-diff/v3 v3.0.0/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw= 401 | sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= 402 | sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q= 403 | sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= 404 | -------------------------------------------------------------------------------- /k8s-webshell/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | _ "github.com/du2016/web-terminal-in-go/k8s-webshell/routers" 6 | ) 7 | 8 | func main() { 9 | beego.Run() 10 | } 11 | -------------------------------------------------------------------------------- /k8s-webshell/routers/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/du2016/web-terminal-in-go/k8s-webshell/controllers" 6 | ) 7 | 8 | func init() { 9 | beego.Router("/", &controllers.HomeController{}) 10 | beego.Router("/terminal", &controllers.TerminalController{}, "get:Get") 11 | beego.Handler("/terminal/ws", &controllers.TerminalSockjs{}, true) 12 | } 13 | -------------------------------------------------------------------------------- /k8s-webshell/static/css/bk_pack.css: -------------------------------------------------------------------------------- 1 | .form-control { 2 | height: 34px; } 3 | -------------------------------------------------------------------------------- /k8s-webshell/static/css/font-awesome.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.3.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | /* FONT PATH 6 | * -------------------------- */ 7 | @font-face { 8 | font-family: 'FontAwesome'; 9 | src: url('../fonts/fontawesome-webfont.eot?v=4.3.0'); 10 | src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.3.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff2?v=4.3.0') format('woff2'), url('../fonts/fontawesome-webfont.woff?v=4.3.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.3.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.3.0#fontawesomeregular') format('svg'); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | .fa { 15 | display: inline-block; 16 | font: normal normal normal 14px/1 FontAwesome; 17 | font-size: inherit; 18 | text-rendering: auto; 19 | -webkit-font-smoothing: antialiased; 20 | -moz-osx-font-smoothing: grayscale; 21 | transform: translate(0, 0); 22 | } 23 | /* makes the font 33% larger relative to the icon container */ 24 | .fa-lg { 25 | font-size: 1.33333333em; 26 | line-height: 0.75em; 27 | vertical-align: -15%; 28 | } 29 | .fa-2x { 30 | font-size: 2em; 31 | } 32 | .fa-3x { 33 | font-size: 3em; 34 | } 35 | .fa-4x { 36 | font-size: 4em; 37 | } 38 | .fa-5x { 39 | font-size: 5em; 40 | } 41 | .fa-fw { 42 | width: 1.28571429em; 43 | text-align: center; 44 | } 45 | .fa-ul { 46 | padding-left: 0; 47 | margin-left: 2.14285714em; 48 | list-style-type: none; 49 | } 50 | .fa-ul > li { 51 | position: relative; 52 | } 53 | .fa-li { 54 | position: absolute; 55 | left: -2.14285714em; 56 | width: 2.14285714em; 57 | top: 0.14285714em; 58 | text-align: center; 59 | } 60 | .fa-li.fa-lg { 61 | left: -1.85714286em; 62 | } 63 | .fa-border { 64 | padding: .2em .25em .15em; 65 | border: solid 0.08em #eeeeee; 66 | border-radius: .1em; 67 | } 68 | .pull-right { 69 | float: right; 70 | } 71 | .pull-left { 72 | float: left; 73 | } 74 | .fa.pull-left { 75 | margin-right: .3em; 76 | } 77 | .fa.pull-right { 78 | margin-left: .3em; 79 | } 80 | .fa-spin { 81 | -webkit-animation: fa-spin 2s infinite linear; 82 | animation: fa-spin 2s infinite linear; 83 | } 84 | .fa-pulse { 85 | -webkit-animation: fa-spin 1s infinite steps(8); 86 | animation: fa-spin 1s infinite steps(8); 87 | } 88 | @-webkit-keyframes fa-spin { 89 | 0% { 90 | -webkit-transform: rotate(0deg); 91 | transform: rotate(0deg); 92 | } 93 | 100% { 94 | -webkit-transform: rotate(359deg); 95 | transform: rotate(359deg); 96 | } 97 | } 98 | @keyframes fa-spin { 99 | 0% { 100 | -webkit-transform: rotate(0deg); 101 | transform: rotate(0deg); 102 | } 103 | 100% { 104 | -webkit-transform: rotate(359deg); 105 | transform: rotate(359deg); 106 | } 107 | } 108 | .fa-rotate-90 { 109 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); 110 | -webkit-transform: rotate(90deg); 111 | -ms-transform: rotate(90deg); 112 | transform: rotate(90deg); 113 | } 114 | .fa-rotate-180 { 115 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); 116 | -webkit-transform: rotate(180deg); 117 | -ms-transform: rotate(180deg); 118 | transform: rotate(180deg); 119 | } 120 | .fa-rotate-270 { 121 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); 122 | -webkit-transform: rotate(270deg); 123 | -ms-transform: rotate(270deg); 124 | transform: rotate(270deg); 125 | } 126 | .fa-flip-horizontal { 127 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); 128 | -webkit-transform: scale(-1, 1); 129 | -ms-transform: scale(-1, 1); 130 | transform: scale(-1, 1); 131 | } 132 | .fa-flip-vertical { 133 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); 134 | -webkit-transform: scale(1, -1); 135 | -ms-transform: scale(1, -1); 136 | transform: scale(1, -1); 137 | } 138 | :root .fa-rotate-90, 139 | :root .fa-rotate-180, 140 | :root .fa-rotate-270, 141 | :root .fa-flip-horizontal, 142 | :root .fa-flip-vertical { 143 | filter: none; 144 | } 145 | .fa-stack { 146 | position: relative; 147 | display: inline-block; 148 | width: 2em; 149 | height: 2em; 150 | line-height: 2em; 151 | vertical-align: middle; 152 | } 153 | .fa-stack-1x, 154 | .fa-stack-2x { 155 | position: absolute; 156 | left: 0; 157 | width: 100%; 158 | text-align: center; 159 | } 160 | .fa-stack-1x { 161 | line-height: inherit; 162 | } 163 | .fa-stack-2x { 164 | font-size: 2em; 165 | } 166 | .fa-inverse { 167 | color: #ffffff; 168 | } 169 | /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen 170 | readers do not read off random characters that represent icons */ 171 | .fa-glass:before { 172 | content: "\f000"; 173 | } 174 | .fa-music:before { 175 | content: "\f001"; 176 | } 177 | .fa-search:before { 178 | content: "\f002"; 179 | } 180 | .fa-envelope-o:before { 181 | content: "\f003"; 182 | } 183 | .fa-heart:before { 184 | content: "\f004"; 185 | } 186 | .fa-star:before { 187 | content: "\f005"; 188 | } 189 | .fa-star-o:before { 190 | content: "\f006"; 191 | } 192 | .fa-user:before { 193 | content: "\f007"; 194 | } 195 | .fa-film:before { 196 | content: "\f008"; 197 | } 198 | .fa-th-large:before { 199 | content: "\f009"; 200 | } 201 | .fa-th:before { 202 | content: "\f00a"; 203 | } 204 | .fa-th-list:before { 205 | content: "\f00b"; 206 | } 207 | .fa-check:before { 208 | content: "\f00c"; 209 | } 210 | .fa-remove:before, 211 | .fa-close:before, 212 | .fa-times:before { 213 | content: "\f00d"; 214 | } 215 | .fa-search-plus:before { 216 | content: "\f00e"; 217 | } 218 | .fa-search-minus:before { 219 | content: "\f010"; 220 | } 221 | .fa-power-off:before { 222 | content: "\f011"; 223 | } 224 | .fa-signal:before { 225 | content: "\f012"; 226 | } 227 | .fa-gear:before, 228 | .fa-cog:before { 229 | content: "\f013"; 230 | } 231 | .fa-trash-o:before { 232 | content: "\f014"; 233 | } 234 | .fa-home:before { 235 | content: "\f015"; 236 | } 237 | .fa-file-o:before { 238 | content: "\f016"; 239 | } 240 | .fa-clock-o:before { 241 | content: "\f017"; 242 | } 243 | .fa-road:before { 244 | content: "\f018"; 245 | } 246 | .fa-download:before { 247 | content: "\f019"; 248 | } 249 | .fa-arrow-circle-o-down:before { 250 | content: "\f01a"; 251 | } 252 | .fa-arrow-circle-o-up:before { 253 | content: "\f01b"; 254 | } 255 | .fa-inbox:before { 256 | content: "\f01c"; 257 | } 258 | .fa-play-circle-o:before { 259 | content: "\f01d"; 260 | } 261 | .fa-rotate-right:before, 262 | .fa-repeat:before { 263 | content: "\f01e"; 264 | } 265 | .fa-refresh:before { 266 | content: "\f021"; 267 | } 268 | .fa-list-alt:before { 269 | content: "\f022"; 270 | } 271 | .fa-lock:before { 272 | content: "\f023"; 273 | } 274 | .fa-flag:before { 275 | content: "\f024"; 276 | } 277 | .fa-headphones:before { 278 | content: "\f025"; 279 | } 280 | .fa-volume-off:before { 281 | content: "\f026"; 282 | } 283 | .fa-volume-down:before { 284 | content: "\f027"; 285 | } 286 | .fa-volume-up:before { 287 | content: "\f028"; 288 | } 289 | .fa-qrcode:before { 290 | content: "\f029"; 291 | } 292 | .fa-barcode:before { 293 | content: "\f02a"; 294 | } 295 | .fa-tag:before { 296 | content: "\f02b"; 297 | } 298 | .fa-tags:before { 299 | content: "\f02c"; 300 | } 301 | .fa-book:before { 302 | content: "\f02d"; 303 | } 304 | .fa-bookmark:before { 305 | content: "\f02e"; 306 | } 307 | .fa-print:before { 308 | content: "\f02f"; 309 | } 310 | .fa-camera:before { 311 | content: "\f030"; 312 | } 313 | .fa-font:before { 314 | content: "\f031"; 315 | } 316 | .fa-bold:before { 317 | content: "\f032"; 318 | } 319 | .fa-italic:before { 320 | content: "\f033"; 321 | } 322 | .fa-text-height:before { 323 | content: "\f034"; 324 | } 325 | .fa-text-width:before { 326 | content: "\f035"; 327 | } 328 | .fa-align-left:before { 329 | content: "\f036"; 330 | } 331 | .fa-align-center:before { 332 | content: "\f037"; 333 | } 334 | .fa-align-right:before { 335 | content: "\f038"; 336 | } 337 | .fa-align-justify:before { 338 | content: "\f039"; 339 | } 340 | .fa-list:before { 341 | content: "\f03a"; 342 | } 343 | .fa-dedent:before, 344 | .fa-outdent:before { 345 | content: "\f03b"; 346 | } 347 | .fa-indent:before { 348 | content: "\f03c"; 349 | } 350 | .fa-video-camera:before { 351 | content: "\f03d"; 352 | } 353 | .fa-photo:before, 354 | .fa-image:before, 355 | .fa-picture-o:before { 356 | content: "\f03e"; 357 | } 358 | .fa-pencil:before { 359 | content: "\f040"; 360 | } 361 | .fa-map-marker:before { 362 | content: "\f041"; 363 | } 364 | .fa-adjust:before { 365 | content: "\f042"; 366 | } 367 | .fa-tint:before { 368 | content: "\f043"; 369 | } 370 | .fa-edit:before, 371 | .fa-pencil-square-o:before { 372 | content: "\f044"; 373 | } 374 | .fa-share-square-o:before { 375 | content: "\f045"; 376 | } 377 | .fa-check-square-o:before { 378 | content: "\f046"; 379 | } 380 | .fa-arrows:before { 381 | content: "\f047"; 382 | } 383 | .fa-step-backward:before { 384 | content: "\f048"; 385 | } 386 | .fa-fast-backward:before { 387 | content: "\f049"; 388 | } 389 | .fa-backward:before { 390 | content: "\f04a"; 391 | } 392 | .fa-play:before { 393 | content: "\f04b"; 394 | } 395 | .fa-pause:before { 396 | content: "\f04c"; 397 | } 398 | .fa-stop:before { 399 | content: "\f04d"; 400 | } 401 | .fa-forward:before { 402 | content: "\f04e"; 403 | } 404 | .fa-fast-forward:before { 405 | content: "\f050"; 406 | } 407 | .fa-step-forward:before { 408 | content: "\f051"; 409 | } 410 | .fa-eject:before { 411 | content: "\f052"; 412 | } 413 | .fa-chevron-left:before { 414 | content: "\f053"; 415 | } 416 | .fa-chevron-right:before { 417 | content: "\f054"; 418 | } 419 | .fa-plus-circle:before { 420 | content: "\f055"; 421 | } 422 | .fa-minus-circle:before { 423 | content: "\f056"; 424 | } 425 | .fa-times-circle:before { 426 | content: "\f057"; 427 | } 428 | .fa-check-circle:before { 429 | content: "\f058"; 430 | } 431 | .fa-question-circle:before { 432 | content: "\f059"; 433 | } 434 | .fa-info-circle:before { 435 | content: "\f05a"; 436 | } 437 | .fa-crosshairs:before { 438 | content: "\f05b"; 439 | } 440 | .fa-times-circle-o:before { 441 | content: "\f05c"; 442 | } 443 | .fa-check-circle-o:before { 444 | content: "\f05d"; 445 | } 446 | .fa-ban:before { 447 | content: "\f05e"; 448 | } 449 | .fa-arrow-left:before { 450 | content: "\f060"; 451 | } 452 | .fa-arrow-right:before { 453 | content: "\f061"; 454 | } 455 | .fa-arrow-up:before { 456 | content: "\f062"; 457 | } 458 | .fa-arrow-down:before { 459 | content: "\f063"; 460 | } 461 | .fa-mail-forward:before, 462 | .fa-share:before { 463 | content: "\f064"; 464 | } 465 | .fa-expand:before { 466 | content: "\f065"; 467 | } 468 | .fa-compress:before { 469 | content: "\f066"; 470 | } 471 | .fa-plus:before { 472 | content: "\f067"; 473 | } 474 | .fa-minus:before { 475 | content: "\f068"; 476 | } 477 | .fa-asterisk:before { 478 | content: "\f069"; 479 | } 480 | .fa-exclamation-circle:before { 481 | content: "\f06a"; 482 | } 483 | .fa-gift:before { 484 | content: "\f06b"; 485 | } 486 | .fa-leaf:before { 487 | content: "\f06c"; 488 | } 489 | .fa-fire:before { 490 | content: "\f06d"; 491 | } 492 | .fa-eye:before { 493 | content: "\f06e"; 494 | } 495 | .fa-eye-slash:before { 496 | content: "\f070"; 497 | } 498 | .fa-warning:before, 499 | .fa-exclamation-triangle:before { 500 | content: "\f071"; 501 | } 502 | .fa-plane:before { 503 | content: "\f072"; 504 | } 505 | .fa-calendar:before { 506 | content: "\f073"; 507 | } 508 | .fa-random:before { 509 | content: "\f074"; 510 | } 511 | .fa-comment:before { 512 | content: "\f075"; 513 | } 514 | .fa-magnet:before { 515 | content: "\f076"; 516 | } 517 | .fa-chevron-up:before { 518 | content: "\f077"; 519 | } 520 | .fa-chevron-down:before { 521 | content: "\f078"; 522 | } 523 | .fa-retweet:before { 524 | content: "\f079"; 525 | } 526 | .fa-shopping-cart:before { 527 | content: "\f07a"; 528 | } 529 | .fa-folder:before { 530 | content: "\f07b"; 531 | } 532 | .fa-folder-open:before { 533 | content: "\f07c"; 534 | } 535 | .fa-arrows-v:before { 536 | content: "\f07d"; 537 | } 538 | .fa-arrows-h:before { 539 | content: "\f07e"; 540 | } 541 | .fa-bar-chart-o:before, 542 | .fa-bar-chart:before { 543 | content: "\f080"; 544 | } 545 | .fa-twitter-square:before { 546 | content: "\f081"; 547 | } 548 | .fa-facebook-square:before { 549 | content: "\f082"; 550 | } 551 | .fa-camera-retro:before { 552 | content: "\f083"; 553 | } 554 | .fa-key:before { 555 | content: "\f084"; 556 | } 557 | .fa-gears:before, 558 | .fa-cogs:before { 559 | content: "\f085"; 560 | } 561 | .fa-comments:before { 562 | content: "\f086"; 563 | } 564 | .fa-thumbs-o-up:before { 565 | content: "\f087"; 566 | } 567 | .fa-thumbs-o-down:before { 568 | content: "\f088"; 569 | } 570 | .fa-star-half:before { 571 | content: "\f089"; 572 | } 573 | .fa-heart-o:before { 574 | content: "\f08a"; 575 | } 576 | .fa-sign-out:before { 577 | content: "\f08b"; 578 | } 579 | .fa-linkedin-square:before { 580 | content: "\f08c"; 581 | } 582 | .fa-thumb-tack:before { 583 | content: "\f08d"; 584 | } 585 | .fa-external-link:before { 586 | content: "\f08e"; 587 | } 588 | .fa-sign-in:before { 589 | content: "\f090"; 590 | } 591 | .fa-trophy:before { 592 | content: "\f091"; 593 | } 594 | .fa-github-square:before { 595 | content: "\f092"; 596 | } 597 | .fa-upload:before { 598 | content: "\f093"; 599 | } 600 | .fa-lemon-o:before { 601 | content: "\f094"; 602 | } 603 | .fa-phone:before { 604 | content: "\f095"; 605 | } 606 | .fa-square-o:before { 607 | content: "\f096"; 608 | } 609 | .fa-bookmark-o:before { 610 | content: "\f097"; 611 | } 612 | .fa-phone-square:before { 613 | content: "\f098"; 614 | } 615 | .fa-twitter:before { 616 | content: "\f099"; 617 | } 618 | .fa-facebook-f:before, 619 | .fa-facebook:before { 620 | content: "\f09a"; 621 | } 622 | .fa-github:before { 623 | content: "\f09b"; 624 | } 625 | .fa-unlock:before { 626 | content: "\f09c"; 627 | } 628 | .fa-credit-card:before { 629 | content: "\f09d"; 630 | } 631 | .fa-rss:before { 632 | content: "\f09e"; 633 | } 634 | .fa-hdd-o:before { 635 | content: "\f0a0"; 636 | } 637 | .fa-bullhorn:before { 638 | content: "\f0a1"; 639 | } 640 | .fa-bell:before { 641 | content: "\f0f3"; 642 | } 643 | .fa-certificate:before { 644 | content: "\f0a3"; 645 | } 646 | .fa-hand-o-right:before { 647 | content: "\f0a4"; 648 | } 649 | .fa-hand-o-left:before { 650 | content: "\f0a5"; 651 | } 652 | .fa-hand-o-up:before { 653 | content: "\f0a6"; 654 | } 655 | .fa-hand-o-down:before { 656 | content: "\f0a7"; 657 | } 658 | .fa-arrow-circle-left:before { 659 | content: "\f0a8"; 660 | } 661 | .fa-arrow-circle-right:before { 662 | content: "\f0a9"; 663 | } 664 | .fa-arrow-circle-up:before { 665 | content: "\f0aa"; 666 | } 667 | .fa-arrow-circle-down:before { 668 | content: "\f0ab"; 669 | } 670 | .fa-globe:before { 671 | content: "\f0ac"; 672 | } 673 | .fa-wrench:before { 674 | content: "\f0ad"; 675 | } 676 | .fa-tasks:before { 677 | content: "\f0ae"; 678 | } 679 | .fa-filter:before { 680 | content: "\f0b0"; 681 | } 682 | .fa-briefcase:before { 683 | content: "\f0b1"; 684 | } 685 | .fa-arrows-alt:before { 686 | content: "\f0b2"; 687 | } 688 | .fa-group:before, 689 | .fa-users:before { 690 | content: "\f0c0"; 691 | } 692 | .fa-chain:before, 693 | .fa-link:before { 694 | content: "\f0c1"; 695 | } 696 | .fa-cloud:before { 697 | content: "\f0c2"; 698 | } 699 | .fa-flask:before { 700 | content: "\f0c3"; 701 | } 702 | .fa-cut:before, 703 | .fa-scissors:before { 704 | content: "\f0c4"; 705 | } 706 | .fa-copy:before, 707 | .fa-files-o:before { 708 | content: "\f0c5"; 709 | } 710 | .fa-paperclip:before { 711 | content: "\f0c6"; 712 | } 713 | .fa-save:before, 714 | .fa-floppy-o:before { 715 | content: "\f0c7"; 716 | } 717 | .fa-square:before { 718 | content: "\f0c8"; 719 | } 720 | .fa-navicon:before, 721 | .fa-reorder:before, 722 | .fa-bars:before { 723 | content: "\f0c9"; 724 | } 725 | .fa-list-ul:before { 726 | content: "\f0ca"; 727 | } 728 | .fa-list-ol:before { 729 | content: "\f0cb"; 730 | } 731 | .fa-strikethrough:before { 732 | content: "\f0cc"; 733 | } 734 | .fa-underline:before { 735 | content: "\f0cd"; 736 | } 737 | .fa-table:before { 738 | content: "\f0ce"; 739 | } 740 | .fa-magic:before { 741 | content: "\f0d0"; 742 | } 743 | .fa-truck:before { 744 | content: "\f0d1"; 745 | } 746 | .fa-pinterest:before { 747 | content: "\f0d2"; 748 | } 749 | .fa-pinterest-square:before { 750 | content: "\f0d3"; 751 | } 752 | .fa-google-plus-square:before { 753 | content: "\f0d4"; 754 | } 755 | .fa-google-plus:before { 756 | content: "\f0d5"; 757 | } 758 | .fa-money:before { 759 | content: "\f0d6"; 760 | } 761 | .fa-caret-down:before { 762 | content: "\f0d7"; 763 | } 764 | .fa-caret-up:before { 765 | content: "\f0d8"; 766 | } 767 | .fa-caret-left:before { 768 | content: "\f0d9"; 769 | } 770 | .fa-caret-right:before { 771 | content: "\f0da"; 772 | } 773 | .fa-columns:before { 774 | content: "\f0db"; 775 | } 776 | .fa-unsorted:before, 777 | .fa-sort:before { 778 | content: "\f0dc"; 779 | } 780 | .fa-sort-down:before, 781 | .fa-sort-desc:before { 782 | content: "\f0dd"; 783 | } 784 | .fa-sort-up:before, 785 | .fa-sort-asc:before { 786 | content: "\f0de"; 787 | } 788 | .fa-envelope:before { 789 | content: "\f0e0"; 790 | } 791 | .fa-linkedin:before { 792 | content: "\f0e1"; 793 | } 794 | .fa-rotate-left:before, 795 | .fa-undo:before { 796 | content: "\f0e2"; 797 | } 798 | .fa-legal:before, 799 | .fa-gavel:before { 800 | content: "\f0e3"; 801 | } 802 | .fa-dashboard:before, 803 | .fa-tachometer:before { 804 | content: "\f0e4"; 805 | } 806 | .fa-comment-o:before { 807 | content: "\f0e5"; 808 | } 809 | .fa-comments-o:before { 810 | content: "\f0e6"; 811 | } 812 | .fa-flash:before, 813 | .fa-bolt:before { 814 | content: "\f0e7"; 815 | } 816 | .fa-sitemap:before { 817 | content: "\f0e8"; 818 | } 819 | .fa-umbrella:before { 820 | content: "\f0e9"; 821 | } 822 | .fa-paste:before, 823 | .fa-clipboard:before { 824 | content: "\f0ea"; 825 | } 826 | .fa-lightbulb-o:before { 827 | content: "\f0eb"; 828 | } 829 | .fa-exchange:before { 830 | content: "\f0ec"; 831 | } 832 | .fa-cloud-download:before { 833 | content: "\f0ed"; 834 | } 835 | .fa-cloud-upload:before { 836 | content: "\f0ee"; 837 | } 838 | .fa-user-md:before { 839 | content: "\f0f0"; 840 | } 841 | .fa-stethoscope:before { 842 | content: "\f0f1"; 843 | } 844 | .fa-suitcase:before { 845 | content: "\f0f2"; 846 | } 847 | .fa-bell-o:before { 848 | content: "\f0a2"; 849 | } 850 | .fa-coffee:before { 851 | content: "\f0f4"; 852 | } 853 | .fa-cutlery:before { 854 | content: "\f0f5"; 855 | } 856 | .fa-file-text-o:before { 857 | content: "\f0f6"; 858 | } 859 | .fa-building-o:before { 860 | content: "\f0f7"; 861 | } 862 | .fa-hospital-o:before { 863 | content: "\f0f8"; 864 | } 865 | .fa-ambulance:before { 866 | content: "\f0f9"; 867 | } 868 | .fa-medkit:before { 869 | content: "\f0fa"; 870 | } 871 | .fa-fighter-jet:before { 872 | content: "\f0fb"; 873 | } 874 | .fa-beer:before { 875 | content: "\f0fc"; 876 | } 877 | .fa-h-square:before { 878 | content: "\f0fd"; 879 | } 880 | .fa-plus-square:before { 881 | content: "\f0fe"; 882 | } 883 | .fa-angle-double-left:before { 884 | content: "\f100"; 885 | } 886 | .fa-angle-double-right:before { 887 | content: "\f101"; 888 | } 889 | .fa-angle-double-up:before { 890 | content: "\f102"; 891 | } 892 | .fa-angle-double-down:before { 893 | content: "\f103"; 894 | } 895 | .fa-angle-left:before { 896 | content: "\f104"; 897 | } 898 | .fa-angle-right:before { 899 | content: "\f105"; 900 | } 901 | .fa-angle-up:before { 902 | content: "\f106"; 903 | } 904 | .fa-angle-down:before { 905 | content: "\f107"; 906 | } 907 | .fa-desktop:before { 908 | content: "\f108"; 909 | } 910 | .fa-laptop:before { 911 | content: "\f109"; 912 | } 913 | .fa-tablet:before { 914 | content: "\f10a"; 915 | } 916 | .fa-mobile-phone:before, 917 | .fa-mobile:before { 918 | content: "\f10b"; 919 | } 920 | .fa-circle-o:before { 921 | content: "\f10c"; 922 | } 923 | .fa-quote-left:before { 924 | content: "\f10d"; 925 | } 926 | .fa-quote-right:before { 927 | content: "\f10e"; 928 | } 929 | .fa-spinner:before { 930 | content: "\f110"; 931 | } 932 | .fa-circle:before { 933 | content: "\f111"; 934 | } 935 | .fa-mail-reply:before, 936 | .fa-reply:before { 937 | content: "\f112"; 938 | } 939 | .fa-github-alt:before { 940 | content: "\f113"; 941 | } 942 | .fa-folder-o:before { 943 | content: "\f114"; 944 | } 945 | .fa-folder-open-o:before { 946 | content: "\f115"; 947 | } 948 | .fa-smile-o:before { 949 | content: "\f118"; 950 | } 951 | .fa-frown-o:before { 952 | content: "\f119"; 953 | } 954 | .fa-meh-o:before { 955 | content: "\f11a"; 956 | } 957 | .fa-gamepad:before { 958 | content: "\f11b"; 959 | } 960 | .fa-keyboard-o:before { 961 | content: "\f11c"; 962 | } 963 | .fa-flag-o:before { 964 | content: "\f11d"; 965 | } 966 | .fa-flag-checkered:before { 967 | content: "\f11e"; 968 | } 969 | .fa-terminal:before { 970 | content: "\f120"; 971 | } 972 | .fa-code:before { 973 | content: "\f121"; 974 | } 975 | .fa-mail-reply-all:before, 976 | .fa-reply-all:before { 977 | content: "\f122"; 978 | } 979 | .fa-star-half-empty:before, 980 | .fa-star-half-full:before, 981 | .fa-star-half-o:before { 982 | content: "\f123"; 983 | } 984 | .fa-location-arrow:before { 985 | content: "\f124"; 986 | } 987 | .fa-crop:before { 988 | content: "\f125"; 989 | } 990 | .fa-code-fork:before { 991 | content: "\f126"; 992 | } 993 | .fa-unlink:before, 994 | .fa-chain-broken:before { 995 | content: "\f127"; 996 | } 997 | .fa-question:before { 998 | content: "\f128"; 999 | } 1000 | .fa-info:before { 1001 | content: "\f129"; 1002 | } 1003 | .fa-exclamation:before { 1004 | content: "\f12a"; 1005 | } 1006 | .fa-superscript:before { 1007 | content: "\f12b"; 1008 | } 1009 | .fa-subscript:before { 1010 | content: "\f12c"; 1011 | } 1012 | .fa-eraser:before { 1013 | content: "\f12d"; 1014 | } 1015 | .fa-puzzle-piece:before { 1016 | content: "\f12e"; 1017 | } 1018 | .fa-microphone:before { 1019 | content: "\f130"; 1020 | } 1021 | .fa-microphone-slash:before { 1022 | content: "\f131"; 1023 | } 1024 | .fa-shield:before { 1025 | content: "\f132"; 1026 | } 1027 | .fa-calendar-o:before { 1028 | content: "\f133"; 1029 | } 1030 | .fa-fire-extinguisher:before { 1031 | content: "\f134"; 1032 | } 1033 | .fa-rocket:before { 1034 | content: "\f135"; 1035 | } 1036 | .fa-maxcdn:before { 1037 | content: "\f136"; 1038 | } 1039 | .fa-chevron-circle-left:before { 1040 | content: "\f137"; 1041 | } 1042 | .fa-chevron-circle-right:before { 1043 | content: "\f138"; 1044 | } 1045 | .fa-chevron-circle-up:before { 1046 | content: "\f139"; 1047 | } 1048 | .fa-chevron-circle-down:before { 1049 | content: "\f13a"; 1050 | } 1051 | .fa-html5:before { 1052 | content: "\f13b"; 1053 | } 1054 | .fa-css3:before { 1055 | content: "\f13c"; 1056 | } 1057 | .fa-anchor:before { 1058 | content: "\f13d"; 1059 | } 1060 | .fa-unlock-alt:before { 1061 | content: "\f13e"; 1062 | } 1063 | .fa-bullseye:before { 1064 | content: "\f140"; 1065 | } 1066 | .fa-ellipsis-h:before { 1067 | content: "\f141"; 1068 | } 1069 | .fa-ellipsis-v:before { 1070 | content: "\f142"; 1071 | } 1072 | .fa-rss-square:before { 1073 | content: "\f143"; 1074 | } 1075 | .fa-play-circle:before { 1076 | content: "\f144"; 1077 | } 1078 | .fa-ticket:before { 1079 | content: "\f145"; 1080 | } 1081 | .fa-minus-square:before { 1082 | content: "\f146"; 1083 | } 1084 | .fa-minus-square-o:before { 1085 | content: "\f147"; 1086 | } 1087 | .fa-level-up:before { 1088 | content: "\f148"; 1089 | } 1090 | .fa-level-down:before { 1091 | content: "\f149"; 1092 | } 1093 | .fa-check-square:before { 1094 | content: "\f14a"; 1095 | } 1096 | .fa-pencil-square:before { 1097 | content: "\f14b"; 1098 | } 1099 | .fa-external-link-square:before { 1100 | content: "\f14c"; 1101 | } 1102 | .fa-share-square:before { 1103 | content: "\f14d"; 1104 | } 1105 | .fa-compass:before { 1106 | content: "\f14e"; 1107 | } 1108 | .fa-toggle-down:before, 1109 | .fa-caret-square-o-down:before { 1110 | content: "\f150"; 1111 | } 1112 | .fa-toggle-up:before, 1113 | .fa-caret-square-o-up:before { 1114 | content: "\f151"; 1115 | } 1116 | .fa-toggle-right:before, 1117 | .fa-caret-square-o-right:before { 1118 | content: "\f152"; 1119 | } 1120 | .fa-euro:before, 1121 | .fa-eur:before { 1122 | content: "\f153"; 1123 | } 1124 | .fa-gbp:before { 1125 | content: "\f154"; 1126 | } 1127 | .fa-dollar:before, 1128 | .fa-usd:before { 1129 | content: "\f155"; 1130 | } 1131 | .fa-rupee:before, 1132 | .fa-inr:before { 1133 | content: "\f156"; 1134 | } 1135 | .fa-cny:before, 1136 | .fa-rmb:before, 1137 | .fa-yen:before, 1138 | .fa-jpy:before { 1139 | content: "\f157"; 1140 | } 1141 | .fa-ruble:before, 1142 | .fa-rouble:before, 1143 | .fa-rub:before { 1144 | content: "\f158"; 1145 | } 1146 | .fa-won:before, 1147 | .fa-krw:before { 1148 | content: "\f159"; 1149 | } 1150 | .fa-bitcoin:before, 1151 | .fa-btc:before { 1152 | content: "\f15a"; 1153 | } 1154 | .fa-file:before { 1155 | content: "\f15b"; 1156 | } 1157 | .fa-file-text:before { 1158 | content: "\f15c"; 1159 | } 1160 | .fa-sort-alpha-asc:before { 1161 | content: "\f15d"; 1162 | } 1163 | .fa-sort-alpha-desc:before { 1164 | content: "\f15e"; 1165 | } 1166 | .fa-sort-amount-asc:before { 1167 | content: "\f160"; 1168 | } 1169 | .fa-sort-amount-desc:before { 1170 | content: "\f161"; 1171 | } 1172 | .fa-sort-numeric-asc:before { 1173 | content: "\f162"; 1174 | } 1175 | .fa-sort-numeric-desc:before { 1176 | content: "\f163"; 1177 | } 1178 | .fa-thumbs-up:before { 1179 | content: "\f164"; 1180 | } 1181 | .fa-thumbs-down:before { 1182 | content: "\f165"; 1183 | } 1184 | .fa-youtube-square:before { 1185 | content: "\f166"; 1186 | } 1187 | .fa-youtube:before { 1188 | content: "\f167"; 1189 | } 1190 | .fa-xing:before { 1191 | content: "\f168"; 1192 | } 1193 | .fa-xing-square:before { 1194 | content: "\f169"; 1195 | } 1196 | .fa-youtube-play:before { 1197 | content: "\f16a"; 1198 | } 1199 | .fa-dropbox:before { 1200 | content: "\f16b"; 1201 | } 1202 | .fa-stack-overflow:before { 1203 | content: "\f16c"; 1204 | } 1205 | .fa-instagram:before { 1206 | content: "\f16d"; 1207 | } 1208 | .fa-flickr:before { 1209 | content: "\f16e"; 1210 | } 1211 | .fa-adn:before { 1212 | content: "\f170"; 1213 | } 1214 | .fa-bitbucket:before { 1215 | content: "\f171"; 1216 | } 1217 | .fa-bitbucket-square:before { 1218 | content: "\f172"; 1219 | } 1220 | .fa-tumblr:before { 1221 | content: "\f173"; 1222 | } 1223 | .fa-tumblr-square:before { 1224 | content: "\f174"; 1225 | } 1226 | .fa-long-arrow-down:before { 1227 | content: "\f175"; 1228 | } 1229 | .fa-long-arrow-up:before { 1230 | content: "\f176"; 1231 | } 1232 | .fa-long-arrow-left:before { 1233 | content: "\f177"; 1234 | } 1235 | .fa-long-arrow-right:before { 1236 | content: "\f178"; 1237 | } 1238 | .fa-apple:before { 1239 | content: "\f179"; 1240 | } 1241 | .fa-windows:before { 1242 | content: "\f17a"; 1243 | } 1244 | .fa-android:before { 1245 | content: "\f17b"; 1246 | } 1247 | .fa-linux:before { 1248 | content: "\f17c"; 1249 | } 1250 | .fa-dribbble:before { 1251 | content: "\f17d"; 1252 | } 1253 | .fa-skype:before { 1254 | content: "\f17e"; 1255 | } 1256 | .fa-foursquare:before { 1257 | content: "\f180"; 1258 | } 1259 | .fa-trello:before { 1260 | content: "\f181"; 1261 | } 1262 | .fa-female:before { 1263 | content: "\f182"; 1264 | } 1265 | .fa-male:before { 1266 | content: "\f183"; 1267 | } 1268 | .fa-gittip:before, 1269 | .fa-gratipay:before { 1270 | content: "\f184"; 1271 | } 1272 | .fa-sun-o:before { 1273 | content: "\f185"; 1274 | } 1275 | .fa-moon-o:before { 1276 | content: "\f186"; 1277 | } 1278 | .fa-archive:before { 1279 | content: "\f187"; 1280 | } 1281 | .fa-bug:before { 1282 | content: "\f188"; 1283 | } 1284 | .fa-vk:before { 1285 | content: "\f189"; 1286 | } 1287 | .fa-weibo:before { 1288 | content: "\f18a"; 1289 | } 1290 | .fa-renren:before { 1291 | content: "\f18b"; 1292 | } 1293 | .fa-pagelines:before { 1294 | content: "\f18c"; 1295 | } 1296 | .fa-stack-exchange:before { 1297 | content: "\f18d"; 1298 | } 1299 | .fa-arrow-circle-o-right:before { 1300 | content: "\f18e"; 1301 | } 1302 | .fa-arrow-circle-o-left:before { 1303 | content: "\f190"; 1304 | } 1305 | .fa-toggle-left:before, 1306 | .fa-caret-square-o-left:before { 1307 | content: "\f191"; 1308 | } 1309 | .fa-dot-circle-o:before { 1310 | content: "\f192"; 1311 | } 1312 | .fa-wheelchair:before { 1313 | content: "\f193"; 1314 | } 1315 | .fa-vimeo-square:before { 1316 | content: "\f194"; 1317 | } 1318 | .fa-turkish-lira:before, 1319 | .fa-try:before { 1320 | content: "\f195"; 1321 | } 1322 | .fa-plus-square-o:before { 1323 | content: "\f196"; 1324 | } 1325 | .fa-space-shuttle:before { 1326 | content: "\f197"; 1327 | } 1328 | .fa-slack:before { 1329 | content: "\f198"; 1330 | } 1331 | .fa-envelope-square:before { 1332 | content: "\f199"; 1333 | } 1334 | .fa-wordpress:before { 1335 | content: "\f19a"; 1336 | } 1337 | .fa-openid:before { 1338 | content: "\f19b"; 1339 | } 1340 | .fa-institution:before, 1341 | .fa-bank:before, 1342 | .fa-university:before { 1343 | content: "\f19c"; 1344 | } 1345 | .fa-mortar-board:before, 1346 | .fa-graduation-cap:before { 1347 | content: "\f19d"; 1348 | } 1349 | .fa-yahoo:before { 1350 | content: "\f19e"; 1351 | } 1352 | .fa-google:before { 1353 | content: "\f1a0"; 1354 | } 1355 | .fa-reddit:before { 1356 | content: "\f1a1"; 1357 | } 1358 | .fa-reddit-square:before { 1359 | content: "\f1a2"; 1360 | } 1361 | .fa-stumbleupon-circle:before { 1362 | content: "\f1a3"; 1363 | } 1364 | .fa-stumbleupon:before { 1365 | content: "\f1a4"; 1366 | } 1367 | .fa-delicious:before { 1368 | content: "\f1a5"; 1369 | } 1370 | .fa-digg:before { 1371 | content: "\f1a6"; 1372 | } 1373 | .fa-pied-piper:before { 1374 | content: "\f1a7"; 1375 | } 1376 | .fa-pied-piper-alt:before { 1377 | content: "\f1a8"; 1378 | } 1379 | .fa-drupal:before { 1380 | content: "\f1a9"; 1381 | } 1382 | .fa-joomla:before { 1383 | content: "\f1aa"; 1384 | } 1385 | .fa-language:before { 1386 | content: "\f1ab"; 1387 | } 1388 | .fa-fax:before { 1389 | content: "\f1ac"; 1390 | } 1391 | .fa-building:before { 1392 | content: "\f1ad"; 1393 | } 1394 | .fa-child:before { 1395 | content: "\f1ae"; 1396 | } 1397 | .fa-paw:before { 1398 | content: "\f1b0"; 1399 | } 1400 | .fa-spoon:before { 1401 | content: "\f1b1"; 1402 | } 1403 | .fa-cube:before { 1404 | content: "\f1b2"; 1405 | } 1406 | .fa-cubes:before { 1407 | content: "\f1b3"; 1408 | } 1409 | .fa-behance:before { 1410 | content: "\f1b4"; 1411 | } 1412 | .fa-behance-square:before { 1413 | content: "\f1b5"; 1414 | } 1415 | .fa-steam:before { 1416 | content: "\f1b6"; 1417 | } 1418 | .fa-steam-square:before { 1419 | content: "\f1b7"; 1420 | } 1421 | .fa-recycle:before { 1422 | content: "\f1b8"; 1423 | } 1424 | .fa-automobile:before, 1425 | .fa-car:before { 1426 | content: "\f1b9"; 1427 | } 1428 | .fa-cab:before, 1429 | .fa-taxi:before { 1430 | content: "\f1ba"; 1431 | } 1432 | .fa-tree:before { 1433 | content: "\f1bb"; 1434 | } 1435 | .fa-spotify:before { 1436 | content: "\f1bc"; 1437 | } 1438 | .fa-deviantart:before { 1439 | content: "\f1bd"; 1440 | } 1441 | .fa-soundcloud:before { 1442 | content: "\f1be"; 1443 | } 1444 | .fa-database:before { 1445 | content: "\f1c0"; 1446 | } 1447 | .fa-file-pdf-o:before { 1448 | content: "\f1c1"; 1449 | } 1450 | .fa-file-word-o:before { 1451 | content: "\f1c2"; 1452 | } 1453 | .fa-file-excel-o:before { 1454 | content: "\f1c3"; 1455 | } 1456 | .fa-file-powerpoint-o:before { 1457 | content: "\f1c4"; 1458 | } 1459 | .fa-file-photo-o:before, 1460 | .fa-file-picture-o:before, 1461 | .fa-file-image-o:before { 1462 | content: "\f1c5"; 1463 | } 1464 | .fa-file-zip-o:before, 1465 | .fa-file-archive-o:before { 1466 | content: "\f1c6"; 1467 | } 1468 | .fa-file-sound-o:before, 1469 | .fa-file-audio-o:before { 1470 | content: "\f1c7"; 1471 | } 1472 | .fa-file-movie-o:before, 1473 | .fa-file-video-o:before { 1474 | content: "\f1c8"; 1475 | } 1476 | .fa-file-code-o:before { 1477 | content: "\f1c9"; 1478 | } 1479 | .fa-vine:before { 1480 | content: "\f1ca"; 1481 | } 1482 | .fa-codepen:before { 1483 | content: "\f1cb"; 1484 | } 1485 | .fa-jsfiddle:before { 1486 | content: "\f1cc"; 1487 | } 1488 | .fa-life-bouy:before, 1489 | .fa-life-buoy:before, 1490 | .fa-life-saver:before, 1491 | .fa-support:before, 1492 | .fa-life-ring:before { 1493 | content: "\f1cd"; 1494 | } 1495 | .fa-circle-o-notch:before { 1496 | content: "\f1ce"; 1497 | } 1498 | .fa-ra:before, 1499 | .fa-rebel:before { 1500 | content: "\f1d0"; 1501 | } 1502 | .fa-ge:before, 1503 | .fa-empire:before { 1504 | content: "\f1d1"; 1505 | } 1506 | .fa-git-square:before { 1507 | content: "\f1d2"; 1508 | } 1509 | .fa-git:before { 1510 | content: "\f1d3"; 1511 | } 1512 | .fa-hacker-news:before { 1513 | content: "\f1d4"; 1514 | } 1515 | .fa-tencent-weibo:before { 1516 | content: "\f1d5"; 1517 | } 1518 | .fa-qq:before { 1519 | content: "\f1d6"; 1520 | } 1521 | .fa-wechat:before, 1522 | .fa-weixin:before { 1523 | content: "\f1d7"; 1524 | } 1525 | .fa-send:before, 1526 | .fa-paper-plane:before { 1527 | content: "\f1d8"; 1528 | } 1529 | .fa-send-o:before, 1530 | .fa-paper-plane-o:before { 1531 | content: "\f1d9"; 1532 | } 1533 | .fa-history:before { 1534 | content: "\f1da"; 1535 | } 1536 | .fa-genderless:before, 1537 | .fa-circle-thin:before { 1538 | content: "\f1db"; 1539 | } 1540 | .fa-header:before { 1541 | content: "\f1dc"; 1542 | } 1543 | .fa-paragraph:before { 1544 | content: "\f1dd"; 1545 | } 1546 | .fa-sliders:before { 1547 | content: "\f1de"; 1548 | } 1549 | .fa-share-alt:before { 1550 | content: "\f1e0"; 1551 | } 1552 | .fa-share-alt-square:before { 1553 | content: "\f1e1"; 1554 | } 1555 | .fa-bomb:before { 1556 | content: "\f1e2"; 1557 | } 1558 | .fa-soccer-ball-o:before, 1559 | .fa-futbol-o:before { 1560 | content: "\f1e3"; 1561 | } 1562 | .fa-tty:before { 1563 | content: "\f1e4"; 1564 | } 1565 | .fa-binoculars:before { 1566 | content: "\f1e5"; 1567 | } 1568 | .fa-plug:before { 1569 | content: "\f1e6"; 1570 | } 1571 | .fa-slideshare:before { 1572 | content: "\f1e7"; 1573 | } 1574 | .fa-twitch:before { 1575 | content: "\f1e8"; 1576 | } 1577 | .fa-yelp:before { 1578 | content: "\f1e9"; 1579 | } 1580 | .fa-newspaper-o:before { 1581 | content: "\f1ea"; 1582 | } 1583 | .fa-wifi:before { 1584 | content: "\f1eb"; 1585 | } 1586 | .fa-calculator:before { 1587 | content: "\f1ec"; 1588 | } 1589 | .fa-paypal:before { 1590 | content: "\f1ed"; 1591 | } 1592 | .fa-google-wallet:before { 1593 | content: "\f1ee"; 1594 | } 1595 | .fa-cc-visa:before { 1596 | content: "\f1f0"; 1597 | } 1598 | .fa-cc-mastercard:before { 1599 | content: "\f1f1"; 1600 | } 1601 | .fa-cc-discover:before { 1602 | content: "\f1f2"; 1603 | } 1604 | .fa-cc-amex:before { 1605 | content: "\f1f3"; 1606 | } 1607 | .fa-cc-paypal:before { 1608 | content: "\f1f4"; 1609 | } 1610 | .fa-cc-stripe:before { 1611 | content: "\f1f5"; 1612 | } 1613 | .fa-bell-slash:before { 1614 | content: "\f1f6"; 1615 | } 1616 | .fa-bell-slash-o:before { 1617 | content: "\f1f7"; 1618 | } 1619 | .fa-trash:before { 1620 | content: "\f1f8"; 1621 | } 1622 | .fa-copyright:before { 1623 | content: "\f1f9"; 1624 | } 1625 | .fa-at:before { 1626 | content: "\f1fa"; 1627 | } 1628 | .fa-eyedropper:before { 1629 | content: "\f1fb"; 1630 | } 1631 | .fa-paint-brush:before { 1632 | content: "\f1fc"; 1633 | } 1634 | .fa-birthday-cake:before { 1635 | content: "\f1fd"; 1636 | } 1637 | .fa-area-chart:before { 1638 | content: "\f1fe"; 1639 | } 1640 | .fa-pie-chart:before { 1641 | content: "\f200"; 1642 | } 1643 | .fa-line-chart:before { 1644 | content: "\f201"; 1645 | } 1646 | .fa-lastfm:before { 1647 | content: "\f202"; 1648 | } 1649 | .fa-lastfm-square:before { 1650 | content: "\f203"; 1651 | } 1652 | .fa-toggle-off:before { 1653 | content: "\f204"; 1654 | } 1655 | .fa-toggle-on:before { 1656 | content: "\f205"; 1657 | } 1658 | .fa-bicycle:before { 1659 | content: "\f206"; 1660 | } 1661 | .fa-bus:before { 1662 | content: "\f207"; 1663 | } 1664 | .fa-ioxhost:before { 1665 | content: "\f208"; 1666 | } 1667 | .fa-angellist:before { 1668 | content: "\f209"; 1669 | } 1670 | .fa-cc:before { 1671 | content: "\f20a"; 1672 | } 1673 | .fa-shekel:before, 1674 | .fa-sheqel:before, 1675 | .fa-ils:before { 1676 | content: "\f20b"; 1677 | } 1678 | .fa-meanpath:before { 1679 | content: "\f20c"; 1680 | } 1681 | .fa-buysellads:before { 1682 | content: "\f20d"; 1683 | } 1684 | .fa-connectdevelop:before { 1685 | content: "\f20e"; 1686 | } 1687 | .fa-dashcube:before { 1688 | content: "\f210"; 1689 | } 1690 | .fa-forumbee:before { 1691 | content: "\f211"; 1692 | } 1693 | .fa-leanpub:before { 1694 | content: "\f212"; 1695 | } 1696 | .fa-sellsy:before { 1697 | content: "\f213"; 1698 | } 1699 | .fa-shirtsinbulk:before { 1700 | content: "\f214"; 1701 | } 1702 | .fa-simplybuilt:before { 1703 | content: "\f215"; 1704 | } 1705 | .fa-skyatlas:before { 1706 | content: "\f216"; 1707 | } 1708 | .fa-cart-plus:before { 1709 | content: "\f217"; 1710 | } 1711 | .fa-cart-arrow-down:before { 1712 | content: "\f218"; 1713 | } 1714 | .fa-diamond:before { 1715 | content: "\f219"; 1716 | } 1717 | .fa-ship:before { 1718 | content: "\f21a"; 1719 | } 1720 | .fa-user-secret:before { 1721 | content: "\f21b"; 1722 | } 1723 | .fa-motorcycle:before { 1724 | content: "\f21c"; 1725 | } 1726 | .fa-street-view:before { 1727 | content: "\f21d"; 1728 | } 1729 | .fa-heartbeat:before { 1730 | content: "\f21e"; 1731 | } 1732 | .fa-venus:before { 1733 | content: "\f221"; 1734 | } 1735 | .fa-mars:before { 1736 | content: "\f222"; 1737 | } 1738 | .fa-mercury:before { 1739 | content: "\f223"; 1740 | } 1741 | .fa-transgender:before { 1742 | content: "\f224"; 1743 | } 1744 | .fa-transgender-alt:before { 1745 | content: "\f225"; 1746 | } 1747 | .fa-venus-double:before { 1748 | content: "\f226"; 1749 | } 1750 | .fa-mars-double:before { 1751 | content: "\f227"; 1752 | } 1753 | .fa-venus-mars:before { 1754 | content: "\f228"; 1755 | } 1756 | .fa-mars-stroke:before { 1757 | content: "\f229"; 1758 | } 1759 | .fa-mars-stroke-v:before { 1760 | content: "\f22a"; 1761 | } 1762 | .fa-mars-stroke-h:before { 1763 | content: "\f22b"; 1764 | } 1765 | .fa-neuter:before { 1766 | content: "\f22c"; 1767 | } 1768 | .fa-facebook-official:before { 1769 | content: "\f230"; 1770 | } 1771 | .fa-pinterest-p:before { 1772 | content: "\f231"; 1773 | } 1774 | .fa-whatsapp:before { 1775 | content: "\f232"; 1776 | } 1777 | .fa-server:before { 1778 | content: "\f233"; 1779 | } 1780 | .fa-user-plus:before { 1781 | content: "\f234"; 1782 | } 1783 | .fa-user-times:before { 1784 | content: "\f235"; 1785 | } 1786 | .fa-hotel:before, 1787 | .fa-bed:before { 1788 | content: "\f236"; 1789 | } 1790 | .fa-viacoin:before { 1791 | content: "\f237"; 1792 | } 1793 | .fa-train:before { 1794 | content: "\f238"; 1795 | } 1796 | .fa-subway:before { 1797 | content: "\f239"; 1798 | } 1799 | .fa-medium:before { 1800 | content: "\f23a"; 1801 | } 1802 | -------------------------------------------------------------------------------- /k8s-webshell/static/css/fullscreen.css: -------------------------------------------------------------------------------- 1 | .xterm.fullscreen { 2 | position: fixed; 3 | top: 0; 4 | bottom: 0; 5 | left: 0; 6 | right: 0; 7 | width: auto; 8 | height: auto; 9 | z-index: 255; 10 | } 11 | -------------------------------------------------------------------------------- /k8s-webshell/static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /k8s-webshell/static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /k8s-webshell/static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /k8s-webshell/static/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /k8s-webshell/static/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/img/favicon.ico -------------------------------------------------------------------------------- /k8s-webshell/static/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/img/logo.png -------------------------------------------------------------------------------- /k8s-webshell/static/js/analysis.js: -------------------------------------------------------------------------------- 1 | /* Copyright (c) 2010 Brandon Aaron (http://brandonaaron.net) 2 | * Dual licensed under the MIT (MIT_LICENSE.txt) 3 | * and GPL Version 2 (GPL_LICENSE.txt) licenses. 4 | * 5 | * Version: 1.1.1 6 | * Requires jQuery 1.3+ 7 | * Docs: http://docs.jquery.com/Plugins/livequery 8 | */ 9 | (function(a){a.extend(a.fn,{livequery:function(e,d,c){var b=this,f;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(g,h){if(b.selector==h.selector&&b.context==h.context&&e==h.type&&(!d||d.$lqguid==h.fn.$lqguid)&&(!c||c.$lqguid==h.fn2.$lqguid)){return(f=h)&&false}});f=f||new a.livequery(this.selector,this.context,e,d,c);f.stopped=false;f.run();return this},expire:function(e,d,c){var b=this;if(a.isFunction(e)){c=d,d=e,e=undefined}a.each(a.livequery.queries,function(f,g){if(b.selector==g.selector&&b.context==g.context&&(!e||e==g.type)&&(!d||d.$lqguid==g.fn.$lqguid)&&(!c||c.$lqguid==g.fn2.$lqguid)&&!this.stopped){a.livequery.stop(g.id)}});return this}});a.livequery=function(b,d,f,e,c){this.selector=b;this.context=d;this.type=f;this.fn=e;this.fn2=c;this.elements=[];this.stopped=false;this.id=a.livequery.queries.push(this)-1;e.$lqguid=e.$lqguid||a.livequery.guid++;if(c){c.$lqguid=c.$lqguid||a.livequery.guid++}return this};a.livequery.prototype={stop:function(){var b=this;if(this.type){this.elements.unbind(this.type,this.fn)}else{if(this.fn2){this.elements.each(function(c,d){b.fn2.apply(d)})}}this.elements=[];this.stopped=true},run:function(){if(this.stopped){return}var d=this;var e=this.elements,c=a(this.selector,this.context),b=c.not(e);this.elements=c;if(this.type){b.bind(this.type,this.fn);if(e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){a.event.remove(g,d.type,d.fn)}})}}else{b.each(function(){d.fn.apply(this)});if(this.fn2&&e.length>0){a.each(e,function(f,g){if(a.inArray(g,c)<0){d.fn2.apply(g)}})}}}};a.extend(a.livequery,{guid:0,queries:[],queue:[],running:false,timeout:null,checkQueue:function(){if(a.livequery.running&&a.livequery.queue.length){var b=a.livequery.queue.length;while(b--){a.livequery.queries[a.livequery.queue.shift()].run()}}},pause:function(){a.livequery.running=false},play:function(){a.livequery.running=true;a.livequery.run()},registerPlugin:function(){a.each(arguments,function(c,d){if(!a.fn[d]){return}var b=a.fn[d];a.fn[d]=function(){var e=b.apply(this,arguments);a.livequery.run();return e}})},run:function(b){if(b!=undefined){if(a.inArray(b,a.livequery.queue)<0){a.livequery.queue.push(b)}}else{a.each(a.livequery.queries,function(c){if(a.inArray(c,a.livequery.queue)<0){a.livequery.queue.push(c)}})}if(a.livequery.timeout){clearTimeout(a.livequery.timeout)}a.livequery.timeout=setTimeout(a.livequery.checkQueue,20)},stop:function(b){if(b!=undefined){a.livequery.queries[b].stop()}else{a.each(a.livequery.queries,function(c){a.livequery.queries[c].stop()})}}});a.livequery.registerPlugin("append","prepend","after","before","wrap","attr","removeAttr","addClass","removeClass","toggleClass","empty","remove","html");a(function(){a.livequery.play()})})(jQuery); 10 | 11 | //统计页面点击量(系统应用不添加) 12 | $(function(){ 13 | var location = window.location.href; 14 | //例如: list = ["http:", "", "app.o.tencent.com", "test", "server_manage", ""] 15 | var list = location.split('/'); 16 | /* 17 | * 活跃度统计(内建应用进行统计) 18 | */ 19 | //根据window url 判断app_code 20 | console.log(list[2]) 21 | if(list[2] == 'app.o.tencent.com' || list[2] == 'app.o.bkclouds.cc' || list[2] == 'cc.o.bkclouds.cc' || list[2] == 'job.o.bkclouds.cc'){ 22 | // 内建应用,记录活跃度 23 | if (list[2] == 'cc.o.bkclouds.cc'){ 24 | var app_code_analysis = 'cc'; 25 | }else if (list[2] == 'job.o.bkclouds.cc'){ 26 | var app_code_analysis = 'job_clouds'; 27 | }if(list.length >= 4 && list[3] != "test"){ 28 | var app_code_analysis = list[3]; 29 | }else if(list.length >= 4 && list[3] == "test"){ 30 | var app_code_analysis = list[4]; 31 | }else{ 32 | var app_code_analysis = 'workbench'; 33 | } 34 | // 绑定点击事件 35 | $("a, button, input:button, input:submit, .btn") 36 | .livequery('click', function() { 37 | console.log('app_code_analysis:' + app_code_analysis) 38 | try{ 39 | // 调用统计接口 40 | window.top.app_click_record(app_code_analysis, 1); 41 | }catch(err){ 42 | var msg = {operation: 'app_click_record', 43 | app_code: app_code_analysis} 44 | window.top.postMessage(JSON.stringify(msg),'*') 45 | } 46 | }); 47 | }else{ 48 | //平台和系统应用 49 | var app_code_analysis = 'workbench'; 50 | } 51 | 52 | /* 53 | * 在线时长统计,平台、系统应用及内建应用都使用 54 | */ 55 | //离线时间限制为2分钟(默认,后台可配) 56 | try{ 57 | var time_limit = parseInt(window.top.user_online_time) ? parseInt(window.top.user_online_time) : 12000; 58 | }catch(err){ 59 | var time_limit = 12000; 60 | } 61 | //默认激活时间、失去焦点时间、最后活动时间均为当前时间 62 | var as_date_now = new Date(); 63 | var as_s_time = as_date_now, 64 | as_e_time = as_date_now, 65 | as_l_active = as_date_now; 66 | 67 | //获取浏览器来源 TODO 68 | //var browser_type = _judge_browser_from(); 69 | 70 | //页面激活 71 | window.onfocus = function(){ 72 | as_date_now = new Date(); //当前时间 73 | as_s_time = as_date_now; //激活时间 74 | //逻辑判断,激活时间与上次失效时间间隔小于等于两分钟,认为是在线状态,统计,否则为离线状态,不统计 75 | var short_time = as_s_time - as_e_time; 76 | //保存在线时间(时间差大于0且小于2分钟,则记录cookie) 77 | if(short_time <= time_limit && short_time > 0){ 78 | try{ 79 | window.top.app_online_record(app_code_analysis, short_time); 80 | }catch(err){ 81 | console.log('window.onfocus:'+short_time) 82 | var msg = {operation: 'app_online_record', 83 | app_code: app_code_analysis, 84 | short_time:short_time } 85 | window.top.postMessage(JSON.stringify(msg),'*') 86 | } 87 | } 88 | // 失去焦点的时间、最后活动时间调为和激活时间一致 89 | as_e_time = as_date_now; 90 | as_l_active = as_date_now; 91 | } 92 | 93 | //页面失去焦点 94 | window.onblur = function(){ 95 | as_date_now = new Date(); //当前时间 96 | as_e_time = as_date_now; //刷新失去焦点的时间 97 | //逻辑判断,最后活动时间与现在时间比较,大于2分钟,则记录最后活动时间与激活时间的差值,否则记录失去焦点时间和激活时间差值 98 | if(as_date_now - as_l_active > time_limit){ 99 | //保存在线时间(最后活动时间与激活时间差,大于0保存) 100 | if(as_l_active - as_s_time > 0){ 101 | try{ 102 | window.top.app_online_record(app_code_analysis, as_l_active - as_s_time); 103 | }catch(err){ 104 | console.log('window.onblur:'+(as_l_active - as_s_time)) 105 | var msg = {operation: 'app_online_record', 106 | app_code: app_code_analysis, 107 | short_time:as_l_active - as_s_time } 108 | window.top.postMessage(JSON.stringify(msg),'*') 109 | } 110 | } 111 | }else{ 112 | //保存在线时间(失去焦点时间与激活时间差,大于0保存) 113 | if(as_e_time - as_s_time > 0){ 114 | try{ 115 | window.top.app_online_record(app_code_analysis, as_e_time - as_s_time); 116 | }catch(err){ 117 | console.log('window.onblur:'+(as_e_time - as_s_time)) 118 | var msg = {operation: 'app_online_record', 119 | app_code: app_code_analysis, 120 | short_time: as_e_time - as_s_time } 121 | window.top.postMessage(JSON.stringify(msg),'*') 122 | } 123 | } 124 | } 125 | //变量重置 126 | as_s_time = as_date_now; 127 | as_e_time = as_date_now; 128 | as_l_active = as_date_now; 129 | } 130 | 131 | //页面关闭或刷新(判断方法同失去焦点) 132 | window.onunload = function (){ 133 | as_date_now = new Date(); //当前时间 134 | as_e_time = as_date_now; //刷新失去焦点的时间 135 | //逻辑判断,最后活动时间与现在时间比较,大于2分钟,则记录最后时间与激活时间的差值,否则记录失去焦点时间和激活时间差值 136 | if(as_date_now - as_l_active > time_limit){ 137 | //保存在线时间(最后活动时间与激活时间差,大于0保存) 138 | if(as_l_active - as_s_time > 0){ 139 | try{ 140 | window.top.app_online_record(app_code_analysis, as_l_active - as_s_time); 141 | }catch(err){ 142 | console.log('window.onunload2:'+(as_l_active - as_s_time)) 143 | var msg = {operation: 'app_online_record', 144 | app_code: app_code_analysis, 145 | short_time: as_l_active - as_s_time } 146 | window.top.postMessage(JSON.stringify(msg),'*') 147 | } 148 | } 149 | }else{ 150 | //保存在线时间(失去焦点时间与激活时间差,大于0保存) 151 | if(as_e_time - as_s_time > 0){ 152 | try{ 153 | window.top.app_online_record(app_code_analysis, as_e_time - as_s_time); 154 | }catch(err){ 155 | console.log('window.onunload1:'+(as_e_time - as_s_time)) 156 | var msg = {operation: 'app_online_record', 157 | app_code: app_code_analysis, 158 | short_time: as_e_time - as_s_time } 159 | window.top.postMessage(JSON.stringify(msg),'*') 160 | } 161 | } 162 | } 163 | //变量重置 164 | as_s_time = as_date_now; 165 | as_e_time = as_date_now; 166 | as_l_active = as_date_now; 167 | } 168 | 169 | //页面有click活动,防止长时间页面不活动 170 | window.onclick = function(){ 171 | as_date_now = new Date(); //当前时间 172 | //最后活动时间与现在时间比较,大于2分钟,则记录最后时间与激活时间的差值,否则更新最后活动时间 173 | if(as_date_now - as_l_active > time_limit){ 174 | //保存在线时间(最后活动时间与激活时间差,大于0保存) 175 | if(as_l_active - as_s_time > 0){ 176 | try{ 177 | console.log('window.onclick:'+(as_l_active - as_s_time)) 178 | window.top.app_online_record(app_code_analysis, as_l_active - as_s_time); 179 | }catch(err){ 180 | console.log('window.onclick:'+(as_l_active - as_s_time)) 181 | var msg = {operation: 'app_online_record', 182 | app_code: app_code_analysis, 183 | short_time: as_l_active - as_s_time } 184 | window.top.postMessage(JSON.stringify(msg),'*') 185 | } 186 | } 187 | //更新激活时间和失去焦点时间为当前时间 188 | as_s_time = as_date_now; 189 | as_e_time = as_date_now; 190 | } 191 | //最后活动时间重置 192 | as_l_active = as_date_now; 193 | } 194 | 195 | }); 196 | 197 | 198 | //判断浏览器来源,0:PC,1:phone,2:ipad 199 | function _judge_browser_from(){ 200 | var browser = navigator.userAgent.toLowerCase(); 201 | if(browser.indexOf('ipad') > 0 && browser.indexOf('iphone') > 0){ 202 | return 2; 203 | }else if((browser.indexOf('linux') > 0 && browser.indexOf('android') > 0) || browser.indexOf('iphone') > 0){ 204 | return 1; 205 | }else{ 206 | return 0; 207 | } 208 | } 209 | 210 | -------------------------------------------------------------------------------- /k8s-webshell/static/js/bk.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/du2016/web-terminal-in-go/9957b78a58dba9d29202420b31f767ccb4beed7d/k8s-webshell/static/js/bk.js -------------------------------------------------------------------------------- /k8s-webshell/static/js/bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.5 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under the MIT license 5 | */ 6 | if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.5",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.5",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.5",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.5",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger("hidden.bs.dropdown",f))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.5",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger("shown.bs.dropdown",h)}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.5",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.5",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.5",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); -------------------------------------------------------------------------------- /k8s-webshell/static/js/fullscreen.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Fullscreen addon for xterm.js 3 | * @module xterm/addons/fullscreen/fullscreen 4 | * @license MIT 5 | */ 6 | (function (fullscreen) { 7 | if (typeof exports === 'object' && typeof module === 'object') { 8 | /* 9 | * CommonJS environment 10 | */ 11 | module.exports = fullscreen(require('../../Terminal').Terminal); 12 | } else if (typeof define == 'function') { 13 | /* 14 | * Require.js is available 15 | */ 16 | define(['../../xterm'], fullscreen); 17 | } else { 18 | /* 19 | * Plain browser environment 20 | */ 21 | fullscreen(window.Terminal); 22 | } 23 | })(function (Terminal) { 24 | var exports = {}; 25 | 26 | /** 27 | * Toggle the given terminal's fullscreen mode. 28 | * @param {Terminal} term - The terminal to toggle full screen mode 29 | * @param {boolean} fullscreen - Toggle fullscreen on (true) or off (false) 30 | */ 31 | exports.toggleFullScreen = function (term, fullscreen) { 32 | var fn; 33 | 34 | if (typeof fullscreen == 'undefined') { 35 | fn = (term.element.classList.contains('fullscreen')) ? 'remove' : 'add'; 36 | } else if (!fullscreen) { 37 | fn = 'remove'; 38 | } else { 39 | fn = 'add'; 40 | } 41 | 42 | term.element.classList[fn]('fullscreen'); 43 | }; 44 | 45 | Terminal.prototype.toggleFullscreen = function (fullscreen) { 46 | exports.toggleFullScreen(this, fullscreen); 47 | }; 48 | 49 | return exports; 50 | }); 51 | -------------------------------------------------------------------------------- /k8s-webshell/static/js/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b)}(this,document); -------------------------------------------------------------------------------- /k8s-webshell/static/js/reload.min.js: -------------------------------------------------------------------------------- 1 | function b(a){var c=new WebSocket(a);c.onclose=function(){setTimeout(function(){b(a)},2E3)};c.onmessage=function(){location.reload()}}try{if(window.WebSocket)try{b("ws://localhost:12450/reload")}catch(a){console.error(a)}else console.log("Your browser does not support WebSockets.")}catch(a){console.error("Exception during connecting to Reload:",a)}; 2 | -------------------------------------------------------------------------------- /k8s-webshell/views/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | -------------------------------------------------------------------------------- /k8s-webshell/views/terminal.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 33 | 34 | 35 | 36 |
37 | 38 |
39 |
40 |
41 |
42 | 113 | 114 | 115 | --------------------------------------------------------------------------------