Revision 244
- Date:
- 2008/10/01 21:05:00
- Files:
Legend:
- Added
- Removed
- Modified
-
lib/A3C/View/Strix.pm
60 60 61 61 h2 { _('Name differences') } 62 62 63 my $name_diff = A3C::SQL->new({ query => qq{ 63 my $diff = A3C::SQL->new({ query => qq{ 64 64 select 65 65 instance,hreduorgurl, 66 66 _site_name,o … … 69 69 where o != _site_name 70 70 }}); 71 71 72 if ( $name_diff->count > 0 ) { 72 if ( $diff->count > 0 ) { 73 73 74 div { { class is 'note' } _("Found %1 instances with name in configuration different from name in LDAP", $diff->count) } 75 74 76 table { 75 77 row { 76 78 th {} … … 78 80 th { _('Strix instance name') } 79 81 th { _('hrEduOrg.o') } 80 82 }; 81 while ( my $row = $name_diff->next ) { 83 while ( my $row = $diff->next ) { 82 84 row { 83 85 cell { show( 'instance-op', 'Create', '+', $row->instance ) } 84 86 cell { $row->instance } … … 92 94 div { _("Can't find any instance of strix which has different name than data from LDAP") } 93 95 } 94 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 } 95 129 }; 96 130 97 131 =head2 instances … … 104 138 105 139 my $sql = A3C::SQL->new({ query => qq{ 106 140 select 107 hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber 108 from strix_instances 109 join hr_edu_orgs on cn = instance 141 hrEduOrgUrl, o, l, postalAddress, telephoneNumber, facsimileTelephoneNumber, 142 strix_visits.instance, strix_visits.hits, strix_changes.modifications 143 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 110 146 order by l,o 111 147 }}); 112 148 113 149 if ( $sql->count > 0 ) { 114 150 151 div { { class is 'note' } _("Found total of %1 strix instances", $sql->count) } 152 115 153 table { 116 154 row { 117 155 th { _('hrEduOrgUrl') } … … 120 158 th { _('postalAddress') } 121 159 th { _('telephoneNumber') } 122 160 th { _('facsimileTelephoneNumber') } 161 th { _('hits') } 162 th { _('edits') } 123 163 }; 124 164 while ( my $row = $sql->next ) { 125 165 row { 126 cell { outs_raw '<a href="http://' . $row->hrEduOrgUrl . '">' . $row->hrEduOrgUrl . '</a>' } 166 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 } 127 173 cell { $row->o } 128 174 cell { $row->l } 129 175 cell { $row->postalAddress } 130 cell { $row->telephoneNumber } 131 cell { $row->facsimileTelephoneNumber } 176 cell { { class is 'center' } $row->telephoneNumber } 177 cell { { class is 'center' } $row->facsimileTelephoneNumber } 178 cell { { class is 'right' } $row->hits } 179 cell { { class is 'right' } $row->modifications } 132 180 } 133 181 } 134 182 } 135 183 136 div { _("Found total of %1 strix instances", $sql->count) } 137 138 184 } else { 139 185 div { _("Can't find any strix instances") } 140 186 }