--- lib/A3C/View/Strix.pm 2008/10/01 21:03:14 243
+++ lib/A3C/View/Strix.pm 2008/10/01 21:05:00 244
@@ -60,7 +60,7 @@
h2 { _('Name differences') }
- my $name_diff = A3C::SQL->new({ query => qq{
+ my $diff = A3C::SQL->new({ query => qq{
select
instance,hreduorgurl,
_site_name,o
@@ -69,7 +69,9 @@
where o != _site_name
}});
- if ( $name_diff->count > 0 ) {
+ if ( $diff->count > 0 ) {
+
+ div { { class is 'note' } _("Found %1 instances with name in configuration different from name in LDAP", $diff->count) }
table {
row {
@@ -78,7 +80,7 @@
th { _('Strix instance name') }
th { _('hrEduOrg.o') }
};
- while ( my $row = $name_diff->next ) {
+ while ( my $row = $diff->next ) {
row {
cell { show( 'instance-op', 'Create', '+', $row->instance ) }
cell { $row->instance }
@@ -92,6 +94,38 @@
div { _("Can't find any instance of strix which has different name than data from LDAP") }
}
+ h2 { _('Missing instance configuration') }
+
+ my $diff = A3C::SQL->new({ query => qq{
+ select
+ instance,hreduorgurl,o
+ from strix_visits
+ join hr_edu_orgs on cn = instance
+ where instance not in (select instance from strix_instances)
+ }});
+
+ if ( $diff->count > 0 ) {
+
+ div { { class is 'note' } _("Found %1 instances which have statistics but no conf.php", $diff->count) }
+
+ table {
+ row {
+ th {}
+ th { _('Instance') }
+ th { _('hrEduOrg.o') }
+ };
+ while ( my $row = $diff->next ) {
+ row {
+ cell { show( 'instance-op', 'Create', '+', $row->instance ) }
+ cell { $row->instance }
+ cell { $row->o }
+ }
+ }
+ }
+
+ } else {
+ div { _("Can't find any instance of strix which has different name than data from LDAP") }
+ }
};
=head2 instances
@@ -104,14 +138,18 @@
my $sql = A3C::SQL->new({ query => qq{
select
- hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber
- from strix_instances
- join hr_edu_orgs on cn = instance
+ hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber,
+ strix_visits.instance, strix_visits.hits, strix_changes.modifications
+ from strix_visits
+ left outer join hr_edu_orgs on cn = instance
+ left outer join strix_changes on strix_changes.instance = strix_visits.instance
order by l,o
}});
if ( $sql->count > 0 ) {
+ div { { class is 'note' } _("Found total of %1 strix instances", $sql->count) }
+
table {
row {
th { _('hrEduOrgUrl') }
@@ -120,21 +158,29 @@
th { _('postalAddress') }
th { _('telephoneNumber') }
th { _('facsimileTelephoneNumber') }
+ th { _('hits') }
+ th { _('edits') }
};
while ( my $row = $sql->next ) {
row {
- cell { outs_raw '' . $row->hrEduOrgUrl . '' }
+ cell {
+ if ( my $url = $row->hrEduOrgUrl ) {
+ outs_raw qq{$url};
+ } else {
+ outs $row->instance;
+ }
+ }
cell { $row->o }
cell { $row->l }
cell { $row->postalAddress }
- cell { $row->telephoneNumber }
- cell { $row->facsimileTelephoneNumber }
+ cell { { class is 'center' } $row->telephoneNumber }
+ cell { { class is 'center' } $row->facsimileTelephoneNumber }
+ cell { { class is 'right' } $row->hits }
+ cell { { class is 'right' } $row->modifications }
}
}
}
- div { _("Found total of %1 strix instances", $sql->count) }
-
} else {
div { _("Can't find any strix instances") }
}