Skip to content

Commit

Permalink
Finish volumes prototype
Browse files Browse the repository at this point in the history
Signed-off-by: Catherine <[email protected]>
  • Loading branch information
Catherine2019 committed May 16, 2019
1 parent 528bcc2 commit 78be0b6
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file modified web/clui/clui
Binary file not shown.
3 changes: 2 additions & 1 deletion web/clui/grpcs/attach_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ func init() {
}

func AttachVolume(ctx context.Context, job *model.Job, args []string) (status string, err error) {
//|:-COMMAND-:| create_volume.sh 5 7 vdb
//|:-COMMAND-:| attach_volume.sh 5 7 vdb
db := dbs.DB()
argn := len(args)
if argn < 4 {
db.Model(&model.Volume{}).Updates(map[string]interface{}{"instance_id": 0})
err = fmt.Errorf("Wrong params")
log.Println("Invalid args", err)
return
Expand Down
2 changes: 1 addition & 1 deletion web/clui/grpcs/clear_vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func init() {
}

func ClearVM(ctx context.Context, job *model.Job, args []string) (status string, err error) {
//|:-COMMAND-:| launch_vm.sh '127' 'running' '3'
//|:-COMMAND-:| clear_vm.sh '127'
db := dbs.DB()
argn := len(args)
if argn < 2 {
Expand Down
1 change: 0 additions & 1 deletion web/clui/routes/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ func (v *VolumeView) Edit(c *macaron.Context, store session.Store) {
}

func (v *VolumeView) Patch(c *macaron.Context, store session.Store) {
log.Println("Enter patch method $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$")
redirectTo := "../volumes"
id := c.Params(":id")
name := c.Query("name")
Expand Down
2 changes: 1 addition & 1 deletion web/clui/templates/volumes.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<td>{{.Name}}</td>
<td>{{.Size}}</td>
<td>{{.Status}}</td>
<td>{{ if .Instance }} {{.Instance.ID}}-{{.Instance.Hostname}}/{{.Target}} {{ end }}</td>
<td>{{ if .Instance }} {{.Instance.ID}}-{{.Instance.Hostname}}:{{.Target}} {{ end }}</td>
<td><a href="{{$Link}}/{{.ID}}"><i class="fa fa-pencil-square-o"></i></a></td>
<td><div class="ui red tiny button delete-button" data-url="{{$Link}}/{{.ID}}" data-id="{{.ID}}">Delete</div></td>
</tr>
Expand Down

0 comments on commit 78be0b6

Please sign in to comment.