Skip to content

Commit

Permalink
Merge pull request #33 from Landoop/preparing-release
Browse files Browse the repository at this point in the history
Preparing release 0.9.0
  • Loading branch information
Antwnis authored Feb 7, 2017
2 parents 58f00c6 + b9dcd10 commit f15128c
Show file tree
Hide file tree
Showing 24 changed files with 710 additions and 320 deletions.
22 changes: 18 additions & 4 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ module.exports = function (grunt) {
'bower_components/angular/angular.min.js.map', // Include source-maps
'bower_components/angular-spinner/angular-spinner.min.js',
'bower_components/angular-spinner/angular-spinner.min.js.map', // Include source-maps
'bower_components/bootstrap/dist/css/bootstrap.min.css',
'bower_components/bootstrap/dist/css/bootstrap.min.css.map', // Include source-maps
'bower_components/angular-route/angular-route.min.js',
'bower_components/angular-route/angular-route.min.js.map', // Include source-maps
'bower_components/angular-animate/angular-animate.min.js',
Expand All @@ -48,12 +46,16 @@ module.exports = function (grunt) {
'bower_components/angular-ui-ace/ui-ace.min.js',
'bower_components/spin.js/spin.min.js',
'bower_components/angular-material/angular-material.min.js',
'bower_components/angular-sanitize/angular-sanitize.min.js',
'bower_components/angular-material-data-table/dist/md-data-table.min.css',
'bower_components/angular-material-data-table/dist/md-data-table.min.js',
'bower_components/angular-diff-match-patch/angular-diff-match-patch.js',
'bower_components/ace-diff/libs/diff_match_patch.js',
'bower_components/angular-json-tree/dist/angular-json-tree.min.js',
'bower_components/angular-json-tree/dist/angular-json-tree.css'
'bower_components/angular-json-tree/dist/angular-json-tree.css',
'bower_components/jszip/dist/jszip.min.js',
'bower_components/jszip/vendor/FileSaver.js',
'bower_components/jszip-utils/dist/jszip-utils.min.js'
],
dest: 'dist',
expand: true
Expand All @@ -79,7 +81,19 @@ module.exports = function (grunt) {
files: {
src: ['dist/index.html']
}
}
},
css: {
options: {
match: ['styles.css'],
replacement: 'md5',
src: {
path: 'dist/src/assets/css/styles.css'
}
},
files: {
src: ['dist/index.html']
}
}
},

usemin: {
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,14 @@ var clusters = [
{
NAME:"dev",
SCHEMA_REGISTRY: "http://localhost:8383",
COLOR: "red" // optional
COLOR: "red", // optional
allowGlobalConfigChange: true // optional
}
];
```
* Use `COLOR` to set different header colors for each set up cluster.
* Use `allowGlobalConfigChange` to enable configuring Global Compatibility Level from the UI.

## Changelog
[Here](https://github.com/Landoop/schema-registry-ui/wiki/Changelog)
Expand Down
3 changes: 3 additions & 0 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@
"bootstrap": "^3.3.6",
"angular-spinner": "^0.8.1",
"angular-material": "^1.0.9",
"angular-sanitize": "1.5.9",
"angularUtils-pagination": "angular-utils-pagination#^0.11.1",
"font-awesome": "fontawesome#^4.6.3",
"angular-material-data-table": "^0.10.9",
"ace-diff": "*",
"Stuk/jszip": "*",
"Stuk/jszip-utils": "*",
"angular-diff-match-patch": "^0.2.4",
"angular-json-tree": "^1.0.1"

Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN wget "https://caddyserver.com/download/build?os=linux&arch=amd64&features="
&& rm -f /caddy.tgz

# Add and Setup Schema-Registry-Ui
RUN wget "https://github.com/Landoop/schema-registry-ui/releases/download/v.0.8.0/schema-registry-ui-0.8.0.tar.gz" \
RUN wget "https://github.com/Landoop/schema-registry-ui/releases/download/v.0.9.0/schema-registry-ui-0.9.0.tar.gz" \
-O /schema-registry-ui.tar.gz \
&& mkdir /schema-registry-ui \
&& tar xzf /schema-registry-ui.tar.gz -C /schema-registry-ui \
Expand Down
3 changes: 2 additions & 1 deletion env.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ var clusters = [
{
NAME:"dev",
SCHEMA_REGISTRY: "http://localhost:8383",
COLOR: "red" // optional
COLOR: "red", // optional
allowGlobalConfigChanges: true // optional
}
];
29 changes: 16 additions & 13 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html>
<head>
<title>Schema Registry UI</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="bower_components/angular-material/angular-material.min.css">
<link rel="stylesheet" href="bower_components/angular-material-data-table/dist/md-data-table.min.css">
Expand All @@ -22,8 +21,14 @@
<header class="header" ng-controller="HeaderCtrl" style="background-color:{{color}}">
<div layout="row" layout-xs="column">
<div flex>
<h5><a href="{{cluster ? '#/cluster/'+cluster.NAME : '#/'}}">SCHEMA REGISTRY</a></h5>
<span class="title"><a style="color:#fff;" class="md-padding" href="{{cluster ? '#/cluster/'+cluster.NAME : '#/'}}">SCHEMA REGISTRY</a></span>
</div>

<a style="" class="exportSchemas"
ng-href="#/cluster/{{cluster.NAME}}/export" >
<i class="fa fa-download" aria-hidden="true"></i> <b>EXPORT SCHEMAS</b>
</a>

<label ng-show="!missingEnvJS && clusters.length > 1" class="selectClusterLabel"><b>SELECT CLUSTER :</b></label>
<md-input-container ng-show="!missingEnvJS && clusters.length > 1" class="selectCluster">
<md-select ng-model="connectEndPoint">
Expand Down Expand Up @@ -56,7 +61,8 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
{
NAME:"dev",
SCHEMA_REGISTRY: "http://localhost:8383",
COLOR: "red" // optional
COLOR: "red", // optional
allowGlobalConfigChanges: true // optional
}
];
</code>
Expand All @@ -66,25 +72,17 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
</div>

<!--Main Content Starts here-->
<div layout="row" layout-margin layout-sm="column" layout-xs="column" ng-controller="SchemaRegistryConfigCtrl" ng-hide="missingEnvJS">
<div layout="row" layout-margin layout-sm="column" layout-xs="column" ng-controller="SchemaRegistryConfigCtrl" ng-hide="missingEnvJS" style="margin-bottom:0;">
<div flex-gt-sm="33">
<div ng-include="'src/schema-registry/list/list.html'"></div>
<br>
<div ng-include="'src/schema-registry/config/config.html'" hide-sm hide-xs></div>
</div>
<div flex-gt-sm="66" flex>
<div flex-gt-sm="66" flex style="margin-bottom:0;">
<ng-view></ng-view>
<br>
<div ng-include="'src/schema-registry/config/config.html'" show-sm hide-gt-sm></div>
</div>
</div>
<div layout-margin flex>
<div flex="nogrow">
<img ng-src="src/assets/icons/landoop-dark.svg" style="width:20px;float: left;padding-right:5px;"></div>
<div flex>
<p class="md-caption">Powered by <a href="http://www.landoop.com/" target="_blank">Landoop</a></p>
</div>
</div>

<!--CUSTOM-FOOTER-->
<!-- analytics -->
Expand All @@ -95,13 +93,17 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
<script src="bower_components/spin.js/spin.min.js"></script>
<script src="bower_components/angular-spinner/angular-spinner.min.js"></script>
<script src="bower_components/angular-route/angular-route.min.js"></script>
<script src="bower_components/angular-sanitize/angular-sanitize.min.js"></script>
<script src="bower_components/angular-material/angular-material.min.js"></script>
<script src="bower_components/angular-animate/angular-animate.min.js"></script>
<script src="bower_components/angular-aria/angular-aria.min.js"></script>
<script src="bower_components/angular-material-data-table/dist/md-data-table.min.js"></script>
<script src="bower_components/angular-diff-match-patch/angular-diff-match-patch.js"></script>
<script src="bower_components/ace-diff/libs/diff_match_patch.js"></script>
<script src="bower_components/angular-json-tree/dist/angular-json-tree.min.js"></script>
<script src="bower_components/jszip/dist/jszip.min.js"></script>
<script src="bower_components/jszip/vendor/FileSaver.js"></script>
<script src="bower_components/jszip-utils/dist/jszip-utils.min.js"></script>

<script src="env.js"></script>

Expand All @@ -110,6 +112,7 @@ <h3 style="font-weight:300; color:red"><i class="fa fa-exclamation-triangle" ari
<script src="src/schema-registry/home/home.controller.js"></script>
<script src="src/schema-registry/config/config.controller.js"></script>
<script src="src/schema-registry/view/view.controller.js"></script>
<script src="src/schema-registry/export/export.controller.js"></script>
<script src="src/schema-registry/list/list.controller.js"></script>
<script src="src/schema-registry/new/new.controller.js"></script>
<script src="src/factories/dirPagination.js"></script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "schema-registry-ui",
"version": "0.8.0",
"version": "0.9.0",
"description": "A user interface for Confluent's Schema Registry",
"readme": "README.md",
"main": "Gruntfile.js",
Expand Down
42 changes: 40 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ var angularAPP = angular.module('angularAPP', [
'ngAria',
'md.data.table',
'diff-match-patch',
'angular-json-tree'
'angular-json-tree',
'ngSanitize'

]);

Expand All @@ -31,6 +32,10 @@ angularAPP.config(function ($routeProvider) {
templateUrl: 'src/schema-registry/new/new.html',
controller: 'NewSubjectCtrl as ctrl'
})
.when('/cluster/:cluster/export', {
templateUrl: 'src/schema-registry/export/export.html',
controller: 'ExportSchemasCtrl'
})
.when('/cluster/:cluster/schema/:subject/version/:version', {
templateUrl: 'src/schema-registry/view/view.html',
controller: 'SubjectsCtrl'
Expand All @@ -40,7 +45,7 @@ angularAPP.config(function ($routeProvider) {
// $locationProvider.html5Mode(true);
});

angularAPP.controller('HeaderCtrl', function ($rootScope, $scope, $location, env) {
angularAPP.controller('HeaderCtrl', function ($rootScope, $scope, $location, $log, SchemaRegistryFactory, env) {


$scope.$on('$routeChangeSuccess', function() {
Expand All @@ -63,6 +68,39 @@ angularAPP.run(
}
)

/* Custom directives */

angularAPP.directive('validJson', function() {
return {
require: 'ngModel',
priority: 1000,
link: function(scope, elem, attrs, ngModel) {

// view to model
ngModel.$parsers.unshift(function(value) {
var valid = true,
obj;
try {
obj = JSON.parse(value);
} catch (ex) {
valid = false;
}
ngModel.$setValidity('validJson', valid);
return valid ? obj : undefined;
});

// model to view
ngModel.$formatters.push(function(value) {
return value;//JSON.stringify(value, null, '\t');
});
}
};
});
angularAPP.config(['$compileProvider',
function ($compileProvider) {
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|tel|file|blob):/);
}]);

angularAPP.config(function ($mdThemingProvider) {
$mdThemingProvider.theme('default')
.primaryPalette('blue-grey')
Expand Down
Loading

0 comments on commit f15128c

Please sign in to comment.