Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added way to override subpath for docker installations #212

Closed
wants to merge 11 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ Open source simple business intelligence application and sql editor tool for Cli

Not need, open in browser http://ui.tabix.io/

Alpha version : http://alpha.tabix.io


### If need install

[Install to you host](https://tabix.io/doc/Install/)
Expand Down
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"name": "Tabix",
"version": "18.06.1",
"name": "tabix",
"version": "18.07.1",
"dependencies": {
"metismenu": "2.6.1",
"angular-animate": "1.6.6",
"angular-aria": "1.5.9",
"jquery": "^3.2.1",
"jquery": "3.2.1",
"jquery-ui": "^1.12.1",
"angular": "1.6.6",
"angular-local-storage": "~0.2.7",
"angular-local-storage": "0.7.1",
"angular-screenfull": "^0.1.1",
"screenfull": "~3.0.2",
"angular-sanitize": "1.6.2",
Expand Down Expand Up @@ -147,7 +148,6 @@
"resolutions": {
"jquery": "~2.1.4",
"angular": "~1.5.11",
"d3": "~4.4.1",
"jquery-ui": "~1.12.1"
}
}
Binary file added build/assets/images/TabixBeta2018.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/plotly-toolpanel/fonts/unified.eot
Binary file not shown.
167 changes: 167 additions & 0 deletions build/assets/plotly-toolpanel/fonts/unified.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/assets/plotly-toolpanel/fonts/unified.ttf
Binary file not shown.
Binary file added build/assets/plotly-toolpanel/fonts/unified.woff
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions build/index.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!doctype html><html ng-app="SMI2"><head><meta charset="utf-8"><title>Tabix.io</title><meta name="viewport" content="width=device-width"><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="shortcut icon" href="/favicon.ico"><base href="/"><link rel="stylesheet" href="styles/vendor-da2acd4f9b.css"><link rel="stylesheet" href="styles/app-a6f222f8ee.css"></head><body><!--[if lt IE 10]>
<!doctype html><html ng-app="SMI2"><head><meta charset="utf-8"><title>Tabix.io</title><meta name="viewport" content="width=device-width"><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="shortcut icon" href="/favicon.ico"><base href="/"><link rel="stylesheet" href="styles/vendor-05d49847d5.css"><link rel="stylesheet" href="styles/app-721d08f0a8.css"></head><body><!--[if lt IE 10]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]--><script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script><script type="text/javascript">window.TabixBuildDate="20180601"; window.TabixVersion="18.06.1";</script><div ui-view="" class="content-ui"></div><script src="scripts/vendor-1db219455d.js"></script><script src="scripts/app-b6bad67439.js"></script></body></html>
<![endif]--><script src="https://cdn.plot.ly/plotly-1.2.0.min.js"></script><script type="text/javascript">window.TabixBuildDate="20180701"; window.TabixVersion="18.07.1";</script><div ui-view="" class="content-ui"></div><script src="scripts/vendor-bad6a329f6.js"></script><script src="scripts/app-65ac869b2e.js"></script></body></html>

Large diffs are not rendered by default.

5,177 changes: 63 additions & 5,114 deletions build/scripts/app.js

Large diffs are not rendered by default.

5,634 changes: 0 additions & 5,634 deletions build/scripts/vendor-1db219455d.js

This file was deleted.

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions build/styles/app-721d08f0a8.css

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion build/styles/app-a6f222f8ee.css

This file was deleted.

14 changes: 7 additions & 7 deletions build/styles/app.css

Large diffs are not rendered by default.

47 changes: 47 additions & 0 deletions build/styles/vendor-05d49847d5.css

Large diffs are not rendered by default.

47 changes: 0 additions & 47 deletions build/styles/vendor-da2acd4f9b.css

This file was deleted.

7 changes: 7 additions & 0 deletions docker/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,11 @@ if [ ! -z "$CONN" ]; then
echo $INDEX > /var/www/html/index.html
fi
fi
if [ ! -z "$BASE_URL" ]; then
INDEX=$(cat /var/www/html/index.html)
OLD="<base href=\"/\">"
NEW="<base href=\"${BASE_URL}\">"
INDEX=${INDEX/$OLD/$NEW}
echo $INDEX > /var/www/html/index.html
fi
nginx -g "daemon off;"
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Tabix",
"version": "18.06.1",
"version": "18.07.1",
"license": "Apache-2.0",
"homepage": "https://tabix.io",
"repository": {
Expand All @@ -13,7 +13,7 @@
"flat-to-nested": "^1.0.2",
"glob": "^7.1.2",
"gulp-concat": "^2.6.1",
"gulp-ngdocs": "^0.2.13",
"gulp-ngdocs": "^0.3.0",
"gulp-tap": "^0.1.3",
"marked": "^0.3.5"
},
Expand All @@ -27,15 +27,15 @@
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.0",
"babel-preset-es2015": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"browser-sync": "~2.9.11",
"browser-sync": "^2.24.5",
"browser-sync-spa": "~1.0.3",
"chalk": "~1.1.1",
"del": "~2.0.2",
"eslint-plugin-angular": "~0.12.0",
"eslint-plugin-es6-recommended": "^0.1.2",
"estraverse": "~4.1.0",
"gulp": "~3.9.0",
"gulp-angular-filesort": "~1.1.1",
"gulp-angular-filesort": "^1.2.1",
"gulp-angular-templatecache": "~1.8.0",
"gulp-autoprefixer": "~3.0.2",
"gulp-babel": "^6.1.2",
Expand All @@ -61,7 +61,7 @@
"gulp-useref": "~1.3.0",
"gulp-util": "~3.0.6",
"lodash": "~3.10.1",
"main-bower-files": "~2.9.0",
"main-bower-files": "^2.13.1",
"uglify-save-license": "~0.4.1",
"wiredep": "~2.2.2"
},
Expand Down
28 changes: 14 additions & 14 deletions src/app/login/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,24 +126,24 @@
<input ng-model="vars.db.params" placeholder="key1=value&key2=value" ng-disabled="vars.loading">
</md-input-container>
</div>
<div>
<!--<div>-->

<md-checkbox md-no-ink ng-model="vars.db.NotCH1_1_54276" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">
Server Version < 1.1.54276
</md-checkbox>
<!--<md-checkbox md-no-ink ng-model="vars.db.NotCH1_1_54276" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">-->
<!--Server Version < 1.1.54276-->
<!--</md-checkbox>-->



</div>
<div layout="row">
Experimental:&nbsp
<md-checkbox md-no-ink ng-model="vars.db.baseauth" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">
HTTP Base auth
</md-checkbox>
<md-checkbox md-no-ink ng-model="vars.db.includeCredentials" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">
Include Credentials
</md-checkbox>
</div>
<!--</div>-->
<!--<div layout="row">-->
<!--Experimental:&nbsp-->
<!--<md-checkbox md-no-ink ng-model="vars.db.baseauth" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">-->
<!--HTTP Base auth-->
<!--</md-checkbox>-->
<!--<md-checkbox md-no-ink ng-model="vars.db.includeCredentials" ng-disabled="vars.loading" class="md-block" flex-gt-sm aria-label="No Ink Effects">-->
<!--Include Credentials-->
<!--</md-checkbox>-->
<!--</div>-->
<div layout="row">
<div flex>
<md-button class="md-primary md-raised m0 width-100" ng-disabled="loginForm.$invalid || vars.loading" ng-click="login()">
Expand Down
211 changes: 211 additions & 0 deletions src/app/metrics/clusterreplicas.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
(function (angular, smi2) {
'use strict';

angular.module(smi2.app.name).controller('ClusterController', ClusterController);
ClusterController.$inject = [
'$scope',
'API',
'ThemeService',
'$interval',
'localStorageService',
'$mdDialog',
'hotRegisterer'
];

/**
* @ngdoc controller
*/
function ClusterController($scope, API, ThemeService, $interval, localStorageService,$mdDialog,hotRegisterer) {

const LS_INTERVAL_KEY = 'proc.interval';
const LS_SORT_KEY = 'proc.key';


$scope.widgets=[];

$scope.staticGrid=true;
$scope.gridStackOptions = {
cellHeight: 200,
verticalMargin: 0,
disableDrag:true,
disableResize:true,
staticGrid:true
};
$scope.logData={};

$scope.vars = {
readOnlyRows : true,
canShowTable : false,
WidgetTable : false,
queryesToKill:{},
clusterMode: true,
logMode : true,
loading: false,

isClusterLoad: false,
clusterList: false,
isDark: ThemeService.isDark(),
sort: /^[a-z0-9_]+$/.test(localStorageService.get(LS_SORT_KEY)) ? localStorageService.get(LS_SORT_KEY) : null,
interval: localStorageService.get(LS_INTERVAL_KEY) || -1,

};





let intervalHandle = null;

// ------------------------------------------------------------------------------
$scope.initClusterConfig = () => {
//

let sql = 'SELECT host_address,port FROM system.clusters GROUP BY host_address,port LIMIT 10';
$scope.vars.clusterList = [];
API.fetchQuery(sql).then(function (data) {
data.data.forEach((cell) => {
$scope.vars.clusterList.push(cell.host_address + ':' + cell.port);

});
$scope.vars.isClusterLoad = true;
console.log("Cluster nodes list", $scope.vars.clusterList.join(","));
// then cluster load config
$scope.load();
}, function (response) {
$scope.vars.isClusterLoad = true;
console.error('Error ' + response);
});
};
// ------------------------------------------------------------------------------
$scope.flush = () => {
$scope.logData={};
};

// ------------------------------------------------------------------------------
$scope.megreProcessData = ($new) => {

// @todo : logData ???? need merge and update `++count`
$new.forEach((cell) => {
if ($scope.logData[cell.hash])
{

let c=$scope.logData[cell.hash].count;

if ($scope.logData[cell.hash].initial_query_id!=cell.initial_query_id)
{
c=c+1;
}
cell.count=c;
$scope.logData[cell.hash]=cell;
} else
{
cell.count=1;
$scope.logData[cell.hash]=cell;

}



});
// let array = $.map($scope.logData, function(value, index) {
// return [value];
// });

return _.values($scope.logData);

} ;

// ------------------------------------------------------------------------------
$scope.load = () => {
console.info("Call load processes");
let sql = `SELECT *,cityHash64(*) as hash,hostName()`;


if ($scope.vars.isClusterLoad && $scope.vars.clusterList ) {
sql = sql + ` FROM remote('` + $scope.vars.clusterList.join(",") + `',system.replication_queue, '` + API.getLogin() + `','` + API.getPassword() + `') `;
}
else {
sql = sql + ` FROM system.replication_queue `;
}

API.fetchQuery(sql).then(function ( queryResult ) {

console.log('queryResult',queryResult);
let $_dataProvider=new DataProvider(queryResult);
if (!$scope.widgets[0])
{
// make new WidgetTable

$_dataProvider.setColumnsHumanSort(['bytes','memory_usage','bytes_read','bytes_written']);
$_dataProvider.setSort('rows',-1);

$scope.widgets[0]=new WidgetTable($_dataProvider,false,12,9);
$_dataProvider.data.forEach((cell) => {
$scope.logData[cell.hash]=cell;
});
}
else {
// on update exists


if ($scope.vars.logMode) {
// if need merge data
$scope.widgets[0].updateData($scope.megreProcessData($_dataProvider.data));
} else {
// force reset data, no merge
$scope.widgets[0].updateData($_dataProvider.data);
}



}


$scope.vars.canShowTable=true;
$scope.vars.data = true;
$scope.vars.loading = false;

$scope.$applyAsync();

}, function ( response ) {
$scope.vars.loading = false;
console.error( 'Error ' + response );
});
};

// ------------------------------------------------------------------------------
$scope.setInterval = () => {

localStorageService.set(LS_INTERVAL_KEY, $scope.vars.interval);

if (intervalHandle) {
$interval.cancel(intervalHandle);
intervalHandle = null;
}
if ($scope.vars.interval > -1) {
intervalHandle = $interval($scope.load, $scope.vars.interval * 1000);
}
};

// ------------------------------------------------------------------------------
$scope.$on('$destroy', function() {
$scope.vars.interval=-1;
$interval.cancel(intervalHandle);
$scope.setInterval();
});


// ------------------------------------------------------------------------------
// start
$scope.initClusterConfig();



if ($scope.vars.interval > -1) {
$scope.setInterval();
}


}

})(angular, smi2);
Loading