60 |
|
|
61 |
h2 { _('Name differences') } |
h2 { _('Name differences') } |
62 |
|
|
63 |
my $name_diff = A3C::SQL->new({ query => qq{ |
my $diff = A3C::SQL->new({ query => qq{ |
64 |
select |
select |
65 |
instance,hreduorgurl, |
instance,hreduorgurl, |
66 |
_site_name,o |
_site_name,o |
69 |
where o != _site_name |
where o != _site_name |
70 |
}}); |
}}); |
71 |
|
|
72 |
if ( $name_diff->count > 0 ) { |
if ( $diff->count > 0 ) { |
73 |
|
|
74 |
|
div { { class is 'note' } _("Found %1 instances with name in configuration different from name in LDAP", $diff->count) } |
75 |
|
|
76 |
table { |
table { |
77 |
row { |
row { |
80 |
th { _('Strix instance name') } |
th { _('Strix instance name') } |
81 |
th { _('hrEduOrg.o') } |
th { _('hrEduOrg.o') } |
82 |
}; |
}; |
83 |
while ( my $row = $name_diff->next ) { |
while ( my $row = $diff->next ) { |
84 |
row { |
row { |
85 |
cell { show( 'instance-op', 'Create', '+', $row->instance ) } |
cell { show( 'instance-op', 'Create', '+', $row->instance ) } |
86 |
cell { $row->instance } |
cell { $row->instance } |
94 |
div { _("Can't find any instance of strix which has different name than data from LDAP") } |
div { _("Can't find any instance of strix which has different name than data from LDAP") } |
95 |
} |
} |
96 |
|
|
97 |
|
h2 { _('Missing instance configuration') } |
98 |
|
|
99 |
|
my $diff = A3C::SQL->new({ query => qq{ |
100 |
|
select |
101 |
|
instance,hreduorgurl,o |
102 |
|
from strix_visits |
103 |
|
join hr_edu_orgs on cn = instance |
104 |
|
where instance not in (select instance from strix_instances) |
105 |
|
}}); |
106 |
|
|
107 |
|
if ( $diff->count > 0 ) { |
108 |
|
|
109 |
|
div { { class is 'note' } _("Found %1 instances which have statistics but no conf.php", $diff->count) } |
110 |
|
|
111 |
|
table { |
112 |
|
row { |
113 |
|
th {} |
114 |
|
th { _('Instance') } |
115 |
|
th { _('hrEduOrg.o') } |
116 |
|
}; |
117 |
|
while ( my $row = $diff->next ) { |
118 |
|
row { |
119 |
|
cell { show( 'instance-op', 'Create', '+', $row->instance ) } |
120 |
|
cell { $row->instance } |
121 |
|
cell { $row->o } |
122 |
|
} |
123 |
|
} |
124 |
|
} |
125 |
|
|
126 |
|
} else { |
127 |
|
div { _("Can't find any instance of strix which has different name than data from LDAP") } |
128 |
|
} |
129 |
}; |
}; |
130 |
|
|
131 |
=head2 instances |
=head2 instances |
138 |
|
|
139 |
my $sql = A3C::SQL->new({ query => qq{ |
my $sql = A3C::SQL->new({ query => qq{ |
140 |
select |
select |
141 |
hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber |
hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber, |
142 |
from strix_instances |
strix_visits.instance, strix_visits.hits, strix_changes.modifications |
143 |
join hr_edu_orgs on cn = instance |
from strix_visits |
144 |
|
left outer join hr_edu_orgs on cn = instance |
145 |
|
left outer join strix_changes on strix_changes.instance = strix_visits.instance |
146 |
order by l,o |
order by l,o |
147 |
}}); |
}}); |
148 |
|
|
149 |
if ( $sql->count > 0 ) { |
if ( $sql->count > 0 ) { |
150 |
|
|
151 |
|
div { { class is 'note' } _("Found total of %1 strix instances", $sql->count) } |
152 |
|
|
153 |
table { |
table { |
154 |
row { |
row { |
155 |
th { _('hrEduOrgUrl') } |
th { _('hrEduOrgUrl') } |
158 |
th { _('postalAddress') } |
th { _('postalAddress') } |
159 |
th { _('telephoneNumber') } |
th { _('telephoneNumber') } |
160 |
th { _('facsimileTelephoneNumber') } |
th { _('facsimileTelephoneNumber') } |
161 |
|
th { _('hits') } |
162 |
|
th { _('edits') } |
163 |
}; |
}; |
164 |
while ( my $row = $sql->next ) { |
while ( my $row = $sql->next ) { |
165 |
row { |
row { |
166 |
cell { outs_raw '<a href="http://' . $row->hrEduOrgUrl . '">' . $row->hrEduOrgUrl . '</a>' } |
cell { |
167 |
|
if ( my $url = $row->hrEduOrgUrl ) { |
168 |
|
outs_raw qq{<a href="http://$url">$url</a>}; |
169 |
|
} else { |
170 |
|
outs $row->instance; |
171 |
|
} |
172 |
|
} |
173 |
cell { $row->o } |
cell { $row->o } |
174 |
cell { $row->l } |
cell { $row->l } |
175 |
cell { $row->postalAddress } |
cell { $row->postalAddress } |
176 |
cell { $row->telephoneNumber } |
cell { { class is 'center' } $row->telephoneNumber } |
177 |
cell { $row->facsimileTelephoneNumber } |
cell { { class is 'center' } $row->facsimileTelephoneNumber } |
178 |
|
cell { { class is 'right' } $row->hits } |
179 |
|
cell { { class is 'right' } $row->modifications } |
180 |
} |
} |
181 |
} |
} |
182 |
} |
} |
183 |
|
|
|
div { _("Found total of %1 strix instances", $sql->count) } |
|
|
|
|
184 |
} else { |
} else { |
185 |
div { _("Can't find any strix instances") } |
div { _("Can't find any strix instances") } |
186 |
} |
} |