Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
goSDN
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
danet
goSDN
Commits
1ed4b802
Commit
1ed4b802
authored
4 years ago
by
Malte Bauch
Browse files
Options
Downloads
Patches
Plain Diff
added GetTitle to some views
parent
505c943b
Branches
Branches containing commit
Tags
Tags containing commit
3 merge requests
!90
Develop
,
!71
Resolve "Stream logger-output to goSDN-tview via gRPC"
,
!53
V.0.1.0 Codename Threadbare
Pipeline
#53256
passed
4 years ago
Stage: test
Stage: deploy
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/gosdn-tview/views/commandsListView.go
+9
-2
9 additions, 2 deletions
cmd/gosdn-tview/views/commandsListView.go
cmd/gosdn-tview/views/footerView.go
+0
-3
0 additions, 3 deletions
cmd/gosdn-tview/views/footerView.go
cmd/gosdn-tview/views/mainView.go
+3
-2
3 additions, 2 deletions
cmd/gosdn-tview/views/mainView.go
with
12 additions
and
7 deletions
cmd/gosdn-tview/views/commandsListView.go
+
9
−
2
View file @
1ed4b802
...
...
@@ -9,17 +9,19 @@ import (
//CommandListView is an application view to display all the goSDN commands
type
CommandListView
struct
{
title
string
commandsList
*
tview
.
List
}
//NewCommandListView creates a new CommandListView
func
NewCommandListView
()
*
CommandListView
{
func
NewCommandListView
(
title
string
)
*
CommandListView
{
cv
:=
&
CommandListView
{
title
:
title
,
commandsList
:
tview
.
NewList
(),
}
cv
.
commandsList
.
SetBorder
(
true
)
.
SetTitle
(
"Commands"
)
SetTitle
(
cv
.
title
)
return
cv
}
...
...
@@ -29,6 +31,11 @@ func (cv *CommandListView) GetContent() tview.Primitive {
return
cv
.
commandsList
}
//GetTitle returns the title of the specific view
func
(
cv
*
CommandListView
)
GetTitle
()
string
{
return
cv
.
title
}
//GetCommands gets all goSDN commands from a command list and creates new
//tview.List items for each one of them. The specific gRPC functions are added
//as tview.Selected() function
...
...
This diff is collapsed.
Click to expand it.
cmd/gosdn-tview/views/footerView.go
+
0
−
3
View file @
1ed4b802
...
...
@@ -22,9 +22,6 @@ func NewFooterView(app *app.App, conn *grpc.ClientConn) *FooterView {
databaseStatusView
:
NewDatabaseStatusView
(
app
),
gRPCStatusView
:
NewGRPCStatusView
(
app
,
conn
),
}
fw
.
footerView
.
SetBorder
(
true
)
.
SetTitle
(
"Status"
)
fw
.
footerView
.
AddItem
(
fw
.
gRPCStatusView
.
GetContent
(),
0
,
1
,
false
)
.
...
...
This diff is collapsed.
Click to expand it.
cmd/gosdn-tview/views/mainView.go
+
3
−
2
View file @
1ed4b802
...
...
@@ -23,7 +23,7 @@ func NewMainView(app *app.App, conn *grpc.ClientConn) *MainView {
mv
:=
&
MainView
{
pages
:
tview
.
NewPages
(),
mainGrid
:
tview
.
NewGrid
(),
commandsListView
:
NewCommandListView
(),
commandsListView
:
NewCommandListView
(
"commands"
),
headerView
:
NewHeaderView
(),
footerView
:
NewFooterView
(
app
,
conn
),
}
...
...
@@ -36,7 +36,8 @@ func NewMainView(app *app.App, conn *grpc.ClientConn) *MainView {
AddItem
(
mv
.
headerView
.
GetContent
(),
0
,
0
,
1
,
2
,
0
,
0
,
false
)
.
AddItem
(
mv
.
footerView
.
GetContent
(),
2
,
0
,
1
,
2
,
0
,
0
,
false
)
mv
.
mainGrid
.
AddItem
(
mv
.
commandsListView
.
GetContent
(),
1
,
0
,
1
,
1
,
0
,
0
,
true
)
.
mv
.
mainGrid
.
AddItem
(
mv
.
commandsListView
.
GetContent
(),
1
,
0
,
1
,
1
,
0
,
0
,
true
)
.
AddItem
(
mv
.
resultAndInputView
.
GetContent
(),
1
,
1
,
1
,
1
,
0
,
0
,
false
)
mv
.
pages
.
AddPage
(
"main"
,
mv
.
mainGrid
,
true
,
true
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment