Commit 3c1d864ac6acbf38cd511feac51fa5bf3c9e6dc5

Authored by kristinlaahneolsen
1 parent 81e1293a

siste push før merge

Konfidensialitet og sporbarhet i et distribuert system.docx
No preview for this file type
Risiko/app/src/main/java/activity/Incident.java
... ... @@ -90,7 +90,7 @@ public class Incident extends AppCompatActivity {
90 90 chosenEventId = ((dataclasses.Incident) lv.getItemAtPosition(position)).getId();
91 91 showEventPopup((dataclasses.Incident) lv.getItemAtPosition(position));
92 92  
93   - Api.get().newAccesslogEntry(chosenEventId, "Pumba", 2, logDate).enqueue(new Callback<String>() {
  93 + Api.get().newAccesslogEntry(chosenEventId, "Timon", "Ambulansepersonell", logDate).enqueue(new Callback<String>() {
94 94 @Override
95 95 public void onResponse(Call<String> call, Response<String> response) {
96 96  
... ...
Risiko/app/src/main/java/adapters/ListAdapterAccesslog.java
... ... @@ -38,8 +38,7 @@ public class ListAdapterAccesslog extends ArrayAdapter&lt;Accesslog&gt; {
38 38 logName.setText(accesslogg.getName());
39 39  
40 40 TextView logGroup = convertView.findViewById(R.id.tv_accesslog_group);
41   - //TODO, HENT UT GRUPPENR
42   - logGroup.setText("1");
  41 + logGroup.setText(accesslogg.getGroupnr());
43 42  
44 43  
45 44  
... ...
Risiko/app/src/main/java/api/Endpoints.java
... ... @@ -92,6 +92,6 @@ public interface Endpoints {
92 92  
93 93 @FormUrlEncoded
94 94 @POST("accesslog")
95   - Call<String> newAccesslogEntry(@Field("associatedincident") String associatedincident, @Field("name") String name, @Field("groupnr") int groupnr, @Field("date") String date);
  95 + Call<String> newAccesslogEntry(@Field("associatedincident") String associatedincident, @Field("name") String name, @Field("groupnr") String groupnr, @Field("date") String date);
96 96  
97 97 }
... ...
Risiko/app/src/main/java/dataclasses/Accesslog.java
... ... @@ -7,10 +7,10 @@ package dataclasses;
7 7 public class Accesslog {
8 8 private String associatedincident;
9 9 private String name;
10   - private int groupnr;
  10 + private String groupnr;
11 11 private String date;
12 12  
13   - public Accesslog(String associatedincident, String name, int groupnr, String date) {
  13 + public Accesslog(String associatedincident, String name, String groupnr, String date) {
14 14 this.associatedincident = associatedincident;
15 15 this.name = name;
16 16 this.groupnr = groupnr;
... ... @@ -34,11 +34,11 @@ public class Accesslog {
34 34 this.name = name;
35 35 }
36 36  
37   - public int getGroupnr() {
  37 + public String getGroupnr() {
38 38 return groupnr;
39 39 }
40 40  
41   - public void setGroupnr(int groupnr) {
  41 + public void setGroupnr(String groupnr) {
42 42 this.groupnr = groupnr;
43 43 }
44 44  
... ...
Risiko/app/src/main/res/layout/activity_main_menu.xml
... ... @@ -67,5 +67,6 @@
67 67 android:drawableLeft="@drawable/ic_add"/>
68 68  
69 69 </LinearLayout>
  70 +
70 71  
71 72 </android.support.constraint.ConstraintLayout>
... ...
Risiko/app/src/main/res/values/strings.xml
... ... @@ -42,6 +42,7 @@
42 42 <string name="see_log">Se hendelseslogg</string>
43 43 <string name="aksesslogg">Aksesslogg</string>
44 44 <string name="accesss_log">Se tilgangslogg</string>
  45 + <string name="last_edited_by">Sist endret av:</string>
45 46  
46 47  
47 48 </resources>
... ...
restApi/.idea/workspace.xml
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <project version="4">
3 3 <component name="ChangeListManager">
4   - <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="" />
  4 + <list default="true" id="0e20d303-9de8-4113-bfd9-019e72b304dc" name="Default" comment="">
  5 + <change beforePath="$PROJECT_DIR$/../Konfidensialitet og sporbarhet i et distribuert system.docx" afterPath="$PROJECT_DIR$/../Konfidensialitet og sporbarhet i et distribuert system.docx" />
  6 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/Incident.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/activity/Incident.java" />
  7 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/adapters/ListAdapterAccesslog.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/adapters/ListAdapterAccesslog.java" />
  8 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/api/Endpoints.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/api/Endpoints.java" />
  9 + <change beforePath="$PROJECT_DIR$/../Risiko/app/src/main/java/dataclasses/Accesslog.java" afterPath="$PROJECT_DIR$/../Risiko/app/src/main/java/dataclasses/Accesslog.java" />
  10 + <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
  11 + <change beforePath="$PROJECT_DIR$/api/routes/routes.js" afterPath="$PROJECT_DIR$/api/routes/routes.js" />
  12 + <change beforePath="$PROJECT_DIR$/../~$nfidensialitet og sporbarhet i et distribuert system.docx" afterPath="" />
  13 + </list>
5 14 <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
6 15 <option name="TRACKING_ENABLED" value="true" />
7 16 <option name="SHOW_DIALOG" value="false" />
... ... @@ -48,8 +57,8 @@
48 57 <file leaf-file-name="routes.js" pinned="false" current-in-tab="true">
49 58 <entry file="file://$PROJECT_DIR$/api/routes/routes.js">
50 59 <provider selected="true" editor-type-id="text-editor">
51   - <state relative-caret-position="-424">
52   - <caret line="415" column="13" lean-forward="true" selection-start-line="415" selection-start-column="13" selection-end-line="415" selection-end-column="52" />
  60 + <state relative-caret-position="369">
  61 + <caret line="518" column="109" lean-forward="false" selection-start-line="518" selection-start-column="109" selection-end-line="518" selection-end-column="109" />
53 62 <folding />
54 63 </state>
55 64 </provider>
... ... @@ -138,8 +147,6 @@
138 147 <foldersAlwaysOnTop value="true" />
139 148 </navigator>
140 149 <panes>
141   - <pane id="Scope" />
142   - <pane id="Scratches" />
143 150 <pane id="ProjectPane">
144 151 <subPane>
145 152 <expand>
... ... @@ -168,6 +175,8 @@
168 175 <select />
169 176 </subPane>
170 177 </pane>
  178 + <pane id="Scope" />
  179 + <pane id="Scratches" />
171 180 </panes>
172 181 </component>
173 182 <component name="PropertiesComponent">
... ... @@ -240,27 +249,28 @@
240 249 <workItem from="1542189792461" duration="7537000" />
241 250 <workItem from="1542881688157" duration="372000" />
242 251 <workItem from="1543226716067" duration="9986000" />
  252 + <workItem from="1543573540819" duration="221000" />
243 253 </task>
244 254 <servers />
245 255 </component>
246 256 <component name="TimeTrackingManager">
247   - <option name="totallyTimeSpent" value="39677000" />
  257 + <option name="totallyTimeSpent" value="39898000" />
248 258 </component>
249 259 <component name="ToolWindowManager">
250   - <frame x="0" y="0" width="1014" height="900" extended-state="0" />
  260 + <frame x="0" y="0" width="1440" height="900" extended-state="0" />
251 261 <editor active="true" />
252 262 <layout>
253   - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1389728" sideWeight="0.69244605" order="0" side_tool="false" content_ui="combo" />
  263 + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13883016" sideWeight="0.68561065" order="0" side_tool="false" content_ui="combo" />
254 264 <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
255 265 <window_info id="Docker" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
256 266 <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="10" side_tool="true" content_ui="tabs" />
257   - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769045" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
258 267 <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
259   - <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.1389728" sideWeight="0.30755395" order="2" side_tool="true" content_ui="tabs" />
  268 + <window_info id="npm" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.13883016" sideWeight="0.31438935" order="2" side_tool="true" content_ui="tabs" />
  269 + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32769045" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
260 270 <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
261 271 <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="9" side_tool="false" content_ui="tabs" />
262   - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39903265" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
263 272 <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" />
  273 + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.39903265" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
264 274 <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
265 275 <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
266 276 <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
... ... @@ -282,6 +292,38 @@
282 292 <watches-manager />
283 293 </component>
284 294 <component name="editorHistoryManager">
  295 + <entry file="file://$PROJECT_DIR$/api/routes/routes.js">
  296 + <provider selected="true" editor-type-id="text-editor">
  297 + <state relative-caret-position="0">
  298 + <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
  299 + <folding />
  300 + </state>
  301 + </provider>
  302 + </entry>
  303 + <entry file="file://$PROJECT_DIR$/server.js">
  304 + <provider selected="true" editor-type-id="text-editor">
  305 + <state relative-caret-position="105">
  306 + <caret line="7" column="47" lean-forward="false" selection-start-line="7" selection-start-column="47" selection-end-line="7" selection-end-column="47" />
  307 + <folding />
  308 + </state>
  309 + </provider>
  310 + </entry>
  311 + <entry file="file://$PROJECT_DIR$/node_modules/express/lib/application.js">
  312 + <provider selected="true" editor-type-id="text-editor">
  313 + <state relative-caret-position="9165">
  314 + <caret line="617" column="23" lean-forward="false" selection-start-line="617" selection-start-column="23" selection-end-line="617" selection-end-column="23" />
  315 + <folding />
  316 + </state>
  317 + </provider>
  318 + </entry>
  319 + <entry file="file://$PROJECT_DIR$/package.json">
  320 + <provider selected="true" editor-type-id="text-editor">
  321 + <state relative-caret-position="120">
  322 + <caret line="8" column="48" lean-forward="false" selection-start-line="8" selection-start-column="48" selection-end-line="8" selection-end-column="48" />
  323 + <folding />
  324 + </state>
  325 + </provider>
  326 + </entry>
285 327 <entry file="file://$PROJECT_DIR$/node_modules/express/lib/application.js">
286 328 <provider selected="true" editor-type-id="text-editor">
287 329 <state relative-caret-position="9165">
... ... @@ -363,8 +405,8 @@
363 405 </entry>
364 406 <entry file="file://$PROJECT_DIR$/api/routes/routes.js">
365 407 <provider selected="true" editor-type-id="text-editor">
366   - <state relative-caret-position="-424">
367   - <caret line="415" column="13" lean-forward="true" selection-start-line="415" selection-start-column="13" selection-end-line="415" selection-end-column="52" />
  408 + <state relative-caret-position="369">
  409 + <caret line="518" column="109" lean-forward="false" selection-start-line="518" selection-start-column="109" selection-end-line="518" selection-end-column="109" />
368 410 <folding />
369 411 </state>
370 412 </provider>
... ...
restApi/api/routes/routes.js
... ... @@ -516,7 +516,7 @@ function setupTables(db) {
516 516 if (err) console.log("Failed to create table evaluationlog.\n" + err)
517 517 });
518 518  
519   - db.execute("CREATE TABLE risk.accesslog(id uuid, associatedincident uuid, name text, groupnr int, date text, PRIMARY KEY(id));", function (err) {
  519 + db.execute("CREATE TABLE risk.accesslog(id uuid, associatedincident uuid, name text, groupnr text, date text, PRIMARY KEY(id));", function (err) {
520 520 if (err) console.log("Failed to create table accesslog.\n" + err)
521 521 });
522 522  
... ...
~$nfidensialitet og sporbarhet i et distribuert system.docx deleted
No preview for this file type