Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
resmon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
mirrors
resmon
Commits
2150c6cf
Commit
2150c6cf
authored
14 years ago
by
Eric Miller
Browse files
Options
Downloads
Patches
Plain Diff
Sort xml output by module and service names
parent
880c6cef
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Resmon/Status.pm
+10
-5
10 additions, 5 deletions
lib/Resmon/Status.pm
with
10 additions
and
5 deletions
lib/Resmon/Status.pm
+
10
−
5
View file @
2150c6cf
...
@@ -70,9 +70,11 @@ sub xml_kv_dump {
...
@@ -70,9 +70,11 @@ sub xml_kv_dump {
my
$info
=
shift
;
my
$info
=
shift
;
my
$indent
=
shift
||
0
;
my
$indent
=
shift
||
0
;
my
$rv
=
'';
my
$rv
=
'';
while
(
my
(
$key
,
$value
)
=
each
%$info
)
{
foreach
my
$key
(
sort
keys
%$info
)
{
my
$value
=
$info
->
{
$key
};
if
(
ref
$value
eq
'
HASH
')
{
if
(
ref
$value
eq
'
HASH
')
{
while
(
my
(
$k
,
$v
)
=
each
%$value
)
{
foreach
my
$k
(
sort
keys
%$value
)
{
my
$v
=
$value
->
{
$k
};
$rv
.=
"
"
x
$indent
;
$rv
.=
"
"
x
$indent
;
$rv
.=
"
<
$key
name=
\"
$k
\"
";
$rv
.=
"
<
$key
name=
\"
$k
\"
";
if
(
ref
(
$v
)
eq
'
ARRAY
')
{
if
(
ref
(
$v
)
eq
'
ARRAY
')
{
...
@@ -118,8 +120,10 @@ sub dump_generic {
...
@@ -118,8 +120,10 @@ sub dump_generic {
my
$self
=
shift
;
my
$self
=
shift
;
my
$dumper
=
shift
;
my
$dumper
=
shift
;
my
$rv
=
'';
my
$rv
=
'';
while
(
my
(
$module
,
$services
)
=
each
%
{
$self
->
{
store
}})
{
foreach
my
$module
(
sort
keys
%
{
$self
->
{
store
}})
{
while
(
my
(
$service
,
$info
)
=
each
%$services
)
{
my
$services
=
$self
->
{
store
}
->
{
$module
};
foreach
my
$service
(
sort
keys
%$services
)
{
my
$info
=
$services
->
{
$service
};
$rv
.=
$dumper
->
(
$module
,
$service
,
$info
);
$rv
.=
$dumper
->
(
$module
,
$service
,
$info
);
}
}
}
}
...
@@ -133,7 +137,8 @@ sub dump_generic_module {
...
@@ -133,7 +137,8 @@ sub dump_generic_module {
my
$module
=
shift
;
my
$module
=
shift
;
my
$rv
=
'';
my
$rv
=
'';
my
$services
=
$self
->
{
store
}
->
{
$module
};
my
$services
=
$self
->
{
store
}
->
{
$module
};
while
(
my
(
$service
,
$info
)
=
each
%$services
)
{
foreach
my
$service
(
sort
keys
%$services
)
{
my
$info
=
$services
->
{
$service
};
$rv
.=
$dumper
->
(
$module
,
$service
,
$info
);
$rv
.=
$dumper
->
(
$module
,
$service
,
$info
);
}
}
return
$rv
;
return
$rv
;
...
...
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