You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@guacamole.apache.org by vn...@apache.org on 2017/06/27 18:22:13 UTC
[1/2] incubator-guacamole-client git commit: GUACAMOLE-332: Correct
appearance of CAS redirect notification.
Repository: incubator-guacamole-client
Updated Branches:
refs/heads/master b26a664d6 -> 0903aaef0
GUACAMOLE-332: Correct appearance of CAS redirect notification.
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/5781a8db
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/5781a8db
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/5781a8db
Branch: refs/heads/master
Commit: 5781a8dba55c3edfd1229c23cb8ca25b6071a817
Parents: 04c70c7
Author: Michael Jumper <mj...@apache.org>
Authored: Mon Jun 26 09:50:24 2017 -0700
Committer: Michael Jumper <mj...@apache.org>
Committed: Mon Jun 26 09:50:24 2017 -0700
----------------------------------------------------------------------
extensions/guacamole-auth-cas/.gitignore | 2 +-
extensions/guacamole-auth-cas/pom.xml | 80 ++++++++++++++++++++
.../src/main/resources/casConfig.js | 33 --------
.../src/main/resources/casController.js | 30 --------
.../src/main/resources/config/casConfig.js | 33 ++++++++
.../main/resources/controllers/casController.js | 30 ++++++++
.../src/main/resources/guac-manifest.json | 14 +++-
.../src/main/resources/license.txt | 18 +++++
.../src/main/resources/styles/cas.css | 35 +++++++++
.../resources/templates/casTicketField.html | 5 ++
.../src/main/resources/translations/en.json | 2 +-
11 files changed, 213 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/.gitignore
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/.gitignore b/extensions/guacamole-auth-cas/.gitignore
index c3a023f..30eb487 100644
--- a/extensions/guacamole-auth-cas/.gitignore
+++ b/extensions/guacamole-auth-cas/.gitignore
@@ -1,3 +1,3 @@
*~
target/
-META-INF/
+src/main/resources/generated/
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/pom.xml
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/pom.xml b/extensions/guacamole-auth-cas/pom.xml
index af129f2..e76c50b 100644
--- a/extensions/guacamole-auth-cas/pom.xml
+++ b/extensions/guacamole-auth-cas/pom.xml
@@ -53,6 +53,85 @@
</configuration>
</plugin>
+ <!-- Pre-cache Angular templates with maven-angular-plugin -->
+ <plugin>
+ <groupId>com.keithbranton.mojo</groupId>
+ <artifactId>angular-maven-plugin</artifactId>
+ <version>0.3.2</version>
+ <executions>
+ <execution>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>html2js</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <sourceDir>${basedir}/src/main/resources</sourceDir>
+ <include>**/*.html</include>
+ <target>${basedir}/src/main/resources/generated/templates-main/templates.js</target>
+ <prefix>app/ext/guac-cas</prefix>
+ </configuration>
+ </plugin>
+
+ <!-- JS/CSS Minification Plugin -->
+ <plugin>
+ <groupId>com.samaxes.maven</groupId>
+ <artifactId>minify-maven-plugin</artifactId>
+ <version>1.7.5</version>
+ <executions>
+ <execution>
+ <id>default-cli</id>
+ <configuration>
+ <charset>UTF-8</charset>
+
+ <webappSourceDir>${basedir}/src/main/resources</webappSourceDir>
+ <webappTargetDir>${project.build.directory}/classes</webappTargetDir>
+
+ <cssSourceDir>/</cssSourceDir>
+ <cssTargetDir>/</cssTargetDir>
+ <cssFinalFile>cas.css</cssFinalFile>
+
+ <cssSourceFiles>
+ <cssSourceFile>license.txt</cssSourceFile>
+ </cssSourceFiles>
+
+ <cssSourceIncludes>
+ <cssSourceInclude>**/*.css</cssSourceInclude>
+ </cssSourceIncludes>
+
+ <jsSourceDir>/</jsSourceDir>
+ <jsTargetDir>/</jsTargetDir>
+ <jsFinalFile>cas.js</jsFinalFile>
+
+ <jsSourceFiles>
+ <jsSourceFile>license.txt</jsSourceFile>
+ </jsSourceFiles>
+
+ <jsSourceIncludes>
+ <jsSourceInclude>**/*.js</jsSourceInclude>
+ </jsSourceIncludes>
+
+ <!-- Do not minify and include tests -->
+ <jsSourceExcludes>
+ <jsSourceExclude>**/*.test.js</jsSourceExclude>
+ </jsSourceExcludes>
+ <jsEngine>CLOSURE</jsEngine>
+
+ <!-- Disable warnings for JSDoc annotations -->
+ <closureWarningLevels>
+ <misplacedTypeAnnotation>OFF</misplacedTypeAnnotation>
+ <nonStandardJsDocs>OFF</nonStandardJsDocs>
+ </closureWarningLevels>
+
+ </configuration>
+ <goals>
+ <goal>minify</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
<!-- Copy dependencies prior to packaging -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -105,6 +184,7 @@
<excludes>
<exclude>**/*.json</exclude>
<exclude>src/licenses/**/*</exclude>
+ <exclude>src/main/resources/templates/*.html</exclude>
</excludes>
</configuration>
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/casConfig.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/casConfig.js b/extensions/guacamole-auth-cas/src/main/resources/casConfig.js
deleted file mode 100644
index 76ee755..0000000
--- a/extensions/guacamole-auth-cas/src/main/resources/casConfig.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Config block which registers CAS-specific field types.
- */
-angular.module('guacCAS').config(['formServiceProvider',
- function guacCASConfig(formServiceProvider) {
-
- // Define field for ticket from CAS service
- formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
- templateUrl : '',
- controller : 'guacCASController',
- module : 'guacCAS'
- });
-
-}]);
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/casController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/casController.js b/extensions/guacamole-auth-cas/src/main/resources/casController.js
deleted file mode 100644
index 3ef1801..0000000
--- a/extensions/guacamole-auth-cas/src/main/resources/casController.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- * Controller for the "GUAC_CAS_TICKET" field which simply redirects the user
- * immediately to the authorization URI.
- */
-angular.module('guacCAS').controller('guacCASController', ['$scope',
- function guacCASController($scope) {
-
- // Redirect to authorization URI
- window.location = $scope.field.authorizationURI;
-
-}]);
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/config/casConfig.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/config/casConfig.js b/extensions/guacamole-auth-cas/src/main/resources/config/casConfig.js
new file mode 100644
index 0000000..95356f7
--- /dev/null
+++ b/extensions/guacamole-auth-cas/src/main/resources/config/casConfig.js
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Config block which registers CAS-specific field types.
+ */
+angular.module('guacCAS').config(['formServiceProvider',
+ function guacCASConfig(formServiceProvider) {
+
+ // Define field for ticket from CAS service
+ formServiceProvider.registerFieldType("GUAC_CAS_TICKET", {
+ templateUrl : 'app/ext/guac-cas/templates/casTicketField.html',
+ controller : 'guacCASController',
+ module : 'guacCAS'
+ });
+
+}]);
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/controllers/casController.js
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/controllers/casController.js b/extensions/guacamole-auth-cas/src/main/resources/controllers/casController.js
new file mode 100644
index 0000000..3ef1801
--- /dev/null
+++ b/extensions/guacamole-auth-cas/src/main/resources/controllers/casController.js
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Controller for the "GUAC_CAS_TICKET" field which simply redirects the user
+ * immediately to the authorization URI.
+ */
+angular.module('guacCAS').controller('guacCASController', ['$scope',
+ function guacCASController($scope) {
+
+ // Redirect to authorization URI
+ window.location = $scope.field.authorizationURI;
+
+}]);
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json b/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
index fd963a2..d241e38 100644
--- a/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
+++ b/extensions/guacamole-auth-cas/src/main/resources/guac-manifest.json
@@ -14,9 +14,15 @@
],
"js" : [
- "casModule.js",
- "casController.js",
- "casConfig.js"
- ]
+ "cas.min.js"
+ ],
+
+ "css" : [
+ "cas.min.css"
+ ],
+
+ "resources" : {
+ "templates/casTicketField.html" : "text/html"
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/license.txt
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/license.txt b/extensions/guacamole-auth-cas/src/main/resources/license.txt
new file mode 100644
index 0000000..042f3ce
--- /dev/null
+++ b/extensions/guacamole-auth-cas/src/main/resources/license.txt
@@ -0,0 +1,18 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/styles/cas.css
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/styles/cas.css b/extensions/guacamole-auth-cas/src/main/resources/styles/cas.css
new file mode 100644
index 0000000..6c775d2
--- /dev/null
+++ b/extensions/guacamole-auth-cas/src/main/resources/styles/cas.css
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+.cas-ticket-field-container {
+ height: 100%;
+ width: 100%;
+ position: fixed;
+ left: 0;
+ top: 0;
+ display: table;
+ background: white;
+}
+
+.cas-ticket-field {
+ width: 100%;
+ display: table-cell;
+ vertical-align: middle;
+ text-align: center;
+}
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/templates/casTicketField.html
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/templates/casTicketField.html b/extensions/guacamole-auth-cas/src/main/resources/templates/casTicketField.html
new file mode 100644
index 0000000..55ca4bb
--- /dev/null
+++ b/extensions/guacamole-auth-cas/src/main/resources/templates/casTicketField.html
@@ -0,0 +1,5 @@
+<div class="cas-ticket-field-container">
+ <div class="cas-ticket-field">
+ <p>{{ 'LOGIN.INFO_CAS_REDIRECT_PENDING' | translate }}</p>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/blob/5781a8db/extensions/guacamole-auth-cas/src/main/resources/translations/en.json
----------------------------------------------------------------------
diff --git a/extensions/guacamole-auth-cas/src/main/resources/translations/en.json b/extensions/guacamole-auth-cas/src/main/resources/translations/en.json
index dfda606..29d1363 100644
--- a/extensions/guacamole-auth-cas/src/main/resources/translations/en.json
+++ b/extensions/guacamole-auth-cas/src/main/resources/translations/en.json
@@ -6,7 +6,7 @@
"LOGIN" : {
"FIELD_HEADER_TICKET" : "",
- "INFO_CAS_REDIRECT_PENDING" : "Please wait, redirecting to CAS authentication."
+ "INFO_CAS_REDIRECT_PENDING" : "Please wait, redirecting to CAS authentication..."
}
}
[2/2] incubator-guacamole-client git commit: GUACAMOLE-332: Merge
Correct appearance of CAS redirect notification
Posted by vn...@apache.org.
GUACAMOLE-332: Merge Correct appearance of CAS redirect notification
Project: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/commit/0903aaef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/tree/0903aaef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-guacamole-client/diff/0903aaef
Branch: refs/heads/master
Commit: 0903aaef012d48dbec9f2067ccfc5a113ff1b6b2
Parents: b26a664 5781a8d
Author: Nick Couchman <vn...@apache.org>
Authored: Tue Jun 27 14:20:06 2017 -0400
Committer: Nick Couchman <vn...@apache.org>
Committed: Tue Jun 27 14:20:06 2017 -0400
----------------------------------------------------------------------
extensions/guacamole-auth-cas/.gitignore | 2 +-
extensions/guacamole-auth-cas/pom.xml | 80 ++++++++++++++++++++
.../src/main/resources/casConfig.js | 33 --------
.../src/main/resources/casController.js | 30 --------
.../src/main/resources/config/casConfig.js | 33 ++++++++
.../main/resources/controllers/casController.js | 30 ++++++++
.../src/main/resources/guac-manifest.json | 14 +++-
.../src/main/resources/license.txt | 18 +++++
.../src/main/resources/styles/cas.css | 35 +++++++++
.../resources/templates/casTicketField.html | 5 ++
.../src/main/resources/translations/en.json | 2 +-
11 files changed, 213 insertions(+), 69 deletions(-)
----------------------------------------------------------------------