From 9965af9ccdeb6b410cdabb369521a815a32c2002 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 5 Oct 2015 09:48:52 -0700 Subject: [PATCH 1/3] fixing links, and adding zeroclipboard --- bower.json | 3 ++- gulp/build.js | 2 +- lemur/static/app/angular/app.js | 10 ++++++++-- lemur/static/app/angular/welcome/welcome.html | 6 +++--- 4 files changed, 14 insertions(+), 7 deletions(-) diff --git a/bower.json b/bower.json index ccb98a7a..f2fdb903 100644 --- a/bower.json +++ b/bower.json @@ -31,7 +31,8 @@ "satellizer": "~0.9.4", "angularjs-toaster": "~0.4.14", "ngletteravatar": "~3.0.1", - "angular-ui-router": "~0.2.15" + "angular-ui-router": "~0.2.15", + "angular-zeroclipboard": "~0.7.0" }, "devDependencies": { "angular-mocks": "~1.3", diff --git a/gulp/build.js b/gulp/build.js index 07ad3c5f..7553f5a0 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -136,7 +136,7 @@ gulp.task('dev:scripts', function () { }); gulp.task('build:extras', function () { - return gulp.src(['lemur/static/app/*.*', '!lemur/static/app/*.html']) + return gulp.src(['lemur/static/app/*.*', 'bower_components/zeroclipboard/dist/ZeroClipboard.swf', '!lemur/static/app/*.html']) .pipe(gulp.dest('lemur/static/dist')); }); diff --git a/lemur/static/app/angular/app.js b/lemur/static/app/angular/app.js index 386b696d..4eddecfd 100644 --- a/lemur/static/app/angular/app.js +++ b/lemur/static/app/angular/app.js @@ -14,9 +14,10 @@ var lemur = angular 'uiSwitch', 'mgo-angular-wizard', 'satellizer', - 'ngLetterAvatar' + 'ngLetterAvatar', + 'zeroclipboard' ]) - .config(function ($stateProvider, $urlRouterProvider, $authProvider) { + .config(function ($stateProvider, $urlRouterProvider, $authProvider, uiZeroclipConfigProvider) { $urlRouterProvider.otherwise('/welcome'); $stateProvider @@ -36,6 +37,11 @@ var lemur = angular authorizationEndpoint: 'https://example.com/as/authorization.oauth2', requiredUrlParams: ['scope'] }); + + // config ZeroClipboard + uiZeroclipConfigProvider.setZcConf({ + swfPath: 'ZeroClipboard.swf' + }); }); lemur.service('MomentService', function () { diff --git a/lemur/static/app/angular/welcome/welcome.html b/lemur/static/app/angular/welcome/welcome.html index c6bcd03f..ec91b8b6 100644 --- a/lemur/static/app/angular/welcome/welcome.html +++ b/lemur/static/app/angular/welcome/welcome.html @@ -10,17 +10,17 @@

Create

With Lemur you can create certificates from any authority; internal or external! Lemur does not issue certificates itself. Instead it acts as a broker, creating private keys and CSRs that are sent to external services.

-

View certificates »

+

View certificates »

Deploy

Once certificates have been created with Lemur, you can put them to use! Lemur has the ability to create destinations for certificates that allow them to be uploaded to and used by a variety of environments.

-

View Destinations »

+

View Destinations »

Authority

Have an internal Certificate Authority? Need an easy way to create an manage those authorities? Lemur has you covered!

-

View Authorities »

+

Dashboard role="button">View Authorities »

From 63b7b71b491a57941d5d18ccc40dc788b0b59bdc Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 5 Oct 2015 16:06:56 -0700 Subject: [PATCH 2/3] adding clipboard functionality --- bower.json | 4 +- gulp/build.js | 6 +- lemur/static/app/angular/app.js | 9 +- .../angular/certificates/view/view.tpl.html | 196 ++++++++++-------- lemur/static/app/angular/welcome/welcome.html | 4 +- lemur/static/app/styles/lemur.css | 10 + 6 files changed, 127 insertions(+), 102 deletions(-) diff --git a/bower.json b/bower.json index f2fdb903..4478b775 100644 --- a/bower.json +++ b/bower.json @@ -32,7 +32,9 @@ "angularjs-toaster": "~0.4.14", "ngletteravatar": "~3.0.1", "angular-ui-router": "~0.2.15", - "angular-zeroclipboard": "~0.7.0" + "angular-zeroclipboard": "~0.7.0", + "clipboard": "~1.4.0", + "angular-clipboard": "~1.1.1" }, "devDependencies": { "angular-mocks": "~1.3", diff --git a/gulp/build.js b/gulp/build.js index 7553f5a0..3bc41eaf 100644 --- a/gulp/build.js +++ b/gulp/build.js @@ -72,7 +72,6 @@ gulp.task('dev:styles', function () { }; var fileList = [ - 'lemur/static/app/styles/lemur.css', 'bower_components/bootswatch/sandstone/bootswatch.less', 'bower_components/fontawesome/css/font-awesome.css', 'bower_components/angular-spinkit/src/angular-spinkit.css', @@ -81,7 +80,8 @@ gulp.task('dev:styles', function () { 'bower_components/angular-ui-switch/angular-ui-switch.css', 'bower_components/angular-wizard/dist/angular-wizard.css', 'bower_components/ng-table/ng-table.css', - 'bower_components/angularjs-toaster/toaster.css' + 'bower_components/angularjs-toaster/toaster.css', + 'lemur/static/app/styles/lemur.css' ]; return gulp.src(fileList) @@ -136,7 +136,7 @@ gulp.task('dev:scripts', function () { }); gulp.task('build:extras', function () { - return gulp.src(['lemur/static/app/*.*', 'bower_components/zeroclipboard/dist/ZeroClipboard.swf', '!lemur/static/app/*.html']) + return gulp.src(['lemur/static/app/*.*', '!lemur/static/app/*.html']) .pipe(gulp.dest('lemur/static/dist')); }); diff --git a/lemur/static/app/angular/app.js b/lemur/static/app/angular/app.js index 4eddecfd..a3e259d7 100644 --- a/lemur/static/app/angular/app.js +++ b/lemur/static/app/angular/app.js @@ -15,9 +15,9 @@ var lemur = angular 'mgo-angular-wizard', 'satellizer', 'ngLetterAvatar', - 'zeroclipboard' + 'angular-clipboard' ]) - .config(function ($stateProvider, $urlRouterProvider, $authProvider, uiZeroclipConfigProvider) { + .config(function ($stateProvider, $urlRouterProvider, $authProvider) { $urlRouterProvider.otherwise('/welcome'); $stateProvider @@ -37,11 +37,6 @@ var lemur = angular authorizationEndpoint: 'https://example.com/as/authorization.oauth2', requiredUrlParams: ['scope'] }); - - // config ZeroClipboard - uiZeroclipConfigProvider.setZcConf({ - swfPath: 'ZeroClipboard.swf' - }); }); lemur.service('MomentService', function () { diff --git a/lemur/static/app/angular/certificates/view/view.tpl.html b/lemur/static/app/angular/certificates/view/view.tpl.html index 479674c9..26aa2657 100644 --- a/lemur/static/app/angular/certificates/view/view.tpl.html +++ b/lemur/static/app/angular/certificates/view/view.tpl.html @@ -6,11 +6,11 @@
@@ -32,7 +32,8 @@
- +
@@ -46,104 +47,121 @@
- - + +
- - -
    -
  • - Creator - - {{ certificate.creator.email }} - -
  • -
  • - Not Before - - {{ momentService.createMoment(certificate.notBefore) }} - -
  • -
  • - Not After - - {{ momentService.createMoment(certificate.notAfter) }} - -
  • -
  • - San - - - - -
  • -
  • - Bits - {{ certificate.bits }} -
  • -
  • - Serial - {{ certificate.serial }} -
  • -
  • - Validity - - Unknown - Revoked - Valid - -
  • -
  • - Description - {{ certificate.description }} -
  • -
-
- -
    -
  • - {{ notification.label }} - {{ notification.description}} -
  • -
-
- -
    -
  • - {{ destination.label }} - {{ destination.description }} -
  • -
-
- - - -
- - -

-

{{ certificate.chain }}
-

+ + Basic Info +
    +
  • + Creator + + {{ certificate.creator.email }} + +
  • +
  • + Not Before + + {{ momentService.createMoment(certificate.notBefore) }} + +
  • +
  • + Not After + + {{ momentService.createMoment(certificate.notAfter) }} + +
  • +
  • + San + + + + +
  • +
  • + Bits + {{ certificate.bits }} +
  • +
  • + Serial + {{ certificate.serial }} +
  • +
  • + Validity + + Unknown + Revoked + Valid + +
  • +
  • + Description + {{ certificate.description }} +
  • +
- -

-

{{ certificate.body }}
-

+ + Notifications +
    +
  • + {{ notification.label }} + {{ notification.description}} +
  • +
+
+ + Destinations +
    +
  • + {{ destination.label }} + {{ destination.description }} +
  • +
+
+ + Domains + + +
+ + + + Chain + + +
{{ certificate.chain }}
+
+ + + Public Certificate + + +
{{ certificate.body }}
Private Key + -

-

{{ certificate.privateKey }}
-

+
{{ certificate.privateKey }}
diff --git a/lemur/static/app/angular/welcome/welcome.html b/lemur/static/app/angular/welcome/welcome.html index ec91b8b6..99b9a803 100644 --- a/lemur/static/app/angular/welcome/welcome.html +++ b/lemur/static/app/angular/welcome/welcome.html @@ -10,7 +10,7 @@

Create

With Lemur you can create certificates from any authority; internal or external! Lemur does not issue certificates itself. Instead it acts as a broker, creating private keys and CSRs that are sent to external services.

-

View certificates »

+

View certificates »

Deploy

@@ -20,7 +20,7 @@

Authority

Have an internal Certificate Authority? Need an easy way to create an manage those authorities? Lemur has you covered!

-

Dashboard role="button">View Authorities »

+

View Authorities »

diff --git a/lemur/static/app/styles/lemur.css b/lemur/static/app/styles/lemur.css index dfd45f03..6ff900c6 100644 --- a/lemur/static/app/styles/lemur.css +++ b/lemur/static/app/styles/lemur.css @@ -169,3 +169,13 @@ a { background-color: #FFFFFF !important; } +.clipboard-btn { + border-width: 0; + background-color: transparent; + color: #777; + display: inline-block; + top: 0; + line-height: 1; +} + + From 3167ce97858c569246c2e48eb9c97c0cb99d91a3 Mon Sep 17 00:00:00 2001 From: kevgliss Date: Mon, 5 Oct 2015 16:08:12 -0700 Subject: [PATCH 3/3] removing unneeded dep --- bower.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/bower.json b/bower.json index 4478b775..f2c6973d 100644 --- a/bower.json +++ b/bower.json @@ -32,8 +32,6 @@ "angularjs-toaster": "~0.4.14", "ngletteravatar": "~3.0.1", "angular-ui-router": "~0.2.15", - "angular-zeroclipboard": "~0.7.0", - "clipboard": "~1.4.0", "angular-clipboard": "~1.1.1" }, "devDependencies": {