"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "moskito-webui/src/main/java/net/anotheria/moskito/webui/dashboards/api/DashboardAPIImpl.java" between
moskito-moskito-2.9.3.tar.gz and moskito-moskito-2.10.0.tar.gz

About: MoSKito (Monitoring System Kit) is a framework for java application monitoring. Sources.

DashboardAPIImpl.java  (moskito-moskito-2.9.3):DashboardAPIImpl.java  (moskito-moskito-2.10.0)
skipping to change at line 352 skipping to change at line 352
if (cc_array.length == 1) { if (cc_array.length == 1) {
//source had only one element //source had only one element
config.setProducers(new_cc_array); config.setProducers(new_cc_array);
return; return;
} }
removeElementFromArray(cc_array, new_cc_array, index); removeElementFromArray(cc_array, new_cc_array, index);
config.setProducers(new_cc_array); config.setProducers(new_cc_array);
} }
private static <T> T removeElementFromArray(T sourceArray[], T destArray, int index) { private static <T> T removeElementFromArray(T[] sourceArray, T destArray, int index) {
//last element //last element
if (sourceArray.length == index + 1) { if (sourceArray.length == index + 1) {
System.arraycopy(sourceArray, 0, destArray, 0, sourceArra y.length - 1); System.arraycopy(sourceArray, 0, destArray, 0, sourceArra y.length - 1);
return destArray; return destArray;
} }
if (index == 0) { if (index == 0) {
System.arraycopy(sourceArray, 1, destArray, 0, sourceArra y.length - 1); System.arraycopy(sourceArray, 1, destArray, 0, sourceArra y.length - 1);
return destArray; return destArray;
} }
skipping to change at line 605 skipping to change at line 605
ret.append(dashboardConfig.getName()); ret.append(dashboardConfig.getName());
} }
} }
return ret.toString(); return ret.toString();
} }
private DashboardConfig[] getConfiguredDashboards(){ private DashboardConfig[] getConfiguredDashboards(){
MoskitoConfiguration config = MoskitoConfigurationHolder.getConfi guration(); MoskitoConfiguration config = MoskitoConfigurationHolder.getConfi guration();
DashboardsConfig dashboardsConfig = config.getDashboardsConfig(); DashboardsConfig dashboardsConfig = config.getDashboardsConfig();
DashboardConfig[] dashboards = dashboardsConfig.getDashboards(); DashboardConfig[] dashboards = dashboardsConfig.getDashboards();
if (dashboards==null)
return new DashboardConfig[0];
return dashboards; return dashboards;
} }
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)