[build] fix src/* imports (#27)

[build] fix src/* imports

Co-authored-by: Kassian Sun <kassiansun@outlook.com>
This commit is contained in:
sunjiacheng 2023-02-21 21:48:20 +08:00 committed by medcl
parent 34feba31a6
commit fc8a47373a
4 changed files with 34 additions and 30 deletions

View File

@ -6,14 +6,15 @@ package alerting
import ( import (
"fmt" "fmt"
"net/http"
"strconv"
"strings"
log "github.com/cihub/seelog"
"infini.sh/console/model/alerting" "infini.sh/console/model/alerting"
httprouter "infini.sh/framework/core/api/router" httprouter "infini.sh/framework/core/api/router"
"infini.sh/framework/core/orm" "infini.sh/framework/core/orm"
"infini.sh/framework/core/util" "infini.sh/framework/core/util"
"net/http"
log "src/github.com/cihub/seelog"
"strconv"
"strings"
) )
func (h *AlertAPI) createChannel(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { func (h *AlertAPI) createChannel(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
@ -140,7 +141,7 @@ func (h *AlertAPI) deleteChannel(w http.ResponseWriter, req *http.Request, ps ht
} }
h.WriteJSON(w, util.MapStr{ h.WriteJSON(w, util.MapStr{
"ids": reqBody.ChannelIDs , "ids": reqBody.ChannelIDs,
"result": "deleted", "result": "deleted",
}, 200) }, 200)
} }

View File

@ -5,13 +5,14 @@
package insight package insight
import ( import (
"net/http"
"strconv"
log "github.com/cihub/seelog"
httprouter "infini.sh/framework/core/api/router" httprouter "infini.sh/framework/core/api/router"
"infini.sh/framework/core/insight" "infini.sh/framework/core/insight"
"infini.sh/framework/core/orm" "infini.sh/framework/core/orm"
"infini.sh/framework/core/util" "infini.sh/framework/core/util"
"net/http"
log "src/github.com/cihub/seelog"
"strconv"
) )
func (h *InsightAPI) createDashboard(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { func (h *InsightAPI) createDashboard(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {
@ -163,7 +164,7 @@ func (h *InsightAPI) searchDashboard(w http.ResponseWriter, req *http.Request, p
if keyword != "" { if keyword != "" {
must = append(must, util.MapStr{ must = append(must, util.MapStr{
"query_string": util.MapStr{ "query_string": util.MapStr{
"default_field":"*", "default_field": "*",
"query": keyword, "query": keyword,
}, },
}) })

View File

@ -6,14 +6,15 @@ package insight
import ( import (
"fmt" "fmt"
"net/http"
"strconv"
"strings"
log "github.com/cihub/seelog"
httprouter "infini.sh/framework/core/api/router" httprouter "infini.sh/framework/core/api/router"
"infini.sh/framework/core/insight" "infini.sh/framework/core/insight"
"infini.sh/framework/core/orm" "infini.sh/framework/core/orm"
"infini.sh/framework/core/util" "infini.sh/framework/core/util"
"net/http"
log "src/github.com/cihub/seelog"
"strconv"
"strings"
) )
func (h *InsightAPI) createVisualization(w http.ResponseWriter, req *http.Request, ps httprouter.Params) { func (h *InsightAPI) createVisualization(w http.ResponseWriter, req *http.Request, ps httprouter.Params) {

View File

@ -5,12 +5,13 @@
package alerting package alerting
import ( import (
"time"
log "github.com/cihub/seelog"
"infini.sh/console/model/alerting" "infini.sh/console/model/alerting"
"infini.sh/framework/core/orm" "infini.sh/framework/core/orm"
"infini.sh/framework/core/task" "infini.sh/framework/core/task"
"infini.sh/framework/core/util" "infini.sh/framework/core/util"
log "src/github.com/cihub/seelog"
"time"
) )
func InitTasks() error { func InitTasks() error {