Skip to content

Commit

Permalink
Merge pull request #244 from usnistgov/fix/ODD833-startup-performance02
Browse files Browse the repository at this point in the history
Fix/odd833 startup performance02
  • Loading branch information
GRG2 authored Sep 30, 2020
2 parents f4cc485 + 60d446a commit df7900d
Show file tree
Hide file tree
Showing 282 changed files with 5,553 additions and 415,516 deletions.
12 changes: 5 additions & 7 deletions angular/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,16 @@
"src/assets"
],
"styles": [
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/primeng/resources/themes/bootstrap/theme.css",
"src/styles/font-awesome/css/font-awesome.min.css",
"node_modules/primeng/resources/primeng.css",
"node_modules/primeicons/primeicons.css",
"src/styles/ultima-ng-5.2.4/assets/layout/css/layout-indigo.css",
"src/styles/ultima-ng-5.2.4/assets/theme/theme-indigo.css",
"src/styles/font-awesome/css/font-awesome.min.css",
"src/styles/main.css",
"src/styles/styles.layout.css",
"src/styles/styles.themes.css"
"src/styles/styles.themes.css",
"src/assets/fontcss/roboto.css",
"src/styles.css"
],
"scripts": [
"node_modules/lodash/lodash.min.js",
Expand Down Expand Up @@ -100,8 +100,6 @@
"src/styles.css",
"node_modules/bootstrap/dist/css/bootstrap.min.css",
"node_modules/primeng/resources/primeng.min.css",
"src/styles/ultima-ng-5.2.4/assets/layout/css/layout-indigo.css",
"src/styles/ultima-ng-5.2.4/assets/theme/theme-indigo.css",
"node_modules/primeicons/primeicons.css",
"src/styles/font-awesome/css/font-awesome.min.css",
"src/styles/main.css"
Expand Down
25 changes: 2 additions & 23 deletions angular/e2e/src/app.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ describe('workspace-project App', () => {
browser.sleep(5000);
browser.ignoreSynchronization = true;
expect<any>(browser.getTitle()).toEqual('NIST Data Repository Page');

expect<any>(page.getParagraphText()).toEqual('NIST Data Discovery');
expect<any>(element(by.id('feature')).getText()).toEqual('FEATURED DATA DOMAINS');
});

it('About page should display title of about page', () => {
Expand All @@ -30,7 +30,7 @@ describe('workspace-project App', () => {
expect<any>(element(by.id('title')).getText()).toEqual('About NIST Data');
});

it('Advanced search page should display title of advanced search page', () => {
it('Advanced search page should display title of Advanced Search Builder', () => {
page.navigateTo('/#/advanced');
browser.sleep(5000);
browser.ignoreSynchronization = true;
Expand All @@ -57,25 +57,4 @@ describe('workspace-project App', () => {
browser.ignoreSynchronization = true;
expect<any>(element(by.id('title')).getText()).toEqual('APIs');
});

it('Search for text SRD 69 should return SRD 101 (mock data)', () => {
page.navigateTo('/#/search?q="SRD 69"&key=&queryAdvSearch=');
browser.sleep(5000);
browser.ignoreSynchronization = true;
const text = element(by.css('sdp-search h4')).getText();
expect<any>(text).toContain("SRD 101");
});

it('Search for text SRD 101 should return SRD 101',()=>{
page.navigateTo('/');
browser.sleep(5000);
browser.ignoreSynchronization = true;
page.getSearchExampleLink().click();
browser.sleep(5000);
page.getSearchButton().click();
browser.sleep(5000);

const text = element(by.css('sdp-search h4')).getText();
expect<any>(text).toContain("SRD 101");
});
});
7 changes: 5 additions & 2 deletions angular/e2e/src/app.po.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ export class AppPage {
getParagraphText() {
browser.sleep(5000);
browser.ignoreSynchronization = true;
return element(by.className('TexAlCenter title')).getText();
return element(by.className('title')).getText();
}

getSearchExampleLink() {
return element(by.id('srd101'));
}

getSearchButton() {
return element(by.className('searchButton'));
return element(by.className('bigSearchButton'));
}

showExampleLink() {
return element(by.id('example'));
}
}
4 changes: 3 additions & 1 deletion angular/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"@angular/platform-browser": "^6.1.0",
"@angular/platform-browser-dynamic": "^6.1.0",
"@angular/router": "^6.1.0",
"@ng-bootstrap/ng-bootstrap": "^3.3.1",
"ajv": "^6.9.1",
"bootstrap": "^4.0.0",
"classlist.js": "^1.1.20150312",
Expand All @@ -41,7 +42,8 @@
"primeui": "^4.1.15",
"rxjs": "^6.2.0",
"rxjs-compat": "^6.2.0",
"zone.js": "~0.8.26"
"zone.js": "~0.8.26",
"ngx-toastr": "^10.1.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.10",
Expand Down
5 changes: 5 additions & 0 deletions angular/src/app/about/about.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,8 @@ hr {
font-weight: 300;
}

.main-image{
width:50%;
margin: 1em 0em 0em 0em;
min-width: 200px;
}
95 changes: 60 additions & 35 deletions angular/src/app/about/about.component.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,65 @@
<div class="ui-g" style="width: 100%;background-color: #153971;color: #FFFFFF">
<div class="ui-g-12" style="padding-left:2.5em;padding-right: 2.5em;padding-top: 2.5em">
<label id='title' style="font-size: xx-large;float: left;display: block;"><i
class="faa faa-info-circle faa-lg"></i>About NIST Data</label>
<ol class="breadcrumb" style="float: right;">
<li class="active breadcrumb-item"><span style="color: #fff; font-weight:normal; cursor: pointer;"
(click)="commonService.goHome()">Home</span></li>
<li class="breadcrumb-item">About</li>
<li class="breadcrumb-item">NIST Data</li>
</ol>
</div>
<!-- Top banner -->
<div class="ui-g top-banner" [ngStyle]="{ 'background-image': 'url(' + imageURL + ')'}">
<div class="container inner-top-banner">
<span style="font-size: xx-large;">
<i class="faa faa-info-circle faa-lg" style="padding-right: .5em;"></i><label id='title'>About NIST
Data</label>
</span>
<ol class="breadcrumb" style="float: right;">
<li class="active breadcrumb-item"><span style="color: #fff; font-weight:normal; cursor: pointer;"
(click)="commonService.goHome()">Home</span></li>
<li class="breadcrumb-item">About</li>
<li class="breadcrumb-item">NIST Data</li>
</ol>
</div>
</div>

<div class="card">
<div class="ui-g">
<div class="ui-g-12">
<div class="ui-g-12 ui-md-6 ui-lg-6 content"
style="font-family: Source Sans Pro,sans-serif;font-size:20px;line-height: 1.2em;">
<div class="adv-step">
This National Institute of Standards and Technology (NIST) <b>Science Data Portal</b> provides a user-friendly discovery and exploration tool for publicly available datasets at NIST. These data products are generated as part of the NIST mission, spanning multiple
disciplines of scientific, engineering and technology research. NIST's publicly available data sets showcase its commitment to providing accurate, well-curated measurements of physical properties, exemplified by the <a href="https://www.nist.gov/srd" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'Standard Reference Data program')"> Standard Reference Data program</a>, as well as its commitment to advancing basic research.
</div>
<div class="adv-step">
For <a href="https://www.nist.gov/topics/data/public-access-nist-research/copyright-fair-use-and-licensing-statements-srd-data-and" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'Fair Use')"><b>Fair Use</b></a> of these data, please include citation in your works including the Digital Object
Identifier (DOI). NIST DOIs are registered with the <a href="https://www.datacite.org" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'DataCite')">DataCite organization</a> and provide globally unique persistent identifiers. The DOI also serves as a direct link to data <i>homepages</i> giving access to the full research publication description and underlying datasets.
</div>
<hr>
<div class="adv-step">
This portal is designed with <a href="https://www.go-fair.org/fair-principles/" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'FAIR Data')"> FAIR principles</a> and best practice for <a href="https://strategy.data.gov/" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'FDS')">Federal Data Strategy</a> (See <a href="#/policy"
target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'Policy')">Policy page</a> for more details). This portal and related software is hosted in the USNISTGOV organization <a href="https://github.com/usnistgov/oar-developer" target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'OAR Github')">github repository</a> as an open source solution.
<!-- Text body -->
<div class="text-body" style="padding: 0px;">
<div class="container">
<div class="ui-g">
<div class="ui-g-12">
<div class="ui-g-12 ui-md-12 ui-lg-12 content"
style="clear: both;">
<img HSPACE=”50” VSPACE=”0” align=right class="main-image"
src="./assets/images/AboutNIST-wordcloud_D.jpg" alt="AboutNIST">
<div class="adv-step">
This National Institute of Standards and Technology (NIST) <b>Science Data Portal</b> provides a
user-friendly discovery and exploration tool for publicly available datasets at NIST. These data
products are generated as part of the NIST mission, spanning multiple
disciplines of scientific, engineering and technology research. NIST's publicly available data
sets showcase its commitment to providing accurate, well-curated measurements of physical
properties, exemplified by the <a href="https://www.nist.gov/srd" target="_blank"
(click)="gaService.gaTrackEvent('outbound', $event, 'Standard Reference Data program')">
Standard Reference Data program</a>, as well as its commitment to advancing basic research.
</div>
<div class="adv-step">
For <a
href="https://www.nist.gov/topics/data/public-access-nist-research/copyright-fair-use-and-licensing-statements-srd-data-and"
target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'Fair Use')"><b>Fair
Use</b></a> of these data, please include citation in your works including the Digital
Object
Identifier (DOI). NIST DOIs are registered with the <a href="https://www.datacite.org"
target="_blank" (click)="gaService.gaTrackEvent('outbound', $event, 'DataCite')">DataCite
organization</a> and provide globally unique persistent identifiers. The DOI also serves as
a direct link to data <i>homepages</i> giving access to the full research publication
description and underlying datasets.
</div>
<hr>
<div class="adv-step">
This portal is designed with <a href="https://www.go-fair.org/fair-principles/" target="_blank"
(click)="gaService.gaTrackEvent('outbound', $event, 'FAIR Data')"> FAIR principles</a> and
best practice for <a href="https://strategy.data.gov/" target="_blank"
(click)="gaService.gaTrackEvent('outbound', $event, 'FDS')">Federal Data Strategy</a> (See
<a href="#/policy" target="_blank"
(click)="gaService.gaTrackEvent('outbound', $event, 'Policy')">Policy page</a> for more
details). This portal and related software is hosted in the USNISTGOV organization <a
href="https://github.com/usnistgov/oar-developer" target="_blank"
(click)="gaService.gaTrackEvent('outbound', $event, 'OAR Github')">github repository</a> as
an open source solution.
</div>
</div>
</div>
</div>
</div>
<div class="ui-g-12 ui-md-6 ui-lg-1">
</div>
<div style="width: 100%">
<img style="float:right;width:45%; margin: 1em 2em 0em 0em;" src="./assets/images/AboutNIST-wordcloud_D.jpg" alt="AboutNIST">
</div>
</div>
</div>
</div>
12 changes: 11 additions & 1 deletion angular/src/app/about/about.component.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
import { Component, OnInit } from '@angular/core';
import { GoogleAnalyticsService } from '../shared/ga-service/google-analytics.service';
import { CommonService } from '../shared/common/common.service';
import { AppConfig, Config } from '../shared/config-service/config-service.service';

@Component({
selector: 'sdp-about',
templateUrl: './about.component.html',
styleUrls: ['./about.component.css']
})
export class AboutComponent implements OnInit {
imageURL: string;
confValues: Config;

constructor(public gaService: GoogleAnalyticsService, public commonService: CommonService) {
constructor(
public gaService: GoogleAnalyticsService,
private appConfig: AppConfig,
public commonService: CommonService)
{
this.confValues = this.appConfig.getConfig();
}

ngOnInit() {
this.imageURL = this.confValues.SDPAPI + 'assets/images/sdp-background.jpg';

}

}
6 changes: 0 additions & 6 deletions angular/src/app/about/about.routes.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { Route } from '@angular/router';
import { AboutComponent } from './about.component';
import { SearchTopBarComponent } from '../app.searchtopbar.component';


export const AboutRoutes: Route[] = [
Expand All @@ -10,11 +9,6 @@ export const AboutRoutes: Route[] = [
{
path: '',
component: AboutComponent
},
{
path: '',
component: SearchTopBarComponent,
outlet: 'route1'
}
]
}
Expand Down
Loading

0 comments on commit df7900d

Please sign in to comment.