Skip to content

Commit

Permalink
Bad os number.
Browse files Browse the repository at this point in the history
  • Loading branch information
kiarn committed Dec 19, 2021
1 parent acc3d60 commit 823991b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Expand Up @@ -144,25 +144,26 @@ angular.module('lmn.linbo_sync').config(function ($routeProvider) {
return $scope.refresh_cmd(group);
};
$scope.refresh_cmd = function(group) {
var autostart, cmd, format, i, ip, j, len, len1, os, ref, ref1, start, sync, timeout;
var autostart, cmd, format, i, index, ip, j, len, len1, os, ref, ref1, start, sync, timeout;
cmd = ' -c ';
format = [];
sync = [];
start = [];
ref = $scope.groups[group]['os'];
for (i = 0, len = ref.length; i < len; i++) {
os = ref[i];
for (index = i = 0, len = ref.length; i < len; index = ++i) {
os = ref[index];
os.position = index + 1;
// First format
if (os.run_format) {
format.push('format:' + os.partition);
}
// Then sync or new ( not both )
if (os.run_sync) {
sync.push('sync:' + os.partition);
sync.push('sync:' + os.position);
}
// A little start, but only one
if (os.run_start) {
start.push('start:' + os.partition);
start.push('start:' + os.position);
}
}
cmd += format.join();
Expand Down
Expand Up @@ -98,18 +98,19 @@ angular.module('lmn.linbo_sync').controller 'SyncIndexController', ($scope, $htt
format = []
sync = []
start = []
for os in $scope.groups[group]['os']
for os, index in $scope.groups[group]['os']
os.position = index + 1
# First format
if os.run_format
format.push('format:'+os.partition)

# Then sync or new ( not both )
if os.run_sync
sync.push('sync:' + os.partition)
sync.push('sync:' + os.position)

# A little start, but only one
if os.run_start
start.push('start:'+os.partition)
start.push('start:' + os.position)

cmd += format.join()
if sync.length > 0
Expand Down

0 comments on commit 823991b

Please sign in to comment.