juci.speedtest update run method and page title
authorSukru Senli <sukru.senli@inteno.se>
Sat, 24 Sep 2016 10:53:34 +0000 (12:53 +0200)
committerSukru Senli <sukru.senli@inteno.se>
Sat, 24 Sep 2016 11:22:20 +0000 (13:22 +0200)
plugins/juci-diagnostics/src/widgets/diagnostics-widget-speedtest.html
plugins/juci-diagnostics/ubus/juci.speedtest

index 368cf71..c56bf33 100644 (file)
@@ -1,5 +1,5 @@
 <div>
-       <juci-expandable title="TP test">
+       <juci-expandable title="TPTEST">
                <juci-config-lines>
                        <juci-config-line title="{{'Direction'|translate}}">
                                <juci-select ng-model="data.test_type" ng-items="testType"/>
index cc65bd9..5eea0c9 100755 (executable)
@@ -11,13 +11,15 @@ case "$1" in
                        run)
                                if pidof tptest-run >/dev/null; then
                                        json_init
-                                       json_add_string "error" "there is already a speedtest going on"
+                                       json_add_string "state" "error"
+                                       json_add_string "message" "there is already a speedtest going on"
                                        json_dump
                                else
                                        read input
                                        tptest-run "$input" >/dev/null 2>&1 &
                                        json_init
-                                       json_add_string "success" "speedtest is started"
+                                       json_add_string "state" "running"
+                                       json_add_string "message" "success"
                                        json_dump
                                fi
                        ;;