Move the '--partial' flag and output configuration to the backend.

Previously, the front end will generate a string for '--partial' flag.
Now the front end will only record the partial partitions that are going
to be updated as an array, and the backend will convert the array into a
string for CLI tool.

The output now is also calculated in the backend,

Test: mannual tested.
Change-Id: Ib5604e52b0c0d0cdd2bf85c71479b3133479da74
diff --git a/tools/otagui/ota_interface.py b/tools/otagui/ota_interface.py
index ec04906..fc1fd28 100644
--- a/tools/otagui/ota_interface.py
+++ b/tools/otagui/ota_interface.py
@@ -172,8 +172,8 @@
         # Check essential configuration is properly set
         if not os.path.isfile(args['target']):
             raise FileNotFoundError
-        if not args['output']:
-            raise SyntaxError
+        if not 'output' in args:
+            args['output'] = os.path.join('output', str(id) + '.zip')
         if args['verbose']:
             command.append('-v')
         command.append('-k')
@@ -186,15 +186,14 @@
             command.append(args['incremental'])
         if args['isPartial']:
             command.append('--partial')
-            command.append(args['partial'])
+            command.append(' '.join(args['partial']))
         command.append(args['target'])
         command.append(args['output'])
         job_info = JobInfo(id,
                            target=args['target'],
                            incremental=args['incremental'] if args['isIncremental'] else '',
                            verbose=args['verbose'],
-                           partial=args['partial'].split(
-                               ' ') if args['isPartial'] else [],
+                           partial=args['partial'] if args['isPartial'] else [],
                            output=args['output'],
                            status='Running',
                            extra=args['extra'],
diff --git a/tools/otagui/src/components/PartialCheckbox.vue b/tools/otagui/src/components/PartialCheckbox.vue
index 2c369e6..d18d011 100644
--- a/tools/otagui/src/components/PartialCheckbox.vue
+++ b/tools/otagui/src/components/PartialCheckbox.vue
@@ -52,10 +52,10 @@
   watch: {
     partitionSelected: {
       handler: function() {
-        let list = ''
+        let list = []
         for (let [key, value] of this.partitionSelected) {
           if (value) {
-            list += key + ' '
+            list.push(key)
           }
         }
         this.$emit('update:modelValue', list)
diff --git a/tools/otagui/src/services/JobSubmission.js b/tools/otagui/src/services/JobSubmission.js
index 22f0436..b70a942 100644
--- a/tools/otagui/src/services/JobSubmission.js
+++ b/tools/otagui/src/services/JobSubmission.js
@@ -14,10 +14,9 @@
   constructor() {
     this.verbose = false,
     this.target = '',
-    this.output = 'output/' + String(this.id) + '.zip',
     this.incremental = '',
     this.isIncremental = false,
-    this.partial = '',
+    this.partial = [],
     this.isPartial = false,
     this.extra = '',
     this.id = uuid.v1()