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
`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
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
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
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
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
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
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
To make things simpler for launching the web ui on a headless linux machine without
an installed browser.
Change-Id: I9664109a251eb80853441dbef33565c0f1874e62
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
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
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
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
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
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
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
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
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
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
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
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
This adds a build:draft command that generates a full application
with a configuration appropriate for docs-draft.
Change-Id: I007df8de43346a40ff4851f1cbb6c2aff676e2e8
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.