Commit Graph

54 Commits

Author SHA1 Message Date
Ghanshyam Mann d58ee7fb08 Retire openstack-health
openstack-health is QA repo and service to know the
job/test success/failure rate. But for a long (more than
a year), this code is broken. We do not have any maintainer
in QA to fix and maintain it. As it is broken, QA and infra team
agree to stop the service

- http://status.openstack.org/openstack-health/#/

In QA zed PTG, we decided to retire the repo also

- https://etherpad.opendev.org/p/qa-zed-ptg

Needed-By: https://review.opendev.org/c/openstack/governance/+/836706
Change-Id: Ie15aa8e469b0bb3aff47dcad422c0676fea640d2
2022-04-05 18:47:38 -05:00
Ghanshyam Mann b91c0054e4 Move openstack-health-nodejs10-run-test-browser to Firefox
openstack-health-nodejs10-run-test-browser job started failing on
chrome browser
- https://bugs.launchpad.net/stackviz/+bug/1909021

Horizon and its plugins also moved the nodejs browser jobs to
firefox now, let's move openstack-health jobs to firefox.

Closes-Bug: #1909021
Change-Id: I06476189c17323101b4904c3da52248ce04bfb83
2020-12-22 23:33:59 +00:00
Ansi Jain 08922f91e7 Fix gate: define nodejs10 jobs
Openstack-health uses horizon nodejs template [1] to run
nodejs10- jobs Which is wrong because openstack-health is
not a horizon plugins and above template is only for horizon
plugins to run node-js jobs.
This patch remove horizon nodejs template from .zuul.yaml
and define a new job to run Nodejs10 jobs on gate.

Also drop support of py35.

[1] https://opendev.org/openstack/openstack-health/src/branch/master/.zuul.yaml#L3

Change-Id: Ia222ce7f52ee1cfd575ed5204088f0eee2fe903e
2020-09-15 08:34:51 -05:00
manchandavishal a88c4fd073 Update nodejs to 10 LTS
This patch updates the zuul nodejs test jobs to use the
LTS version 10 of nodejs because nodejs4 version
run to xenial and we already switch to bionic. Horizon has
define a template for nodejs 10 job so using the same
template here.

Change-Id: I5fd09a0621a314e3ac508601ea1ec464e41b03b7
2020-03-05 05:53:10 +00:00
Masayuki Igawa f716b42b15
Update angularjs libraries version
This commit updates angularjs libraries version. This can be included in
the other npm packages update patch, however, I took a deliberate way
this time to avoid accident as possible.
This version is the latest against AngularJS[1] but not Angular[2]
because Angular is totally different from AngularJS. It's not so easy to
upgrade to it.

[1] https://www.angularjs.org/
[2] https://angular.io/

Change-Id: I0941d9a537681659b17150fc532668d6bc12fc05
2018-11-26 19:05:05 +09:00
Zuul e4dff96029 Merge "Fix gulp-util deprecation" 2018-03-30 07:54:16 +00:00
mccasland, trevor (tm2086) fd387956f4 Add support for HeadlessChrome in karma
Motivation for this change:
  As a tester, I want to execute npm unit tests in a headless
  chrome environment.

Notes on implementation:
  * Running headless chrome requires verion chrome 59 or greater[1]
  * --no-sandbox flag is a workaround for running as root[2]
  * HeadlessChrome base was added in karma-chrome-launcher v2.1.0[3]
    - upgrading to this package caused a CHROME_BIN not set error[4].
      Setting CHROME_BIN to chromium-browser fixes the issue.
  * Using Chrome without the upgraded packages causes an error during
    the coverage report generation
    - TypeError: Cannot read property 'start' of undefined[5]

[1] https://github.com/karma-runner/karma-chrome-launcher#available-browsers
[2] https://github.com/karma-runner/karma-chrome-launcher/issues/158
[3] https://github.com/karma-runner/karma-chrome-launcher/releases/tag/v2.1.0
[4] http://paste.openstack.org/show/715433/
[5] https://review.openstack.org/#/c/456556/9

Change-Id: I907708d73b5fe5345f3a56d8d638c51e7d3aa6f7
2018-03-27 15:05:26 -05:00
mccasland, trevor (tm2086) 238e3fd135 Fix gulp-util deprecation
This patchset aims to remove the gulp-util package using the
steps outlined in the deprecation message[1]
[1] https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

Change-Id: I11ed0f56cb3756e395f3684655f4b54e906b6a55
2018-03-19 22:49:29 +00:00
mccasland, trevor (tm2086) 4cc5c7e449 Fix npm-test: write after end error
The npm-test gate currently fails while bundling due to a
write after end error.
Here are some more details on the error:
  *snippet of the error[1]
  *link to sample run[2]

I tried a few solutions online and found this[3] to work with
how we bundle openstack-health. The release for 1.4.2 has been
out for some time so I was curious why it's just now starting to
fail but at least this gets the gate passing again.

[1]http://paste.openstack.org/show/688811/
[2]http://logs.openstack.org/66/547866/7/check/nodejs-npm-run-test/f21e7b5/
[3]https://github.com/substack/bulkify/issues/18

Change-Id: Id288e68a7b38382d99a1dfb886544f99c0714310
2018-03-02 13:02:22 -06:00
Tim Buckley 8f44e241b0 Lock required angular version to 1.6.2
This locks the angular version to v1.6.2. This should help avoid any
future breaking changes as well as force status.o.o to update from
1.5.0.

Change-Id: I623571bfb732935b7665ff0bc314063656df8536
2017-02-07 11:33:00 -07:00
Tim Buckley 38c9528eb1 Add base utilities for canvas charts
This commit adds support for our own custom canvas-based charts.
By avoiding SVG and rendering directly to a 2D canvas context, these
charts should greatly reduce memory usage and improve page
performance, particularly when scrolling or on browsers and platforms
without good hardware acceleration. Lag while scrolling or hovering
over data points should be almost entirely eliminated, especially on
data-heavy pages like the home page with large periods or certain test
pages.

This commit adds only the components shared between all charts. New
implementations of each specific chart type will be added in follow-up
patches.

Change-Id: I5aff9c647095d879982c9b4d6080eafc497368d6
2016-10-02 18:42:38 -06:00
Jenkins c03378f034 Merge "Replace loading bar to nprogress" 2016-09-13 21:55:06 +00:00
Matthew Treinish 4b90966759
De-vendorify d3 and nvd3
It's been almost a year since we started openstack-health, and most of
the bugs and/or missing features from nvd3 have been addressed. This
commit moves us onto the nvd3 releases and packages instead of using
a random git snapshot from Oct. 2015.

Change-Id: Ibfefe310fbad1d80f4c7ec96bda083d97a09824e
2016-08-05 13:01:45 -04:00
Masayuki Igawa 6927ee48dc Replace loading bar to nprogress
This commit replaces the loading bar to the nprogress. It is fancier
than the original one. And this new loading bar have the ability to
inform users about the true progress. So we might be able to implement
a better progress bar mechanism in the future.

Change-Id: If3b4ef66759e96c6807bd6aea150c21ffb3f95d1
2016-07-15 10:17:36 +09:00
Tim Buckley e657b09726 Add karma-subunit-reporter to generate subunit results for unit tests
This adds a new plugin, 'karma-subunit-reporter', to generate subunit
streams for unit test output. These files should be compatible with
subunit2sql and (with appropriate log client configuration) could be
displayed in openstack-health or other tools like stackviz.

Change-Id: I7a72c0330852a9afd6bff35436978d9d1c266551
2016-06-10 09:19:55 -06:00
Tim a0561d5503 Disable Protractor tests and enable strictDi
This disables the Protractor E2E tests due to a high failure rate
related to a protractor/chrome bug [1] where ChromeDriver would
frequently hang. The E2E tests were mainly used to check for
dependency injection failures, but they didn't catch all (or even
most) failures. Instead, this enables angular's built-in 'strictDi'
mode, which will raise errors during normal development (i.e.
non-production builds) and during unit tests whenever a bad injection
is used.

[1] https://github.com/angular/protractor/issues/2419

Change-Id: I825986a3df457326a6c0c0c3b4d8584617a9d5e2
2016-04-02 14:27:08 -06:00
Tim Buckley 12016682bb Use prefix API on tests and tests detail pages
This uses the new prefix APIs to provide server-side processing for
listing tests by prefix and pagination. This removes the need for
users to download the entire list of all tests (~4 MB of JSON taking
15 seconds to generate and download), instead sending only a list of
prefixes which the user can select from (~6 KB and < 0.5 seconds to
load). Additionally, the tests detail page now loads a paginated list
of tests by prefix from the server, greatly reducing the required time
and memory needed to load the page.

Change-Id: I103f77c63c4cb8200db842f48c514b4a214ef9b7
2016-03-31 01:26:51 +00:00
Masayuki Igawa e6ce7c1fb5 Change header of homepage status panel to camel case
This commit changes the header of the homepage status panel to camel
case. Originally, only first words was lowercases such as 'project
Status', 'filename Status', etc. It's a little wired. So This commit
fixes it. And this commit changes snake cases to camel cases, too. For
example, 'build_branch Status' -> 'Build Branch Status'.

Change-Id: I2a3cb01640c83d5211bad7831be8a3ff67049629
2016-03-18 17:16:14 +09:00
Tim Buckley 1b68b36ccf Update angular-ui-bootstrap
This updates angular-ui-bootstrap to the latest version. Among other
fixes, this corrects some odd display behavior when showing the period
selection popover, and allows us to enable dismiss-on-outside-click
functionality.

Note that as of 1.0.0, directives from angular-ui-bootstrap are
prefixed with 'uib-'. The dropdowns in the crumb menu have been
updated to account for this.

Change-Id: I04ff7d057ca881295c23b50eb277a60add384fbd
2016-03-16 03:00:56 +00:00
Tim Buckley 567d9d2a24 Run unit tests in Chrome instead of PhantomJS
This commit adds karma-chrome-launcher and changes karma's settings
to use Chrome for all unit tests, removing PhantomJS. This change
is mainly to avoid downloading PhantomJS during gate tests, as the
phantomjs platform binaries would be downloaded from bitbucket and
their download servers have been returning rate limiting jobs and
returning 429 errors, leading to failed test runs. Since Chrome is
automatically installled from local mirrors, this should avoid the
problem entirely.

Change-Id: I5aba5480b34c4b4a6646f96c382c010495b3ea1b
2016-03-15 15:29:26 -06:00
Masayuki Igawa d4ecb58644 Update angularjs and phantomjs package
This commit bumps up the angularjs and phantomjs version to resolve the
testing failure.
NOTE: phantomjs was renamed to phantomjs-prebuilt[1].

[1] https://www.npmjs.com/package/phantomjs

Change-Id: Ie046865749bd152f4d3dd3b485d34953963087f2
2016-02-17 09:23:48 +09:00
Jenkins a030483fdb Merge "Add user-selectable date and duration picker." 2016-01-31 21:21:10 +00:00
Tim Buckley 4473e6e6f6 Add user-selectable date and duration picker.
This adds a new date and duration picker to the crumb menu, along with
functionality in the view service to manage window size preferences
for views and users. Each controller can now specify allowed period
sizes and a preferred default which can be overridden by the user. The
user may also request an arbitrary end date, which defaults to the
current date.

A new library, moment, was added to help with the date caluclations,
as the builtin date utilities lack a huge amount of needed
functionality for computing date differences. Note that a run of
`npm install` may be needed to update local installations to reflect
the change.

Change-Id: I64c1629e527fcf5b4a167fba50c2bb3fe80a2e96
2016-01-29 10:24:19 -07:00
Masayuki Igawa 98769467a0 Bump up angular-ui-router version
This commit bumps up angular-ui-router version. We fixed the issue of
the '/' encoding with Iceca852e15a6d023b758de52800088ab1456d931 . So we
need >=0.2.16 now[1].

[1] https://github.com/angular-ui/ui-router/commit/02e98660

Change-Id: I9986e56d310b5821534b28c9daa5487d07bb92a6
2016-01-27 19:08:27 +09:00
Tim Buckley 6e3f74a847 Enable Protractor end-to-end testing.
This enables end-to-end testing with Protractor, along with some
basic route and page load testing for the home and project pages.
PhantomJS is used to execute tests, and API requests are mocked
using `protractor-http-mock` (see `test/e2e/mocks/`).

A new gulp `e2e` task is also added to prepare and execute the
tests, along with a shortcut, `npm run protractor`. The default
`npm run test` is also amended to include E2E tests, with unit
tests moved to the new shortcut `npm run unit`.

Change-Id: Idb2eef2d851035c715e23553db56fc80deeab8e7
2015-11-11 17:02:27 -07:00
Jenkins ed26267b06 Merge "Add karma-spec-reporter" 2015-11-01 01:44:57 +00:00
Glauco Oliveira 2e168b4ce5 Add karma-spec-reporter
While writing unit tests around our components I found it really
difficult to understand what was going on once a failure happened due to
the lacke of information given by karma progress reporter.
While talking to a few people on the community, found out that karma
spec reporter gives you better feedback.

Change-Id: I0a3278d7ff424e0b3218e3f7b1a2f8356eb51ceb
2015-10-28 11:40:13 +09:00
Jenkins d57c2f9813 Merge "Downgrade karma-coverage to 0.2.6." 2015-10-23 17:52:37 +00:00
Jenkins 4d10db888b Merge "Use `gulp unit` instead of calling karma directly." 2015-10-23 14:13:15 +00:00
Tim Buckley 33d2259269 Downgrade karma-coverage to 0.2.6.
The 3.1 release of karma-coverage raises an error when writing
coverage reports. This downgrades to 0.2.6 which does not have
this issue.

Change-Id: I4f754346d9fe02f7ff37182a640ceb68f1b478be
2015-10-22 14:11:11 +00:00
Tim Buckley 93d24d9d24 Use `gulp unit` instead of calling karma directly.
When running Karma directly, Angular views are never compiled,
causing tests to fail. This replaces the direct call to karma with
`gulp unit` so views are compiled before karma is run.

Change-Id: I30b0ac39111b95755e6c8b4ec92646a3d3571b80
2015-10-22 13:49:29 +00:00
Matthew Treinish 66301ff221 Add a tests view
This commit adds a tests view to the dashboard, it has a bar graph
for all tests showing the failure rate and then a table listing the
per test stats for each test. This is a good starting point for
diving down into per test details.

Co-Authored-By: Glauco Oliveira <gvinici@thoughtworks.com>
Co-Authored-By: Caio Carrara <ccarrara@thoughtworks.com>
Change-Id: I56938734775c603cf5bac4f082d6dfae290dfbd0
2015-10-20 14:44:42 -02:00
Tim Buckley 7c58be1a32 Include d3 and nvd3 as static dependencies.
As the current latest release of nvd3 has a number of major bugs,
we need to use the latest available git release. However, depending
on libraries from `https://` Git repositories is broken on older
versions of npm.

As a workaround, this patch adds nvd3 (and consequently, d3 itself)
as static dependencies using the `vendor-js` mechanism and keeps
the code for each directly within our source tree.

Change-Id: I4fe83ca7eee21dcd1e6d2692f56592e6cb4ea74e
2015-10-14 15:32:48 -06:00
Tim Buckley 3ca729652c Use PhantomJS and enforce singleRun for tests.
Karma previously started a continuous server to allow for multiple
test runs, which would cause `npm test` to hang when tests finish.
This enables the config option `singleRun` so it quits after tests
have finished running.

Additionally, this removes Chrome and the Chrome launcher so tests
can be run properly in a headless environment.

Change-Id: Ib493d9cac3be5a83aa342b0f2a142f82a2757ffb
2015-10-14 15:24:58 -06:00
Jenkins 589c41fbea Merge "Bump the gulp-sass version" 2015-10-09 13:44:18 +00:00
Michael Krotscheck b324cd3b6b Switched from jshint to eslint
Both jshint and jslint contain the 'do no evil' license which
makes it unusable for OpenStack. This patch switches this project
to use eslint, the published eslint-config-openstack rules, and
the john-papa eslint style guides. It also adds the 'npm run lint'
command used by infra in the javascript-jobs macro.

Change-Id: I724d3a12fb5b9c85446adcd07c03a676e966bd41
2015-10-08 17:04:24 -07:00
Matthew Treinish 4c9440dd9a Bump the gulp-sass version
When running with node 4.x.x the gulp-sass version required was too
old to work with the node-sass version required by the packges.json.
This commit bumps the gulp-sass version to correspond to a version
which works with node 4.

Change-Id: I7e8947449b5e86c18a008d4cdbfa3d97c98aea9a
2015-10-07 09:26:47 -07:00
Tim Buckley 91fa7babb7 Replace Highcharts with d3 and Nvd3 charts.
This removes all highcharts code and replaces it with alternative
charts from Nvd3. The example implementations homepage charts
(i.e. the stock chart and gauges) have been modified to use the
new charts.

Change-Id: Ia813965c7d7cf61195e430aeb34dd091373dead8
2015-10-02 15:29:40 -06:00
Tim Buckley d7c7b594f3 Remove unused Node dependencies.
This removes several large and unnecessary node dependencies,
reducing the total space consumed by build dependencies by around
34%. In particular, `gulp-imagemin` and `debowerify` (along with
their associated build steps) are removed, freeing ~200MB.

Change-Id: Ic560d30c559ddd24f1a7089f5287ce26108de212
2015-09-18 11:41:00 -06:00
Jenkins 1d744a7609 Merge "Add shim for Highcharts." 2015-09-17 03:16:17 +00:00
Tim Buckley 42be30a166 Add shim for Highcharts.
As Highcharts does not support module loaders, remove its npm
dependency and add it manually as part of a new "vendor-js" build
step. Libraries in `app/vendor-js/` will be concatenated into a final
"vendor.js" file which is included manually into the index page. The
Highcharts module is then exposed via a shim.

Change-Id: I0d3b1d938b85ffe5f54fca7467a55a08507bd155
2015-09-16 16:05:45 +00:00
Anita Kuno c614729c18 Pin karma package to 0.12
Currently the karma package required is ^0.13.4, this is
greater than the maximum package expectation for gulp-karma.

This patch pins karma to ~0.12.0 which installs the latest
0.12.x package. This fixes the npm install error that was
seen prior to this patch.

Change-Id: I24c504cf5f5a8348ea9c8f9d550eda2aa2fb876d
2015-09-15 10:53:51 -06:00
David Lyle 9e0e69650c Adding highcharts.js 2015-09-14 15:26:39 -06:00
David Lyle 7dbd9d4b50 Rename to openstack-health 2015-09-14 14:16:34 -06:00
David Lyle edaf92d16d removing python elements 2015-09-14 14:08:12 -06:00
Tim Buckley b49f36f2ff Use `gulp-replace` to rewrite JS and CSS paths during `gzip` task. `index.html.gz` now links properly to gzipped resources allowing them to be distributed alone and unmodified. 2015-09-09 17:13:40 -06:00
Tim Buckley 7cdb1cfa86 Add font-awesome CSS and fonts along with angular-fontawesome 2015-09-02 15:51:26 -06:00
Tim Buckley 9e0f80a439 Add bootstrap and sb-admin-2 styles 2015-08-31 16:59:17 -06:00
Tim Buckley ef19a265a9 Add Angular boilerplate from `angularjs-gulp-browserify-boilerplate` 2015-08-31 15:18:45 -06:00
Austin Clark fd5990f283 Fix default dialog message 2015-08-20 09:20:21 -06:00