2011-10-04 Miguel de Dios <miguel.dedios@artica.es>
* AndroidManifest.xml: added the reference to description. * src/pandroid_event_viewer/pandorafms/PopupValidationEvent.java, src/pandroid_event_viewer/pandorafms/AlarmReceiver.java, src/pandroid_event_viewer/pandorafms/PandroidEventviewerActivity.java, src/pandroid_event_viewer/pandorafms/Main.java, src/pandroid_event_viewer/pandorafms/EventList.java: change the method to show the list of events from the notification and some fixes. * res/values/strings.xml, res/values-en/strings.xml, res/values-es/strings.xml: added the string to fill for the description. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5034 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
1904727957
commit
f81bf776cf
|
@ -30,7 +30,9 @@
|
|||
-->
|
||||
|
||||
<application android:icon="@drawable/pandorafms_logo"
|
||||
android:label="Pandroid Event viewer">
|
||||
android:label="Pandroid Event viewer"
|
||||
android:description="@string/pandroid_event_viewer_description_str"
|
||||
>
|
||||
<activity
|
||||
android:name=".PandroidEventviewerActivity"
|
||||
android:label="Pandroid Event viewer"
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2011-10-04 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* AndroidManifest.xml: added the reference to description.
|
||||
|
||||
* src/pandroid_event_viewer/pandorafms/PopupValidationEvent.java,
|
||||
src/pandroid_event_viewer/pandorafms/AlarmReceiver.java,
|
||||
src/pandroid_event_viewer/pandorafms/PandroidEventviewerActivity.java,
|
||||
src/pandroid_event_viewer/pandorafms/Main.java,
|
||||
src/pandroid_event_viewer/pandorafms/EventList.java: change the method to
|
||||
show the list of events from the notification and some fixes.
|
||||
|
||||
* res/values/strings.xml, res/values-en/strings.xml,
|
||||
res/values-es/strings.xml: added the string to fill for the description.
|
||||
|
||||
2011-10-03 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* AndroidManifest.xml: added permission to vibrate mobile.
|
||||
|
|
|
@ -92,4 +92,5 @@
|
|||
<string name="unknown_event_str">Unknown event</string>
|
||||
|
||||
<string name="validate_event_label_str">Event validated</string>
|
||||
<string name="pandroid_event_viewer_description_str">DESCRIPTION PANDROID EVENT VIEWER</string>
|
||||
</resources>
|
||||
|
|
|
@ -92,4 +92,5 @@
|
|||
<string name="unknown_event_str">Evento desconocido</string>
|
||||
|
||||
<string name="validate_event_label_str">Evento validado</string>
|
||||
<string name="pandroid_event_viewer_description_str">DESCRIPTION PANDROID EVENT VIEWER</string>
|
||||
</resources>
|
||||
|
|
|
@ -97,4 +97,5 @@
|
|||
<string name="unknown_event_str">Unknown event</string>
|
||||
|
||||
<string name="validate_event_label_str">Event validated</string>
|
||||
<string name="pandroid_event_viewer_description_str">DESCRIPTION PANDROID EVENT VIEWER</string>
|
||||
</resources>
|
||||
|
|
|
@ -80,6 +80,7 @@ public class AlarmReceiver extends BroadcastReceiver {
|
|||
return_api = Core.convertStreamToString(entityResponse.getContent());
|
||||
|
||||
return_api = return_api.replace("\n", "");
|
||||
Log.e("AlarmReceiver checkNewEvents", "" + return_api);
|
||||
this.count_events = new Long(return_api).longValue();
|
||||
|
||||
//Check the event more critical
|
||||
|
@ -165,6 +166,8 @@ public class AlarmReceiver extends BroadcastReceiver {
|
|||
return_var += "|";
|
||||
return_var += Long.toString(0); //The offset of list events
|
||||
|
||||
Log.e("AlarmReceiver serializeParams2Api", return_var);
|
||||
|
||||
return return_var;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,6 @@ import android.graphics.Color;
|
|||
import android.os.Bundle;
|
||||
import android.text.Html;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuInflater;
|
||||
|
|
|
@ -68,8 +68,6 @@ public class Main extends Activity {
|
|||
buttonbuttonSetAsFilterWatcher.setEnabled(false);
|
||||
}
|
||||
else {
|
||||
Spinner combo;
|
||||
|
||||
buttonSearch.setEnabled(false);
|
||||
buttonReset.setEnabled(false);
|
||||
buttonbuttonSetAsFilterWatcher.setEnabled(false);
|
||||
|
@ -82,7 +80,7 @@ public class Main extends Activity {
|
|||
Activity.MODE_PRIVATE);
|
||||
|
||||
comboSeverity = (Spinner) findViewById(R.id.severity_combo);
|
||||
ArrayAdapter adapter = ArrayAdapter.createFromResource(
|
||||
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(
|
||||
this, R.array.severity_array_values, android.R.layout.simple_spinner_item);
|
||||
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
|
||||
comboSeverity.setAdapter(adapter);
|
||||
|
@ -283,7 +281,6 @@ public class Main extends Activity {
|
|||
|
||||
this.object.id_group = 0;
|
||||
|
||||
int sel;
|
||||
combo = (Spinner) findViewById(R.id.group_combo);
|
||||
String selectedGroup = combo.getSelectedItem().toString();
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
public void onResume() {
|
||||
super.onResume();
|
||||
|
||||
Intent i = getIntent();
|
||||
/*Intent i = getIntent();
|
||||
long count_events = i.getLongExtra("count_events", 0);
|
||||
int more_criticity = i.getIntExtra("more_criticity", -1);
|
||||
|
||||
|
@ -202,7 +202,7 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
Activity.MODE_PRIVATE);
|
||||
this.timestamp = preferences.getLong("previous_filterTimestamp", (new Date().getTime() / 1000));
|
||||
}
|
||||
|
||||
*/
|
||||
this.getTabHost().setCurrentTab(1);
|
||||
|
||||
if (this.showTabListFirstTime) {
|
||||
|
@ -216,14 +216,10 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
}
|
||||
|
||||
public void onNewIntent(Intent intent) {
|
||||
//super.onNewIntent(intent);
|
||||
|
||||
Toast toast = Toast.makeText(getApplicationContext(), "PANDORA FMS TEST", Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
super.onNewIntent(intent);
|
||||
|
||||
Intent i = getIntent();
|
||||
long count_events = i.getLongExtra("count_events", 0);Log.e("onNewIntent", "" + count_events);
|
||||
int more_criticity = i.getIntExtra("more_criticity", -1);
|
||||
long count_events = intent.getLongExtra("count_events", 0);
|
||||
int more_criticity = intent.getIntExtra("more_criticity", -1);
|
||||
|
||||
CharSequence text;
|
||||
|
||||
|
@ -257,14 +253,25 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
}
|
||||
|
||||
|
||||
toast = Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT);
|
||||
Toast toast = Toast.makeText(getApplicationContext(), text, Toast.LENGTH_SHORT);
|
||||
toast.show();
|
||||
|
||||
//Set the time when the watcher find the events.
|
||||
//Set the same parameters to extract the events of the notification.
|
||||
SharedPreferences preferences = getSharedPreferences(
|
||||
getString(R.string.const_string_preferences),
|
||||
Activity.MODE_PRIVATE);
|
||||
this.timestamp = preferences.getLong("previous_filterTimestamp", (new Date().getTime() / 1000));
|
||||
this.agentNameStr = preferences.getString("filterAgentName", "");
|
||||
this.id_group = preferences.getInt("filterIDGroup", 0);
|
||||
this.severity = preferences.getInt("filterSeverity", -1);
|
||||
this.status = preferences.getInt("filterStatus", 4);
|
||||
this.eventSearch = preferences.getString("filterEventSearch", "");
|
||||
|
||||
this.getTabHost().setCurrentTab(1);
|
||||
|
||||
this.loadInProgress = true;
|
||||
this.getNewListEvents = true;
|
||||
executeBackgroundGetEvents();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,7 +302,7 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
return_var += "|";
|
||||
return_var += Long.toString(this.offset); //The offset of list events
|
||||
|
||||
Log.e("serializeParams2Api", return_var);
|
||||
Log.e("PandroidEventviewerActivity serializeParams2Api", return_var);
|
||||
|
||||
return return_var;
|
||||
}
|
||||
|
@ -458,7 +465,7 @@ public class PandroidEventviewerActivity extends TabActivity implements Serializ
|
|||
|
||||
@Override
|
||||
protected Void doInBackground(Void... params) {
|
||||
|
||||
Log.e("GetEventsAsyncTask doInBackground", "doInBackground");
|
||||
if (getNewListEvents) {
|
||||
getEvents(true);
|
||||
}
|
||||
|
|
|
@ -18,11 +18,9 @@ import android.os.AsyncTask;
|
|||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.Button;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ProgressBar;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.Toast;
|
||||
|
||||
public class PopupValidationEvent extends Activity {
|
||||
|
|
Loading…
Reference in New Issue