mirror of
https://repository.entgra.net/community/device-mgt-plugins.git
synced 2025-09-16 23:42:15 +00:00
Merge branch 'release-3.0.x' of https://github.com/wso2/carbon-device-mgt-plugins into windows10
This commit is contained in:
commit
e81d2b1c20
@ -54,6 +54,7 @@ public class RegisterActivity extends Activity {
|
|||||||
private EditText mHostView;
|
private EditText mHostView;
|
||||||
private View mProgressView;
|
private View mProgressView;
|
||||||
private View mLoginFormView;
|
private View mLoginFormView;
|
||||||
|
private Button deviceRegisterButton;
|
||||||
private Handler mUiHandler = new Handler();
|
private Handler mUiHandler = new Handler();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -73,7 +74,7 @@ public class RegisterActivity extends Activity {
|
|||||||
AvailableSensorsInDevice availableSensorsInDevice = new AvailableSensorsInDevice(getApplicationContext());
|
AvailableSensorsInDevice availableSensorsInDevice = new AvailableSensorsInDevice(getApplicationContext());
|
||||||
availableSensorsInDevice.setContent();
|
availableSensorsInDevice.setContent();
|
||||||
|
|
||||||
Button deviceRegisterButton = (Button) findViewById(R.id.device_register_button);
|
deviceRegisterButton = (Button) findViewById(R.id.device_register_button);
|
||||||
|
|
||||||
|
|
||||||
deviceRegisterButton.setOnClickListener(new OnClickListener() {
|
deviceRegisterButton.setOnClickListener(new OnClickListener() {
|
||||||
@ -204,6 +205,7 @@ public class RegisterActivity extends Activity {
|
|||||||
// and hide the relevant UI components.
|
// and hide the relevant UI components.
|
||||||
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
|
mProgressView.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||||
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
|
mLoginFormView.setVisibility(show ? View.GONE : View.VISIBLE);
|
||||||
|
deviceRegisterButton.setVisibility(show? View.VISIBLE : View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -52,11 +52,8 @@ import java.util.List;
|
|||||||
* This is an android service which publishes the data to the server.
|
* This is an android service which publishes the data to the server.
|
||||||
*/
|
*/
|
||||||
public class DataPublisherService extends Service {
|
public class DataPublisherService extends Service {
|
||||||
private static final String TAG = DataPublisherService.class.getName();
|
private final String TAG = DataPublisherService.class.getName();
|
||||||
private static String KEY_TAG = "key";
|
private Context context;
|
||||||
private static String TIME_TAG = "time";
|
|
||||||
private static String VALUE_TAG = "value";
|
|
||||||
public static Context context;
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
@ -68,9 +65,9 @@ public class DataPublisherService extends Service {
|
|||||||
public int onStartCommand(Intent intent, int flags, int startId) {
|
public int onStartCommand(Intent intent, int flags, int startId) {
|
||||||
context = this;
|
context = this;
|
||||||
Log.d(TAG, "service started");
|
Log.d(TAG, "service started");
|
||||||
Runnable runnable = new Runnable() {
|
// Runnable runnable = new Runnable() {
|
||||||
@Override
|
// @Override
|
||||||
public void run() {
|
// public void run() {
|
||||||
try {
|
try {
|
||||||
List<Event> events = new ArrayList<>();
|
List<Event> events = new ArrayList<>();
|
||||||
//retrieve sensor data.
|
//retrieve sensor data.
|
||||||
@ -315,10 +312,10 @@ public class DataPublisherService extends Service {
|
|||||||
} catch (TransportHandlerException e) {
|
} catch (TransportHandlerException e) {
|
||||||
Log.e(TAG, "Data Publish Failed", e);
|
Log.e(TAG, "Data Publish Failed", e);
|
||||||
}
|
}
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
Thread dataUploaderThread = new Thread(runnable);
|
// Thread dataUploaderThread = new Thread(runnable);
|
||||||
dataUploaderThread.start();
|
// dataUploaderThread.start();
|
||||||
return Service.START_NOT_STICKY;
|
return Service.START_NOT_STICKY;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,8 +183,8 @@ public class LocationDataReader extends DataReader implements LocationListener {
|
|||||||
double distance =CalculationByDistance(latitude, longitude, lat_old, lon_old)/1000;
|
double distance =CalculationByDistance(latitude, longitude, lat_old, lon_old)/1000;
|
||||||
|
|
||||||
speed = (float)distance/(float)time;
|
speed = (float)distance/(float)time;
|
||||||
Toast.makeText(mContext, longitude+"\n"+latitude+"\nDistance is: "
|
// Toast.makeText(mContext, longitude+"\n"+latitude+"\nDistance is: "
|
||||||
+distance+"\nSpeed is: "+speed , Toast.LENGTH_SHORT).show();
|
// +distance+"\nSpeed is: "+speed , Toast.LENGTH_SHORT).show();
|
||||||
|
|
||||||
|
|
||||||
Intent intent = new Intent("speedUpdate");
|
Intent intent = new Intent("speedUpdate");
|
||||||
|
|||||||
@ -73,7 +73,7 @@ public class ActivitySelectSensor extends AppCompatActivity
|
|||||||
private ListView listView;
|
private ListView listView;
|
||||||
private SensorManager sensorManager;
|
private SensorManager sensorManager;
|
||||||
private ArrayList<Sensor> sensors = new ArrayList<>();
|
private ArrayList<Sensor> sensors = new ArrayList<>();
|
||||||
private EditText sessionIdText;
|
// private EditText sessionIdText;
|
||||||
private RealTimeSensorReader sensorReader = null;
|
private RealTimeSensorReader sensorReader = null;
|
||||||
private RealTimeSensorChangeReceiver realTimeSensorChangeReceiver = new RealTimeSensorChangeReceiver();
|
private RealTimeSensorChangeReceiver realTimeSensorChangeReceiver = new RealTimeSensorChangeReceiver();
|
||||||
private SupportedSensors supportedSensors = SupportedSensors.getInstance();
|
private SupportedSensors supportedSensors = SupportedSensors.getInstance();
|
||||||
@ -87,21 +87,21 @@ public class ActivitySelectSensor extends AppCompatActivity
|
|||||||
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
|
||||||
setSupportActionBar(toolbar);
|
setSupportActionBar(toolbar);
|
||||||
sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
|
sensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
|
||||||
sessionIdText = (EditText) findViewById(R.id.sessionId);
|
//sessionIdText = (EditText) findViewById(R.id.sessionId);
|
||||||
sessionIdText.setCursorVisible(false);
|
// sessionIdText.setCursorVisible(false);
|
||||||
|
|
||||||
listView = (ListView) findViewById(R.id.senseListContainer);
|
listView = (ListView) findViewById(R.id.senseListContainer);
|
||||||
verifyBluetooth();
|
//verifyBluetooth();
|
||||||
|
|
||||||
registerReceiver(realTimeSensorChangeReceiver, new IntentFilter("sensorDataMap"));
|
registerReceiver(realTimeSensorChangeReceiver, new IntentFilter("sensorDataMap"));
|
||||||
|
|
||||||
sessionIdText.setOnClickListener(new View.OnClickListener() {
|
// sessionIdText.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
sessionIdText.setCursorVisible(true);
|
// sessionIdText.setCursorVisible(true);
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
//Publish data
|
//Publish data
|
||||||
FloatingActionButton fbtnPublishData = (FloatingActionButton) findViewById(R.id.publish);
|
FloatingActionButton fbtnPublishData = (FloatingActionButton) findViewById(R.id.publish);
|
||||||
@ -126,33 +126,33 @@ public class ActivitySelectSensor extends AppCompatActivity
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
FloatingActionButton fbtnSpeechRecongnizer = (FloatingActionButton) findViewById(R.id.speech);
|
//FloatingActionButton fbtnSpeechRecongnizer = (FloatingActionButton) findViewById(R.id.speech);
|
||||||
fbtnSpeechRecongnizer.setOnClickListener(new View.OnClickListener() {
|
// fbtnSpeechRecongnizer.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
// @Override
|
||||||
public void onClick(View v) {
|
// public void onClick(View v) {
|
||||||
String sessionId = sessionIdText.getText().toString();
|
// String sessionId = sessionIdText.getText().toString();
|
||||||
if (!sessionId.isEmpty()) {
|
// if (!sessionId.isEmpty()) {
|
||||||
Intent intent = new Intent(getApplicationContext(), WordRecognitionActivity.class);
|
// Intent intent = new Intent(getApplicationContext(), WordRecognitionActivity.class);
|
||||||
intent.putExtra("sessionId", sessionId);
|
// intent.putExtra("sessionId", sessionId);
|
||||||
startActivity(intent);
|
// startActivity(intent);
|
||||||
} else {
|
// } else {
|
||||||
Toast.makeText(ActivitySelectSensor.this, "Please type a session id value", Toast.LENGTH_SHORT)
|
// Toast.makeText(ActivitySelectSensor.this, "Please type a session id value", Toast.LENGTH_SHORT)
|
||||||
.show();
|
// .show();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
// FloatingActionButton fbtnBeaconMonitor = (FloatingActionButton) findViewById(R.id.beacon);
|
||||||
});
|
// fbtnBeaconMonitor.setOnClickListener(new View.OnClickListener() {
|
||||||
|
// @Override
|
||||||
FloatingActionButton fbtnBeaconMonitor = (FloatingActionButton) findViewById(R.id.beacon);
|
// public void onClick(View v) {
|
||||||
fbtnBeaconMonitor.setOnClickListener(new View.OnClickListener() {
|
// Intent intent = new Intent(getApplicationContext(), BeaconMonitoringActivity.class);
|
||||||
@Override
|
// startActivity(intent);
|
||||||
public void onClick(View v) {
|
//
|
||||||
Intent intent = new Intent(getApplicationContext(), BeaconMonitoringActivity.class);
|
//
|
||||||
startActivity(intent);
|
// }
|
||||||
|
// });
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
sharedPreferences = getSharedPreferences(SupportedSensors.SELECTED_SENSORS, 0);
|
sharedPreferences = getSharedPreferences(SupportedSensors.SELECTED_SENSORS, 0);
|
||||||
@ -313,43 +313,43 @@ public class ActivitySelectSensor extends AppCompatActivity
|
|||||||
unregisterReceiver(realTimeSensorChangeReceiver);
|
unregisterReceiver(realTimeSensorChangeReceiver);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void verifyBluetooth() {
|
// private void verifyBluetooth() {
|
||||||
|
//
|
||||||
try {
|
// try {
|
||||||
if (!BeaconManager.getInstanceForApplication(this).checkAvailability()) {
|
// if (!BeaconManager.getInstanceForApplication(this).checkAvailability()) {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
// final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle("Bluetooth not enabled");
|
// builder.setTitle("Bluetooth not enabled");
|
||||||
builder.setMessage("Please enable bluetooth in settings and restart this application.");
|
// builder.setMessage("Please enable bluetooth in settings and restart this application.");
|
||||||
builder.setPositiveButton(android.R.string.ok, null);
|
// builder.setPositiveButton(android.R.string.ok, null);
|
||||||
builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
// builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onDismiss(DialogInterface dialog) {
|
// public void onDismiss(DialogInterface dialog) {
|
||||||
finish();
|
// finish();
|
||||||
System.exit(0);
|
// System.exit(0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
builder.show();
|
// builder.show();
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
} catch (RuntimeException e) {
|
// } catch (RuntimeException e) {
|
||||||
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
// final AlertDialog.Builder builder = new AlertDialog.Builder(this);
|
||||||
builder.setTitle("Bluetooth LE not available");
|
// builder.setTitle("Bluetooth LE not available");
|
||||||
builder.setMessage("Sorry, this device does not support Bluetooth LE.");
|
// builder.setMessage("Sorry, this device does not support Bluetooth LE.");
|
||||||
builder.setPositiveButton(android.R.string.ok, null);
|
// builder.setPositiveButton(android.R.string.ok, null);
|
||||||
builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
// builder.setOnDismissListener(new DialogInterface.OnDismissListener() {
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public void onDismiss(DialogInterface dialog) {
|
// public void onDismiss(DialogInterface dialog) {
|
||||||
finish();
|
// finish();
|
||||||
System.exit(0);
|
// System.exit(0);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
});
|
// });
|
||||||
builder.show();
|
// builder.show();
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|||||||
@ -57,6 +57,7 @@ public class SenseClientAsyncExecutor extends AsyncTask<String, Void, Map<String
|
|||||||
private final static String TAG = "SenseService Client";
|
private final static String TAG = "SenseService Client";
|
||||||
private static final String STATUS = "status";
|
private static final String STATUS = "status";
|
||||||
private final String PASSWORD_GRANT_TYPE = "password";
|
private final String PASSWORD_GRANT_TYPE = "password";
|
||||||
|
private final String SCOPE = "perm:android-sense:enroll";
|
||||||
private final static String DEVICE_NAME = Build.MANUFACTURER + " " + Build.MODEL;
|
private final static String DEVICE_NAME = Build.MANUFACTURER + " " + Build.MODEL;
|
||||||
private Context context;
|
private Context context;
|
||||||
|
|
||||||
@ -117,7 +118,7 @@ public class SenseClientAsyncExecutor extends AsyncTask<String, Void, Map<String
|
|||||||
new BasicAuthRequestInterceptor(apiApplicationKey.getConsumerKey(), apiApplicationKey.getConsumerSecret()))
|
new BasicAuthRequestInterceptor(apiApplicationKey.getConsumerKey(), apiApplicationKey.getConsumerSecret()))
|
||||||
.contract(new JAXRSContract()).encoder(new JacksonEncoder()).decoder(new JacksonDecoder())
|
.contract(new JAXRSContract()).encoder(new JacksonEncoder()).decoder(new JacksonDecoder())
|
||||||
.target(TokenIssuerService.class, endpoint);
|
.target(TokenIssuerService.class, endpoint);
|
||||||
accessTokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password, "device_" + deviceId);
|
accessTokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password, "device_" + deviceId, SCOPE);
|
||||||
|
|
||||||
//DeviceRegister
|
//DeviceRegister
|
||||||
AndroidSenseManagerService androidSenseManagerService = Feign.builder().client(disableHostnameVerification)
|
AndroidSenseManagerService androidSenseManagerService = Feign.builder().client(disableHostnameVerification)
|
||||||
|
|||||||
@ -29,7 +29,7 @@ public interface TokenIssuerService {
|
|||||||
@POST
|
@POST
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
||||||
@QueryParam("password") String password, @QueryParam("deviceId") String deviceId);
|
@QueryParam("password") String password, @QueryParam("deviceId") String deviceId, @QueryParam("scope") String scope);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
|||||||
@ -26,41 +26,65 @@
|
|||||||
<include layout="@layout/content_activity_select_sensor"/>
|
<include layout="@layout/content_activity_select_sensor"/>
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_gravity="bottom|center"
|
android:layout_gravity="bottom|center"
|
||||||
android:layout_height="wrap_content" >
|
android:layout_height="100dp"
|
||||||
|
android:layout_margin="20dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<!--<RelativeLayout-->
|
||||||
android:id="@+id/beacon"
|
<!--android:layout_width="0dp"-->
|
||||||
android:layout_width="wrap_content"
|
<!--android:layout_height="match_parent"-->
|
||||||
android:layout_height="wrap_content"
|
<!--android:layout_weight="0.25"-->
|
||||||
android:layout_margin="@dimen/fab_margin"
|
<!-->-->
|
||||||
android:src="@drawable/beacon"/>
|
<!--<android.support.design.widget.FloatingActionButton-->
|
||||||
|
<!--android:id="@+id/beacon"-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="match_parent"-->
|
||||||
|
<!--android:layout_margin="15dp"-->
|
||||||
|
<!--android:src="@drawable/beacon"/>-->
|
||||||
|
<!--</RelativeLayout>-->
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
<RelativeLayout
|
||||||
android:id="@+id/addSensors"
|
android:layout_width="0dp"
|
||||||
android:layout_width="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_weight="0.5"
|
||||||
android:layout_margin="@dimen/fab_margin"
|
>
|
||||||
android:src="@android:drawable/ic_input_add"/>
|
<android.support.design.widget.FloatingActionButton
|
||||||
|
android:id="@+id/addSensors"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@android:drawable/ic_input_add"/>
|
||||||
|
|
||||||
<android.support.design.widget.FloatingActionButton
|
</RelativeLayout>
|
||||||
android:id="@+id/speech"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_margin="@dimen/fab_margin"
|
|
||||||
android:src="@drawable/mic"/>
|
|
||||||
|
|
||||||
|
<!--<RelativeLayout-->
|
||||||
|
<!--android:layout_width="0dp"-->
|
||||||
|
<!--android:layout_height="match_parent"-->
|
||||||
|
<!--android:layout_weight="0.25"-->
|
||||||
|
<!-->-->
|
||||||
|
<!--<android.support.design.widget.FloatingActionButton-->
|
||||||
|
<!--android:id="@+id/speech"-->
|
||||||
|
<!--android:layout_width="match_parent"-->
|
||||||
|
<!--android:layout_height="match_parent"-->
|
||||||
|
<!--android:layout_margin="15dp"-->
|
||||||
|
<!--android:src="@drawable/mic"/>-->
|
||||||
|
<!--</RelativeLayout>-->
|
||||||
|
|
||||||
|
<RelativeLayout
|
||||||
<android.support.design.widget.FloatingActionButton
|
android:layout_width="0dp"
|
||||||
android:id="@+id/publish"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="wrap_content"
|
android:layout_weight="0.5"
|
||||||
android:layout_height="wrap_content"
|
>
|
||||||
android:layout_margin="@dimen/fab_margin"
|
<android.support.design.widget.FloatingActionButton
|
||||||
android:adjustViewBounds="false"
|
android:id="@+id/publish"
|
||||||
android:src="@drawable/pushtoserver"/>
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_margin="15dp"
|
||||||
|
android:layout_centerInParent="true"
|
||||||
|
android:src="@drawable/pushtoserver"/>
|
||||||
|
</RelativeLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
</android.support.design.widget.CoordinatorLayout>
|
</android.support.design.widget.CoordinatorLayout>
|
||||||
|
|||||||
@ -11,18 +11,18 @@
|
|||||||
tools:context="org.wso2.carbon.iot.android.sense.realtimeviewer.ActivitySelectSensor"
|
tools:context="org.wso2.carbon.iot.android.sense.realtimeviewer.ActivitySelectSensor"
|
||||||
android:id="@+id/parentContainer">
|
android:id="@+id/parentContainer">
|
||||||
|
|
||||||
<EditText
|
<!--<EditText-->
|
||||||
android:layout_width="match_parent"
|
<!--android:layout_width="match_parent"-->
|
||||||
android:layout_height="wrap_content" android:hint="@string/sessionId"
|
<!--android:layout_height="wrap_content" android:hint="@string/sessionId"-->
|
||||||
android:id="@+id/sessionId"
|
<!--android:id="@+id/sessionId"-->
|
||||||
android:inputType="text"
|
<!--android:inputType="text"-->
|
||||||
android:maxLines="1" android:singleLine="true"/>
|
<!--android:maxLines="1" android:singleLine="true"/>-->
|
||||||
|
|
||||||
<ListView
|
<ListView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:id="@+id/senseListContainer"
|
android:id="@+id/senseListContainer"
|
||||||
android:layout_below="@+id/sessionId">
|
>
|
||||||
</ListView>
|
</ListView>
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
|
|
||||||
<item android:id="@+id/select" android:icon="@android:drawable/ic_menu_agenda"
|
<item android:id="@+id/select" android:icon="@android:drawable/ic_menu_agenda"
|
||||||
android:title="Sensors" />
|
android:title="Sensors" />
|
||||||
<item android:id="@+id/speech_recognizer" android:icon="@android:drawable/ic_menu_agenda"
|
<!--<item android:id="@+id/speech_recognizer" android:icon="@android:drawable/ic_menu_agenda"-->
|
||||||
android:title="Speech Recognizer" />
|
<!--android:title="Speech Recognizer" />-->
|
||||||
<!--<group android:checkableBehavior="single">-->
|
<!--<group android:checkableBehavior="single">-->
|
||||||
<!-- -->
|
<!-- -->
|
||||||
|
|
||||||
|
|||||||
@ -6,7 +6,7 @@ buildscript {
|
|||||||
maven { url 'https://repo.eclipse.org/content/repositories/paho-releases/' }
|
maven { url 'https://repo.eclipse.org/content/repositories/paho-releases/' }
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.1.0'
|
classpath 'com.android.tools.build:gradle:2.2.0'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#Wed May 11 14:40:10 IST 2016
|
#Mon Jan 09 12:13:26 IST 2017
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-2.10-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
|
||||||
|
|||||||
@ -48,7 +48,6 @@ import java.util.Properties;
|
|||||||
public class AndroidSenseServiceImpl implements AndroidSenseService {
|
public class AndroidSenseServiceImpl implements AndroidSenseService {
|
||||||
|
|
||||||
private static Log log = LogFactory.getLog(AndroidSenseServiceImpl.class);
|
private static Log log = LogFactory.getLog(AndroidSenseServiceImpl.class);
|
||||||
private static String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886";
|
|
||||||
|
|
||||||
@Path("device/{deviceId}/words")
|
@Path("device/{deviceId}/words")
|
||||||
@POST
|
@POST
|
||||||
|
|||||||
@ -40,7 +40,7 @@ public class AndroidSenseConstants {
|
|||||||
public static final String HOST_NAME = "HostName";
|
public static final String HOST_NAME = "HostName";
|
||||||
public static final String LOCALHOST = "localhost";
|
public static final String LOCALHOST = "localhost";
|
||||||
public static final String CONFIG_TYPE = "general";
|
public static final String CONFIG_TYPE = "general";
|
||||||
public static final String DEFAULT_ENDPOINT = "tcp://localhost:1886";
|
public static final String DEFAULT_ENDPOINT = "tcp://${mqtt.broker.host}:${mqtt.broker.port}";
|
||||||
|
|
||||||
public static final String SCOPE = "scope";
|
public static final String SCOPE = "scope";
|
||||||
|
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import org.wso2.carbon.apimgt.application.extension.APIManagementProviderService
|
|||||||
import org.wso2.carbon.base.ServerConfiguration;
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
import org.wso2.carbon.context.CarbonContext;
|
import org.wso2.carbon.context.CarbonContext;
|
||||||
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
import org.wso2.carbon.context.PrivilegedCarbonContext;
|
||||||
|
import org.wso2.carbon.core.util.Utils;
|
||||||
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
|
import org.wso2.carbon.device.mgt.common.authorization.DeviceAccessAuthorizationService;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
||||||
@ -205,7 +206,7 @@ public class APIUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getMqttEndpoint() throws ConfigurationManagementException {
|
public static String getMqttEndpoint() throws ConfigurationManagementException {
|
||||||
String iotServerIP = AndroidSenseConstants.DEFAULT_ENDPOINT;
|
String iotServerIP = Utils.replaceSystemProperty(AndroidSenseConstants.DEFAULT_ENDPOINT);
|
||||||
iotServerIP = iotServerIP.replace(AndroidSenseConstants.LOCALHOST, getServerUrl());;
|
iotServerIP = iotServerIP.replace(AndroidSenseConstants.LOCALHOST, getServerUrl());;
|
||||||
PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration(
|
PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration(
|
||||||
AndroidSenseConstants.CONFIG_TYPE);
|
AndroidSenseConstants.CONFIG_TYPE);
|
||||||
@ -224,15 +225,11 @@ public class APIUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getServerUrl() {
|
public static String getServerUrl() {
|
||||||
String hostName = ServerConfiguration.getInstance().getFirstProperty(AndroidSenseConstants.HOST_NAME);
|
|
||||||
try {
|
try {
|
||||||
if (hostName == null) {
|
return org.apache.axis2.util.Utils.getIpAddress();
|
||||||
hostName = NetworkUtils.getLocalHostname();
|
|
||||||
}
|
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
hostName = "localhost";
|
|
||||||
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
||||||
|
return "localhost";
|
||||||
}
|
}
|
||||||
return hostName;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,10 +16,6 @@
|
|||||||
<servlet-name>CXFServlet</servlet-name>
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>doAuthentication</param-name>
|
<param-name>doAuthentication</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
|
|||||||
@ -86,7 +86,7 @@
|
|||||||
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
||||||
|
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Location
|
</span> View Device Location
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Analytics
|
</span> View Device Analytics
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"deviceType": {
|
"deviceType": {
|
||||||
"label": "Android Sense",
|
"label": "Android Sense",
|
||||||
"category": "iot"
|
"category": "iot",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:android-sense:enroll"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -204,7 +204,7 @@
|
|||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
You can view all your connected devices
|
You can view all your connected devices
|
||||||
@ -212,7 +212,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
You can select any one of your connected devices for available
|
You can select any one of your connected devices for available
|
||||||
@ -220,7 +220,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span> For historical analytics of sensor data navigate to device
|
</span> For historical analytics of sensor data navigate to device
|
||||||
analytics page.
|
analytics page.
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import org.apache.commons.logging.Log;
|
|||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.base.MultitenantConstants;
|
import org.wso2.carbon.base.MultitenantConstants;
|
||||||
import org.wso2.carbon.base.ServerConfiguration;
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
|
import org.wso2.carbon.core.util.Utils;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
||||||
@ -59,7 +60,9 @@ public class ZipUtil {
|
|||||||
private static final String HTTP_PORT_PROPERTY = "httpPort";
|
private static final String HTTP_PORT_PROPERTY = "httpPort";
|
||||||
private static final String CONFIG_TYPE = "general";
|
private static final String CONFIG_TYPE = "general";
|
||||||
private static final Log log = LogFactory.getLog(ZipUtil.class);
|
private static final Log log = LogFactory.getLog(ZipUtil.class);
|
||||||
public static final String HOST_NAME = "HostName";
|
private static final String LOCALHOST = "localhost";
|
||||||
|
private static final String HTTP_PROTOCOL_HOST = "${iot.gateway.host}";
|
||||||
|
private static final String HTTP_PROTOCOL_PORT = "${iot.gateway.http.port}";
|
||||||
|
|
||||||
public ZipArchive createZipFile(String owner, String tenantDomain, String deviceType,
|
public ZipArchive createZipFile(String owner, String tenantDomain, String deviceType,
|
||||||
String deviceId, String deviceName, String token,
|
String deviceId, String deviceName, String token,
|
||||||
@ -72,8 +75,10 @@ public class ZipUtil {
|
|||||||
String iotServerIP;
|
String iotServerIP;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
iotServerIP = getServerUrl();
|
iotServerIP = Utils.replaceSystemProperty(HTTP_PROTOCOL_HOST);
|
||||||
String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY);
|
String serverIpAddress = getServerUrl();
|
||||||
|
iotServerIP = iotServerIP.replace(LOCALHOST, serverIpAddress);
|
||||||
|
String httpServerPort = Utils.replaceSystemProperty(HTTP_PROTOCOL_PORT);
|
||||||
|
|
||||||
Map<String, String> contextParams = new HashMap<>();
|
Map<String, String> contextParams = new HashMap<>();
|
||||||
|
|
||||||
@ -117,17 +122,13 @@ public class ZipUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getServerUrl() {
|
public static String getServerUrl() {
|
||||||
String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME);
|
|
||||||
try {
|
try {
|
||||||
if (hostName == null) {
|
return org.apache.axis2.util.Utils.getIpAddress();
|
||||||
hostName = NetworkUtils.getLocalHostname();
|
|
||||||
}
|
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
hostName = "localhost";
|
|
||||||
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
||||||
|
return "localhost";
|
||||||
}
|
}
|
||||||
return hostName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
private static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
||||||
|
|||||||
@ -16,10 +16,6 @@
|
|||||||
<servlet-name>CXFServlet</servlet-name>
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>doAuthentication</param-name>
|
<param-name>doAuthentication</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
||||||
|
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Location
|
</span> View Device Location
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Analytics
|
</span> View Device Analytics
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -2,6 +2,10 @@
|
|||||||
"deviceType": {
|
"deviceType": {
|
||||||
"label": "Arduino",
|
"label": "Arduino",
|
||||||
"category": "iot",
|
"category": "iot",
|
||||||
"downloadAgentUri": "arduino/device/download"
|
"downloadAgentUri": "arduino/device/download",
|
||||||
|
"category": "iot",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:arduino:enroll"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -239,14 +239,14 @@
|
|||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
|
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Arduino will publish it's internal temperature to WSO2-IoT-Server
|
Arduino will publish it's internal temperature to WSO2-IoT-Server
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
LED on <i>PIN 13</i> can be controlled from Device Management page.
|
LED on <i>PIN 13</i> can be controlled from Device Management page.
|
||||||
|
|||||||
@ -23,6 +23,7 @@ import org.apache.commons.io.IOUtils;
|
|||||||
import org.apache.commons.logging.Log;
|
import org.apache.commons.logging.Log;
|
||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.wso2.carbon.base.ServerConfiguration;
|
import org.wso2.carbon.base.ServerConfiguration;
|
||||||
|
import org.wso2.carbon.core.util.Utils;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
||||||
@ -56,15 +57,12 @@ import java.util.zip.ZipOutputStream;
|
|||||||
public class ZipUtil {
|
public class ZipUtil {
|
||||||
|
|
||||||
private static final Log log = LogFactory.getLog(ZipUtil.class);
|
private static final Log log = LogFactory.getLog(ZipUtil.class);
|
||||||
public static final String HOST_NAME = "HostName";
|
|
||||||
private static final String HTTPS_PORT_PROPERTY = "httpsPort";
|
|
||||||
private static final String HTTP_PORT_PROPERTY = "httpPort";
|
|
||||||
|
|
||||||
private static final String LOCALHOST = "localhost";
|
private static final String LOCALHOST = "localhost";
|
||||||
private static final String HTTPS_PROTOCOL_APPENDER = "https://";
|
private static final String HTTPS_PROTOCOL_URL = "https://${iot.gateway.host}:${iot.gateway.https.port}";
|
||||||
private static final String HTTP_PROTOCOL_APPENDER = "http://";
|
private static final String HTTP_PROTOCOL_URL = "http://${iot.gateway.host}:${iot.gateway.http.port}";
|
||||||
private static final String CONFIG_TYPE = "general";
|
private static final String CONFIG_TYPE = "general";
|
||||||
private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886";
|
private static final String DEFAULT_MQTT_ENDPOINT = "tcp://${mqtt.broker.host}:${mqtt.broker.port}";
|
||||||
|
|
||||||
public ZipArchive createZipFile(String owner, String tenantDomain, String deviceType,
|
public ZipArchive createZipFile(String owner, String tenantDomain, String deviceType,
|
||||||
String deviceId, String deviceName, String token,
|
String deviceId, String deviceName, String token,
|
||||||
@ -78,16 +76,14 @@ public class ZipUtil {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
iotServerIP = getServerUrl();
|
iotServerIP = getServerUrl();
|
||||||
String httpsServerPort = System.getProperty(HTTPS_PORT_PROPERTY);
|
String httpsServerEP = Utils.replaceSystemProperty(HTTPS_PROTOCOL_URL);
|
||||||
String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY);
|
String httpServerEP = Utils.replaceSystemProperty(HTTP_PROTOCOL_URL);
|
||||||
String httpsServerEP = HTTPS_PROTOCOL_APPENDER + iotServerIP + ":" + httpsServerPort;
|
String mqttEndpoint = Utils.replaceSystemProperty(DEFAULT_MQTT_ENDPOINT);
|
||||||
String httpServerEP = HTTP_PROTOCOL_APPENDER + iotServerIP + ":" + httpServerPort;
|
|
||||||
String apimEndpoint = httpsServerEP;
|
|
||||||
String mqttEndpoint = DEFAULT_MQTT_ENDPOINT;
|
|
||||||
if (mqttEndpoint.contains(LOCALHOST)) {
|
if (mqttEndpoint.contains(LOCALHOST)) {
|
||||||
mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP);
|
mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP);
|
||||||
|
httpsServerEP = httpsServerEP.replace(LOCALHOST, iotServerIP);
|
||||||
|
httpServerEP = httpServerEP.replace(LOCALHOST, iotServerIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration(
|
PlatformConfiguration configuration = APIUtil.getTenantConfigurationManagementService().getConfiguration(
|
||||||
CONFIG_TYPE);
|
CONFIG_TYPE);
|
||||||
if (configuration != null && configuration.getConfiguration() != null && configuration
|
if (configuration != null && configuration.getConfiguration() != null && configuration
|
||||||
@ -115,7 +111,7 @@ public class ZipUtil {
|
|||||||
contextParams.put("DEVICE_NAME", deviceName);
|
contextParams.put("DEVICE_NAME", deviceName);
|
||||||
contextParams.put("HTTPS_EP", httpsServerEP);
|
contextParams.put("HTTPS_EP", httpsServerEP);
|
||||||
contextParams.put("HTTP_EP", httpServerEP);
|
contextParams.put("HTTP_EP", httpServerEP);
|
||||||
contextParams.put("APIM_EP", apimEndpoint);
|
contextParams.put("APIM_EP", httpsServerEP);
|
||||||
contextParams.put("MQTT_EP", mqttEndpoint);
|
contextParams.put("MQTT_EP", mqttEndpoint);
|
||||||
contextParams.put("DEVICE_TOKEN", token);
|
contextParams.put("DEVICE_TOKEN", token);
|
||||||
contextParams.put("DEVICE_REFRESH_TOKEN", refreshToken);
|
contextParams.put("DEVICE_REFRESH_TOKEN", refreshToken);
|
||||||
@ -130,17 +126,13 @@ public class ZipUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getServerUrl() {
|
public static String getServerUrl() {
|
||||||
String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME);
|
|
||||||
try {
|
try {
|
||||||
if (hostName == null) {
|
return org.apache.axis2.util.Utils.getIpAddress();
|
||||||
hostName = NetworkUtils.getLocalHostname();
|
|
||||||
}
|
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
hostName = "localhost";
|
|
||||||
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
||||||
|
return "localhost";
|
||||||
}
|
}
|
||||||
return hostName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
private static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
||||||
|
|||||||
@ -16,10 +16,6 @@
|
|||||||
<servlet-name>CXFServlet</servlet-name>
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>doAuthentication</param-name>
|
<param-name>doAuthentication</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
|
|||||||
@ -88,7 +88,7 @@
|
|||||||
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
||||||
|
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Location
|
</span> View Device Location
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Analytics
|
</span> View Device Analytics
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
"deviceType": {
|
"deviceType": {
|
||||||
"label": "Raspberry Pi",
|
"label": "Raspberry Pi",
|
||||||
"category": "iot",
|
"category": "iot",
|
||||||
"downloadAgentUri": "raspberrypi/device/download"
|
"downloadAgentUri": "raspberrypi/device/download",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:raspberrypi:enroll"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -217,7 +217,7 @@
|
|||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
|
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
[sudo ./testAgent.sh] - Script to test agent
|
[sudo ./testAgent.sh] - Script to test agent
|
||||||
@ -226,7 +226,7 @@
|
|||||||
<li class="padding-top-double">
|
<li class="padding-top-double">
|
||||||
|
|
||||||
<span class="fw-stack margin-right">
|
<span class="fw-stack margin-right">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
<i class="fw fw-right-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
[sudo ./startService.sh] - Use this to start
|
[sudo ./startService.sh] - Use this to start
|
||||||
|
|||||||
@ -437,7 +437,7 @@ public class AgentUtilOperations {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private class APIManagerTokenUtils {
|
private class APIManagerTokenUtils {
|
||||||
public static final String TOKEN_ENDPOINT = "/oauth2/token";
|
public static final String TOKEN_ENDPOINT = "/token";
|
||||||
public static final String GRANT_TYPE = "grant_type";
|
public static final String GRANT_TYPE = "grant_type";
|
||||||
public static final String ACCESS_TOKEN = "access_token";
|
public static final String ACCESS_TOKEN = "access_token";
|
||||||
public static final String REFRESH_TOKEN = "refresh_token";
|
public static final String REFRESH_TOKEN = "refresh_token";
|
||||||
|
|||||||
@ -25,14 +25,13 @@ import org.apache.commons.logging.Log;
|
|||||||
import org.apache.commons.logging.LogFactory;
|
import org.apache.commons.logging.LogFactory;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants;
|
import org.wso2.carbon.apimgt.application.extension.constants.ApiApplicationConstants;
|
||||||
import org.wso2.carbon.base.ServerConfiguration;
|
import org.wso2.carbon.core.util.Utils;
|
||||||
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
import org.wso2.carbon.device.mgt.common.DeviceManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationEntry;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.ConfigurationManagementException;
|
||||||
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
import org.wso2.carbon.device.mgt.common.configuration.mgt.PlatformConfiguration;
|
||||||
import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig;
|
import org.wso2.carbon.device.mgt.iot.virtualfirealarm.service.impl.xmpp.XmppConfig;
|
||||||
import org.wso2.carbon.utils.CarbonUtils;
|
import org.wso2.carbon.utils.CarbonUtils;
|
||||||
import org.wso2.carbon.utils.NetworkUtils;
|
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
@ -64,10 +63,10 @@ public class ZipUtil {
|
|||||||
private static final String HTTP_PORT_PROPERTY = "httpPort";
|
private static final String HTTP_PORT_PROPERTY = "httpPort";
|
||||||
|
|
||||||
private static final String LOCALHOST = "localhost";
|
private static final String LOCALHOST = "localhost";
|
||||||
private static final String HTTPS_PROTOCOL_APPENDER = "https://";
|
private static final String HTTPS_PROTOCOL_URL = "https://${iot.gateway.host}:${iot.gateway.https.port}";
|
||||||
private static final String HTTP_PROTOCOL_APPENDER = "http://";
|
private static final String HTTP_PROTOCOL_URL = "http://${iot.gateway.host}:${iot.gateway.http.port}";
|
||||||
private static final String CONFIG_TYPE = "general";
|
private static final String CONFIG_TYPE = "general";
|
||||||
private static final String DEFAULT_MQTT_ENDPOINT = "tcp://localhost:1886";
|
private static final String DEFAULT_MQTT_ENDPOINT = "tcp://${mqtt.broker.host}:${mqtt.broker.port}";
|
||||||
public static final String HOST_NAME = "HostName";
|
public static final String HOST_NAME = "HostName";
|
||||||
|
|
||||||
public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName,
|
public ZipArchive createZipFile(String owner, String deviceType, String deviceId, String deviceName,
|
||||||
@ -83,13 +82,13 @@ public class ZipUtil {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
iotServerIP = getServerUrl();
|
iotServerIP = getServerUrl();
|
||||||
String httpsServerPort = System.getProperty(HTTPS_PORT_PROPERTY);
|
String httpsServerEP = Utils.replaceSystemProperty(HTTPS_PROTOCOL_URL);
|
||||||
String httpServerPort = System.getProperty(HTTP_PORT_PROPERTY);
|
String httpServerEP = Utils.replaceSystemProperty(HTTP_PROTOCOL_URL);
|
||||||
String httpsServerEP = HTTPS_PROTOCOL_APPENDER + iotServerIP + ":" + httpsServerPort;
|
String mqttEndpoint = Utils.replaceSystemProperty(DEFAULT_MQTT_ENDPOINT);
|
||||||
String httpServerEP = HTTP_PROTOCOL_APPENDER + iotServerIP + ":" + httpServerPort;
|
|
||||||
String mqttEndpoint = DEFAULT_MQTT_ENDPOINT;
|
|
||||||
if (mqttEndpoint.contains(LOCALHOST)) {
|
if (mqttEndpoint.contains(LOCALHOST)) {
|
||||||
mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP);
|
mqttEndpoint = mqttEndpoint.replace(LOCALHOST, iotServerIP);
|
||||||
|
httpsServerEP = httpsServerEP.replace(LOCALHOST, iotServerIP);
|
||||||
|
httpServerEP = httpServerEP.replace(LOCALHOST, iotServerIP);
|
||||||
}
|
}
|
||||||
|
|
||||||
String xmppEndpoint = "";
|
String xmppEndpoint = "";
|
||||||
@ -161,16 +160,12 @@ public class ZipUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getServerUrl() {
|
public static String getServerUrl() {
|
||||||
String hostName = ServerConfiguration.getInstance().getFirstProperty(HOST_NAME);
|
|
||||||
try {
|
try {
|
||||||
if (hostName == null) {
|
return org.apache.axis2.util.Utils.getIpAddress();
|
||||||
hostName = NetworkUtils.getLocalHostname();
|
|
||||||
}
|
|
||||||
} catch (SocketException e) {
|
} catch (SocketException e) {
|
||||||
hostName = "localhost";
|
|
||||||
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
log.warn("Failed retrieving the hostname, therefore set to localhost", e);
|
||||||
|
return "localhost";
|
||||||
}
|
}
|
||||||
return hostName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
public static ZipArchive getSketchArchive(String archivesPath, String templateSketchPath, Map contextParams
|
||||||
|
|||||||
@ -16,18 +16,10 @@
|
|||||||
<servlet-name>CXFServlet</servlet-name>
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
<url-pattern>/*</url-pattern>
|
<url-pattern>/*</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>doAuthentication</param-name>
|
<param-name>doAuthentication</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
</context-param>
|
</context-param>
|
||||||
<context-param>
|
|
||||||
<param-name>providerTenantDomain</param-name>
|
|
||||||
<param-value>carbon.super</param-value>
|
|
||||||
</context-param>
|
|
||||||
|
|
||||||
<!--publish to apim-->
|
<!--publish to apim-->
|
||||||
<context-param>
|
<context-param>
|
||||||
|
|||||||
@ -80,7 +80,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}">
|
href="{{@app.context}}/policy/add/{{device.type}}?deviceId={{device.deviceIdentifier}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-policy fw-stack-1x"></i>
|
<i class="fw fw-policy fw-stack-1x"></i>
|
||||||
</span> Add device specific policy</a>
|
</span> Add device specific policy</a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -31,7 +31,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
href="{{@app.context}}/device/{{device.type}}/analytics?deviceId={{device.deviceIdentifier}}&deviceName={{device.name}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-statistics fw-stack-1x"></i>
|
<i class="fw fw-statistics fw-stack-1x"></i>
|
||||||
</span> View Device Analytics
|
</span> View Device Analytics
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -3,6 +3,9 @@
|
|||||||
"label": "Virtual Firealarm",
|
"label": "Virtual Firealarm",
|
||||||
"category": "virtual",
|
"category": "virtual",
|
||||||
"downloadAgentUri": "virtual_firealarm/device/download",
|
"downloadAgentUri": "virtual_firealarm/device/download",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:firealarm:enroll"
|
||||||
|
],
|
||||||
"features": {
|
"features": {
|
||||||
"buzz": {
|
"buzz": {
|
||||||
"icon" : "fw-dial-up"
|
"icon" : "fw-dial-up"
|
||||||
|
|||||||
@ -63,7 +63,7 @@
|
|||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-raspberry fw-stack-2x"></i>
|
<i class="fw fw-raspberry fw-stack-2x"></i>
|
||||||
<span class="fw-stack fw-move-right fw-move-bottom">
|
<span class="fw-stack fw-move-right fw-move-bottom">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
|
<i class="fw fw-circle fw-stack-2x fw-stroke text-info"></i>
|
||||||
<i class="fw fw-add fw-stack-1x fw-inverse"></i>
|
<i class="fw fw-add fw-stack-1x fw-inverse"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -31,7 +31,7 @@ dcrUrl=dcrUrl
|
|||||||
dcrUrl.hint=dynamic client registration endpoint URL to create application (if required) eg: https://localhost:9443/dynamic-client-web/register
|
dcrUrl.hint=dynamic client registration endpoint URL to create application (if required) eg: https://localhost:9443/dynamic-client-web/register
|
||||||
contentValidator=contentValidation
|
contentValidator=contentValidation
|
||||||
contentValidator.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required)
|
contentValidator.hint=Class Name of the content Validation or 'default' to set default class, required to implement (if required)
|
||||||
url.hint=MQTT broker url tcp://localhost:1886
|
url.hint=MQTT broker url tcp://localhost:1883
|
||||||
cleanSession=Clean Session
|
cleanSession=Clean Session
|
||||||
cleanSession.hint=Persist topic subscriptions and ack positions across client sessions
|
cleanSession.hint=Persist topic subscriptions and ack positions across client sessions
|
||||||
keepAlive=Keep Alive (In seconds)
|
keepAlive=Keep Alive (In seconds)
|
||||||
|
|||||||
@ -61,6 +61,11 @@ public class DeviceAuthorizer implements Authorizer {
|
|||||||
@Override
|
@Override
|
||||||
public void init(Map<String, String> globalProperties) {
|
public void init(Map<String, String> globalProperties) {
|
||||||
statPermissions = getPermissions(globalProperties);
|
statPermissions = getPermissions(globalProperties);
|
||||||
|
if (statPermissions != null && !statPermissions.isEmpty()) {
|
||||||
|
for (String permission : statPermissions) {
|
||||||
|
PermissionUtil.putPermission(permission);
|
||||||
|
}
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
deviceAccessAuthorizationAdminService = Feign.builder()
|
deviceAccessAuthorizationAdminService = Feign.builder()
|
||||||
.requestInterceptor(new OAuthRequestInterceptor(globalProperties))
|
.requestInterceptor(new OAuthRequestInterceptor(globalProperties))
|
||||||
|
|||||||
@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. licenses this file to you under the Apache License,
|
||||||
|
* Version 2.0 (the "License"); you may not use this file except
|
||||||
|
* in compliance with the License.
|
||||||
|
* you may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing,
|
||||||
|
* software distributed under the License is distributed on an
|
||||||
|
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
* KIND, either express or implied. See the License for the
|
||||||
|
* specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*/
|
||||||
|
package org.wso2.carbon.device.mgt.output.adapter.websocket.authorization;
|
||||||
|
|
||||||
|
import org.apache.commons.logging.Log;
|
||||||
|
import org.apache.commons.logging.LogFactory;
|
||||||
|
import org.wso2.carbon.base.MultitenantConstants;
|
||||||
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.internal.WebsocketEventAdaptorServiceDataHolder;
|
||||||
|
import org.wso2.carbon.registry.api.Resource;
|
||||||
|
import org.wso2.carbon.registry.core.Registry;
|
||||||
|
import org.wso2.carbon.registry.core.exceptions.RegistryException;
|
||||||
|
|
||||||
|
import java.util.StringTokenizer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utility class which holds necessary utility methods required for persisting permissions in
|
||||||
|
* registry.
|
||||||
|
*/
|
||||||
|
public class PermissionUtil {
|
||||||
|
|
||||||
|
public static final String PERMISSION_PROPERTY_NAME = "name";
|
||||||
|
private static Log log = LogFactory.getLog(DeviceAuthorizer.class);
|
||||||
|
|
||||||
|
public static void putPermission(String permission) {
|
||||||
|
try {
|
||||||
|
StringTokenizer tokenizer = new StringTokenizer(permission, "/");
|
||||||
|
String lastToken = "", currentToken, tempPath;
|
||||||
|
while (tokenizer.hasMoreTokens()) {
|
||||||
|
currentToken = tokenizer.nextToken();
|
||||||
|
tempPath = lastToken + "/" + currentToken;
|
||||||
|
if (!checkResourceExists(tempPath)) {
|
||||||
|
createRegistryCollection(tempPath, currentToken);
|
||||||
|
|
||||||
|
}
|
||||||
|
lastToken = tempPath;
|
||||||
|
}
|
||||||
|
} catch (org.wso2.carbon.registry.api.RegistryException e) {
|
||||||
|
log.error("Failed to creation permission in registry" + permission, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void createRegistryCollection(String path, String resourceName)
|
||||||
|
throws org.wso2.carbon.registry.api.RegistryException {
|
||||||
|
Resource resource = getGovernanceRegistry().newCollection();
|
||||||
|
resource.addProperty(PERMISSION_PROPERTY_NAME, resourceName);
|
||||||
|
getGovernanceRegistry().beginTransaction();
|
||||||
|
getGovernanceRegistry().put(path, resource);
|
||||||
|
getGovernanceRegistry().commitTransaction();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean checkResourceExists(String path)
|
||||||
|
throws RegistryException {
|
||||||
|
return getGovernanceRegistry().resourceExists(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Registry getGovernanceRegistry() throws RegistryException {
|
||||||
|
return WebsocketEventAdaptorServiceDataHolder.getRegistryService()
|
||||||
|
.getGovernanceSystemRegistry(MultitenantConstants.SUPER_TENANT_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -45,6 +45,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
private static final String APPLICATION_NAME = "websocket-app";
|
private static final String APPLICATION_NAME = "websocket-app";
|
||||||
private static final String PASSWORD_GRANT_TYPE = "password";
|
private static final String PASSWORD_GRANT_TYPE = "password";
|
||||||
private static final String REFRESH_GRANT_TYPE = "refresh_token";
|
private static final String REFRESH_GRANT_TYPE = "refresh_token";
|
||||||
|
private static final String REQUIRED_SCOPE = "perm:authorization:verify";
|
||||||
private ApiApplicationRegistrationService apiApplicationRegistrationService;
|
private ApiApplicationRegistrationService apiApplicationRegistrationService;
|
||||||
private TokenIssuerService tokenIssuerService;
|
private TokenIssuerService tokenIssuerService;
|
||||||
|
|
||||||
@ -76,7 +77,6 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
username = getUsername(globalProperties);
|
username = getUsername(globalProperties);
|
||||||
password = getPassword(globalProperties);
|
password = getPassword(globalProperties);
|
||||||
tokenEndpoint = getTokenEndpoint(globalProperties);
|
tokenEndpoint = getTokenEndpoint(globalProperties);
|
||||||
scopes = getScopes(globalProperties);
|
|
||||||
apiApplicationRegistrationService = Feign.builder().requestInterceptor(
|
apiApplicationRegistrationService = Feign.builder().requestInterceptor(
|
||||||
new BasicAuthRequestInterceptor(username, password))
|
new BasicAuthRequestInterceptor(username, password))
|
||||||
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
||||||
@ -104,11 +104,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
new BasicAuthRequestInterceptor(consumerKey, consumerSecret))
|
new BasicAuthRequestInterceptor(consumerKey, consumerSecret))
|
||||||
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
||||||
.target(TokenIssuerService.class, tokenEndpoint);
|
.target(TokenIssuerService.class, tokenEndpoint);
|
||||||
if (scopes == null || scopes.isEmpty()) {
|
tokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password, REQUIRED_SCOPE);
|
||||||
tokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password);
|
|
||||||
} else {
|
|
||||||
tokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password, scopes);
|
|
||||||
}
|
|
||||||
tokenInfo.setExpires_in(System.currentTimeMillis() + tokenInfo.getExpires_in());
|
tokenInfo.setExpires_in(System.currentTimeMillis() + tokenInfo.getExpires_in());
|
||||||
}
|
}
|
||||||
synchronized(this) {
|
synchronized(this) {
|
||||||
@ -163,9 +159,4 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
return refreshTimeOffset;
|
return refreshTimeOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getScopes(Map<String, String> globalProperties) {
|
|
||||||
return globalProperties.get(TOKEN_SCOPES);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,6 +27,7 @@
|
|||||||
package org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto;
|
package org.wso2.carbon.device.mgt.output.adapter.websocket.authorization.client.dto;
|
||||||
|
|
||||||
import javax.ws.rs.Consumes;
|
import javax.ws.rs.Consumes;
|
||||||
|
import javax.ws.rs.FormParam;
|
||||||
import javax.ws.rs.POST;
|
import javax.ws.rs.POST;
|
||||||
import javax.ws.rs.Path;
|
import javax.ws.rs.Path;
|
||||||
import javax.ws.rs.Produces;
|
import javax.ws.rs.Produces;
|
||||||
@ -48,7 +49,7 @@ public interface TokenIssuerService {
|
|||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||||
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
||||||
@QueryParam("password") String password, @QueryParam("scopes") String scopes);
|
@QueryParam("password") String password, @QueryParam("scope") String scopes);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
|||||||
@ -20,6 +20,7 @@ package org.wso2.carbon.device.mgt.output.adapter.websocket.internal;
|
|||||||
|
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.WebsocketOutputCallbackControllerServiceImpl;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.WebsocketOutputCallbackControllerServiceImpl;
|
||||||
import org.wso2.carbon.event.stream.core.EventStreamService;
|
import org.wso2.carbon.event.stream.core.EventStreamService;
|
||||||
|
import org.wso2.carbon.registry.core.service.RegistryService;
|
||||||
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.concurrent.LinkedBlockingDeque;
|
import java.util.concurrent.LinkedBlockingDeque;
|
||||||
@ -35,6 +36,7 @@ public final class WebsocketEventAdaptorServiceDataHolder {
|
|||||||
private static ConcurrentHashMap<Integer, ConcurrentHashMap<String, LinkedBlockingDeque<Object>>>
|
private static ConcurrentHashMap<Integer, ConcurrentHashMap<String, LinkedBlockingDeque<Object>>>
|
||||||
tenantSpecificStreamEventMap = new ConcurrentHashMap<>();
|
tenantSpecificStreamEventMap = new ConcurrentHashMap<>();
|
||||||
private static EventStreamService eventStreamService;
|
private static EventStreamService eventStreamService;
|
||||||
|
private static RegistryService registryService;
|
||||||
|
|
||||||
public static void registerEventStreamService(EventStreamService eventBuilderService) {
|
public static void registerEventStreamService(EventStreamService eventBuilderService) {
|
||||||
WebsocketEventAdaptorServiceDataHolder.eventStreamService = eventBuilderService;
|
WebsocketEventAdaptorServiceDataHolder.eventStreamService = eventBuilderService;
|
||||||
@ -63,4 +65,15 @@ public final class WebsocketEventAdaptorServiceDataHolder {
|
|||||||
getTenantSpecificStreamEventMap() {
|
getTenantSpecificStreamEventMap() {
|
||||||
return tenantSpecificStreamEventMap;
|
return tenantSpecificStreamEventMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static RegistryService getRegistryService() {
|
||||||
|
if (registryService == null) {
|
||||||
|
throw new IllegalStateException("Registry service is not initialized properly");
|
||||||
|
}
|
||||||
|
return registryService;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setRegistryService(RegistryService registryService) {
|
||||||
|
WebsocketEventAdaptorServiceDataHolder.registryService = registryService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,12 +26,19 @@ import org.wso2.carbon.device.mgt.output.adapter.websocket.WebsocketOutputCallba
|
|||||||
import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterFactory;
|
import org.wso2.carbon.event.output.adapter.core.OutputEventAdapterFactory;
|
||||||
import org.wso2.carbon.device.mgt.output.adapter.websocket.WebsocketOutputCallbackControllerService;
|
import org.wso2.carbon.device.mgt.output.adapter.websocket.WebsocketOutputCallbackControllerService;
|
||||||
import org.wso2.carbon.event.stream.core.EventStreamService;
|
import org.wso2.carbon.event.stream.core.EventStreamService;
|
||||||
|
import org.wso2.carbon.registry.core.service.RegistryService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @scr.component component.name="output.extensions.secured.websocket.AdapterService.component" immediate="true"
|
* @scr.component component.name="output.extensions.secured.websocket.AdapterService.component" immediate="true"
|
||||||
* @scr.reference name="eventStreamService.service"
|
* @scr.reference name="eventStreamService.service"
|
||||||
* interface="org.wso2.carbon.event.stream.core.EventStreamService" cardinality="1..1"
|
* interface="org.wso2.carbon.event.stream.core.EventStreamService" cardinality="1..1"
|
||||||
* policy="dynamic" bind="setEventStreamService" unbind="unsetEventStreamService"
|
* policy="dynamic" bind="setEventStreamService" unbind="unsetEventStreamService"
|
||||||
|
* @scr.reference name="registry.service"
|
||||||
|
* interface="org.wso2.carbon.registry.core.service.RegistryService"
|
||||||
|
* cardinality="1..1"
|
||||||
|
* policy="dynamic"
|
||||||
|
* bind="setRegistryService"
|
||||||
|
* unbind="unsetRegistryService"
|
||||||
*/
|
*/
|
||||||
public class WebsocketLocalEventAdapterServiceComponent {
|
public class WebsocketLocalEventAdapterServiceComponent {
|
||||||
|
|
||||||
@ -80,4 +87,28 @@ public class WebsocketLocalEventAdapterServiceComponent {
|
|||||||
}
|
}
|
||||||
WebsocketEventAdaptorServiceDataHolder.registerEventStreamService(null);
|
WebsocketEventAdaptorServiceDataHolder.registerEventStreamService(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets Registry Service.
|
||||||
|
*
|
||||||
|
* @param registryService An instance of RegistryService
|
||||||
|
*/
|
||||||
|
protected void setRegistryService(RegistryService registryService) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Setting Registry Service");
|
||||||
|
}
|
||||||
|
WebsocketEventAdaptorServiceDataHolder.setRegistryService(registryService);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unsets Registry Service.
|
||||||
|
*
|
||||||
|
* @param registryService An instance of RegistryService
|
||||||
|
*/
|
||||||
|
protected void unsetRegistryService(RegistryService registryService) {
|
||||||
|
if (log.isDebugEnabled()) {
|
||||||
|
log.debug("Un setting Registry Service");
|
||||||
|
}
|
||||||
|
WebsocketEventAdaptorServiceDataHolder.setRegistryService(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -18,6 +18,8 @@ import feign.Feign;
|
|||||||
import feign.RequestInterceptor;
|
import feign.RequestInterceptor;
|
||||||
import feign.RequestTemplate;
|
import feign.RequestTemplate;
|
||||||
import feign.auth.BasicAuthRequestInterceptor;
|
import feign.auth.BasicAuthRequestInterceptor;
|
||||||
|
import feign.codec.EncodeException;
|
||||||
|
import feign.codec.Encoder;
|
||||||
import feign.gson.GsonDecoder;
|
import feign.gson.GsonDecoder;
|
||||||
import feign.gson.GsonEncoder;
|
import feign.gson.GsonEncoder;
|
||||||
import feign.jaxrs.JAXRSContract;
|
import feign.jaxrs.JAXRSContract;
|
||||||
@ -40,6 +42,7 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
private static final String APPLICATION_NAME = "mqtt_broker";
|
private static final String APPLICATION_NAME = "mqtt_broker";
|
||||||
private static final String PASSWORD_GRANT_TYPE = "password";
|
private static final String PASSWORD_GRANT_TYPE = "password";
|
||||||
private static final String REFRESH_GRANT_TYPE = "refresh_token";
|
private static final String REFRESH_GRANT_TYPE = "refresh_token";
|
||||||
|
private static final String REQUIRED_SCOPE = "perm:authorization:verify";
|
||||||
private ApiApplicationRegistrationService apiApplicationRegistrationService;
|
private ApiApplicationRegistrationService apiApplicationRegistrationService;
|
||||||
private TokenIssuerService tokenIssuerService;
|
private TokenIssuerService tokenIssuerService;
|
||||||
|
|
||||||
@ -75,8 +78,9 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
tokenIssuerService = Feign.builder().requestInterceptor(
|
tokenIssuerService = Feign.builder().requestInterceptor(
|
||||||
new BasicAuthRequestInterceptor(consumerKey, consumerSecret))
|
new BasicAuthRequestInterceptor(consumerKey, consumerSecret))
|
||||||
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
.contract(new JAXRSContract()).encoder(new GsonEncoder()).decoder(new GsonDecoder())
|
||||||
.target(TokenIssuerService.class, AuthorizationConfigurationManager.getInstance().getTokenEndpoint());
|
.target(TokenIssuerService.class,
|
||||||
tokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password);
|
AuthorizationConfigurationManager.getInstance().getTokenEndpoint());
|
||||||
|
tokenInfo = tokenIssuerService.getToken(PASSWORD_GRANT_TYPE, username, password, REQUIRED_SCOPE);
|
||||||
tokenInfo.setExpires_in(System.currentTimeMillis() + tokenInfo.getExpires_in());
|
tokenInfo.setExpires_in(System.currentTimeMillis() + tokenInfo.getExpires_in());
|
||||||
}
|
}
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
@ -89,5 +93,4 @@ public class OAuthRequestInterceptor implements RequestInterceptor {
|
|||||||
template.header("Authorization", headerValue);
|
template.header("Authorization", headerValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,12 @@ public interface TokenIssuerService {
|
|||||||
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
||||||
@QueryParam("password") String password);
|
@QueryParam("password") String password);
|
||||||
|
|
||||||
|
@POST
|
||||||
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
|
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||||
|
AccessTokenInfo getToken(@QueryParam("grant_type") String grant, @QueryParam("username") String username,
|
||||||
|
@QueryParam("password") String password, @QueryParam("scope") String scopes);
|
||||||
|
|
||||||
@POST
|
@POST
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
|
||||||
|
|||||||
@ -42,11 +42,6 @@
|
|||||||
<session-config>
|
<session-config>
|
||||||
<session-timeout>60</session-timeout>
|
<session-timeout>60</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
|
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>managed-api-enabled</param-name>
|
<param-name>managed-api-enabled</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
|
|||||||
@ -341,7 +341,7 @@
|
|||||||
<a class="padding-left"
|
<a class="padding-left"
|
||||||
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-map-location fw-stack-1x"></i>
|
<i class="fw fw-map-location fw-stack-1x"></i>
|
||||||
</span>View device on the map
|
</span>View device on the map
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -48,7 +48,7 @@
|
|||||||
<a href="{{appContext}}/policy/effective-policy?type={{deviceType}}&id={{deviceId}}" class="cu-btn-inner
|
<a href="{{appContext}}/policy/effective-policy?type={{deviceType}}&id={{deviceId}}" class="cu-btn-inner
|
||||||
policy-view-link" data-id="{{id}}">
|
policy-view-link" data-id="{{id}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-view fw-stack-1x"></i>
|
<i class="fw fw-view fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
View
|
View
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="col-lg-5 col-md-6 col-centered">
|
<div class="col-lg-5 col-md-6 col-centered">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw {{iconFont}} fw-stack-1x"></i>
|
<i class="fw {{iconFont}} fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{name}}
|
{{name}}
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<div class="col-lg-5 col-md-6 col-centered">
|
<div class="col-lg-5 col-md-6 col-centered">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -965,7 +965,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
Add Application
|
Add Application
|
||||||
@ -1010,7 +1010,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -1400,7 +1400,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
Add Application
|
Add Application
|
||||||
</a>
|
</a>
|
||||||
@ -1446,7 +1446,7 @@
|
|||||||
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -779,13 +779,13 @@
|
|||||||
<!--<a href="#" class="multi-view add enabled">-->
|
<!--<a href="#" class="multi-view add enabled">-->
|
||||||
<!--<span class="icon fw-stack">-->
|
<!--<span class="icon fw-stack">-->
|
||||||
<!--<i class="fw fw-add fw-stack-1x"></i>-->
|
<!--<i class="fw fw-add fw-stack-1x"></i>-->
|
||||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
<!--<i class="fw fw-circle-outline fw-stack-2x"></i>-->
|
||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
<!--</a>-->
|
<!--</a>-->
|
||||||
<!--<a href="#" class="multi-view remove disabled">-->
|
<!--<a href="#" class="multi-view remove disabled">-->
|
||||||
<!--<span class="icon fw-stack">-->
|
<!--<span class="icon fw-stack">-->
|
||||||
<!--<i class="fw fw-minus fw-stack-1x"></i>-->
|
<!--<i class="fw fw-minus fw-stack-1x"></i>-->
|
||||||
<!--<i class="fw fw-ring fw-stack-2x"></i>-->
|
<!--<i class="fw fw-circle-outline fw-stack-2x"></i>-->
|
||||||
<!--</span>-->
|
<!--</span>-->
|
||||||
<!--</a>-->
|
<!--</a>-->
|
||||||
<!--Wi-Fi Setting :-->
|
<!--Wi-Fi Setting :-->
|
||||||
@ -964,7 +964,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
Add Application
|
Add Application
|
||||||
@ -1009,7 +1009,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -1511,7 +1511,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
Add Application
|
Add Application
|
||||||
@ -1558,7 +1558,7 @@
|
|||||||
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -965,7 +965,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
Add Application
|
Add Application
|
||||||
@ -1010,7 +1010,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@ -1400,7 +1400,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
Add Application
|
Add Application
|
||||||
</a>
|
</a>
|
||||||
@ -1446,7 +1446,7 @@
|
|||||||
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
<a href="#cosu-whitelisted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -4,6 +4,9 @@
|
|||||||
"category": "mobile",
|
"category": "mobile",
|
||||||
"analyticsEnabled": "false",
|
"analyticsEnabled": "false",
|
||||||
"groupingEnabled": "false",
|
"groupingEnabled": "false",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:android:enroll"
|
||||||
|
],
|
||||||
"features": {
|
"features": {
|
||||||
"DEVICE_RING": {
|
"DEVICE_RING": {
|
||||||
"icon": "fw-dial-up",
|
"icon": "fw-dial-up",
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
{{#defineZone "toggleMenuRight-icon"}}
|
{{#defineZone "toggleMenuRight-icon"}}
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-settings fw-stack-1x"></i>
|
<i class="fw fw-settings fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{/defineZone}}
|
{{/defineZone}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 385 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -48,10 +48,6 @@
|
|||||||
<session-config>
|
<session-config>
|
||||||
<session-timeout>60</session-timeout>
|
<session-timeout>60</session-timeout>
|
||||||
</session-config>
|
</session-config>
|
||||||
<context-param>
|
|
||||||
<param-name>isAdminService</param-name>
|
|
||||||
<param-value>false</param-value>
|
|
||||||
</context-param>
|
|
||||||
<context-param>
|
<context-param>
|
||||||
<param-name>managed-api-enabled</param-name>
|
<param-name>managed-api-enabled</param-name>
|
||||||
<param-value>true</param-value>
|
<param-value>true</param-value>
|
||||||
|
|||||||
@ -47,7 +47,7 @@
|
|||||||
<span class="list-group-item-actions">
|
<span class="list-group-item-actions">
|
||||||
<a href="{{appContext}}/policy/effective-policy?type={{deviceType}}&id={{deviceId}}" class="cu-btn-inner policy-view-link" data-id="{{id}}">
|
<a href="{{appContext}}/policy/effective-policy?type={{deviceType}}&id={{deviceId}}" class="cu-btn-inner policy-view-link" data-id="{{id}}">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-view fw-stack-1x"></i>
|
<i class="fw fw-view fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
View
|
View
|
||||||
|
|||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="col-lg-5 col-md-6 col-centered">
|
<div class="col-lg-5 col-md-6 col-centered">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw {{iconFont}} fw-stack-1x"></i>
|
<i class="fw {{iconFont}} fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{name}}
|
{{name}}
|
||||||
@ -126,7 +126,7 @@
|
|||||||
<div class="col-lg-5 col-md-6 col-centered">
|
<div class="col-lg-5 col-md-6 col-centered">
|
||||||
<h3>
|
<h3>
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
<i id="status-icon" class="fw fw-error fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
@ -35,7 +35,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#enableEncryptionTab"
|
<a data-toggle="collapse" data-parent="#accordion" href="#enableEncryptionTab"
|
||||||
aria-expanded="true" aria-controls="enableEncryptionTab">
|
aria-expanded="true" aria-controls="enableEncryptionTab">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Encryption Enable/Disable
|
Encryption Enable/Disable
|
||||||
@ -61,7 +61,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#passCodePolicy" aria-expanded="false"
|
<a data-toggle="collapse" data-parent="#accordion" href="#passCodePolicy" aria-expanded="false"
|
||||||
aria-controls="passCodePolicy" class="collapsed">
|
aria-controls="passCodePolicy" class="collapsed">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Passcode Policy
|
Passcode Policy
|
||||||
@ -155,7 +155,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#installApp" aria-expanded="true"
|
<a data-toggle="collapse" data-parent="#accordion" href="#installApp" aria-expanded="true"
|
||||||
aria-controls="installApp">
|
aria-controls="installApp">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Install App
|
Install App
|
||||||
@ -198,7 +198,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#installWebClip" aria-expanded="true"
|
<a data-toggle="collapse" data-parent="#accordion" href="#installWebClip" aria-expanded="true"
|
||||||
aria-controls="installWebClip" class="collapsed">
|
aria-controls="installWebClip" class="collapsed">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Install Web Clip
|
Install Web Clip
|
||||||
@ -230,7 +230,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#uninstallApp" aria-expanded="true"
|
<a data-toggle="collapse" data-parent="#accordion" href="#uninstallApp" aria-expanded="true"
|
||||||
aria-controls="uninstallApp" class="collapsed">
|
aria-controls="uninstallApp" class="collapsed">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Uninstall App
|
Uninstall App
|
||||||
@ -260,7 +260,7 @@
|
|||||||
<a data-toggle="collapse" data-parent="#accordion" href="#cameraDisable" aria-expanded="true"
|
<a data-toggle="collapse" data-parent="#accordion" href="#cameraDisable" aria-expanded="true"
|
||||||
aria-controls="cameraDisable">
|
aria-controls="cameraDisable">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Camera Enable/Disable
|
Camera Enable/Disable
|
||||||
|
|||||||
@ -40,7 +40,7 @@
|
|||||||
<h2 class="sub-title panel-title">
|
<h2 class="sub-title panel-title">
|
||||||
<a data-toggle="collapse" data-parent="#accordion" href="#installPublicAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS">
|
<a data-toggle="collapse" data-parent="#accordion" href="#installPublicAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Install Public App
|
Install Public App
|
||||||
@ -84,7 +84,7 @@
|
|||||||
<h2 class="sub-title panel-title">
|
<h2 class="sub-title panel-title">
|
||||||
<a data-toggle="collapse" data-parent="#accordion" href="#installEnterpriseAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS" class="collapsed">
|
<a data-toggle="collapse" data-parent="#accordion" href="#installEnterpriseAppiOS" aria-expanded="true" aria-controls="installPublicAppiOS" class="collapsed">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Install Enterprise App
|
Install Enterprise App
|
||||||
@ -127,7 +127,7 @@
|
|||||||
<h2 class="sub-title panel-title">
|
<h2 class="sub-title panel-title">
|
||||||
<a data-toggle="collapse" data-parent="#accordion" href="#removeApplication" aria-expanded="true" aria-controls="removeApplication" class="collapsed">
|
<a data-toggle="collapse" data-parent="#accordion" href="#removeApplication" aria-expanded="true" aria-controls="removeApplication" class="collapsed">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
<i class="fw fw-arrow fw-down-arrow fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Uninstall App
|
Uninstall App
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="pull-left modal-title">
|
<h3 class="pull-left modal-title">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-error fw-stack-1x"></i>
|
<i class="fw fw-error fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Operation cannot be performed !
|
Operation cannot be performed !
|
||||||
@ -24,7 +24,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="pull-left modal-title">
|
<h3 class="pull-left modal-title">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-error fw-stack-1x"></i>
|
<i class="fw fw-error fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Operation cannot be performed !
|
Operation cannot be performed !
|
||||||
@ -46,7 +46,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="pull-left modal-title">
|
<h3 class="pull-left modal-title">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-check fw-stack-1x"></i>
|
<i class="fw fw-check fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Operation queued successfully !
|
Operation queued successfully !
|
||||||
@ -69,7 +69,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="pull-left modal-title">
|
<h3 class="pull-left modal-title">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-check fw-stack-1x"></i>
|
<i class="fw fw-check fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
Message sent successfully !
|
Message sent successfully !
|
||||||
@ -96,7 +96,7 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h3 class="pull-left modal-title">
|
<h3 class="pull-left modal-title">
|
||||||
<span class="fw-stack">
|
<span class="fw-stack">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw {{icon}} fw-stack-1x"></i>
|
<i class="fw {{icon}} fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{name}}
|
{{name}}
|
||||||
|
|||||||
@ -338,7 +338,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
Add Application
|
Add Application
|
||||||
</a>
|
</a>
|
||||||
@ -384,7 +384,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -342,7 +342,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
Add Application
|
Add Application
|
||||||
@ -389,7 +389,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -338,7 +338,7 @@
|
|||||||
data-click-event="add-form">
|
data-click-event="add-form">
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-add fw-stack-1x"></i>
|
<i class="fw fw-add fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
Add Application
|
Add Application
|
||||||
</a>
|
</a>
|
||||||
@ -384,7 +384,7 @@
|
|||||||
<a href="#restricted-applications-grid" class="grid-input-remove"
|
<a href="#restricted-applications-grid" class="grid-input-remove"
|
||||||
data-click-event="remove-form">
|
data-click-event="remove-form">
|
||||||
<span class="fw-stack helper" title="Remove Entry">
|
<span class="fw-stack helper" title="Remove Entry">
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
<i class="fw fw-delete fw-stack-1x"></i>
|
<i class="fw fw-delete fw-stack-1x"></i>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@ -2,6 +2,9 @@
|
|||||||
"deviceType": {
|
"deviceType": {
|
||||||
"label": "Windows",
|
"label": "Windows",
|
||||||
"category": "mobile",
|
"category": "mobile",
|
||||||
|
"scopes" : [
|
||||||
|
"perm:windows:enroll"
|
||||||
|
],
|
||||||
"analyticsEnabled": "false",
|
"analyticsEnabled": "false",
|
||||||
"groupingEnabled": "false",
|
"groupingEnabled": "false",
|
||||||
"features": {
|
"features": {
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
{{#defineZone "toggleMenuRight-icon"}}
|
{{#defineZone "toggleMenuRight-icon"}}
|
||||||
<span class="icon fw-stack">
|
<span class="icon fw-stack">
|
||||||
<i class="fw fw-settings fw-stack-1x"></i>
|
<i class="fw fw-settings fw-stack-1x"></i>
|
||||||
<i class="fw fw-ring fw-stack-2x"></i>
|
<i class="fw fw-circle-outline fw-stack-2x"></i>
|
||||||
</span>
|
</span>
|
||||||
{{/defineZone}}
|
{{/defineZone}}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 337 KiB After Width: | Height: | Size: 385 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -22,29 +22,29 @@
|
|||||||
<Feature code="keywords">
|
<Feature code="keywords">
|
||||||
<Name>Add Keywords</Name>
|
<Name>Add Keywords</Name>
|
||||||
<Description>Send keywords to the device</Description>
|
<Description>Send keywords to the device</Description>
|
||||||
<Operation context="/android_sense/device/{deviceId}/words" method="POST">
|
<!--<Operation context="/android_sense/device/{deviceId}/words" method="POST">-->
|
||||||
<QueryParameters>
|
<!--<QueryParameters>-->
|
||||||
<Parameter>keywords</Parameter>
|
<!--<Parameter>keywords</Parameter>-->
|
||||||
</QueryParameters>
|
<!--</QueryParameters>-->
|
||||||
</Operation>
|
<!--</Operation>-->
|
||||||
</Feature>
|
</Feature>
|
||||||
<Feature code="threshold">
|
<Feature code="threshold">
|
||||||
<Name>Add Threshold</Name>
|
<Name>Add Threshold</Name>
|
||||||
<Description>Send Threshold to the device</Description>
|
<Description>Send Threshold to the device</Description>
|
||||||
<Operation context="/android_sense/device/{deviceId}/words/threshold" method="POST">
|
<!--<Operation context="/android_sense/device/{deviceId}/words/threshold" method="POST">-->
|
||||||
<QueryParameters>
|
<!--<QueryParameters>-->
|
||||||
<Parameter>threshold</Parameter>
|
<!--<Parameter>threshold</Parameter>-->
|
||||||
</QueryParameters>
|
<!--</QueryParameters>-->
|
||||||
</Operation>
|
<!--</Operation>-->
|
||||||
</Feature>
|
</Feature>
|
||||||
<Feature code="remove_words">
|
<Feature code="remove_words">
|
||||||
<Name>Remove words</Name>
|
<Name>Remove words</Name>
|
||||||
<Description>Remove Threshold from the device</Description>
|
<Description>Remove Threshold from the device</Description>
|
||||||
<Operation context="/android_sense/device/{deviceId}/words" method="DELETE">
|
<!--<Operation context="/android_sense/device/{deviceId}/words" method="DELETE">-->
|
||||||
<QueryParameters>
|
<!--<QueryParameters>-->
|
||||||
<Parameter>words</Parameter>
|
<!--<Parameter>words</Parameter>-->
|
||||||
</QueryParameters>
|
<!--</QueryParameters>-->
|
||||||
</Operation>
|
<!--</Operation>-->
|
||||||
</Feature>
|
</Feature>
|
||||||
</Features>
|
</Features>
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user