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
Commits
db0e980c
Verified
Commit
db0e980c
authored
1 year ago
by
Mateusz Żebrak
Browse files
Options
Downloads
Patches
Plain Diff
Rename DynamicPropertiesClock callbacks
parent
bc978a2a
No related branches found
No related tags found
3 merge requests
!186
V1.27.5.0 release
,
!174
RELEASE: 1
,
!102
Redesign header
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
clive/__private/ui/widgets/header.py
+6
-6
6 additions, 6 deletions
clive/__private/ui/widgets/header.py
with
6 additions
and
6 deletions
clive/__private/ui/widgets/header.py
+
6
−
6
View file @
db0e980c
...
...
@@ -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
}
"
...
...
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