EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09723
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- To: <eprints-tech@ecs.soton.ac.uk>, MOHD.IZWAN SALIM <mohdizwan8733@uitm.edu.my>
- Subject: Re: [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Fri, 7 Jun 2024 01:42:23 +0100
Hi Izwan,
This is a bug in the IRStats2 code that means it has issues if you have set a path for a repository other than /. You need to edit lib/static/_javascript_/auto/90_irstats2.js and change two lines:
$( this.container_id ).insert( new Element( 'img', { 'border': '0', 'class': 'irstats2_spin', 'src': '/style/images/loading.gif' } ) );
to:
$( this.container_id ).insert( new Element( 'img', { 'border': '0', 'class': 'irstats2_spin', 'src': eprints_http_root+'/style/images/loading.gif' } ) );
and
$( container_id ).update( new Element( 'img', { 'border':'0', 'src': '/style/images/loading.gif' } ) );
to:
$( container_id ).update( new Element( 'img', { 'border':'0', 'src': eprints_http_root+'/style/images/loading.gif' } ) );
These are around lines 133 and 511 but may vary depending on which version of IRStats2 you are using.
Regards
David Newman
On 07/06/2024 1:04 am, MOHD.IZWAN SALIM
wrote:
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.Dear all
I'm doing multiple repos in one host.
I replicate the flavours folder for each reporepo1_librepo2_lib
Some files like icon images do not follow the correct path, and it goes to the base URL - http://repo.uitm.edu.my/style/images/loading.gif, suppose http://repo.uitm.edu.my/repo1/style/images/loading.gif
Now, I just installed IRStat2, and the graph is not working. It goes to the wrong URL (/cgi). I can see it from the console browser.
I see a comment in line 89 in z_irstats2.pl
# The method below is called by the /cgi/stats/* scripts which handle the delivery of stats
$c->{irstats2}->{allow} = sub {
my( $session, $priv ) = @_;
return 0 unless( defined $priv );
Can I change it to include the correct path - repo1/cgi/stats. How do I write it? Or is the any other good solution to this?
RegardsIzwan
UiTM Digital Library
PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...
DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public, proprietary, privileged, confidential and exempt from disclosure under applicable law including the Official Secrets Act 1972. READ MORE...
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
- References:
- [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- From: "MOHD.IZWAN SALIM" <mohdizwan8733@uitm.edu.my>
- [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- Prev by Date: [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- Next by Date: Re: [EP-tech] User Roles for Admin Screen Tab
- Previous by thread: [EP-tech] Changing path in IRStat2 for multiple repo in one vhost
- Index(es):