@@ -344,13 +344,3 @@ func subMonth(t1, t2 time.Time) (month int) { | |||||
month = yearInterval*12 + monthInterval | month = yearInterval*12 + monthInterval | ||||
return month | return month | ||||
} | } | ||||
func QueryAllRepo() []*Repository { | |||||
sess := x.NewSession() | |||||
defer sess.Close() | |||||
sess.Select("*").Table("repository") | |||||
repositoryList := make([]*Repository, 0) | |||||
sess.Find(&repositoryList) | |||||
return repositoryList | |||||
} |
@@ -18,7 +18,11 @@ func TimeingCountData() { | |||||
yesterday := currentTimeNow.AddDate(0, 0, -1) | yesterday := currentTimeNow.AddDate(0, 0, -1) | ||||
repoList := models.QueryAllRepo() | |||||
repoList, err := models.GetAllRepositories() | |||||
if err != nil { | |||||
log.Error("query repo error.") | |||||
return | |||||
} | |||||
log.Info("start to query wiki data") | log.Info("start to query wiki data") | ||||
for _, repoRecord := range repoList { | for _, repoRecord := range repoList { | ||||
wikiPath := models.WikiPath(repoRecord.OwnerName, repoRecord.Name) | wikiPath := models.WikiPath(repoRecord.OwnerName, repoRecord.Name) | ||||
@@ -1,12 +1,12 @@ | |||||
<div class="repos--seach"> | <div class="repos--seach"> | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="ui two column centered grid"> | <div class="ui two column centered grid"> | ||||
<form class="mobile ten wide tablet computer column ui form ignore-dirty"> | |||||
<form class="fourteen wide mobile ten wide tablet ten wide computer column ui form ignore-dirty"> | |||||
<div class="ui fluid action input"> | <div class="ui fluid action input"> | ||||
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | ||||
<input type="hidden" name="tab" value="{{$.TabName}}"> | <input type="hidden" name="tab" value="{{$.TabName}}"> | ||||
<input type="hidden" name="sort" value="{{$.SortType}}"> | <input type="hidden" name="sort" value="{{$.SortType}}"> | ||||
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> | |||||
<button class="ui green button">{{.i18n.Tr "explore.search"}}</button> | |||||
</div> | </div> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
@@ -1,11 +1,11 @@ | |||||
<div class="repos--seach"> | <div class="repos--seach"> | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="ui two column centered grid"> | <div class="ui two column centered grid"> | ||||
<form class="sixteen wide mobile eight fourteen tablet fourteen wide computer column ui form ignore-dirty"> | |||||
<form class="fourteen wide mobile ten wide tablet ten wide computer column ui form ignore-dirty"> | |||||
<div class="ui fluid action input"> | <div class="ui fluid action input"> | ||||
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | ||||
<input type="hidden" name="tab" value="{{$.TabName}}"> | <input type="hidden" name="tab" value="{{$.TabName}}"> | ||||
<button class="ui blue button">{{.i18n.Tr "explore.search"}}</button> | |||||
<button class="ui green button">{{.i18n.Tr "explore.search"}}</button> | |||||
</div> | </div> | ||||
</form> | </form> | ||||
</div> | </div> | ||||
@@ -37,7 +37,7 @@ | |||||
</div> | </div> | ||||
{{if .Permission.CanWrite $.UnitTypeDatasets}} | {{if .Permission.CanWrite $.UnitTypeDatasets}} | ||||
<div class="column four wide right aligned"> | <div class="column four wide right aligned"> | ||||
<a class="ui button primary" href="javascript:void(0)" id="dataset-edit"> | |||||
<a class="ui green button" href="javascript:void(0)" id="dataset-edit"> | |||||
{{.i18n.Tr "dataset.edit"}} | {{.i18n.Tr "dataset.edit"}} | ||||
</a> | </a> | ||||
</div> | </div> | ||||
@@ -66,7 +66,7 @@ | |||||
<input name="type" value="{{.Type}}" type="hidden" /> | <input name="type" value="{{.Type}}" type="hidden" /> | ||||
<div class="sixteen wide column"> | <div class="sixteen wide column"> | ||||
<a class="ui button" id="cancel">{{.i18n.Tr "cancel"}}</a> | <a class="ui button" id="cancel">{{.i18n.Tr "cancel"}}</a> | ||||
<button class="ui primary button" id="submit">{{.i18n.Tr "dataset.update_dataset"}}</button> | |||||
<button class="ui green button" id="submit">{{.i18n.Tr "dataset.update_dataset"}}</button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -7,7 +7,7 @@ | |||||
<input type="hidden" name="assignee" value="{{$.AssigneeID}}"/> | <input type="hidden" name="assignee" value="{{$.AssigneeID}}"/> | ||||
<div class="ui search action input"> | <div class="ui search action input"> | ||||
<input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | <input name="q" value="{{.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | ||||
<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button> | |||||
<button class="ui green button" type="submit">{{.i18n.Tr "explore.search"}}</button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</form> | </form> |
@@ -74,7 +74,7 @@ | |||||
<input type="hidden" name="state" value="{{$.State}}"/> | <input type="hidden" name="state" value="{{$.State}}"/> | ||||
<div class="ui search action input"> | <div class="ui search action input"> | ||||
<input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | <input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}..." autofocus> | ||||
<button class="ui blue button" type="submit">{{.i18n.Tr "explore.search"}}</button> | |||||
<button class="ui green button" type="submit">{{.i18n.Tr "explore.search"}}</button> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</form> | </form> | ||||