Skip to content

Commit

Permalink
feat(k8s): add login page to hawtio-online
Browse files Browse the repository at this point in the history
  • Loading branch information
tadayosi committed Dec 7, 2021
1 parent be207bc commit 464eb50
Show file tree
Hide file tree
Showing 9 changed files with 159 additions and 131 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@
"vinyl": "2.1.0",
"process-nextick-args": "2.0.1",
"readable-stream": "2.3.7",
"@types/jquery": "2.0.53"
"@types/jquery": "2.0.53",
"uglify-js": "3.14.4"
}
}
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"gulp-replace": "~0.5.0",
"gulp-rev": "^7.0.0",
"gulp-typescript": "^4.0.0",
"gulp-uglify": "^2.0.0",
"gulp-uglify": "^3.0.0",
"gulp-usemin": "~0.3.0",
"typescript": "^3.3.0",
"yargs": "^9.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"gulp-replace": "~0.5.0",
"gulp-rev": "^7.0.0",
"gulp-typescript": "^4.0.0",
"gulp-uglify": "^2.0.0",
"gulp-uglify": "^3.0.0",
"gulp-usemin": "~0.3.0",
"license-reporter": "^1.2.1",
"typescript": "^3.3.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/online/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,11 @@ function copyImages() {
}

function siteBundle() {
return gulp.src('index.html')
return gulp.src('@(index|login).html')
.pipe(plugins.preprocess())
.pipe(plugins.usemin({
css: [plugins.cleanCss({ format: 'keep-breaks', inline: false })],
js : [plugins.uglify(), plugins.rev()],
css: [() => plugins.cleanCss({ format: 'keep-breaks', inline: false })],
js: [plugins.uglify, plugins.rev],
}))
.pipe(plugins.debug({ title: 'site bundle' }))
.pipe(gulp.dest('site'));
Expand Down Expand Up @@ -204,7 +205,7 @@ function watchLessFiles() {
}

function watchResources() {
return gulp.watch(['index.html', path.join(config.dist, '*')], { cwd: __dirname },
return gulp.watch(['@(index|login).html', path.join(config.dist, '*')], { cwd: __dirname },
gulp.series(ns('reload')));
}

Expand Down
98 changes: 98 additions & 0 deletions packages/online/head-partial.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
<head>
<meta charset="UTF8" />
<title>hawtio-online</title>
<base href='/online/' />
<link rel="icon" type="image/png" href="img/favicon.ico" sizes="128x128">

<!-- build:css style.css -->

<!-- datatables -->
<link rel="stylesheet" href="node_modules/datatables.net-dt/css/jquery.dataTables.css" />
<!-- patternfly 3 -->
<link rel="stylesheet" href="node_modules/patternfly/dist/css/patternfly.css">
<link rel="stylesheet" href="node_modules/patternfly/dist/css/patternfly-additions.css">
<!-- patternfly 4 -->
<link rel="stylesheet" href="node_modules/@hawtio/core/dist/css/patternfly.css">
<!-- angular-patternfly -->
<link rel="stylesheet" href="node_modules/angular-patternfly/dist/styles/angular-patternfly.css" />
<!-- openshift-logos-icon -->
<link rel="stylesheet" href="node_modules/openshift-logos-icon/style.css" />
<!-- @hawtio/core -->
<link rel="stylesheet" href="node_modules/@hawtio/core/dist/hawtio-core.css">
<!-- @hawtio/online-common -->
<link rel="stylesheet" href="node_modules/@hawtio/online-common/dist/hawtio-online-common.css">
<!-- @hawtio/online -->
<link rel="stylesheet" href="dist/hawtio-online.css" />

<!-- endbuild -->

<!-- build:js app.js -->

<!-- jquery -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<!-- jquery-match-height -->
<script src="node_modules/jquery-match-height/dist/jquery.matchHeight-min.js"></script>
<!-- datatables -->
<script src="node_modules/datatables.net/js/jquery.dataTables.js"></script>
<script src="node_modules/datatables.net-select/js/dataTables.select.js"></script>
<!-- bootstrap -->
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- patternfly -->
<script src="node_modules/patternfly/dist/js/patternfly.min.js"></script>
<!-- angular -->
<script src="node_modules/angular/angular.js"></script>
<!-- angular-animate -->
<script src="node_modules/angular-animate/angular-animate.min.js"></script>
<!-- angular-sanitize -->
<script src="node_modules/angular-sanitize/angular-sanitize.js"></script>
<!-- angular-route -->
<script src="node_modules/angular-route/angular-route.min.js"></script>
<!-- angular-cookies -->
<script src="node_modules/angular-cookies/angular-cookies.min.js"></script>
<!-- angular-ui-bootstrap -->
<script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>
<!-- angular-drag-and-drop-lists -->
<script src="node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.min.js"></script>
<!-- angular-datatables -->
<script src="node_modules/angularjs-datatables/dist/angular-datatables.min.js"></script>
<script src="node_modules/angularjs-datatables/dist/plugins/select/angular-datatables.select.min.js"></script>
<!-- angular-patternfly -->
<script src="node_modules/angular-patternfly/dist/angular-patternfly.js"></script>
<!-- lodash -->
<script src="node_modules/lodash/lodash.min.js"></script>
<!-- urijs -->
<script src="node_modules/urijs/src/URI.min.js"></script>
<!-- js-logger -->
<script src="node_modules/js-logger/src/logger.min.js"></script>
<!-- @hawtio/core -->
<script src="node_modules/@hawtio/core/dist/hawtio-core.js"></script>
<!-- marked -->
<script src="node_modules/marked/lib/marked.js"></script>
<!-- moment -->
<script src="node_modules/moment/min/moment.min.js"></script>
<!-- angular-moment -->
<script src="node_modules/angular-moment/angular-moment.min.js"></script>
<!-- @hawtio-oauth -->
<script src="node_modules/@hawtio/oauth/dist/hawtio-oauth.js"></script>
<script src="node_modules/ng-idle/angular-idle.js"></script>
<!-- hawtio-kubernetes-api -->
<script src="node_modules/eventemitter3/index.js"></script>
<script src="node_modules/@hawtio/kubernetes-api/dist/hawtio-kubernetes-api.js"></script>
<!-- jsonpath -->
<script src="node_modules/jsonpath/jsonpath.js"></script>
<!-- kubernetes-label-selector -->
<script src="node_modules/kubernetes-label-selector/labelSelector.js"></script>
<script src="node_modules/kubernetes-label-selector/labelFilter.js"></script>
<!-- angular-resource -->
<script src="node_modules/angular-resource/angular-resource.min.js"></script>
<!-- jolokia -->
<script src="node_modules/jolokia.js/jolokia.js"></script>
<script src="node_modules/jolokia.js/jolokia-simple.js"></script>
<!-- @hawtio/online-common -->
<script src="node_modules/@hawtio/online-common/dist/hawtio-online-common.js"></script>
<!-- @hawtio/online -->
<script src="dist/hawtio-online.js"></script>

<!-- endbuild -->

</head>
104 changes: 4 additions & 100 deletions packages/online/index.html
Original file line number Diff line number Diff line change
@@ -1,106 +1,10 @@
<!DOCTYPE html>
<html>

<head>
<title>hawtio-online</title>
<base href='/online/'></base>
<meta charset="UTF8" />
<link rel="icon" type="image/png" href="img/favicon.ico" sizes="128x128">
<!-- @include-static head-partial.html -->

<!-- build:css style.css -->
<body>
<hawtio-app></hawtio-app>
</body>

<!-- datatables -->
<link rel="stylesheet" href="node_modules/datatables.net-dt/css/jquery.dataTables.css" />
<!-- patternfly 3 -->
<link rel="stylesheet" href="node_modules/patternfly/dist/css/patternfly.css">
<link rel="stylesheet" href="node_modules/patternfly/dist/css/patternfly-additions.css">
<!-- patternfly 4 -->
<link rel="stylesheet" href="node_modules/@hawtio/core/dist/css/patternfly.css">
<!-- angular-patternfly -->
<link rel="stylesheet" href="node_modules/angular-patternfly/dist/styles/angular-patternfly.css" />
<!-- openshift-logos-icon -->
<link rel="stylesheet" href="node_modules/openshift-logos-icon/style.css" />
<!-- @hawtio/core -->
<link rel="stylesheet" href="node_modules/@hawtio/core/dist/hawtio-core.css">
<!-- @hawtio/online-common -->
<link rel="stylesheet" href="node_modules/@hawtio/online-common/dist/hawtio-online-common.css">
<!-- @hawtio/online -->
<link rel="stylesheet" href="dist/hawtio-online.css" />

<!-- endbuild -->

<!-- build:js app.js -->

<!-- jquery -->
<script src="node_modules/jquery/dist/jquery.min.js"></script>
<!-- jquery-match-height -->
<script src="node_modules/jquery-match-height/dist/jquery.matchHeight-min.js"></script>
<!-- datatables -->
<script src="node_modules/datatables.net/js/jquery.dataTables.js"></script>
<script src="node_modules/datatables.net-select/js/dataTables.select.js"></script>
<!-- bootstrap -->
<script src="node_modules/bootstrap/dist/js/bootstrap.min.js"></script>
<!-- patternfly -->
<script src="node_modules/patternfly/dist/js/patternfly.min.js"></script>
<!-- angular -->
<script src="node_modules/angular/angular.js"></script>
<!-- angular-animate -->
<script src="node_modules/angular-animate/angular-animate.min.js"></script>
<!-- angular-sanitize -->
<script src="node_modules/angular-sanitize/angular-sanitize.js"></script>
<!-- angular-route -->
<script src="node_modules/angular-route/angular-route.min.js"></script>
<!-- angular-cookies -->
<script src="node_modules/angular-cookies/angular-cookies.min.js"></script>
<!-- angular-ui-bootstrap -->
<script src="node_modules/angular-ui-bootstrap/dist/ui-bootstrap-tpls.js"></script>
<!-- angular-drag-and-drop-lists -->
<script src="node_modules/angular-drag-and-drop-lists/angular-drag-and-drop-lists.min.js"></script>
<!-- angular-datatables -->
<script src="node_modules/angularjs-datatables/dist/angular-datatables.min.js"></script>
<script src="node_modules/angularjs-datatables/dist/plugins/select/angular-datatables.select.min.js"></script>
<!-- angular-patternfly -->
<script src="node_modules/angular-patternfly/dist/angular-patternfly.js"></script>
<!-- lodash -->
<script src="node_modules/lodash/lodash.min.js"></script>
<!-- urijs -->
<script src="node_modules/urijs/src/URI.min.js"></script>
<!-- js-logger -->
<script src="node_modules/js-logger/src/logger.min.js"></script>
<!-- @hawtio/core -->
<script src="node_modules/@hawtio/core/dist/hawtio-core.js"></script>
<!-- marked -->
<script src="node_modules/marked/lib/marked.js"></script>
<!-- moment -->
<script src="node_modules/moment/min/moment.min.js"></script>
<!-- angular-moment -->
<script src="node_modules/angular-moment/angular-moment.min.js"></script>
<!-- @hawtio-oauth -->
<script src="node_modules/@hawtio/oauth/dist/hawtio-oauth.js"></script>
<script src="node_modules/ng-idle/angular-idle.js"></script>
<!-- hawtio-kubernetes-api -->
<script src="node_modules/eventemitter3/index.js"></script>
<script src="node_modules/@hawtio/kubernetes-api/dist/hawtio-kubernetes-api.js"></script>
<!-- jsonpath -->
<script src="node_modules/jsonpath/jsonpath.js"></script>
<!-- kubernetes-label-selector -->
<script src="node_modules/kubernetes-label-selector/labelSelector.js"></script>
<script src="node_modules/kubernetes-label-selector/labelFilter.js"></script>
<!-- angular-resource -->
<script src="node_modules/angular-resource/angular-resource.min.js"></script>
<!-- jolokia -->
<script src="node_modules/jolokia.js/jolokia.js"></script>
<script src="node_modules/jolokia.js/jolokia-simple.js"></script>
<!-- @hawtio/online-common -->
<script src="node_modules/@hawtio/online-common/dist/hawtio-online-common.js"></script>
<!-- @hawtio/online -->
<script src="dist/hawtio-online.js"></script>

<!-- endbuild -->

</head>

<body>
<hawtio-app></hawtio-app>
</body>
</html>
10 changes: 10 additions & 0 deletions packages/online/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>

<!-- @include-static head-partial.html -->

<body>
<hawtio-oauth-form-login></hawtio-oauth-form-login>
</body>

</html>
3 changes: 2 additions & 1 deletion packages/online/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@
"gulp-load-plugins": "^1.0.0",
"gulp-ng-annotate": "^2.0.0",
"gulp-notify": "^2.0.0",
"gulp-preprocess": "~3.0.1",
"gulp-rename": "^1.0.0",
"gulp-replace": "~0.5.0",
"gulp-rev": "^7.0.0",
"gulp-typescript": "^4.0.0",
"gulp-uglify": "^2.0.0",
"gulp-uglify": "^3.0.0",
"gulp-usemin": "~0.3.0",
"license-reporter": "^1.2.1",
"merge2": "^1.2.1",
Expand Down
59 changes: 36 additions & 23 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2702,6 +2702,15 @@ gulp-notify@^2.0.0:
node.extend "^1.1.3"
through2 "^0.6.3"

gulp-preprocess@~3.0.1:
version "3.0.3"
resolved "https://registry.yarnpkg.com/gulp-preprocess/-/gulp-preprocess-3.0.3.tgz#7b0a5a13a7984fbc7e1a33978f14a6783dda115b"
integrity sha512-hda2bIlIB+HsRNDKAl/m6vWUQhXMZOmzHhuivwIWf0dWMeKZ3DXLuUeCo0xZNlNRN+/Az49pTopTkTsiYv1SBw==
dependencies:
lodash "^4.17.15"
map-stream "^0.1.x"
preprocess "^3.0.0"

gulp-rename@^1.0.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/gulp-rename/-/gulp-rename-1.4.0.tgz#de1c718e7c4095ae861f7296ef4f3248648240bd"
Expand Down Expand Up @@ -2742,18 +2751,20 @@ gulp-typescript@^4.0.0:
vinyl "^2.1.0"
vinyl-fs "^3.0.0"

gulp-uglify@^2.0.0:
version "2.1.2"
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-2.1.2.tgz#6db85b1d0ee63d18058592b658649d65c2ec4541"
integrity sha1-bbhbHQ7mPRgFhZK2WGSdZcLsRUE=
gulp-uglify@^3.0.0:
version "3.0.2"
resolved "https://registry.yarnpkg.com/gulp-uglify/-/gulp-uglify-3.0.2.tgz#5f5b2e8337f879ca9dec971feb1b82a5a87850b0"
integrity sha512-gk1dhB74AkV2kzqPMQBLA3jPoIAPd/nlNzP2XMDSG8XZrqnlCiDGAqC+rZOumzFvB5zOphlFh6yr3lgcAb/OOg==
dependencies:
array-each "^1.0.1"
extend-shallow "^3.0.2"
gulplog "^1.0.0"
has-gulplog "^0.1.0"
lodash "^4.13.1"
isobject "^3.0.1"
make-error-cause "^1.1.1"
safe-buffer "^5.1.2"
through2 "^2.0.0"
uglify-js "~2.8.10"
uglify-save-license "^0.4.1"
uglify-js "^3.0.5"
vinyl-sourcemaps-apply "^0.2.0"

gulp-usemin@~0.3.0:
Expand Down Expand Up @@ -3711,7 +3722,7 @@ lodash.uniq@^4.3.0:
resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M=

lodash@4.17.21, lodash@^4.0.0, lodash@^4.13.1, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@~1.0.1, lodash@~4.17.10, lodash@~4.17.21:
lodash@4.17.21, lodash@^4.0.0, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4, lodash@~1.0.1, lodash@~4.17.10, lodash@~4.17.21:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
Expand Down Expand Up @@ -3772,7 +3783,7 @@ map-obj@^1.0.0, map-obj@^1.0.1:
resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d"
integrity sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0=

map-stream@0.0.7, map-stream@0.1.0:
map-stream@0.0.7, map-stream@0.1.0, map-stream@^0.1.x:
version "0.1.0"
resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194"
integrity sha1-5WqpTEyAVaFkBKBnS3jyFffI4ZQ=
Expand Down Expand Up @@ -4610,6 +4621,13 @@ prelude-ls@~1.1.2:
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=

preprocess@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/preprocess/-/preprocess-3.2.0.tgz#36b3e2c52331fbc6fabb26d4fd5709304b7e3675"
integrity sha512-cO+Rf+Ose/eD+ze8Hxd9p9nS1xT8thYqv8owG/V8+IS/Remd7Z17SvaRK/oJxp08yaM8zb+QTckDKJUul2pk7g==
dependencies:
xregexp "3.1.0"

pretty-hrtime@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
Expand Down Expand Up @@ -5711,20 +5729,10 @@ typescript@^3.0.3, typescript@^3.3.0:
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.3.tgz#d3ac8883a97c26139e42df5e93eeece33d610b8a"
integrity sha512-D/wqnB2xzNFIcoBG9FG8cXRDjiqSTbG2wd8DMZeQyJlP1vfTkIxH4GKveWaEBYySKIg+USu+E+EDIR47SqnaMQ==

uglify-js@^2.8.22, uglify-js@~2.8.10:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0=
dependencies:
source-map "~0.5.1"
yargs "~3.10.0"
optionalDependencies:
uglify-to-browserify "~1.0.0"

uglify-save-license@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/uglify-save-license/-/uglify-save-license-0.4.1.tgz#95726c17cc6fd171c3617e3bf4d8d82aa8c4cce1"
integrity sha1-lXJsF8xv0XHDYX479NjYKqjEzOE=
uglify-js@^2.8.22, uglify-js@^3.0.5:
version "3.14.4"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.14.4.tgz#68756f17d1b90b9d289341736cb9a567d6882f90"
integrity sha512-AbiSR44J0GoCeV81+oxcy/jDOElO2Bx3d0MfQCUShq7JRXaM4KtQopZsq2vFv8bCq2yMaGrw1FgygUd03RyRDA==

uglify-to-browserify@~1.0.0:
version "1.0.2"
Expand Down Expand Up @@ -6057,6 +6065,11 @@ xmlcreate@^1.0.1:
resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-1.0.2.tgz#fa6bf762a60a413fb3dd8f4b03c5b269238d308f"
integrity sha1-+mv3YqYKQT+z3Y9LA8WyaSONMI8=

xregexp@3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-3.1.0.tgz#14d8461e0bdd38224bfee5039a0898fc42fcd336"
integrity sha1-FNhGHgvdOCJL/uUDmgiY/EL80zY=

xtend@4.0.1, "xtend@>=4.0.0 <4.1.0-0", xtend@~4.0.0, xtend@~4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"
Expand Down

0 comments on commit 464eb50

Please sign in to comment.