Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
c308b36e
Commit
c308b36e
authored
15 years ago
by
Moe Jette
Browse files
Options
Downloads
Patches
Plain Diff
only highlight nodes in current reservation.
display a reservation's duration
parent
6cba6718
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sview/resv_info.c
+30
-2
30 additions, 2 deletions
src/sview/resv_info.c
with
30 additions
and
2 deletions
src/sview/resv_info.c
+
30
−
2
View file @
c308b36e
...
@@ -48,6 +48,7 @@ enum {
...
@@ -48,6 +48,7 @@ enum {
SORTID_POS
=
POS_LOC
,
SORTID_POS
=
POS_LOC
,
SORTID_ACCOUNTS
,
SORTID_ACCOUNTS
,
SORTID_ACTION
,
SORTID_ACTION
,
SORTID_DURATION
,
SORTID_END_TIME
,
SORTID_END_TIME
,
SORTID_FEATURES
,
SORTID_FEATURES
,
SORTID_FLAGS
,
SORTID_FLAGS
,
...
@@ -77,9 +78,11 @@ static display_data_t display_data_resv[] = {
...
@@ -77,9 +78,11 @@ static display_data_t display_data_resv[] = {
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_NODE_LIST
,
"NodeList"
,
TRUE
,
EDIT_TEXTBOX
,
{
G_TYPE_STRING
,
SORTID_NODE_LIST
,
"NodeList"
,
TRUE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_START_TIME
,
"StartTime"
,
FALS
E
,
EDIT_TEXTBOX
,
{
G_TYPE_STRING
,
SORTID_START_TIME
,
"StartTime"
,
TRU
E
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_END_TIME
,
"EndTime"
,
FALSE
,
EDIT_TEXTBOX
,
{
G_TYPE_STRING
,
SORTID_END_TIME
,
"EndTime"
,
TRUE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_DURATION
,
"Duration"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
{
G_TYPE_STRING
,
SORTID_ACCOUNTS
,
"Accounts"
,
FALSE
,
EDIT_TEXTBOX
,
{
G_TYPE_STRING
,
SORTID_ACCOUNTS
,
"Accounts"
,
FALSE
,
EDIT_TEXTBOX
,
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
refresh_resv
,
create_model_resv
,
admin_edit_resv
},
...
@@ -230,6 +233,14 @@ static const char *_set_resv_msg(resv_desc_msg_t *resv_msg,
...
@@ -230,6 +233,14 @@ static const char *_set_resv_msg(resv_desc_msg_t *resv_msg,
else
else
got_edit_signal
=
xstrdup
(
new_text
);
got_edit_signal
=
xstrdup
(
new_text
);
break
;
break
;
case
SORTID_DURATION
:
temp_int
=
strtol
(
new_text
,
(
char
**
)
NULL
,
10
);
type
=
"duration"
;
if
(
temp_int
<=
0
)
goto
return_error
;
resv_msg
->
duration
=
temp_int
;
break
;
case
SORTID_END_TIME
:
case
SORTID_END_TIME
:
resv_msg
->
end_time
=
parse_time
((
char
*
)
new_text
,
0
);
resv_msg
->
end_time
=
parse_time
((
char
*
)
new_text
,
0
);
type
=
"end time"
;
type
=
"end time"
;
...
@@ -467,6 +478,14 @@ static void _layout_resv_record(GtkTreeView *treeview,
...
@@ -467,6 +478,14 @@ static void _layout_resv_record(GtkTreeView *treeview,
SORTID_END_TIME
),
SORTID_END_TIME
),
time_buf
);
time_buf
);
secs2time_str
((
uint32_t
)
difftime
(
resv_ptr
->
end_time
,
resv_ptr
->
start_time
),
time_buf
,
sizeof
(
time_buf
));
add_display_treestore_line
(
update
,
treestore
,
&
iter
,
find_col_name
(
display_data_resv
,
SORTID_DURATION
),
time_buf
);
add_display_treestore_line
(
update
,
treestore
,
&
iter
,
add_display_treestore_line
(
update
,
treestore
,
&
iter
,
find_col_name
(
display_data_resv
,
find_col_name
(
display_data_resv
,
SORTID_ACCOUNTS
),
SORTID_ACCOUNTS
),
...
@@ -508,6 +527,11 @@ static void _update_resv_record(sview_resv_info_t *sview_resv_info_ptr,
...
@@ -508,6 +527,11 @@ static void _update_resv_record(sview_resv_info_t *sview_resv_info_ptr,
gtk_tree_store_set
(
treestore
,
iter
,
gtk_tree_store_set
(
treestore
,
iter
,
SORTID_ACCOUNTS
,
resv_ptr
->
accounts
,
-
1
);
SORTID_ACCOUNTS
,
resv_ptr
->
accounts
,
-
1
);
secs2time_str
((
uint32_t
)
difftime
(
resv_ptr
->
end_time
,
resv_ptr
->
start_time
),
tmp_char
,
sizeof
(
tmp_char
));
gtk_tree_store_set
(
treestore
,
iter
,
SORTID_DURATION
,
tmp_char
,
-
1
);
slurm_make_time_str
((
time_t
*
)
&
resv_ptr
->
end_time
,
tmp_char
,
slurm_make_time_str
((
time_t
*
)
&
resv_ptr
->
end_time
,
tmp_char
,
sizeof
(
tmp_char
));
sizeof
(
tmp_char
));
gtk_tree_store_set
(
treestore
,
iter
,
SORTID_END_TIME
,
tmp_char
,
-
1
);
gtk_tree_store_set
(
treestore
,
iter
,
SORTID_END_TIME
,
tmp_char
,
-
1
);
...
@@ -907,6 +931,7 @@ extern void get_info_resv(GtkTable *table, display_data_t *display_data)
...
@@ -907,6 +931,7 @@ extern void get_info_resv(GtkTable *table, display_data_t *display_data)
ListIterator
itr
=
NULL
;
ListIterator
itr
=
NULL
;
sview_resv_info_t
*
sview_resv_info_ptr
=
NULL
;
sview_resv_info_t
*
sview_resv_info_ptr
=
NULL
;
reserve_info_t
*
resv_ptr
=
NULL
;
reserve_info_t
*
resv_ptr
=
NULL
;
time_t
now
=
time
(
NULL
);
if
(
display_data
)
if
(
display_data
)
local_display_data
=
display_data
;
local_display_data
=
display_data
;
...
@@ -946,6 +971,9 @@ display_it:
...
@@ -946,6 +971,9 @@ display_it:
itr
=
list_iterator_create
(
info_list
);
itr
=
list_iterator_create
(
info_list
);
while
((
sview_resv_info_ptr
=
list_next
(
itr
)))
{
while
((
sview_resv_info_ptr
=
list_next
(
itr
)))
{
resv_ptr
=
sview_resv_info_ptr
->
resv_ptr
;
resv_ptr
=
sview_resv_info_ptr
->
resv_ptr
;
if
((
resv_ptr
->
start_time
>
now
)
||
(
resv_ptr
->
end_time
<
now
))
continue
;
/* only map current reservations */
j
=
0
;
j
=
0
;
while
(
resv_ptr
->
node_inx
[
j
]
>=
0
)
{
while
(
resv_ptr
->
node_inx
[
j
]
>=
0
)
{
sview_resv_info_ptr
->
color
=
sview_resv_info_ptr
->
color
=
...
...
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