func NewMonitoringController(s *web.Server) *MonitoringController { ctl := &MonitoringController{} s.GET("/monitoring", ctl.getMonitoringAction) return ctl }
func NewLogController(s *web.Server) *LogController { ctl := &LogController{} // 1 - Show log page s.GET("/logs", ctl.getLogsAction) return ctl }
func NewLogfileController(s *web.Server) *LogfileController { ctl := &LogfileController{} // 1 - Add a logfile s.GET("/application/logfile/:app_id", ctl.getAddLogfileAction) s.POST("/application/logfile/:app_id", ctl.postAddLogfileAction) s.GET("/application/logfile/:app_id/:logfile_id", ctl.getEditLogfileAction) s.POST("/application/logfile/:app_id/:logfile_id", ctl.postEditLogfileAction) return ctl }
func NewConfigurationController(s *web.Server) *ConfigurationController { ctl := &ConfigurationController{} // 1 - Add a configuration s.GET("/application/configuration/:app_id", ctl.getAddConfigurationAction) s.POST("/application/configuration/:app_id", ctl.postAddConfigurationAction) s.GET("/application/configuration/:app_id/:config_id", ctl.getEditConfigurationAction) s.POST("/application/configuration/:app_id/:config_id", ctl.postEditConfigurationAction) return ctl }
func NewDeploymentController(s *web.Server) *DeploymentController { ctl := &DeploymentController{ upgrader: websocket.Upgrader{ ReadBufferSize: 1024, WriteBufferSize: 1024, CheckOrigin: func(r *http.Request) bool { return true }, }, } // 1 - Show deployment s.GET("/application/deployment/:app_id/:deploy_id", ctl.getDeploymentAction) // 2 - Create a deployment s.POST("/application/deployment/:app_id/:build_id", ctl.postDeploymentAction) // 3 - Stream the output (ws) s.GET("/ws/application/deployment/:app_id/:deploy_id", ctl.getDeploymentWSAction) return ctl }
func NewApplicationController(s *web.Server) *ApplicationController { ctl := &ApplicationController{} // 1 - Applications list s.GET("/", ctl.getApplicationsAction) // 2 - Show an application s.GET("/application/show/:id", ctl.getApplicationAction) // 3 - Add an application s.GET("/application/add", ctl.getAddApplicationAction) s.POST("/application/add", ctl.postAddApplicationAction) // Add an application - service s.GET("/application/add/service", ctl.getAddApplicationServiceAction) s.POST("/application/add/service", ctl.postAddApplicationServiceAction) // Add an application - docker s.GET("/application/add/docker", ctl.getAddApplicationDockerAction) s.POST("/application/add/docker", ctl.postAddApplicationDockerAction) // 4 - Edit an application s.GET("/application/edit/:id", ctl.getEditApplicationAction) s.POST("/application/edit/:id", ctl.postEditApplicationAction) // 5 - Delete an application s.GET("/application/delete/:id", ctl.getDeleteApplicationAction) return ctl }
func NewNodeController(s *web.Server) *NodeController { ctl := &NodeController{} s.GET("/nodes", ctl.getNodesAction) s.GET("/node/edit/:id", ctl.getNodeAction) s.POST("/node/edit/:id", ctl.postNodeAction) s.GET("/node/add", ctl.getNodeAddAction) s.GET("/node/add/ec2", ctl.getNodeAddEc2Action) s.POST("/node/add/ec2", ctl.postNodeAddEc2Action) s.GET("/node/add/do", ctl.getNodeAddDOAction) s.POST("/node/add/do", ctl.postNodeAddDOAction) s.POST("/node/access/add", ctl.postAddAccessAction) s.POST("/node/access/delete/:type", ctl.postDeleteAccessAction) s.POST("/node/delete/:id", ctl.postDeleteNodeAction) return ctl }
func NewAlertController(s *web.Server) *AlertController { ctl := &AlertController{} s.GET("/alerts", ctl.getAlertsListAction) s.POST("/alerts/acknowledge/:id", ctl.postAlertsAcknowledgeAction) s.POST("/alerts/close/:id", ctl.postAlertsCloseAction) s.POST("/alerts/message/:id", ctl.postAlertsMessageAction) s.GET("/alerts-policies", ctl.getAlertsPolicyListAction) s.GET("/alerts-policies/add", ctl.getAddAlertsPolicyAction) s.POST("/alerts-policies/add", ctl.postAddAlertsPolicyAction) s.GET("/alerts-policies/edit/:id", ctl.getEditAlertsPolicyAction) s.POST("/alerts-policies/edit/:id", ctl.postEditAlertsPolicyAction) s.POST("/alerts-policies/delete/:id", ctl.postDeleteAlertsPolicyAction) s.GET("/alerts-groups", ctl.getAlertsGroupsListAction) s.GET("/alerts-groups/add", ctl.getAddAlertsGroupAction) s.POST("/alerts-groups/add", ctl.postAddAlertsGroupAction) s.GET("/alerts-groups/edit/:id", ctl.getEditAlertsGroupAction) s.POST("/alerts-groups/edit/:id", ctl.postEditAlertsGroupAction) s.POST("/alerts-groups/delete/:id", ctl.postDeleteAlertsGroupAction) return ctl }