Project

General

Profile

« Previous | Next » 

Revision 55671

completed timezones list and removed not needed setTimeouts

View differences:

modules/uoa-repository-dashboard-gui/trunk/src/app/pages/sources/sources-register/register-datasource-select-existing.component.ts
87 87
  }
88 88

  
89 89
  getReposInCountry(i: number) {
90
    setTimeout( () => {
91
      const country = this.countries[i];
92
      console.log(`I got ${country} and ${this.mode}`);
93
      this.countryRepos = [];
94
      this.selectedCountry = country;
95
      this.hasSelectedCountry = false;
96
      this.loadingMessage = loadingReposMessage;
97
      this.noRepositories = '';
98
      this.repoService.getRepositoriesOfCountry(country.code, this.mode).subscribe (
99
        repos => {
100
          this.countryRepos = repos;
101
        },
102
        error => {
103
          console.log(error.statusText);
104
          this.loadingMessage = '';
105
          this.alertMessage = noServiceMessage;
106
          this.countryRepos = [];
107
        },
108
        () => {
109
          if (!this.countryRepos || !this.countryRepos.length) {
110
            this.noRepositories = noRepositoriesFound;
90
    const country = this.countries[i];
91
    console.log(`I got ${country} and ${this.mode}`);
92
    this.countryRepos = [];
93
    this.selectedCountry = country;
94
    this.hasSelectedCountry = false;
95
    this.loadingMessage = loadingReposMessage;
96
    this.noRepositories = '';
97
    this.repoService.getRepositoriesOfCountry(country.code, this.mode).subscribe (
98
      repos => {
99
        this.countryRepos = repos;
100
      },
101
      error => {
102
        console.log(error.statusText);
103
        this.loadingMessage = '';
104
        this.alertMessage = noServiceMessage;
105
        this.countryRepos = [];
106
      },
107
      () => {
108
        if (!this.countryRepos || !this.countryRepos.length) {
109
          this.noRepositories = noRepositoriesFound;
110
        } else {
111
          this.noRepositories = '';
112
          if (this.selectedCountry.code === country.code) {
113
            /* to make sure that the correct set of repositories is displayed - in case of consequent country selections */
114
            this.hasSelectedCountry = true;
111 115
          } else {
112
            this.noRepositories = '';
113
            if (this.selectedCountry.code === country.code) {
114
              /* to make sure that the correct set of repositories is displayed - in case of consequent country selections */
115
              this.hasSelectedCountry = true;
116
            } else {
117
              this.countryRepos = [];
118
            }
116
            this.countryRepos = [];
119 117
          }
120
          this.loadingMessage = '';
121
          this.alertMessage = '';
122
          console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
123 118
        }
124
      );
125
    }, 500);
119
        this.loadingMessage = '';
120
        this.alertMessage = '';
121
        console.log('this.selectedCountry became', JSON.stringify(this.selectedCountry));
122
      }
123
    );
126 124
  }
127 125

  
128 126
  getLatestUpdate() {
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/metrics/metrics-show.component.ts
35 35

  
36 36
  ngOnInit() {
37 37
    this.repoId = this.route.snapshot.paramMap.get('id');
38
    setTimeout(() => {
39
      this.getPiwik();
40
    }, 1000);
38
    this.getPiwik();
41 39
  }
42 40

  
43 41

  
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/compatibility/compatibility-validation-results.component.ts
37 37

  
38 38
  ngOnInit () {
39 39
    if (this.authService.getIsUserLoggedIn()) {
40
      setTimeout(() => {
41 40
        this.getJobInfo();
42
      }, 500 );
43 41
    } else {
44 42
      const id = this.route.snapshot.paramMap.get('id');
45 43
      this.authService.redirectUrl = '/compatibility/browseHistory/' + id;
modules/uoa-repository-dashboard-gui/trunk/src/app/pages/content/content-events-of-repository.component.ts
32 32
  ngOnInit() {
33 33
    this.repoName = this.route.snapshot.paramMap.get('name');
34 34
    this.getCorrectName();
35
    setTimeout(() => {
36
      this.getTopics();
37
    }, 500);
35
    this.getTopics();
38 36
  }
39 37

  
40 38
  getRepoTopics(): void {
modules/uoa-repository-dashboard-gui/trunk/src/app/app.component.ts
2 2
import { NavigationEnd, Router, RoutesRecognized } from '@angular/router';
3 3
import { AuthenticationService } from './services/authentication.service';
4 4
import { environment } from '../environments/environment';
5
import { MatomoInjector } from 'ngx-matomo';
5
import { MatomoInjector, MatomoTracker } from 'ngx-matomo';
6 6

  
7 7
@Component({
8 8
  selector: 'oa-repo-manager',
......
12 12
export class AppComponent implements OnInit {
13 13
  constructor(private router: Router,
14 14
              private authService: AuthenticationService,
15
              private matomoInjector: MatomoInjector) {
15
              private matomoInjector: MatomoInjector,
16
              private matomoTracker: MatomoTracker) {
16 17

  
17 18
    console.log('11-02-2019. First deploy of project upgraded to angular 6');
18 19

  
......
47 48
  }
48 49

  
49 50
  ngOnInit() {
51
    if (this.authService.isLoggedIn) {
52
      this.matomoTracker.setUserId(this.authService.getUserEmail());
53
    }
50 54
    this.router.events.subscribe((evt) => {
51
      /*if ((evt instanceof RoutesRecognized) && (environment.production === true)) {
52
        let piwikUrl;
53
        if (window.location.origin.includes('beta')) {
54
          // piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
55
          piwikUrl = '92';
56
        } else if (window.location.origin.includes('localhost:4200') ||
57
                   window.location.origin.includes('athenarc')) {
58
          // piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=92&rec=1';
59
          piwikUrl = '9222222';
60
        } else {
61
          // piwikUrl = 'https://analytics.openaire.eu/piwik.php?idsite=111&rec=1';
62
          piwikUrl = '111';
63
        }
64
        this.matomoInjector.init('https://analytics.openaire.eu/', piwikUrl);
65
      }*/
66

  
67 55
      if (!(evt instanceof NavigationEnd)) {
68 56
        return;
69 57
      }
modules/uoa-repository-dashboard-gui/trunk/src/app/domain/timezones.ts
1 1
export const timezones = [
2
  { offset: -2.0, name:	'[GMT - 2] Fernando de Noronha Time,	South Georg...' },
3
  { offset: -1.0, name:	'[GMT - 1] Azores Standard Time, Cape Verde Time...' },
4
  { offset: 0.0, name:	'[GMT] Western European Time, Greenwich Mean Time' },
5
  { offset: 1.0, name:	'[GMT + 1] Central European Time, West African Time' },
6
  { offset: 2.0, name:	'[GMT + 2] Eastern European Time, Central Africa...' },
7
  { offset: 3.0, name:	'[GMT + 3] Moscow Standard Time, Eastern African...' },
8
  { offset: 3.5, name:	'[GMT + 3:30] Iran Standard Time' },
9
  { offset: 4.0, name:	'[GMT + 4] Gulf Standard Time, Samara Standard Time' },
10
  { offset: 4.5, name:	'[GMT + 4:30] Afghanistan Time' },
11
  { offset: 5.0, name:	'[GMT + 5] Pakistan Standard Time, Yekaterinburg...' },
12
  { offset: 8.0, name:	'[GMT + 8] Beijing, Hong Kong, Irkutsk, Kuala Lumpur, Manila, Perth' },
2
  { offset: -12.0, name: '[GMT - 12:00] United States Minor Outlying Islands' },
3
  { offset: -11.0, name: '[GMT - 11:00] United States, New Zealand' },
4
  { offset: -10.0, name: '[GMT - 10:00] Honolulu, Papeete...' },
5
  { offset: -9.5, name: '[GMT - 09:30] French Polynesia' },
6
  { offset: -9.0, name: '[GMT - 09:00] Anchorage...' },
7
  { offset: -8.0, name: '[GMT - 08:00] Los Angeles, Vancouver, Tijuana...' },
8
  { offset: -7.0, name: '[GMT - 07:00] Phoenix, Denver, Calgary, Ciudad Juárez...' },
9
  { offset: -6.0, name: '[GMT - 06:00] Chicago, Mexico City, Guatemala City, Tegucigalpa, Managua, Winnipeg, San José, San Salvador...' },
10
  { offset: -5.0, name: '[GMT - 05:00] New York, Toronto, Havana, Lima, Bogotá, Kingston...' },
11
  { offset: -4.0, name: '[GMT - 04:00] Santiago, Santo Domingo, Manaus, Caracas, La Paz, Asunción, Halifax...' },
12
  { offset: -3.5, name: '[GMT - 03:30] St. John’s...' },
13
  { offset: -3.0, name: '[GMT - 03:00] São Paulo, Buenos Aires, Montevideo...' },
14
  { offset: -2.0, name: '[GMT - 02:00] Brazil, United Kingdom...' },
15
  { offset: -1.0, name: '[GMT - 01:00] Praia, Ponta Delgada...' },
16
  { offset: 0.0, name: '[GMT] London, Dublin, Lisbon, Accra, Dakar...' },
17
  { offset: 1.0, name: '[GMT + 01:00] Berlin, Rome, Paris, Madrid, Vienna, Warsaw, Lagos, Kinshasa, Luanda, Algiers, Casablanca...' },
18
  { offset: 2.0, name: '[GMT + 02:00] Cairo, Khartoum, Johannesburg, Athens, Kiev, Bucharest, Lubumbashi, Jerusalem...' },
19
  { offset: 3.0, name: '[GMT + 03:00] Moscow, Istanbul, Riyadh, Baghdad, Nairobi, Minsk, Doha...' },
20
  { offset: 3.5, name: '[GMT + 03:30] Tehran...' },
21
  { offset: 4.0, name: '[GMT + 04:00] Dubai, Baku, Samara...' },
22
  { offset: 4.5, name: '[GMT + 04:30] Kabul...' },
23
  { offset: 5.0, name: '[GMT + 05:00] Karachi, Tashkent, Yekaterinburg...' },
24
  { offset: 5.5, name: '[GMT + 05:30] Mumbai, Delhi, Colombo...' },
25
  { offset: 5.75, name: '[GMT + 05:45] Kathmandu...' },
26
  { offset: 6.0, name: '[GMT + 06:00] Dhaka, Almaty, Omsk...' },
27
  { offset: 6.5, name: '[GMT + 06:30] Yangon...' },
28
  { offset: 7.0, name: '[GMT + 07:00] Jakarta, Bangkok, Ho Chi Minh City, Krasnoyarsk...' },
29
  { offset: 8.0, name: '[GMT + 08:00] Shanghai, Beijing, Hong Kong, Kuala Lumpur, Singapore, Taipei, Perth, Manila, Makassar, Irkutsk...' },
30
  { offset: 8.75, name: '[GMT + 08:45] Australia' },
31
  { offset: 9.0, name: '[GMT + 09:00] Tokyo, Seoul, Pyongyang, Ambon, Yakutsk...' },
32
  { offset: 9.5, name: '[GMT + 09:30] Adelaide, Darwin...' },
33
  { offset: 10.0, name: '[GMT + 10:00] Sydney, Melbourne, Port Moresby, Vladivostok...' },
34
  { offset: 10.5, name: '[GMT + 10:30] Australia (New South Wales)...' },
35
  { offset: 11.0, name: '[GMT + 11:00] Nouméa, Magadan...' },
36
  { offset: 12.0, name: '[GMT + 12:00] Auckland, Suva, Petropavlovsk-Kamchatsky...' },
37
  { offset: 12.75, name: '[GMT + 12:45] New Zealand (Chatham Islands)...' },
38
  { offset: 13.0, name: '[GMT + 13:00] Kiribati (Phoenix Islands), New Zealand (Tokelau), Samoa, Tonga' },
39
  { offset: 14.0, name: '[GMT + 14:00] Kiribati (Line Islands)' },
13 40
];

Also available in: Unified diff