Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
clive
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository 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
hive
clive
Merge requests
!102
Redesign header
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Redesign header
kmochocki/issue-21
into
develop
Overview
11
Commits
10
Pipelines
10
Changes
1
All threads resolved!
Hide all comments
Merged
Krzysztof Mochocki
requested to merge
kmochocki/issue-21
into
develop
1 year ago
Overview
11
Commits
10
Pipelines
10
Changes
1
All threads resolved!
Hide all comments
Expand
resolves:
#21 (closed)
0
0
Merge request reports
Viewing commit
db0e980c
Prev
Next
Show latest version
1 file
+
6
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
db0e980c
Rename DynamicPropertiesClock callbacks
· db0e980c
Mateusz Żebrak
authored
1 year ago
clive/__private/ui/widgets/header.py
+
6
−
6
Options
@@ -67,17 +67,17 @@ class AlarmsSummary(Container, CliveWidget):
class
DynamicPropertiesClock
(
Horizontal
,
CliveWidget
):
def
compose
(
self
)
->
ComposeResult
:
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
update
_block_num
,
id_
=
"
block_num
"
)
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
update
_chain_time
,
id_
=
"
chain_time
"
)
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
update
_last_update
,
id_
=
"
last_update
"
)
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
get
_block_num
,
id_
=
"
block_num
"
)
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
get
_chain_time
,
id_
=
"
chain_time
"
)
yield
DynamicLabel
(
self
.
app
.
world
,
"
app_state
"
,
self
.
__
get
_last_update
,
id_
=
"
last_update
"
)
def
__
update
_block_num
(
self
,
app_state
:
AppState
)
->
str
:
def
__
get
_block_num
(
self
,
app_state
:
AppState
)
->
str
:
return
f
"
block:
{
app_state
.
get_dynamic_global_properties
().
head_block_number
}
"
def
__
update
_chain_time
(
self
,
app_state
:
AppState
)
->
str
:
def
__
get
_chain_time
(
self
,
app_state
:
AppState
)
->
str
:
return
f
"
{
app_state
.
get_dynamic_global_properties
().
time
.
time
()
}
UTC
"
def
__
update
_last_update
(
self
,
app_state
:
AppState
)
->
str
:
def
__
get
_last_update
(
self
,
app_state
:
AppState
)
->
str
:
gdpo
=
app_state
.
get_dynamic_global_properties
()
last_update
=
humanize
.
naturaltime
(
datetime
.
datetime
.
utcnow
().
replace
(
tzinfo
=
datetime
.
timezone
.
utc
)
-
gdpo
.
time
)
return
f
"
last update:
{
last_update
}
"
Loading