Skip to content

Commit

Permalink
dropdown functional, set up local testing server
Browse files Browse the repository at this point in the history
  • Loading branch information
6palace committed Aug 30, 2017
1 parent 45a392c commit 32ed27c
Show file tree
Hide file tree
Showing 4 changed files with 249 additions and 11 deletions.
32 changes: 32 additions & 0 deletions uaa/slate/gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
var gulp = require('gulp');
var exec = require('child_process').exec;
var webserver = require('gulp-webserver');

function displayErrors(err, stdout, stderr) {
if(err != undefined) {
console.log("\nERROR FOUND\n\n" + err);
console.log("\nDUMPING STDOUT\n\n" + stdout);
console.log("\nDUMPING STDERR\n\n" + stderr);
process.exit();
}
}

gulp.task('middleman', function(cb) {
exec('bundle exec middleman build', function(err, stdout, stderr) {
if(err) return displayErrors(err, stdout, stderr);
cb();
});
});

gulp.task('webserver', ['middleman'], function() {
gulp.src('build').pipe(webserver({
livereload: true,
port: 9000
}));
});

gulp.task('watch', function() {
gulp.watch(['source/**/*'], ['middleman']);
});

gulp.task('default', ['middleman', 'webserver', 'watch']);
199 changes: 199 additions & 0 deletions uaa/slate/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
{
"name": "api-docs",
"version": "1.0.0",
"description": "Cloud Foundry UAA ========",
"main": "index.js",
"scripts": {
"start": "./node_modules/.bin/gulp",
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Cloud Foundry",
"license": "Apache-2.0",
"devDependencies": {
"accepts": "^1.3.2",
"ansi-regex": "^2.0.0",
"ansi-styles": "^2.2.0",
"archy": "^1.0.0",
"array-differ": "^1.0.0",
"array-uniq": "^1.0.2",
"balanced-match": "^0.3.0",
"batch": "^0.5.3",
"beeper": "^1.1.0",
"body-parser": "^1.15.0",
"brace-expansion": "^1.1.3",
"builtin-modules": "^1.1.1",
"bytes": "^2.3.0",
"camelcase": "^2.1.0",
"camelcase-keys": "^2.0.0",
"chalk": "^1.1.1",
"clone": "^1.0.2",
"clone-stats": "0.0.1",
"concat-map": "0.0.1",
"connect": "^3.4.1",
"connect-livereload": "^0.5.4",
"core-util-is": "^1.0.2",
"dateformat": "^1.0.12",
"debug": "^2.2.0",
"defaults": "^1.0.3",
"depd": "^1.1.0",
"deprecated": "0.0.1",
"destroy": "^1.0.4",
"duplexer2": "^0.1.4",
"ee-first": "^1.1.1",
"end-of-stream": "^1.1.0",
"error-ex": "^1.3.0",
"escape-html": "^1.0.3",
"escape-string-regexp": "^1.0.5",
"etag": "^1.7.0",
"extend": "^3.0.0",
"fancy-log": "^1.2.0",
"faye-websocket": "^0.11.0",
"finalhandler": "^0.4.1",
"find-index": "^1.1.0",
"find-up": "^1.1.2",
"findup-sync": "^0.3.0",
"first-chunk-stream": "^2.0.0",
"flagged-respawn": "^0.3.1",
"fresh": "^0.3.0",
"gaze": "^0.5.2",
"get-stdin": "^5.0.1",
"glob": "^7.0.3",
"glob-stream": "^5.3.2",
"glob-watcher": "^2.0.0",
"glob2base": "0.0.12",
"globule": "^0.2.0",
"glogg": "^1.0.0",
"graceful-fs": "^4.1.3",
"gulp": "^3.9.1",
"gulp-util": "^3.0.7",
"gulp-webserver": "^0.9.1",
"gulplog": "^1.0.0",
"has-ansi": "^2.0.0",
"has-gulplog": "^0.1.0",
"hosted-git-info": "^2.1.4",
"http-errors": "^1.4.0",
"iconv-lite": "^0.4.13",
"indent-string": "^2.1.0",
"inflight": "^1.0.4",
"inherits": "^2.0.1",
"interpret": "^1.0.0",
"is": "^3.1.0",
"is-arrayish": "^0.3.0",
"is-builtin-module": "^1.0.0",
"is-finite": "^1.0.1",
"is-utf8": "^0.2.1",
"isarray": "^1.0.0",
"liftoff": "^2.2.0",
"load-json-file": "^1.1.0",
"lodash": "^4.6.1",
"lodash._basecopy": "^3.0.1",
"lodash._basetostring": "^3.0.1",
"lodash._basevalues": "^3.0.0",
"lodash._escapehtmlchar": "^2.4.1",
"lodash._escapestringchar": "^2.4.1",
"lodash._getnative": "^3.9.1",
"lodash._htmlescapes": "^2.4.1",
"lodash._isiterateecall": "^3.0.9",
"lodash._isnative": "^2.4.1",
"lodash._objecttypes": "^2.4.1",
"lodash._reescape": "^3.0.0",
"lodash._reevaluate": "^3.0.0",
"lodash._reinterpolate": "^3.0.0",
"lodash._reunescapedhtml": "^2.4.1",
"lodash._shimkeys": "^2.4.1",
"lodash.defaults": "^4.0.1",
"lodash.escape": "^4.0.0",
"lodash.isarguments": "^3.0.8",
"lodash.isarray": "^4.0.0",
"lodash.isobject": "^3.0.2",
"lodash.keys": "^4.0.5",
"lodash.restparam": "^3.6.1",
"lodash.template": "^4.2.2",
"lodash.templatesettings": "^4.0.0",
"lodash.values": "^4.1.0",
"loud-rejection": "^1.3.0",
"lru-cache": "^4.0.0",
"map-obj": "^1.0.1",
"media-typer": "^0.3.0",
"meow": "^3.7.0",
"mime": "^1.3.4",
"mime-db": "^1.22.0",
"mime-types": "^2.1.10",
"minimatch": "^3.0.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",
"ms": "^0.7.1",
"multipipe": "^0.3.0",
"negotiator": "^0.6.0",
"node.extend": "^1.1.5",
"normalize-package-data": "^2.3.5",
"number-is-nan": "^1.0.0",
"object-assign": "^4.0.1",
"on-finished": "^2.3.0",
"once": "^1.3.3",
"open": "0.0.5",
"orchestrator": "^0.3.7",
"ordered-read-streams": "^0.3.0",
"os-homedir": "^1.0.1",
"parse-json": "^2.2.0",
"parseurl": "^1.3.1",
"path-exists": "^2.1.0",
"path-is-absolute": "^1.0.0",
"path-type": "^1.1.0",
"pify": "^2.3.0",
"pinkie": "^2.0.4",
"pinkie-promise": "^2.0.0",
"pretty-hrtime": "^1.0.2",
"process-nextick-args": "^1.0.6",
"proxy-middleware": "^0.15.0",
"qs": "^6.1.0",
"range-parser": "^1.0.3",
"raw-body": "^2.1.6",
"read-pkg": "^1.1.0",
"read-pkg-up": "^1.0.1",
"readable-stream": "^2.0.5",
"rechoir": "^0.6.2",
"redent": "^1.0.0",
"repeating": "^2.0.0",
"replace-ext": "0.0.1",
"resolve": "^1.1.7",
"semver": "^5.1.0",
"send": "^0.13.2",
"sequencify": "0.0.7",
"serve-index": "^1.7.3",
"serve-static": "^1.10.2",
"sigmund": "^1.0.1",
"signal-exit": "^2.1.2",
"sparkles": "^1.0.0",
"spdx-correct": "^1.0.2",
"spdx-exceptions": "^1.0.4",
"spdx-expression-parse": "^1.0.2",
"spdx-license-ids": "^1.2.0",
"statuses": "^1.2.1",
"stream-consume": "^0.1.0",
"string_decoder": "^0.10.31",
"strip-ansi": "^3.0.1",
"strip-bom": "^2.0.0",
"strip-indent": "^1.0.1",
"supports-color": "^3.1.2",
"through2": "^2.0.1",
"tildify": "^1.1.2",
"tiny-lr": "^0.2.1",
"trim-newlines": "^1.0.0",
"type-is": "^1.6.12",
"unique-stream": "^2.2.1",
"unpipe": "^1.0.0",
"user-home": "^2.0.0",
"util-deprecate": "^1.0.2",
"utils-merge": "^1.0.0",
"v8flags": "^2.0.11",
"validate-npm-package-license": "^3.0.1",
"vinyl": "^1.1.1",
"vinyl-fs": "^2.4.2",
"watch": "^0.17.1",
"websocket-driver": "^0.6.4",
"websocket-extensions": "^0.1.1",
"wrappy": "^1.0.1",
"xtend": "^4.0.1"
}
}
22 changes: 11 additions & 11 deletions uaa/slate/source/javascripts/app/_version_dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,15 @@
}

function setupVersionsDropdown() {
// $.get(
// "/versions.json",
// function(data) {
// var versions = data.versions
var versions =
[
"4.6.0-SNAPSHOT",
"release-candidate"
];
$.get(
"/versions.json",
function(data) {
var versions = data.versions
// var versions =
// [
// "4.6.0-SNAPSHOT",
// "release-candidate"
// ];
for(var i = 0; i < versions.length; i++) {
var version = versions[i];
if(version == "release-candidate") { continue; }
Expand All @@ -100,7 +100,7 @@
bindDropdownPointers();
populateFilter();
bindFilter();
// }
// );
}
);
}
})();
7 changes: 7 additions & 0 deletions uaa/slate/source/stylesheets/_dropdown.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#version-dropdown {
margin:10px;
position:relative;
}

#version-select { }

.dropdown-toggle {
width:100%;
text-align:left;
Expand Down

0 comments on commit 32ed27c

Please sign in to comment.