Commit Graph

46 Commits

Author SHA1 Message Date
Adam Coldrick c445307dc2 Reinstate "Add transpiling as a step in the build process"
This commit fixes the issue with https://review.opendev.org/#/c/600979/
where the minified output contained a mangled name, which broke
dependency injection for the `CardDetailController`.

It also re-adds the transpilation step to move towards allowing ES6
syntax at last.

This reverts commit fc60a0a5e0.

Change-Id: Ib90c4f5cd07a76deb5c1980bdc175849aa8a7de2
2019-10-26 11:42:53 +01:00
Adam Coldrick 884c395153 Remove unused imagemin build step
Change-Id: Iedd3ecaefe8ba0e0ce469098a86a864e87711276
2019-10-24 20:02:37 +01:00
Adam Coldrick b3ec6245cd Fix post job by setting some variables
`node_version` is set to cause a version of node to be installed that
actually works to build StoryBoard on bionic.

The remaining issue with this job is that zuul currently uploads
everything in the dist/ directory to tarballs.openstack.org. The
output directory of our build script is also modified to not be "dist"
to stop this causing an untarballed webclient being uploaded to
tarballs.openstack.org. `create_tarball_directory` is set in .zuul.yaml
to reflect the new location.

Needed-By: I9f435c12df2b355ac9d735e9eda3f70cc396f1d9
Change-Id: Ia8bf1dc99ee18d31a6d269b243eade71fe519b7d
2019-03-15 14:30:59 +00:00
Adam Coldrick fc60a0a5e0 Revert "Add transpiling as a step in the build process"
This reverts commit 53206e2894.

Change-Id: I9bf2922d09b34cc91bf2999ec9e0e1a35fb3d4fe
2018-09-11 15:29:26 +00:00
Jack Coldrick 53206e2894 Add transpiling as a step in the build process
Adding transpilation to the build process means that any JavaScript in
the src/app directory can now use ES6+ features. The uglify task is no
longer needed as minification is taken care of by Babel.

Change-Id: I3684ca59ac48d359ceb21cc0dfee28e57b9b597f
2018-09-08 22:31:52 +01:00
Adam Coldrick e5d53dbad3 Convert less to scss
This commit converts all our stylesheets from less to scss. Previously
Sass required ruby-compass, which wasn't easy to fit into our build
process. This is no longer the case so it makes sense to switch to
Sass/SCSS to enable us to streamline our build process and use some
of the more advanced features provided by Sass in the future.

Change-Id: I22fcbf4504d7756cd7ece41b0eca12985316db6b
2018-08-03 21:55:11 +01:00
Adam Coldrick 849440ed19 Update fontawesome to version 5
Version 5 of fontawesome has somewhat better icons for things
like tasks and boards. This commit makes the requisite changes
to our build process to support this upgrade, and switches to
the correct npm package for version 5. It also updates some
icon names which were changed between versions.

Change-Id: If7a538328156cc4007ae065ff96dac18fddd68da
2018-08-03 21:54:31 +01:00
Zuul 36dcf2848f Merge "Fix syntax highlighting" 2018-06-20 19:47:50 +00:00
Adam Coldrick b69a68680e Generate a tarball when running `grunt build`
The build automation expects a .tgz file to be generated by the build
process. This commit adds that functionality to our Gruntfile so that
the production tarball is actually generated.

Change-Id: Ibe9bf1be49befbdf15a5082493a55e707c5dcbc1
2018-05-09 22:51:53 +01:00
Adam Coldrick 0fc80f229a Fix syntax highlighting
Syntax highlighting is currently broken because the npm package for
highlight.js doesn't contain a version of highlight.js built for use
in-browser. This commit fixes this by switching to using the latest
published version of the highlightjs package, which does contain a
version of highlight.js built for use in-browser.

Change-Id: Ie340d77e0423688d3b4b625a997c95e919fdd666
2018-03-18 11:37:21 +00:00
Monty Taylor f442646269
Remove bower and add yarn support
bower is deprecated and intended to be replaced. yarn is the recommended
replacement for both things installed via npm and things installed via
bower.

Move the bower resources into package.json and add the yarn.lock file.
Zuul has support for installing yarn if a yarn.lock file is found and
using it to install things.

Change-Id: I848f22dce6196b2df9de4b9f585e857e03cdb0d7
2017-12-23 10:40:35 -06:00
David Lenwell 161659711d removed open option from npm serve
To make things simpler for launching the web ui on a headless linux machine without
an installed browser.

Change-Id: I9664109a251eb80853441dbef33565c0f1874e62
2017-02-23 08:19:40 -08:00
Michael Krotscheck 5009f8cff5 Removed grunt-bower
bower install is invoked during the npm postinstall phase, meaning
that it will always be initialized whenever a workspace is built.
Invoking it in the gruntfile is redundant.

Change-Id: Ib683efa157d7166d46e2d4ef8b09a1d91347e91f
2016-06-06 09:13:44 -07:00
Michael Krotscheck ff2736945f
Removed grunt test-unit in favor of just running karma
There's no actual need to use grunt to run karma. So we're not.

Change-Id: Iab0c6b0f04466ac045e0510370865bb99aea8e3d
2016-05-04 12:02:29 -07:00
Michael Krotscheck 265859f79d
Removed ineffective grunt target
The grunt test target invokes karma:integration, which doesn't
actually exist, and would therefore always fail. That's a pretty
good indication that this command is not in use.

Change-Id: Ia0e69fbe0c42c32a2507638ecdc98cd08ed4674e
2016-05-04 12:02:27 -07:00
Michael Krotscheck f72f752631
Removed grunt:eslint in favor of just running eslint
There's no actual need to use grunt to run eslint. So we're not.

Change-Id: Icfd19e4258fdec64a922fc683f2b0aaa7b8510a8
2016-04-12 07:29:06 -07:00
Adam Coldrick d0fea306cc Display the most recent commit SHA on the about page
Change-Id: Idca471882a6b06df5d840649efabcf3a6696b5d6
2015-12-16 15:41:39 +00:00
Adam Coldrick 01bd40c183 Add a page to view a worklist
Add a worklist detail page, and various other modal templates for
interacting with the worklist. Also add ng-sortable[0] as a new
dependency. This is used to allow drag-and-drop rearrangement of
the worklist contents.

[0]: https://github.com/a5hik/ng-sortable

Change-Id: I5cc85e687f9ce60db158168a9f4c8325b1a022f6
2015-10-08 09:40:54 +00:00
Adam Coldrick cdf7944065 Render descriptions and comments as Markdown
When displaying comments and descriptions for projects or stories,
render the content as Markdown before displaying it. This is a
simple way to support rich text descriptions and comments, and
there is no special editor as yet.

Any code in the supplied Markdown (indented by 4 spaces) will have
its syntax highlighted. The `highlightjs` module is used for syntax
highlighting and the `marked` module is used for parsing the
Markdown.

Also, stop eslint from raising an error when it thinks something is
undefined, and raise a warning instead. This is because the use of
`hljs` and `marked` was confusing the linter into thinking they
weren't defined.

Change-Id: I7896fd686a39e27f8068ee6db6747b2b5ab0ccfc
2015-09-22 10:04:53 +00:00
Michael Krotscheck 7230e03130 Removed eslint from compile step
With this patch, linting becomes an entirely separate step, invoked
by 'npm run lint'. It is no longer baked into our compile, build,
package flow.

Change-Id: Ic167ce7ffdee704d9c21be6db07884bfd06a3e33
2015-06-04 09:22:05 -07:00
Jenkins aed32f2116 Merge "Initial proposal for integration tests" 2015-05-11 09:48:44 +00:00
Michael Krotscheck 8e79019781 Added bower:install to gruntfile.
This patch adds the bower:install command to the gruntfile,
and links it in with various established commands. This allows
us to abstract the use of bower behind `npm run`, and decouples
infra's npm build from having to know about it.

Change-Id: Ic400a95991fc3a0283201979b632e01f066a49c7
2015-04-08 15:38:30 -07:00
Yolanda Robla 97fe898d8e Initial proposal for integration tests
Change-Id: I512b5c9474f80fd690fdea9d926d15b8146144e4
2015-04-07 11:05:19 +02:00
Michael Krotscheck 6b9d34a34d Removed grunt:server
It's been long enough, we can get rid of this.

Change-Id: I113095149af85a5c37327d75d3abf711adedc604
2015-03-31 13:36:07 -07:00
Michael Krotscheck 77ac547f80 Removed "Do No Evil" jshint and replaced with eslint.
eslint is not weighted down by the 'do no evil' license that plagues
jshint and jslint. It also replaces lintspaces. Some rules have been
explicitly deactivated and addressed in future patches.

Change-Id: I17ce9ea6c050563981dbd0d708cb8f3ec8bdbc76
2015-03-04 16:19:05 -08:00
Tom Pollard c7cee8a1a6 Gruntfile Connect Hostname commandline option
The default hostname in grunt connect plugin may now be set using the
'--hostname VALUE' option. This allows a developer to bind to alternate
IP addresses such as 0.0.0.0, making the grunt server accessible from a
host machine if doing development on a VM with port forwarding.

Documentation will be updated in a separate commit on
openstack-infra/storyboard

Change-Id: I94d48b1be5bb22e05d8f574e71d6886b21f23daa
2015-01-21 17:23:27 -08:00
Yolanda Robla 2250dc91e2 Add grunt-lintspaces module to check cr-at-end in js files
We are having problems in some files, that don't have cr at the end
of the file. Some other editors are automatically adding it, so it's
highlighting non-existent differences on gerrit when editing.

Add grunt-lintspaces to ensure that all js files end with newline.
Update all the files to end with a CR to prevent these errors.

Change-Id: If0c89399dbb5cdf94384e979a3cfe8038850193b
Story: 2000089
2015-01-07 13:29:23 +01:00
Michael Krotscheck f148f2d25e Eabled custom dev configuration.
Sometimes it is useful to allow an engineer to point the webclient
at an API not running on localhost. To address this edge case,
I have added src/config.json to .gitignore, and taught grunt how
to copy it during the dev build/deploy phase. If the file is not
found, it is ignored.

Do not merge until an equivalent patch to storyboard/docs is
provided.

Change-Id: I82229f92271d9094ec8ad4b52c38f3bc7ef7fa42
2014-12-01 07:18:07 -08:00
Richard Jones 58d82435d2 Switch to "serve" verb.
The grunt community has moved to using verbs consistently in their
task names, so "server" has been renamed "serve"; getting it wrong
results in a bizarro error, so this is slightly nicer for newcomers
to the project with history in other grunt projects.

Change-Id: If1266371d0e548e71f579e440ba7d4e7db07918f
2014-11-07 11:29:16 +01:00
Michael Krotscheck fa093128cd Removed server:prod
Javascript builds now generate a fully functional web client, code
reviews no longer require a user downloads the source to run it locally.
Furthermore, using the new configuration mechanism against prod requires
that the production server permit localhost:9000 as a CORS origin,
which it currently does not. Removing server:prod because we don't
really need it anymore.

Change-Id: Id2a57870fcf97eff9da5ec168197e616a1e35e1d
2014-10-01 10:15:57 -07:00
Michael Krotscheck 9b82d26ea3 Added draft build
This adds a build:draft command that generates a full application
with a configuration appropriate for docs-draft.

Change-Id: I007df8de43346a40ff4851f1cbb6c2aff676e2e8
2014-09-29 18:25:31 -07:00
Michael Krotscheck 6d8447c706 Fixed template inclusion for nested templates.
Nested templates were not being included in the template manifest,
because the ** selector apparently ignores slashes under some
circumstances. This fixes the issue, and also sets up a watch
target that matches the actual template-to-js command.

Change-Id: I86b13dfb16e21cc81cb391a82e7ccb63550dbb11
2014-07-18 16:23:26 -07:00
Michael Krotscheck 571c72bd16 New StoryBoard Logo
This patch adds both the openstack and storyboard font glyph source SVG
files to our repostiory, as well as a tool that allows us to convert
those SVG files into a font (with the associated LESS). The tool at
the moment still has to be run manually, because grunt-webtool requires
fontforge which is not installable via NPM (you can run it manually
using 'grunt webfont').

The old custom font has been removed.

(Put up as a separate patch because it's likely to be contentious)

Change-Id: I60be7ea3b8fce7cc210538719cc1ec5d20d50f60
2014-07-16 07:35:25 -07:00
Michael Krotscheck 86714a09ea Moved template files into related modules
This patch moves all HTML templates from the central 'templates' module
into their respective modules, while still creating the 'dummy'
sb.templates template cache injector.

The intent is to make it a little clearer which templates go with
which javascript files.

Change-Id: I8ec4929e18feedc5ec4a4cb53a46ff425bbdcf4a
2014-07-15 16:10:15 -07:00
Michael Krotscheck 2f885789b2 Added custom CSS aliases for common storyboard icons.
We're starting to use iconography within our UI, so it makes sense
to centralize the icons we're using for different resource types.
To accomplish this, I've added fontawesome to our LESS manifest,
removed it from our index.html (since now it's compiled into our
central theme), and created CSS class aliases for the common icons that
we use.

Change-Id: I7c9f5e1791a6152e3fdaea95dd80550b941f5d05
2014-06-26 12:02:33 -07:00
Michael Krotscheck 72c29d2c11 Favicon Whitelabel
This change allows us to whitelabel the favicon in the browser. Much
like the simple-whitelabel patch already landed, this makes use of
array ordering and file resolution to determine which favicon 'wins'.
In this case, both icons are copied, however if the custom font icon
actually exists, it will override storyboard's default icon.

Change-Id: Ic412a920d034b965ced25a7b63a51f82c4447a3d
2014-04-24 10:59:05 -07:00
Michael Krotscheck 978d3404e4 Enabled functional tests
An outstanding bug in grunt-connect-proxy v0.1.8 caused an error
in our selenium UI tests. I submitted a patch that was accepted
in v0.1.9, however that version was never properly deployed to
NPM due to the recent CA cert chain changes. The package
maintainer finally released a new version.

This commit upgrades the proxy to v0.1.10 and re-enables our
selenium tests.

Change-Id: Ia944f59e8b6f303a956ca2dbe7b506cf231c79bd
2014-04-18 09:16:11 -07:00
Michael Krotscheck 65a0b8c3ac Grunt build now supports package CSS
Up until now we were just using LESS to compile our styles, however in
many cases this is either unecessary (because the library includes a
CSS file already) or impossible (because a third-party library ONLY
includes CSS). In order to support a library's plain-css includes,
I've used font-awesome as a demo library to show how compiling plain
CSS would work. Bootstrap remains a LESS include, since we're using
variables to customize it.

- Added CSS compile block to index.html including font-awesome.css
- Removed font-awesome from LESS compile.

Change-Id: I52af102e139628bb8ff71a7e2f4ae413708ceb6e
2014-04-15 10:32:58 -07:00
Michael Krotscheck e4206a761e Simple whitelabeling
The LESS compiler resolves @import references on a 'first hit' basis,
allowing us to provide simple custom-theme support by providing a
directory with a higher resolution priority.

- Renamed the 'styles' directory to 'theme'
- Updated grunt-contrib-less version
- Added README for the super curious
- Moved files around to place files into their respective directories
- Added custom theme .less files to .gitignore
- Update build.

Change-Id: Ic55a6b463a993f58fc7f71ad51fe65b04601ed78
2014-04-14 18:02:34 -07:00
Michael Krotscheck 5751ac7eb9 Added prod convenience invocation
In order to facilitate UI testing, ttx asked for a convenient way to
run the webUI against the production API. This commit modifies the
proxy settings inside of grunt to allow this. To use, execute
tox -egrunt_no_api server:prod

Change-Id: Icc5432382a254825030b295d248d0d4b7efb9065
2014-03-24 11:13:02 -07:00
Michael Krotscheck 34f06c54df Fix NPM CA Chain issue and port conflict.
This patch includes two fixes. First, it disables our functional tests
because of a bug in grunt-connect-proxy, which is fixed by an
as-yet-not-accepted patch here:

81631b20c5

Secondly, it includes a temporary fix for the recent NPM CA chain update
explained here:

http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more

The basic premise is that the node package manager no longer supports
their self-signed certificate. This is good! Unfortunately, the
released version of npm is 1.4.4, but the one packaged with nodejs
0.10.26(stable) is 1.4.3. Until nodejs updates itself, we need to
temporarily bork the ca chain to update npm.

Since we're using throwaway slaves, and it's a temporary fix, and
node is only used for builds, I feel this is an acceptable risk.

Change-Id: Ic510e55355966591affbe25ce3f831ca424b2afa
2014-02-28 14:04:01 -08:00
Michael Krotscheck 062836f2dd MVP Storyboard Client
This patch constitutes the work discussed in Brussels for the MVP webclient.
 Changes made, as follows:

1- Updated header to contain Overview, Projects, Stories, and a "New Story"
button, including mobile treatment.
2- Updated navigation header to use selection styling for mobile and regular.
3- Application index contains new-story button.
4- Main application container now has a minheight.
5- Removed old controllers (code cleanup) before reimplementation.
6- Wired project views (require API support).
7- Wired story views (require API support).
8- Wired new story modal (require API support).
9- New task form (requires API support).
10- Wired up new functional tests and fixed a few issues in existing unit
tests.
11- Switched LESS compiler from recess to less, since recess can no longer
compile the most recent version of bootstrap.

Change-Id: Iddd5b29dd899d92f05ad7a9a63814d8599e167d4
2014-02-26 11:34:27 -08:00
Michael Krotscheck 9e4411efab Updated grunt proxy server to rewrite to WSGI in dev
When running storyboard as a developer, we run into a bit of a problem with
the apache mod_wsgi config (which prefixes a context root of /api/v1) vs.
our simple-server setup (which uses /v1 as a context root). Since this only
impacts the grunt server running locally, it seems appropriate to simply
rewrite the grunt CORS-buster proxy to handle this for us.

Change-Id: Iec9454c845a880f383a8c3a7bfc15db58101d549
2014-01-27 18:06:23 -08:00
Michael Krotscheck 2153ac56e5 Added storyboard API to webclient venv
This change adds the storyboard API as a dependency for the virtual
environment so we can run integration and functional tests with
a live API. It also sets up the grunt development server with a local
proxy so that we don't have to worry about implementing CORS immediately.

Change-Id: I4835649630ef69f13d73ef2a10dff860aceb1f49
2014-01-22 16:37:14 -08:00
Michael Krotscheck 457beec1c1 Customise Bootstrap
This commit updates the way our LESS is compiled so that we
can override the default bootstrap UI variables (color, padding,
font, etc) with our own colors. It also introduces the google
fonts inclusion for PT Sans, which is the title font currently
used on Openstack.org.

Change-Id: Id07ed27c4cde6113fc5f6aa483e9b5355d9873c6
2014-01-16 16:20:55 -08:00
Michael Krotscheck 197d5dd2bd Initial commit
This contains the initial commit for the storyboard web client
project, consisting of the basic build & testing harnesses,
simple set of routes, and a list of basic dependencies
necessary to run an application. It's purpose is to be
reference Javascript/Angular project to test out the build
images.
2014-01-14 18:49:39 -08:00