Skip to content
GitLab
About GitLab
GitLab: the DevOps platform
Explore GitLab
Install GitLab
How GitLab compares
Get started
GitLab docs
GitLab Learn
Pricing
Talk to an expert
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Projects
Groups
Snippets
Sign up now
Login
Sign in / Register
Toggle navigation
Menu
Open sidebar
PublicAndroidApps
Nebulo
Commits
c093b2ba
Commit
c093b2ba
authored
Aug 15, 2019
by
Daniel Wolf
Browse files
Added the responses to a query to the detail view
parent
13f4e3d9
Pipeline
#5104
passed with stages
in 1 minute and 15 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/src/main/java/com/frostnerd/smokescreen/fragment/querylogfragment/QueryLogDetailFragment.kt
View file @
c093b2ba
...
...
@@ -15,6 +15,7 @@ import com.frostnerd.smokescreen.dialog.DnsRuleDialog
import
com.google.android.material.snackbar.Snackbar
import
kotlinx.android.synthetic.main.activity_dns_rules.*
import
kotlinx.android.synthetic.main.fragment_querylog_detail.*
import
org.minidns.record.A
import
org.minidns.record.Record
import
java.text.DateFormat
import
java.util.*
...
...
@@ -144,6 +145,15 @@ class QueryLogDetailFragment : Fragment() {
}
else
{
resolvedBy
.
text
=
query
.
askedServer
?.
replace
(
"tls::"
,
""
)
?.
replace
(
"https::"
,
""
)
?:
"-"
}
responses
.
text
=
query
.
getParsedResponses
().
filter
{
it
.
type
==
query
.
type
}.
joinToString
{
val
payload
=
it
.
payload
payload
.
toString
()
}.
let
{
if
(
it
.
isBlank
())
"-"
else
it
}
}
}
...
...
app/src/main/res/drawable/ic_exclamation.xml
0 → 100644
View file @
c093b2ba
<vector
android:height=
"32dp"
android:viewportHeight=
"512"
android:viewportWidth=
"192"
android:width=
"12dp"
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M176,432c0,44.112 -35.888,80 -80,80s-80,-35.888 -80,-80 35.888,-80 80,-80 80,35.888 80,80zM25.26,25.199l13.6,272C39.499,309.972 50.041,320 62.83,320h66.34c12.789,0 23.331,-10.028 23.97,-22.801l13.6,-272C167.425,11.49 156.496,0 142.77,0H49.23C35.504,0 24.575,11.49 25.26,25.199z"
/>
</vector>
app/src/main/res/layout/fragment_querylog_detail.xml
View file @
c093b2ba
...
...
@@ -209,6 +209,37 @@
android:layout_marginTop=
"8dp"
android:layout_height=
"wrap_content"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_marginTop=
"24dp"
android:layout_height=
"wrap_content"
>
<ImageView
android:layout_width=
"24dp"
android:id=
"@+id/responseImage"
android:src=
"@drawable/ic_exclamation"
android:tint=
"?android:attr/textColor"
android:layout_height=
"24dp"
/>
<TextView
android:layout_width=
"wrap_content"
android:textSize=
"18sp"
android:layout_toEndOf=
"@id/responseImage"
android:text=
"@string/windows_querylogging_responses"
android:textStyle=
"italic"
android:layout_marginStart=
"8dp"
android:id=
"@+id/queryResponseText"
android:layout_height=
"wrap_content"
/>
<TextView
android:layout_width=
"wrap_content"
android:textSize=
"18sp"
android:id=
"@+id/responses"
android:layout_alignStart=
"@id/queryResponseText"
android:layout_below=
"@id/queryResponseText"
android:layout_marginTop=
"8dp"
android:layout_height=
"wrap_content"
/>
</RelativeLayout>
</LinearLayout>
</ScrollView>
<Button
...
...
app/src/main/res/values/strings.xml
View file @
c093b2ba
...
...
@@ -83,6 +83,7 @@
<string
name=
"windows_querylogging_used_server"
>
Used server
</string>
<string
name=
"windows_querylogging_protocol"
>
Protocol
</string>
<string
name=
"windows_querylogging_latency"
>
Latency
</string>
<string
name=
"windows_querylogging_responses"
>
Responses
</string>
<string
name=
"windows_querylogging_create_dnsrule"
>
Create dns rule for this host
</string>
<string
name=
"windows_querylogging_dnsrule_created"
>
Dns rule has been created.
</string>
</resources>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment