diff --git a/core/resource_test.go b/core/resource_test.go index 7e053c2..b3764b3 100644 --- a/core/resource_test.go +++ b/core/resource_test.go @@ -60,7 +60,7 @@ func Test_prepareImport(t *testing.T) { } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := prepareImport(tt.args.proto, ""); !reflect.DeepEqual(got, tt.want) { + if got := prepareImport(tt.args.proto); !reflect.DeepEqual(got, tt.want) { t.Errorf("prepareImport() = %v, want %v", string(got), string(tt.want)) diff --git a/handler/routes.go b/handler/routes.go index 4e5c27c..b949737 100644 --- a/handler/routes.go +++ b/handler/routes.go @@ -29,6 +29,7 @@ func Init(router *mux.Router) { router.PathPrefix("/js/").Handler(http.StripPrefix("/js/", http.FileServer(http.Dir(assetsPath+"/js/")))) router.PathPrefix("/font/").Handler(http.StripPrefix("/font/", http.FileServer(http.Dir(assetsPath+"/font/")))) router.PathPrefix("/img/").Handler(http.StripPrefix("/img/", http.FileServer(http.Dir(assetsPath+"/img/")))) + router.PathPrefix("/database/").Handler(http.StripPrefix("/database/", http.FileServer(http.Dir(assetsPath+"/database/")))) } func corsHandler(h http.HandlerFunc) http.HandlerFunc { diff --git a/index/css/style.css b/index/css/style.css index ae61674..c3a18a5 100644 --- a/index/css/style.css +++ b/index/css/style.css @@ -1,59 +1,77 @@ +html { + min-height: 100%; +} + body { + min-height: 100%; +} + +.mt-10 { + margin-top: 10px; +} + +.pt-50 { + padding-top: 50px; +} + +.pb-50 { padding-bottom: 50px; } -.mt-10 { - margin-top:10px; -} -.pt-50 { - padding-top:50px; -} + .w-120 { width: 120px; } + .custom-pretty { - border:none!important; + border: none!important; } + .custom-control-label:hover { cursor: pointer; } + #choose-service, #choose-function, #body-request { margin-top: 40px; } + .schema-body { height: 250px; overflow-y: scroll; } + #response { margin-top: 30px; } /* github corner */ -.github-corner:hover .octo-arm{ - animation:octocat-wave 560ms ease-in-out + +.github-corner:hover .octo-arm { + animation: octocat-wave 560ms ease-in-out } -@keyframes octocat-wave{ - 0%,100%{ - transform:rotate(0) + +@keyframes octocat-wave { + 0%, 100% { + transform: rotate(0) } - 20%,60%{ - transform:rotate(-25deg) + 20%, 60% { + transform: rotate(-25deg) } - 40%,80%{ - transform:rotate(10deg) + 40%, 80% { + transform: rotate(10deg) } } -@media (max-width:500px){ - .github-corner:hover .octo-arm{ - animation:none +@media (max-width:500px) { + .github-corner:hover .octo-arm { + animation: none } - - .github-corner .octo-arm{ - animation:octocat-wave 560ms ease-in-out + .github-corner .octo-arm { + animation: octocat-wave 560ms ease-in-out } } /* connections */ + .connections { font-weight: 100; background: #efefef; @@ -62,8 +80,8 @@ body { position: fixed; top: 200px; z-index: 100; - -webkit-box-shadow: -3px 0px 5px 0px rgba(0,0,0,0.2); - box-shadow: -3px 0px 5px 0px rgba(0,0,0,0.2); + -webkit-box-shadow: -3px 0px 5px 0px rgba(0, 0, 0, 0.2); + box-shadow: -3px 0px 5px 0px rgba(0, 0, 0, 0.2); left: -190px; transition: all .3s; -webkit-transition: all .3s; @@ -110,7 +128,9 @@ body { cursor: pointer; } -.connections .nav li a:hover { color: #aaa } +.connections .nav li a:hover { + color: #aaa +} .dots { position: absolute; @@ -149,6 +169,7 @@ circle { } /* loading spinner */ + .spinner { margin: 10px auto; width: 180px; @@ -157,12 +178,11 @@ circle { font-size: 80px; } -.spinner > div { +.spinner>div { background-color: #59698d; height: 100%; width: 18px; display: inline-block; - -webkit-animation: sk-stretchdelay 1.2s infinite ease-in-out; animation: sk-stretchdelay 1.2s infinite ease-in-out; } @@ -188,15 +208,20 @@ circle { } @-webkit-keyframes sk-stretchdelay { - 0%, 40%, 100% { -webkit-transform: scaleY(0.4) } - 20% { -webkit-transform: scaleY(1.0) } + 0%, 40%, 100% { + -webkit-transform: scaleY(0.4) + } + 20% { + -webkit-transform: scaleY(1.0) + } } @keyframes sk-stretchdelay { 0%, 40%, 100% { transform: scaleY(0.4); -webkit-transform: scaleY(0.4); - } 20% { + } + 20% { transform: scaleY(1.0); -webkit-transform: scaleY(1.0); } diff --git a/index/database/database.json b/index/database/database.json new file mode 100644 index 0000000..e3d651a --- /dev/null +++ b/index/database/database.json @@ -0,0 +1,10 @@ +[ + { + "name": "Example 1", + "ip": "localhost:8000" + }, + { + "name": "Example 2", + "ip": "localhost:8585" + } +] \ No newline at end of file diff --git a/index/index.html b/index/index.html index 9896a5c..6bcca19 100644 --- a/index/index.html +++ b/index/index.html @@ -1,5 +1,6 @@ +
@@ -14,98 +15,135 @@ -