Skip to content

Commit

Permalink
Merge branch 'adjust_1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroaki-iwase committed Oct 1, 2015
2 parents 6e0cd7b + 264c338 commit fc281d0
Show file tree
Hide file tree
Showing 44 changed files with 5,870 additions and 3,682 deletions.
20 changes: 0 additions & 20 deletions CHANGELOG

This file was deleted.

37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# [1.2.0](http://roma-kvs.org/blogs/blog-entry-13.html) (Sep 30 2015)
* gather main logic of add_user and revert_config tool [hiroaki-iwase] 04bedfc
* add reverting config tool [hiroaki-iwase] 3c93ad3
* add how to contribute project to README [hiroaki-iwase] 42ed684
* deactivate filter function all secondary vnodes column [hiroaki-iwase] 4bfc40c
* add tool of add_user, confirm_user, set_roma_info [hiroaki-iwase] a0aba99
* enable to check storage type on cluster page [hiroaki-iwase] 8ec27c2
* adjust unit test to hostname ROMA [hiroaki-iwase] 6936244
* adjust tablesorter to iso8601 [hiroaki-iwase] 4b94b34
* add log level and enabled_failover and adjust groonga and adjust dynamic command of fail over [hiroaki-iwase] 8814e64
* adjust unit test of controller/api [hiroaki-iwase] 8977abd
* change rspec test [hiroaki-iwase] 9098cd4
* adjust secondary1, 2 .... [hiroaki-iwase] 5270962
* update tablesorter plugin [hiroaki-iwase] cd03a43
* modify parameter validation [ooeyoshinori] a981928
* modify_stat_page [ooeyoshinori] adac7f6

# [1.1.0](http://roma-kvs.org/blogs/blog-entry-6.html) (Mar 30 2015)

* modify generate join [ooeyoshinori] d9920a2
* Add connection glaph page [hiroaki-iwase] 7214c99
* connection resource pie chart
* connection count line chart
* add rspec test of v1.1.0 [hiroaki-iwase] 3be7f0c
* Improve log checking function [hiroaki-iwase] ac9cafb
* Adjust groonga storage type [hiroaki-iwase] 6aa4a55
* restrict cpdb and data size func to tokyocabinet storage type. [hiroaki-iwase] 7b0345b

# [1.0.0](http://roma-kvs.org/blogs/blog-entry-3.html) (Sep 20 2014)

* v1.0.0 commit [hiroaki-iwase] 17d254e
* Cluster Control system
* Status/Configuration setting system
* Routing information system
* Gather Logs system
* Data Management system
* Initial commit [Hiroaki Iwase] 016023b
32 changes: 26 additions & 6 deletions README → README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
================================================================
Gladiator: GUI management system for ROMA
Copyright (C) 2014 Rakuten, Inc.
================================================================
#Gladiator - GUI management system for ROMA

This library is written in almost Ruby, provides GUI control system of ROMA.

== Features
## Features

* Cluster controlling
* enable to check Cluster status(cluster architecture, nodes information, data rate, etc...)
Expand All @@ -19,18 +16,41 @@ This library is written in almost Ruby, provides GUI control system of ROMA.
* enable to download routing information via web application.
* Check Logs data
* enable to check Log data of ROMA.
* also can sort and filtering
* Connection Glaph
* enable to check connection counts changing of each nodes
* enable to check connectino resource rate
* Data management
* enable to execute set, get.
* enable to check and command generate of snapshot.

## Documentation

== Requirements
* Refer to [Gladiator documentations](http://roma-kvs.org/gladiator.html)

## Requirements
* Basic Rails Web application Environments.
* Apahce 2.X (recommend) ,nginx or WEBric
* Passenger or etc...
* Rails => 4.0.2(recommend)
* Ruby => 2.1.2(recommend)
* ROMA
* v1.2.0 : Full support(recommend)
* v1.0.0~ : Full support
* v0.8.11 ~ v0.8.14 : Some functions are limited
* ~v0.8.10 : Can not use

## Contributing

If you would like to contribute, please...

1. Fork.
2. Make changes in a branch & add unit tests.
3. boot Gladiator and ROMA
4. Run Unit Test
* run `rspec spec/models/roma_spec.rb`
* run `rspec spec/controllers/api_controller_spec.rb`
(if unit test fails, please check 'lib/config_gui.rb'. If it has no prob, run it again - it's fickle).
5. Create a pull request.

Contributions, improvements, comments and suggestions are welcome!
Binary file added app/assets/images/groonga_logo.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 app/assets/images/ruby_logo.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 app/assets/images/tc_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
// about supported directives.
//
//= require jquery-2.1.1.min
//= require jquery.tablesorter.js
//= require jquery.tablesorter.widgets.js
//= require jquery.tablesorter.combined.js
//= require jquery.tablesorter.pager.js
//= require jquery.datetimepicker.js
//= require raphael-min.js
Expand Down
113 changes: 58 additions & 55 deletions app/assets/javascripts/cluster.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
$(window).load(function() {

//for past version
if ($('.recover-restriction-msg')[0]) {
$('#recover-button').css({"background-color":"grey", "border":"none"});
}
if ($('.restriction-health-button')[0]) {
$('.table-contents td:nth-of-type(3)').css({"background-color":"silver", "color":"#696969"});
}

//Just Booting
if (gon.just_booting) {
var element = $('.table-contents');
Expand Down Expand Up @@ -52,13 +44,10 @@ $(window).load(function() {
sortList: [[0,0]],
widthFixed: true,
widgets: ["filter"],
headers: {0: { filter: false }, 3: { filter: false }, 4: { filter: false }, 5: { filter: false }, 6: { filter: false, sorter: false }, 7: { filter: false }},
headers: {0: { filter: false }, 3: { filter: false }, 4: { filter: false }, 5: { filter: false }, 6: { filter: false, sorter: false }, 7: { filter: false }, 8: {filter: false}, 9: {filter: false}},
widgetOptions : {
filter_reset : 'button.reset-filter',
filter_cssFilter : 'tablesorter-filter',
filter_functions : {
2 : true
}
}
});

Expand All @@ -77,11 +66,31 @@ $(window).load(function() {
calcProgressRate('join');
}

function updateVnodesCount(data, instanceName, type) {
cnt = parseInt(data[instanceName][type]);
start = gon.routing_info[instanceName][type];
if (cnt < start) {
color = "red"
icon = 'arrow-down'
}else if (cnt > start) {
color = "blue"
icon = 'arrow-up'
}else{
color = ""
icon = ''
}
instance = instanceName.match(/\d/g).join("");
$('#'+ type.replace(/_/g, "-") +'-'+instance).css("color", color)
$('#'+ type.replace(/_/g, "-") +'-'+instance).html(cnt+'<span><i class="icon-'+icon+'"></i></span>')
}

function calcProgressRate(process) {
var webApiEndPoint
var instanceName
var primaryVnodes
var secondaryVnodes
var cnt
var start
var rd
var progressRate
var host
var protocol
Expand All @@ -100,42 +109,19 @@ $(window).load(function() {
for(instanceName in data){
if (data[instanceName]["status"] != "inactive") {

primaryVnodes = parseInt(data[instanceName]["primary_nodes"]);
secondaryVnodes = parseInt(data[instanceName]["secondary_nodes"]);
startPrimaryVnodes = gon.routing_info[instanceName]["primary_nodes"];
startSecondaryVnodes = gon.routing_info[instanceName]["secondary_nodes"];

//set vnodes count
if (primaryVnodes < startPrimaryVnodes) {
color_primary = "red"
icon_primary = 'arrow-down'
}else if (primaryVnodes > startPrimaryVnodes) {
color_primary = "blue"
icon_primary = 'arrow-up'
}else{
color_primary = ""
icon_primary = ''
}

if (secondaryVnodes < startSecondaryVnodes) {
color_secondary = "red"
icon_secondary = 'arrow-down'
}else if (secondaryVnodes > startSecondaryVnodes) {
color_secondary = "blue"
icon_secondary = 'arrow-up'
}else{
color_secondary = ""
icon_secondary = ''
// primary node
updateVnodesCount(data, instanceName, "primary_nodes")

// secondary node
rd = parseInt(data[instanceName]["redundant"])
if (data[instanceName]["version"].match(/^1\.[01]\.0/)) {
updateVnodesCount(data, instanceName, "secondary_nodes")
} else {
for(i = 0; i < rd-1; i++ ){
updateVnodesCount(data, instanceName, "secondary_nodes"+(i+1))
}
}

instance = instanceName.match(/\d/g).join("");
//for primary nodes
$('#primary-nodes-'+instance).css("color", color_primary)
$('#primary-nodes-'+instance).html(primaryVnodes+'<span><i class="icon-'+icon_primary+'"></i></span>')
//for secondary nodes
$('#secondary-nodes-'+instance).css("color", color_secondary)
$('#secondary-nodes-'+instance).html(secondaryVnodes+'<span><i class="icon-'+icon_secondary+'"></i></span>')

if (instanceName == gon.host+"_"+gon.port) {
$('#short-vnodes-cnt').text(data[instanceName]["short_vnodes"]);

Expand All @@ -153,9 +139,18 @@ $(window).load(function() {
function progressBarSet(data, process) {
switch (process) {
case "release":
primaryVnodes = parseInt(data["primary_nodes"]);
secondaryVnodes = parseInt(data["secondary_nodes"]);
progressRate = Math.round((1-((primaryVnodes + secondaryVnodes)/gon.denominator)) * 1000) /10
sum_vnodes = parseInt(data["primary_nodes"]);
rd = parseInt(data["redundant"])

if (data["version"].match(/^1\.[01]\.0/)) {
sum_vnodes += parseInt(data["secondary_nodes"]);
} else {
for(i = 0; i < rd-1; i++ ){
sum_vnodes += parseInt(data["secondary_nodes"+(i+1)]);
}
}
progressRate = Math.round((1-(sum_vnodes/gon.denominator)) * 1000) /10

$('#extra-progress-bar').css("width",progressRate + "%");
$('#extra-bar-rate').text(progressRate+ "% Complete");
break;
Expand All @@ -177,9 +172,17 @@ $(window).load(function() {
function checkFinish(data, process) {
switch (process) {
case "release":
primaryVnodes = parseInt(data["primary_nodes"]);
secondaryVnodes = parseInt(data["secondary_nodes"]);
progressRate = Math.round((1-((primaryVnodes + secondaryVnodes)/gon.denominator)) * 1000) /10
sum_vnodes = parseInt(data["primary_nodes"]);
rd = parseInt(data["redundant"])
if (data["version"].match(/^1\.[01]\.0/)) {
sum_vnodes += parseInt(data["secondary_nodes"]);
} else {
for(i = 0; i < rd-1; i++ ){
sum_vnodes += parseInt(data["secondary_nodes"+(i+1)]);
}
}
progressRate = Math.round((1-(sum_vnodes/gon.denominator)) * 1000) /10

if (progressRate == 100) {
$('#extra-bar-rate').text("Finished!");
setTimeout(function() { confirmRbalse() }, 1000);
Expand Down Expand Up @@ -227,7 +230,7 @@ $(window).load(function() {
var currentPort = $('#currentPort').val();
var configPath = $('#configPath').val();
if ($("#repetitionCheck").prop('checked')) {
var repetitionOption = "--enabled_repeathost"
var repetitionOption = "--replication_in_host"
}
else {
var repetitionOption = ""
Expand All @@ -248,7 +251,7 @@ $(window).load(function() {
$('.join-explanation').text("Please execute below command on your ROMA server.");
$('.join-command').css({"padding":"10px"});
$('.join-command').html(
"$ cd ${ROMA directory}/ruby/server<br>" +
"$ cd ${ROMA directory}<br>" +
"$ bin/romad "+newHost+" -p "+newPort+" -d -j "+currentHost+"_"+currentPort+" --config "+configPath+" "+repetitionOption
);
}
Expand Down
Loading

0 comments on commit fc281d0

Please sign in to comment.