mirror of
https://github.com/gravitl/netmaker.git
synced 2025-10-05 08:47:35 +08:00
New Docs (#3034)
* New Docs CSS update and Dockerfile to include docs folder flash of unrendered text fix markdown docs ignore docs/docs.go improving the docs generation github actions for docs generation go runner version fix updated docs.yml update repo action updated updated actions and dns docs dns complete More docs update Complete docs and updated workflow Update documentation Tue Aug 6 11:17:42 UTC 2024 Update documentation Thu Aug 8 12:26:57 UTC 2024 clean up clean up Dockerfile clean up Updated workflow Updated workflow Update docs.yml Update docs.yml * requested changes * changed ingress gateway to remote access gateway
This commit is contained in:
@@ -102,18 +102,12 @@ func getUsage(w http.ResponseWriter, _ *http.Request) {
|
||||
})
|
||||
}
|
||||
|
||||
// swagger:route GET /api/server/status server getStatus
|
||||
//
|
||||
// Get the server configuration.
|
||||
//
|
||||
// Schemes: https
|
||||
//
|
||||
// Security:
|
||||
// oauth
|
||||
//
|
||||
// Responses:
|
||||
// 200: serverConfigResponse
|
||||
// @Summary Get the server status
|
||||
// @Router /api/server/status [get]
|
||||
// @Tags Server
|
||||
// @Security oauth2
|
||||
func getStatus(w http.ResponseWriter, r *http.Request) {
|
||||
// @Success 200 {object} status
|
||||
type status struct {
|
||||
DB bool `json:"db_connected"`
|
||||
Broker bool `json:"broker_connected"`
|
||||
@@ -131,7 +125,8 @@ func getStatus(w http.ResponseWriter, r *http.Request) {
|
||||
var trialEndDate time.Time
|
||||
var err error
|
||||
isOnTrial := false
|
||||
if servercfg.IsPro && (servercfg.GetLicenseKey() == "" || servercfg.GetNetmakerTenantID() == "") {
|
||||
if servercfg.IsPro &&
|
||||
(servercfg.GetLicenseKey() == "" || servercfg.GetNetmakerTenantID() == "") {
|
||||
trialEndDate, err = logic.GetTrialEndDate()
|
||||
if err != nil {
|
||||
slog.Error("failed to get trial end date", "error", err)
|
||||
@@ -177,17 +172,11 @@ func allowUsers(next http.Handler) http.HandlerFunc {
|
||||
}
|
||||
}
|
||||
|
||||
// swagger:route GET /api/server/getserverinfo server getServerInfo
|
||||
//
|
||||
// Get the server configuration.
|
||||
//
|
||||
// Schemes: https
|
||||
//
|
||||
// Security:
|
||||
// oauth
|
||||
//
|
||||
// Responses:
|
||||
// 200: serverConfigResponse
|
||||
// @Summary Get the server information
|
||||
// @Router /api/server/getserverinfo [get]
|
||||
// @Tags Server
|
||||
// @Security oauth2
|
||||
// @Success 200 {object} models.ServerConfig
|
||||
func getServerInfo(w http.ResponseWriter, r *http.Request) {
|
||||
// Set header
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
@@ -198,17 +187,11 @@ func getServerInfo(w http.ResponseWriter, r *http.Request) {
|
||||
// w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
||||
// swagger:route GET /api/server/getconfig server getConfig
|
||||
//
|
||||
// Get the server configuration.
|
||||
//
|
||||
// Schemes: https
|
||||
//
|
||||
// Security:
|
||||
// oauth
|
||||
//
|
||||
// Responses:
|
||||
// 200: serverConfigResponse
|
||||
// @Summary Get the server configuration
|
||||
// @Router /api/server/getconfig [get]
|
||||
// @Tags Server
|
||||
// @Security oauth2
|
||||
// @Success 200 {object} config.ServerConfig
|
||||
func getConfig(w http.ResponseWriter, r *http.Request) {
|
||||
// Set header
|
||||
w.Header().Set("Content-Type", "application/json")
|
||||
|
Reference in New Issue
Block a user