File tree 4 files changed +13
-11
lines changed
4 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -911,6 +911,8 @@ func (cluster *Cluster) SetSysbenchThreads(Threads string) {
911
911
i , err := strconv .Atoi (Threads )
912
912
if err == nil {
913
913
cluster .Conf .SysbenchThreads = i
914
+ } else {
915
+ cluster .LogPrintf (LvlErr , "Error converting threads to int %s" , err )
914
916
}
915
917
}
916
918
Original file line number Diff line number Diff line change @@ -1638,9 +1638,9 @@ func (repman *ReplicationManager) handlerMuxClusterSysbench(w http.ResponseWrite
1638
1638
http .Error (w , "No valid ACL" , 403 )
1639
1639
return
1640
1640
}
1641
- vars := mux . Vars ( r )
1642
- if _ , ok := vars [ "theads" ]; ok {
1643
- mycluster .SetSysbenchThreads (vars [ "theads" ] )
1641
+ if r . URL . Query (). Get ( "threads" ) != "" {
1642
+ mycluster . LogPrintf ( cluster . LvlInfo , "Setting Sysbench threads to %s" , r . URL . Query (). Get ( "threads" ))
1643
+ mycluster .SetSysbenchThreads (r . URL . Query (). Get ( "threads" ) )
1644
1644
}
1645
1645
go mycluster .RunSysbench ()
1646
1646
}
Original file line number Diff line number Diff line change @@ -1151,7 +1151,7 @@ function (
1151
1151
1152
1152
1153
1153
$scope . sysbench = function ( threads ) {
1154
- if ( confirm ( "Confirm sysbench run !" ) ) httpGetWithoutResponse ( getClusterUrl ( ) + '/actions/sysbench?threads=' + threads ) ;
1154
+ if ( confirm ( "Confirm sysbench run !" + threads ) ) httpGetWithoutResponse ( getClusterUrl ( ) + '/actions/sysbench?threads=' + threads ) ;
1155
1155
} ;
1156
1156
1157
1157
$scope . runonetest = function ( test ) {
Original file line number Diff line number Diff line change 21
21
< tr >
22
22
< td >
23
23
< md-select name ="selectedThreads " id ="selectedThreads " ng-model ="selectedThreads " >
24
- < md-option > 1 </ md-option >
25
- < md-option > 4 </ md-option >
26
- < md-option > 8 </ md-option >
27
- < md-option > 16 </ md-option >
28
- < md-option > 32 </ md-option >
29
- < md-option > 64 </ md-option >
30
- < md-option > 128 </ md-option >
24
+ < md-option ng-value =" 1 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 1 </ md-option >
25
+ < md-option ng-value =" 4 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 4 </ md-option >
26
+ < md-option ng-value =" 8 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 8 </ md-option >
27
+ < md-option ng-value =" 16 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 16 </ md-option >
28
+ < md-option ng-value =" 32 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 32 </ md-option >
29
+ < md-option ng-value =" 64 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 64 </ md-option >
30
+ < md-option ng-value =" 128 " ng-selected =" {{element == selectedCluster.config.sysbenchThreads}} " > 128 </ md-option >
31
31
</ md-select >
32
32
</ td > < td colspan =2 >
33
33
< md-button type ="button " class ="btn btn-primary " ng-click ="sysbench(selectedThreads) "> Sysbench</ md-button >
You can’t perform that action at this time.
0 commit comments