mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-09 12:27:52 +00:00
Combine two subpackages and consolidate doc.go into filestystem.go for simplicity.
This commit is contained in:
parent
0a6f2d07f6
commit
b36e8c7a14
5 changed files with 10 additions and 12 deletions
|
|
@ -42,9 +42,6 @@ import (
|
|||
"github.com/pilosa/pilosa/pql"
|
||||
|
||||
"unicode"
|
||||
|
||||
// Allow building Pilosa without the web UI.
|
||||
_ "github.com/pilosa/pilosa/statik"
|
||||
)
|
||||
|
||||
// Handler represents an HTTP handler.
|
||||
|
|
@ -289,13 +286,13 @@ func (h *Handler) handleWebUI(w http.ResponseWriter, r *http.Request) {
|
|||
http.Error(w, "Welcome. Pilosa is running. Visit https://www.pilosa.com/docs/ for more information or try the WebUI by visiting this URL in your browser.", http.StatusNotFound)
|
||||
return
|
||||
}
|
||||
statikFS, err := h.FileSystem.New()
|
||||
filesystem, err := h.FileSystem.New()
|
||||
if err != nil {
|
||||
h.writeQueryResponse(w, r, &QueryResponse{Err: err})
|
||||
h.logger().Println("Pilosa WebUI is not available. Please run `make generate-statik` before building Pilosa with `make install`.")
|
||||
return
|
||||
}
|
||||
http.FileServer(statikFS).ServeHTTP(w, r)
|
||||
http.FileServer(filesystem).ServeHTTP(w, r)
|
||||
}
|
||||
|
||||
// handleGetSchema handles GET /schema requests.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import (
|
|||
"github.com/pilosa/pilosa"
|
||||
"github.com/pilosa/pilosa/internal"
|
||||
"github.com/pilosa/pilosa/pql"
|
||||
statik "github.com/pilosa/pilosa/statik/filesystem"
|
||||
"github.com/pilosa/pilosa/statik"
|
||||
"github.com/pilosa/pilosa/test"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ import (
|
|||
"github.com/pilosa/pilosa"
|
||||
"github.com/pilosa/pilosa/gcnotify"
|
||||
"github.com/pilosa/pilosa/gossip"
|
||||
statik "github.com/pilosa/pilosa/statik/filesystem"
|
||||
"github.com/pilosa/pilosa/statik"
|
||||
"github.com/pilosa/pilosa/statsd"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
// Package statik contains static assets for the Web UI. `go generate` will
|
||||
// produce statik.go, which is ignored by git.
|
||||
//go:generate statik -src=../webui -dest=..
|
||||
package statik
|
||||
|
|
@ -11,8 +11,13 @@
|
|||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
//go:generate statik -src=../webui -dest=..
|
||||
//
|
||||
// Package statik contains static assets for the Web UI. `go generate` or
|
||||
// `make generate-statik` will produce statik.go, which is ignored by git.
|
||||
|
||||
package filesystem
|
||||
package statik
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
Loading…
Add table
Reference in a new issue