Permalink
Browse files

No fuck ups pls

  • Loading branch information...
Martin Sølvkær Jensen
Martin Sølvkær Jensen committed Dec 1, 2017
1 parent 67a6f4c commit 3bc16893d3645ad64009ca56b32f1a4d46df4b07
View
@@ -4,7 +4,6 @@
<modules>
<module fileurl="file://$PROJECT_DIR$/CiscoFullApp.iml" filepath="$PROJECT_DIR$/CiscoFullApp.iml" />
<module fileurl="file://D:\CISCO BULLSHIT\CiscoFullApp\.idea\CiscoFullApp.iml" filepath="D:\CISCO BULLSHIT\CiscoFullApp\.idea\CiscoFullApp.iml" />
<module fileurl="file://C:\Users\Martin\Desktop\FixedCisco\CiscoFullApp\CiscoFullApp.iml" filepath="C:\Users\Martin\Desktop\FixedCisco\CiscoFullApp\CiscoFullApp.iml" />
<module fileurl="file://$PROJECT_DIR$/app/app.iml" filepath="$PROJECT_DIR$/app/app.iml" />
</modules>
</component>
@@ -3,6 +3,7 @@
import android.content.Intent;
import android.util.Log;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -53,7 +54,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.post(body)
.build();
@@ -5,6 +5,7 @@
import android.util.Log;
import android.widget.TextView;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -48,7 +49,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.build();
@@ -2,6 +2,7 @@
import android.util.Log;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -44,7 +45,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.build();
@@ -55,7 +55,7 @@ public void onCreate(Bundle savedInstanceState) {
ImageButton imageButton = (ImageButton) findViewById(R.id.imageButton);
final String command[] = {"show version", "show running", "sh interface gig" , "ping" };
final String command[] = {"show version", "show running", "show proc cpu" , "sh interface gig" , "ping" };
ListView list = (ListView) findViewById(R.id.listview);
EditText editSearch = (EditText) findViewById(R.id.c_runnerSearch);
@@ -3,6 +3,7 @@
import android.util.Log;
import com.example.martin.ciscofullapp.CommandRunner.CommandClass;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -47,7 +48,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.post(body)
.build();
@@ -3,6 +3,7 @@
import android.app.Activity;
import android.util.Log;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -36,7 +37,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.get()
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("X-CAA-AUTH-TOKEN", ccoLogin.ccoToken)
.addHeader("content-type", "application/json; charset=utf-8")
.addHeader("cache-control", "no-cache")
@@ -2,6 +2,7 @@
import android.util.Log;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -33,7 +34,7 @@ public void run() {
Request request = new Request.Builder()
.url(url)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("X-CAA-AUTH-TOKEN", CcoLogin.ccoToken)
.addHeader("content-type", "application/json; charset=utf-8")
.build();
@@ -14,6 +14,7 @@
import com.example.martin.ciscofullapp.Database.InsertData;
import com.example.martin.ciscofullapp.R;
import com.example.martin.ciscofullapp.SoftwareAdvisor.CcoLogin;
import com.example.martin.ciscofullapp.SoftwareAdvisor.SoftwareClass;
import com.example.martin.ciscofullapp.SoftwareAdvisor.SpecificLifecycle;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -42,7 +43,7 @@
public static String requiredTicket;
private Button update, statistics, commandRunner, taskRunner, fileButton;
private Button update, statistics, commandRunner, softwareAdvisor, fileButton;
MediaType mediaType = MediaType.parse("application/json; charset=utf-8");
String url = "https://"+ipadress+"/api/v1/ticket";
CcoLogin ccoLogin = new CcoLogin();
@@ -61,6 +62,7 @@ public void onCreate(Bundle savedInstanceState) {
update = (Button) findViewById(R.id.buttonUpdate);
statistics = (Button) findViewById(R.id.buttonStatistics);
commandRunner = (Button) findViewById(R.id.commandRunner);
softwareAdvisor = (Button) findViewById(R.id.softwareAdvisor);
@@ -96,6 +98,14 @@ public void run() {
});
softwareAdvisor.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent = new Intent(Menu_Mockup.this, SoftwareClass.class);
startActivity(intent);
}
});
statistics.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
@@ -6,12 +6,14 @@
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.example.martin.ciscofullapp.R;
import com.example.martin.ciscofullapp.VisualRepresentations.Menu_Mockup;
import com.example.martin.ciscofullapp.getPorts.CertificateClient;
import com.example.martin.ciscofullapp.getPorts.MainActivity;
@@ -116,7 +118,7 @@ public void run() {
Request request = new Request.Builder()
.url(networkdevicesURL)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.build();
@@ -212,7 +214,7 @@ public void runs() throws IOException {
Request request = new Request.Builder()
.url(realURL)
.header("X-Auth-Token", MainActivity.requiredTicket)
.header("X-Auth-Token", Menu_Mockup.requiredTicket)
.addHeader("content-type", "application/json; charset=utf-8")
.build();

0 comments on commit 3bc1689

Please sign in to comment.