Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
dedc0b4
backend: Sortby slice to string
wilhelmguo Nov 29, 2018
5fb93f0
backend: base api pageSize and pageNo must bigger than zero
wilhelmguo Nov 29, 2018
50ca792
backend: add kubernetes resource dataselector for backend paging
wilhelmguo Nov 29, 2018
5c26fcd
backend: add kubernetes deployment list
wilhelmguo Nov 29, 2018
2d9c02b
backend: abstraction base controller
wilhelmguo Nov 30, 2018
2f75143
Merge branch 'master' of github.com:Qihoo360/wayne into feature/add_k…
wilhelmguo Nov 30, 2018
7277e57
backend: remove deployment debug logs
wilhelmguo Nov 30, 2018
8da44cd
Merge branch 'master' of github.com:Qihoo360/wayne into feature/add_k…
wilhelmguo Nov 30, 2018
e9176a7
backend: update auditlog model Action size 255 to 256
wilhelmguo Dec 5, 2018
f33fe16
backend: update kubernetes deployment cluster & namespace param to path
wilhelmguo Dec 5, 2018
451ebe4
backend: add get kube deployment api
wilhelmguo Dec 5, 2018
d601685
backend: get kubernetes list return DeploymentList Object
wilhelmguo Dec 5, 2018
03cb40e
frontend: move tpl-detail to shared
wilhelmguo Dec 5, 2018
699621f
frontend: add kubernetes deployment management
wilhelmguo Dec 5, 2018
c847355
merge master
wilhelmguo Dec 5, 2018
a6db772
backend: update kubernetes deployment createOrUpdate strategy
wilhelmguo Dec 5, 2018
de1bfa4
frontend: update deployment tpl generate rules
wilhelmguo Dec 5, 2018
42e4b03
frontend: move tpl-detail to shared
wilhelmguo Dec 5, 2018
4fe613b
backend: deal with Resources already exist error.
wilhelmguo Dec 6, 2018
319f604
frontend: add kubernetes deployment migration
wilhelmguo Dec 6, 2018
b84aed2
frontend: update lib version
wilhelmguo Dec 6, 2018
95b5bb9
frontend: migration deployment showcolumns key to lower case
wilhelmguo Dec 6, 2018
453de6b
Merge branch 'master' of github.com:Qihoo360/wayne into feature/add_k…
wilhelmguo Dec 6, 2018
de6e641
Merge branch 'master' into feature/add_kubernetes_deployment_migration
Dec 6, 2018
42dedf4
backend: remove unused newline
wilhelmguo Dec 6, 2018
07c8c93
Merge branch 'feature/add_kubernetes_deployment_migration' of https:/…
wilhelmguo Dec 6, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
backend: update kubernetes deployment cluster & namespace param to path
  • Loading branch information
wilhelmguo committed Dec 5, 2018
commit f33fe166fd16c74922081497e0af281cf2ee665f
13 changes: 7 additions & 6 deletions src/backend/controllers/kubernetes/deployment/deployment.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,18 @@ func (c *KubeDeploymentController) Prepare() {

// @Title List deployment
// @Description get all deployment
// @Param cluster query string true "the cluster name"
// @Param namespace query string true "the namespace name"
// @Param pageNo query int false "the page current no"
// @Param pageSize query int false "the page size"
// @Param filter query string false "column filter, ex. filter=name=test"
// @Param sortby query string false "column sorted by, ex. sortby=-id, '-' representation desc, and sortby=id representation asc"
// @Param cluster path string true "the cluster name"
// @Param namespace path string true "the namespace name"
// @Success 200 {object} common.Page success
// @router / [get]
// @router /namespaces/:namespace/clusters/:cluster [get]
func (c *KubeDeploymentController) List() {
param := c.BuildQueryParam()

cluster := c.Input().Get("cluster")
namespace := c.Input().Get("namespace")
cluster := c.Ctx.Input.Param(":cluster")
namespace := c.Ctx.Input.Param(":namespace")

manager, err := client.Manager(cluster)
if err == nil {
Expand Down Expand Up @@ -251,6 +250,8 @@ func getNamespace(appId int64) (*models.Namespace, error) {

// @Title Get
// @Description find Deployment by cluster
// @Param cluster path string true "the cluster name"
// @Param namespace path string true "the namespace name"
// @Success 200 {object} models.Deployment success
// @router /:deployment/namespaces/:namespace/clusters/:cluster [get]
func (c *KubeDeploymentController) Get() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@ func init() {
beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"] = append(beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"],
beego.ControllerComments{
Method: "Get",
Router: `/:deployment/namespaces/:namespace/clusters/:cluster`,
Router: `/:deployment`,
AllowHTTPMethods: []string{"get"},
MethodParams: param.Make(),
Params: nil})

beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"] = append(beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"],
beego.ControllerComments{
Method: "Offline",
Router: `/:deployment/namespaces/:namespace/clusters/:cluster`,
Router: `/:deployment`,
AllowHTTPMethods: []string{"delete"},
MethodParams: param.Make(),
Params: nil})

beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"] = append(beego.GlobalControllerRouter["github.com/Qihoo360/wayne/src/backend/controllers/kubernetes/deployment:KubeDeploymentController"],
beego.ControllerComments{
Method: "Deploy",
Router: `/:deploymentId([0-9]+)/tpls/:tplId([0-9]+)/clusters/:cluster`,
Router: `/:deploymentId([0-9]+)/tpls/:tplId([0-9]+)`,
AllowHTTPMethods: []string{"post"},
MethodParams: param.Make(),
Params: nil})
Expand Down