had to update index again

This commit is contained in:
Tristan Ancelet 2024-01-15 10:30:49 -06:00
parent 6573ea7260
commit f9550388fb
14 changed files with 1285 additions and 2 deletions

View File

@ -40,7 +40,7 @@ last 5 posts
</ul>
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2024/01/15
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2024/01/12
</p>
<p>

View File

@ -23,7 +23,7 @@
<ul>
<li>
<a href="1705335388-no-tickets.html">2023/01/15 - No Tickets</a>
<a href="1705083636-no-tickets.html">2023/01/12 - No Tickets</a>
<li>

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>Blog Issue</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1693630800-hello-world.html">Hello World</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/09/05
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="Blog Issue"><h1 id="Blog Issue" class="header"><a href="#Blog Issue">Blog Issue</a></h1></div>
<div id="Blog Issue-DNS"><h2 id="DNS" class="header"><a href="#Blog Issue-DNS">DNS</a></h2></div>
<hr />
<p>
Looks like my master DNS server was down for the last 3 days (didn't know until the teacher mentioned it). Had to end up taking a look at my provider and it looks like my master DNS server had crashed at some point. After restarting it I got everything started up and it seems to have come back up.
</p>
<p>
I had a backup DNS server as well, but after looking into the VM (that was still running), it turns out that I never whitelisted the DNS port (53/udp) on it. So it's entire life has been failure (as it's been the backup for several months). My thought is that I <span id="Blog Issue-DNS-DID"></span><strong id="DID">DID</strong> whitelist it but not perminately. So after a reboot it cleared the config and DNS traffic wasn't whitelisted it anymore.
</p>
<p>
Here is the commands it did to whitelist DNS (running firewalld as a device side firewall)
</p>
<pre bash>
firewall-cmd --perm --zone=public --add-service=dns
firewall-cmd --reload
</pre>
<p>
After checking that DNS was resolving with dig, I was able to visit my site with no more issues.
</p>
<pre bash>
dig blog.tristanancelet.com
</pre>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>Webhooks</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1699558725-ref-290-submitted.html">REF-290 Submitted</a>
<li>
<a href="1699375988-ref-209-start.html">REF-290: Start</a>
<li>
<a href="1698642000-first-ticket.html">First Ticket</a>
<li>
<a href="1693890000-blog-issue.html">Blog Issue</a>
<li>
<a href="1693630800-hello-world.html">Hello World</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/09
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="Webhooks"><h1 id="Webhooks" class="header"><a href="#Webhooks">Webhooks</a></h1></div>
<div id="Webhooks-gitea"><h2 id="gitea" class="header"><a href="#Webhooks-gitea">gitea</a></h2></div>
<hr />
<p>
I just recently started hosting my own gitserver (gitea). Had a few issues setting it up due to some default values in the gitea.service file (that prevented the program from using port 80).
</p>
<p>
After getting that dealt with I decided to see what I could do with gitea's support for webhooks. So I decided to setup a webhook that will handle updating my blog when I push to my <a href="https://git.arcanium.tech/tristan/blog-site">Blog Repo</a>.
</p>
<p>
Once I push a new addition to the repo it now automatically makes a post request to my webhook server that will automatically update my website without manual intervention.
</p>
<div id="Webhooks-This Post"><h2 id="This Post" class="header"><a href="#Webhooks-This Post">This Post</a></h2></div>
<hr />
<p>
This post was simply being used to test that functionality in gitea.
</p>
</body>
</html>

View File

@ -0,0 +1,74 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>New Job Offer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
<li>
<a href="1699558725-ref-290-submitted.html">REF-290 Submitted</a>
<li>
<a href="1699375988-ref-209-start.html">REF-290: Start</a>
<li>
<a href="1698642000-first-ticket.html">First Ticket</a>
<li>
<a href="1693890000-blog-issue.html">Blog Issue</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/15
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="New Job Offer"><h1 id="New Job Offer" class="header"><a href="#New Job Offer">New Job Offer</a></h1></div>
<div id="New Job Offer-The offer"><h2 id="The offer" class="header"><a href="#New Job Offer-The offer">The offer</a></h2></div>
<p>
Yea, as the post suggests I got a job offer from another company that want's to hire me as a Linux Systems Engineer.
</p>
<div id="New Job Offer-The Company"><h2 id="The Company" class="header"><a href="#New Job Offer-The Company">The Company</a></h2></div>
<p>
The company being <a href="https://www.acumera.com/">Acumera</a>. I had one round of interviews with the hiring manager and one of their engineers. We had a really good time and I rather enjoyed the convo, as I got to talk about all of the work I do for my current company and the tools I've both made and used for work.
</p>
<div id="New Job Offer-Struggles"><h2 id="Struggles" class="header"><a href="#New Job Offer-Struggles">Struggles</a></h2></div>
<p>
I've noticed working and getting job offers is dealing with actually accepting them. I've been working for my current company for about 2 years, and without going too far into it, I've had a really bad time due to lack of support. Mostly due to me being the sole person responsible for my companies infrastructure. I've told them several times that I've needed assistance handling our systems (as we have over 40 and each server is handling their own undocumented legacy applications and services. I do not have the time in the day to handle both admin and engineering duties. It has been over a year of this and honestly I can't take it anymore.
</p>
<div id="New Job Offer-Will I take it"><h2 id="Will I take it" class="header"><a href="#New Job Offer-Will I take it">Will I take it</a></h2></div>
<p>
Yes I will proabably take it. The new position actually has me doing engieneering work with a team. Meaning I will not be the sole person to handle my workload. It will be shared. While the job will probably not be a cakewalk, I believe I will be able to handle it much better than my current workplace. As I will be doing my work, and not the work of an entire dept.
</p>
</body>
</html>

View File

@ -0,0 +1,151 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>Auvik Trial</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1700345096-busy-week.html">Busy Week</a>
<li>
<a href="1700104768-new-job-offer.html">New Job Offer</a>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
<li>
<a href="1699558725-ref-290-submitted.html">REF-290 Submitted</a>
<li>
<a href="1699375988-ref-209-start.html">REF-290: Start</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/24
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="Auvik Trial"><h1 id="Auvik Trial" class="header"><a href="#Auvik Trial">Auvik Trial</a></h1></div>
<div id="Auvik Trial-The Trial"><h2 id="The Trial" class="header"><a href="#Auvik Trial-The Trial">The Trial</a></h2></div>
<hr />
<p>
<a href="https://www.auvik.com/">Auvik</a> was providing a 14 day trial to test out their platform.
</p>
<p>
I wasn't even aware of what Auvik even was until I came accross a "try Auvik and win a free Ubiquity Switch" ad. The primary factor for me messing with their paltform was admittedly the free switch.
</p>
<div id="Auvik Trial-Their Platform"><h2 id="Their Platform" class="header"><a href="#Auvik Trial-Their Platform">Their Platform</a></h2></div>
<hr />
<p>
Unbeknownst to me, their platform was akin to something I've just recently been working with at work. A network monitoring service, but instead of an on-prem solution it's based in the cloud with a collector/agent you have to install on a server in your network.
</p>
<div id="Auvik Trial-LibreNMS: At Work"><h2 id="LibreNMS: At Work" class="header"><a href="#Auvik Trial-LibreNMS: At Work">LibreNMS: At Work</a></h2></div>
<hr />
<p>
At work we use Solarwinds almost exclusively, but recently in the engineering dept we decided to setup our own NMS with <a href="https://www.librenms.org/">LibreNMS</a>. A process that I setup in a <a href="https://git.arcanium.tech/tristan/myscripts/src/branch/master/install-librenms.sh">script</a> for ease-of-use for anyone else wanting to try it. It is an amazing project and I highly praise it for all of the functionality it brings.
</p>
<p>
However, there are still some pain points with the project in terms of the network map. When viewing a network map, unless you've grouped up your devices in small enough network groups (doesn't help sometimes) your network map will be presented in a spider-web without any ability to resize or manipulate the map in any way (that makes it easier to read). Although this is where any gripes over LibreNMS starts and ends, as otherwise this is an amazing project that makes monitoring your network much more manageable.
</p>
<div id="Auvik Trial-Auvik"><h2 id="Auvik" class="header"><a href="#Auvik Trial-Auvik">Auvik</a></h2></div>
<div id="Auvik Trial-Auvik-Deployment &amp; Setup"><h3 id="Deployment &amp; Setup" class="header"><a href="#Auvik Trial-Auvik-Deployment &amp; Setup">Deployment &amp; Setup</a></h3></div>
<hr />
<p>
Deploying their solution was insanely easy. I took the route of deploying their collector via a docker container (they generate you a docker compose file) on my VM Server, which only took a few minutes to download the necessary images and start it. Very soon after it connected back to their platform and began scanning my internal network.
</p>
<div id="Auvik Trial-Auvik-Operation : Function"><h3 id="Operation : Function" class="header"><a href="#Auvik Trial-Auvik-Operation : Function">Operation : Function</a></h3></div>
<hr />
<p>
Within 10 minutes their collector had mapped out (just about) every single VLAN and network I had running in my homelab (even the vnets running on my VM server). It really suprised me how invasive it was.
</p>
<div id="Auvik Trial-Auvik-Operation : UX"><h3 id="Operation : UX" class="header"><a href="#Auvik Trial-Auvik-Operation : UX">Operation : UX</a></h3></div>
<hr />
<p>
With my experience with Solarwinds, Zabbix and LibreNMS I didn't expect much in the way of UX from Auvik. However, I was plesantly suprised. The UI &amp; UX for their platform was outstanding. Everything is laid out well and everything is formatted in a way that makes everything easy to read.
</p>
<p>
For someone that despises Front-End work, I can appreciate the effort they've put into their product.
</p>
<div id="Auvik Trial-Auvik-Operation : Features"><h3 id="Operation : Features" class="header"><a href="#Auvik Trial-Auvik-Operation : Features">Operation : Features</a></h3></div>
<div id="Auvik Trial-Auvik-Operation : Features-Remote Management"><h4 id="Remote Management" class="header"><a href="#Auvik Trial-Auvik-Operation : Features-Remote Management">Remote Management</a></h4></div>
<hr />
<p>
One of the features that I really like about this prouct is the "remote management" feature. While it does allow you to monitor your devices from the cloud, it also allows you to run commands and even get a shell on the device itself. It looks like it supports both telnet and ssh to get a shell on the device (provided you have configured the credentials).
</p>
<p>
LibreNMS lets you take a shortcut by pressing the "Telnet to &lt;hostname&gt;"/"SSH to &lt;hostname&gt;" that simply opens up a link in a new window in the format <code>ssh://&lt;hostname&gt;</code> or <code>telnet://&lt;hostname&gt;</code> and it's up to your desktop enviroment to interpret it and try to launch it in the default application to handle those connections. However, with Auvik they have a web-based terminal that allows you to access your devices from anywhere (provided the collector has access to the port needed to ssh or telnet to the device.
</p>
<p>
This allows you to gain access to your devices and make changes without having to deal with VPN's or actually being on the network to do it locally. This is a very useful tool and one of the few features that I appreciate from the platform.
</p>
<div id="Auvik Trial-Auvik-Operation : Features-Others"><h4 id="Others" class="header"><a href="#Auvik Trial-Auvik-Operation : Features-Others">Others</a></h4></div>
<hr />
<p>
Unfortunately with the little time I was on the platform I wasn't able to delve into the depts of what it offers. However, from what I was able to see the offered the full stack of applications and services for your needs:
</p>
<ul>
<li>
SNMP monitoring
<li>
Syslog
<li>
Remote Management
<li>
Network Map (best I've used so far on a NMS platform)
<li>
Traffic Analysis
</ul>
<p>
There were probably much more that I just haven't seen, but this is the what I was able to see on the surface.
</p>
<div id="Auvik Trial-Overall"><h2 id="Overall" class="header"><a href="#Auvik Trial-Overall">Overall</a></h2></div>
<hr />
<p>
This is a really high-quality product I would like to use in my own lab, but due to it's black-box nature I wouldn't be ok with using it for my home network.
</p>
</body>
</html>

View File

@ -0,0 +1,126 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>ZFS Upgrade Issue</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1701545547-no-tickets.html">No Tickets</a>
<li>
<a href="1700863814-auvik-trial.html">Auvik Trial</a>
<li>
<a href="1700345096-busy-week.html">Busy Week</a>
<li>
<a href="1700104768-new-job-offer.html">New Job Offer</a>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
</ul>
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/12/17
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="ZFS Upgrade Issue"><h1 id="ZFS Upgrade Issue" class="header"><a href="#ZFS Upgrade Issue">ZFS Upgrade Issue</a></h1></div>
<div id="ZFS Upgrade Issue-Background"><h2 id="Background" class="header"><a href="#ZFS Upgrade Issue-Background">Background</a></h2></div>
<hr />
<p>
I have an DIY Ubuntu NAS (one of the first few linux installs), and I was having aggravations with the zfs-dkms package that I had setup a couple of years ago to host raided pools for my NAS setup. However, recently during an update I noticed the kernel was updated on the machine to 6.2.0-39-generic which now caused the zfs-dkms to throw errors when apt would run mkinitcpio as the zfs-dkms-2.1.5 module only supported up to kernel 5.19.
</p>
<p>
While it didn't exactly cause any issues with the zfs installation there was currently (it still functioned fine even with the new kernel). I got tired of it so I decided to compile openzfs from source and install it on my system.
</p>
<pre bash>
## Run as root
# sudo -i
git clone https://github.com/openzfs/zfs
## I was missing a few dependencies but installed them like so
apt install uuid-dev libblkid-dev
cd zfs
## Run the autoconf autogen script
./autogen.sh
## Run the configure script to build the Makefile
./configure
## Build the module to make sure everything goes ok
make
## Had to add the extra modules to the depmod search ath
depmod_cont="$(&lt;/etc/depmod.d/ubuntu.conf)"
## Replace "search" with "search extra" to put the extra modules into the depmod path
depmod_cont="${depmod_cont/search/search extra}"
echo "$depmod_cont" &gt; /etc/depmod.d/ubuntu.conf
## Build and intall
make install
## Run ldconfig
ldconfig
## Run depmod
depmod
</pre>
<div id="ZFS Upgrade Issue-Other issues"><h2 id="Other issues" class="header"><a href="#ZFS Upgrade Issue-Other issues">Other issues</a></h2></div>
<div id="ZFS Upgrade Issue-Other issues-Zpools not importing"><h3 id="Zpools not importing" class="header"><a href="#ZFS Upgrade Issue-Other issues-Zpools not importing">Zpools not importing</a></h3></div>
<hr />
<p>
Upon finishing installation and reboot I noticed that when the server rebooted it didn't mount the pools on boot. I always had to import them manually <code>zpool import data &amp;&amp; zpool import media</code>
</p>
<p>
I was confused because the configs setup by my dkms installation were still valid <code>/etc/defaults/zfs</code>.
</p>
<p>
While it took me an hour to figure it out, I eventually figured out what was wrong and why zfs wasn't importing my pools.
</p>
<p>
the services configured in /usr/lib/systemd/system were setup with the path that bsd/unix would use for the zpool.cache file (<code>/usr/local/etc/zfs/zpool.cache</code>) instead of what zfs was configured with on my zfs-dkms installation (<code>/etc/zfs/zpool.cache</code>).
</p>
<div id="ZFS Upgrade Issue-Other issues-Resolution"><h3 id="Resolution" class="header"><a href="#ZFS Upgrade Issue-Other issues-Resolution">Resolution</a></h3></div>
<hr />
<p>
All I ended up needing to do was change the path's that the service files from <code>/usr/local/etc/zfs/zpool.cache</code> to <code>/etc/zfs/zpool.cache</code> (wherever applicable).
</p>
<p>
After doing that and rebooting the pools were imported and mounted as they previously had.
</p>
</body>
</html>

View File

@ -0,0 +1,67 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>Hello World</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/09/02
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="Hello World"><h1 id="Hello World" class="header"><a href="#Hello World">Hello World</a></h1></div>
<hr />
<p>
Hello everyone, I'm terrible at things like blogging so I'll just start off with the basics. My name is Tristan Ancelet. I'm a technologist both in hobby and in work.
</p>
<p>
I am also a Systems Engineer and I dabble in software to automate portions of my work and to make administration and backup of my companies infrastructure much easier.
</p>
<div id="Hello World-My Journey So Far"><h2 id="My Journey So Far" class="header"><a href="#Hello World-My Journey So Far">My Journey So Far</a></h2></div>
<hr />
<p>
I started working in IT when I was 24, as a Network Tech for an ISP. In the next 2 years I then expanded into System Administration and eventually System Engineering.
</p>
<div id="Hello World-Goals"><h2 id="Goals" class="header"><a href="#Hello World-Goals">Goals</a></h2></div>
<hr />
<div id="Hello World-Goals-Long Term"><h3 id="Long Term" class="header"><a href="#Hello World-Goals-Long Term">Long Term</a></h3></div>
<hr />
<p>
As far as my goals going forward. My long term goal is to use this degree to become much more comfortable with development so that I can get into DevOps Engineering. As having experience with development and the associated technologies (Source Control/Git, GitLab, GitHub, etc) will allow me to expand my scope to encompass those topics more easily. Which will get me closer to that goal.
</p>
<div id="Hello World-Goals-Short Term"><h3 id="Short Term" class="header"><a href="#Hello World-Goals-Short Term">Short Term</a></h3></div>
<hr />
<p>
My short Term goals is to graduate with a bachelors in Computer Science. So that I will have more time to be able to focus on my career, and to give me more time to improve my health (due to a very stationary and sedentary job).
</p>
<div id="Hello World-This Blog"><h2 id="This Blog" class="header"><a href="#Hello World-This Blog">This Blog</a></h2></div>
<hr />
<p>
This blog is just something I whipped up with using VimWiki and some auto-generation bash scripts. I am focusing on reliable (and convenient) generation of the website and NOT visual appeal. I will eventually change to custom CSS so that the style is more unique and easier to look at. However, this is far from something I feel is a priority in the short term.
</p>
</body>
</html>

View File

@ -0,0 +1,337 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>First Ticket</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1693890000-blog-issue.html">Blog Issue</a>
<li>
<a href="1693630800-hello-world.html">Hello World</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/10/30
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="First Ticket"><h1 id="First Ticket" class="header"><a href="#First Ticket">First Ticket</a></h1></div>
<hr />
<p>
I finished my first ticket not too long ago. Was one involving front end work. Which is one of my weakest areas, especially since I've never done front-end work on Android UI before.
</p>
<p>
In my previous P&amp;P classes I've only ever done backend and API work (as that's my bread and butter working with enterprise applications at work). It unfortunately took me 2 weeks to complete my REFs (REF-219 &amp; REF-218), which kinda made me feel useless when my classmates finished multiple tickets (2-3+) in the same time it took me to finish one.
</p>
<div id="First Ticket-What was the ticket over?"><h2 id="What was the ticket over?" class="header"><a href="#First Ticket-What was the ticket over?">What was the ticket over?</a></h2></div>
<hr />
<p>
The ticket was about implementing both my REF (REF-218) "Recent Search Functionality" and another REF (REF-219) "Active Search Functionality"
</p>
<div id="First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)"><h3 id="Recent Search Functionality (REF-218)" class="header"><a href="#First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)">Recent Search Functionality (REF-218)</a></h3></div>
<hr />
<p>
This ticket was about implementing the recent search feature. Basically creating a RecyclerView adapter that would load in the users recent searches from disk, and would dynamically add and remove searches from the view as they are added to the search list (and then the adapters NotifyDataSetChanged() method that would cause the RecyclerView to refresh it's views afterwards.
</p>
<div id="First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)-RecyclerView Adapter"><h4 id="RecyclerView Adapter" class="header"><a href="#First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)-RecyclerView Adapter">RecyclerView Adapter</a></h4></div>
<hr />
<p>
Part of the REF was to create a custom adapter for the RecyclerView. Of which gave me the most issue. I've <span id="First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)-RecyclerView Adapter-NEVER"></span><strong id="NEVER">NEVER</strong> done one before, much less done frontend work. Got some help from a classmate Robert Sale. He's a pretty experienced developer compared to me. He pointed me in the right direction and gave me some pseudo-code to help me understand the lifecycle of a RecyclerView. Which I didn't understand before this ticket.
</p>
<p>
For this I ended up making a copy-paste version of a generic adapter already present in the project. From there I made it less generic. Created my own version with some hardcoded variables (since there wasn't any need to complicate it anymore that it already was).
</p>
<pre java>
public class RecentSearchAdapter extends RecyclerView.Adapter&lt;RecentSearchAdapter.ViewHolder&gt; {
private static final String TAG = "RecentSearchAdapter";
public class ViewHolder extends RecyclerView.ViewHolder {
@BindView(R.id.recent_search_linear_layout)
LinearLayout layout;
@BindView(R.id.recent_search_textview)
TextView textView;
@BindView(R.id.recent_search_remove_button)
ImageView clearButtonImageView;
private ViewHolder(@NonNull View itemView) {
super(itemView);
ButterKnife.bind(this, itemView);
}
public void setText(String to) {
textView.setText(to);
}
}
LinkedList&lt;String&gt; data;
Consumer&lt;Integer&gt; clickedCallback;
Consumer&lt;Integer&gt; deleteCallback;
final static int rootLayout = R.layout.item_recent_searches;
public RecentSearchAdapter( LinkedList&lt;String&gt; data, Consumer&lt;Integer&gt; clickedCallback, Consumer&lt;Integer&gt; deleteCallback){
this.data = data;
this.clickedCallback = clickedCallback;
this.deleteCallback = deleteCallback;
}
@NonNull
@Override
public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
View view = LayoutInflater.from(parent.getContext()).inflate(rootLayout, parent, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
ViewHolder Holder = (ViewHolder) holder;
Holder.textView.setText(data.get(position));
Holder.textView.setOnClickListener((viewPos)-&gt;{clickedCallback.accept(position);});
Holder.clearButtonImageView.setOnClickListener((viewPos)-&gt;{deleteCallback.accept(position);});
}
@Override
public int getItemCount() {
return data.size();
}
}
</pre>
<p>
In the end it made more sense to handle the callback function as a lambda, as that can be formed in the main Fragment and then passed through to the constructor of the adapter.
</p>
<pre java>
LinearLayoutManager recentLayoutManager = new LinearLayoutManager(getContext(), RecyclerView.VERTICAL, false);
recentSearches = new RecentSearchFSUtil(getContext(), "" + CurrentUserManager.getInstance().getEchelonUser().getId());
LinkedList&lt;String&gt; recentSearchList = recentSearches.getRecentSearches();
recentSearchAdapter = new RecentSearchAdapter(
recentSearchList,
(position) -&gt;{
String term = recentSearchList.get(position);
searchBar.setText(term);
loadFirstPage(term);
},
(position) -&gt; {
recentSearchList.remove(position);
recentSearches.deleteSearch(position);
recentSearchAdapter.notifyDataSetChanged();
if (recentSearchAdapter.getItemCount() == 0)
recentSearchLayout.setVisibility(View.GONE);
}
);
recentSearchRV.setLayoutManager(recentLayoutManager);
recentSearchRV.setAdapter(recentSearchAdapter);
</pre>
<p>
<span id="First Ticket-What was the ticket over?-Recent Search Functionality (REF-218)-RecyclerView Adapter-Constructor in onActivityCreated method SearchFragment.java"></span><strong id="Constructor in onActivityCreated method SearchFragment.java">Constructor in onActivityCreated method SearchFragment.java</strong>
</p>
<p>
This would allow for the callbacks to be scoped with access to methods it wouldn't have access to otherwise.
</p>
<div id="First Ticket-What was the ticket over?-The Meeting"><h3 id="The Meeting" class="header"><a href="#First Ticket-What was the ticket over?-The Meeting">The Meeting</a></h3></div>
<hr />
<p>
Unfortunately during on of our bi-weekly meetings with the team, it only took our lead about 20 seconds to find a bug in the feature that I hadn't accounted for. He found this within moments after checking out my branch, which was very embarrasing, but it is what it is.
</p>
<p>
In the end the issue that was picked up by the lead was that my feature didn't store searches for any other sources other than physically typing into the search bar at the top of the screen of the app. The fix was to place my two method calls to add the search query and the callback to the loadFirstPage method. This was universally used accross all of the search types (Popular, Recent, Suggested, etc). It was just the one method that was used by all other parts of the search page. It was about 2 minutes and the bug had been fixed before QA could decide to send it back it was an issue lol.
</p>
<pre java>
public void loadFirstPage(String q) {
if (resultsList == null) {
resultsList = new ArrayList&lt;&gt;();
} else {
resultsList.clear();
}
recentSearches.resolveNewSearch(q); //call 1
recentSearchAdapter.notifyDataSetChanged(); //call 2
suggestedLayout.setVisibility(View.GONE);
loading.setVisibility(View.VISIBLE);
resultsList(q).enqueue(new Callback&lt;ContentSearchResultsResponse&gt;() {
@Override
public void onResponse(Call&lt;ContentSearchResultsResponse&gt; call, Response&lt;ContentSearchResultsResponse&gt; response) {
loading.setVisibility(View.GONE);
List&lt;ContentData&gt; data = fetchResults(response);
resultsList = data;
mAdapter.addAll(data);
updateResultsRv();
}
@Override
public void onFailure(Call&lt;ContentSearchResultsResponse&gt; call, Throwable t) {
loading.setVisibility(View.GONE);
}
});
}
</pre>
<div id="First Ticket-What was the ticket over?-Active Search Functionality (REF-219)"><h3 id="Active Search Functionality (REF-219)" class="header"><a href="#First Ticket-What was the ticket over?-Active Search Functionality (REF-219)">Active Search Functionality (REF-219)</a></h3></div>
<hr />
<p>
Comparatively, this REF was <span id="First Ticket-What was the ticket over?-Active Search Functionality (REF-219)-MUCH"></span><strong id="MUCH">MUCH</strong> simpler than REF-218. In this REF the active search functionality was to be implemented.
</p>
<p>
This is just making sure the correct behavior is implemented when the user begins to start typing in the search bar. Each of the different parts of the application had to react a different way depending on the state of the SearchBar (has focus, and if it has text in it).
</p>
<p>
On my side I just needed to make sure that the recent &amp; popular searches were to be set to GONE when there was text in the search bar &amp; in focus. To complete this I just had to add conditional statements in two parts of SearchFragment.
</p>
<p>
In the SearchBar's onSearchBarFocusChangeListener method I just had to make sure to hide it when the search bar was not in focus, or when it didn't have any recent searches to show.
</p>
<pre java>
View.OnFocusChangeListener onSearchBarFocusChangeListener() {
return (v, hasFocus) -&gt; {
searchFragmentState.setIsActiveState(hasFocus);
if (searchFragmentState.isActiveState &amp;&amp; searchFragmentState.searchTextLength == 0){
if (recentSearchAdapter.getItemCount() &gt; 0)
recentSearchLayout.setVisibility(View.VISIBLE);
} else {
recentSearchLayout.setVisibility(View.GONE);
}
};
}
</pre>
<p>
On the flip side of handling the behavior of the views based on if text is present in the search bar I put my conditionals in the afterTextChanged method in the onSearchBarTextChangedListener.
</p>
<p>
I just had to remember that the recent searches &amp; popular searches would need to be hidden when there is text in the search bar, and shown otherwise. The only exception would be for recent searches, and this is just to make sure it's GONE if there are no recent searches to show.
</p>
<pre java>
@Override
public void afterTextChanged(Editable editable) {
searchFragmentState.setSearchTextLength(editable.length());
if (searchFragmentState.searchTextLength &gt; 0) {
popularSearchLayout.setVisibility(View.GONE);
recentSearchLayout.setVisibility(View.GONE);
suggestedLayout.setVisibility(View.VISIBLE);
} else if (searchFragmentState.searchTextLength == 0) {
popularSearchLayout.setVisibility(View.VISIBLE);
if (recentSearchAdapter.getItemCount() &gt; 0)
recentSearchLayout.setVisibility(View.VISIBLE);
suggestedLayout.setVisibility(View.GONE);
}
}
</pre>
<div id="First Ticket-What was the ticket over?-Unexpected Changes"><h3 id="Unexpected Changes" class="header"><a href="#First Ticket-What was the ticket over?-Unexpected Changes">Unexpected Changes</a></h3></div>
<hr />
<p>
There were a few things I needed to change outside of my REF's to make sure everything looked according to our reference/plans.
</p>
<ol>
<li>
Had to alter one of the layouts becuase (recent_search_item) it was incorrectly laid out and sized. Which caused a lot of incorrect sizing of the recent searches when added to the RecyclerView. (Thanks to Robert for pointing this out and providing me with the correct attribute values)
<li>
Had to alter the "Recent Searches" layout xml in the SearchFragment. It wasn't sized properly and was causing the view to become scrollable instead of expanding in size to fill up the space taken up by items.
<ul>
<li>
This was another issue found by the lead when testing my branch.
</ul>
<li>
Had to add two methods to the RecentSearchFSUtil class that Robert made in conjunction to my REF's. Otherwise his utility worked perfect the rest of the time.
<ul>
<li>
getter method (getRecentSearches) to return the internally stored recentSearches list
<li>
delete method (deleteSearch) to remove a recent search by index in the list.
</ul>
</ol>
<div id="First Ticket-What was the ticket over?-Overall"><h3 id="Overall" class="header"><a href="#First Ticket-What was the ticket over?-Overall">Overall</a></h3></div>
<hr />
<p>
This class is going pretty well atm. It's slow unfortunately, since the actual company is prioritizing their main projects right now. Our features and requests/tickets are dried up with our senior members (and Robert as it seems) taking all of the tickets (and some that aren't even in our branch to do). Not that I'm complaining that I have nothing to do, as I have more than enough work to do at my day job. I rather enjoy not having things to do sometimes.
</p>
<div id="First Ticket-People Mentioned in this post"><h2 id="People Mentioned in this post" class="header"><a href="#First Ticket-People Mentioned in this post">People Mentioned in this post</a></h2></div>
<hr />
<table>
<thead>
<tr>
<th>
Name
</th>
<th>
Social Media
</th>
<th>
Website
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Robert Sale
</td>
<td>
<a href="https://www.linkedin.com/in/robert-sale-83b5aa212">LinkedIn</a> Discord=@robertmsale
</td>
<td>
<a href="https://www.fieldfab.net/">Fieldfab</a>
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>REF-290: Start</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1698642000-first-ticket.html">First Ticket</a>
<li>
<a href="1693890000-blog-issue.html">Blog Issue</a>
<li>
<a href="1693630800-hello-world.html">Hello World</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/07
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="REF-209"><h1 id="REF-209" class="header"><a href="#REF-209">REF-209</a></h1></div>
<hr />
<p>
Picked up a new ticket. <span id="REF-209-REF-290: Update Colors on Error Cells"></span><strong id="REF-290: Update Colors on Error Cells">REF-290: Update Colors on Error Cells</strong>.
</p>
<div id="REF-209-What am I doing on it"><h2 id="What am I doing on it" class="header"><a href="#REF-209-What am I doing on it">What am I doing on it</a></h2></div>
<hr />
<p>
Looks like this is to make make sure all "error" colors displayed (as an outline or as text color) are set to be '#fd6c5a'.
</p>
<div id="REF-209-What am I doing on it-What Have I done"><h3 id="What Have I done" class="header"><a href="#REF-209-What am I doing on it-What Have I done">What Have I done</a></h3></div>
<hr />
<p>
After looking through the layout xml's I see that all of the errorColor's were all set to '#fd6c5a' manually, while '@color/text_error' was defined in colors.xml
</p>
<p>
After working on it a bit I poked at my lead (Bobby) to see what the scope of the ticket would include, as I did start going through and manually started changing errorTextColor in each layout that was needing to have it changed (from manual to the global color definition).
</p>
<p>
TL;DR:
</p>
<ul>
<li>
Defined errorEnabled, errorTextColor &amp; boxStrokeErrorColor in the TextInputLayoutStyle &amp; TextInputLayoutStyleTimeout styles.
<li>
Removed errorEnabled &amp; errorTextColor defined in:
<ul>
<li>
@+id/fragment_add_profile_email_layout (in fragment_add_new_profile.xml)
<li>
@+id/fragment_login_incorrect_details (in fragment_login.xml)
</ul>
</ul>
<div id="REF-209-What am I doing on it-What I have left to do"><h3 id="What I have left to do" class="header"><a href="#REF-209-What am I doing on it-What I have left to do">What I have left to do</a></h3></div>
<hr />
<p>
I have to test the app and try to get to each individual section to test that each change has actually changed the colors in each area.
</p>
<div id="REF-209-People Mentioned In post"><h2 id="People Mentioned In post" class="header"><a href="#REF-209-People Mentioned In post">People Mentioned In post</a></h2></div>
<hr />
<table>
<thead>
<tr>
<th>
Name
</th>
<th>
Notes
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Bobby Whitley
</td>
<td>
Team Lead
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>REF-290 Submitted</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1699375988-ref-209-start.html">REF-290: Start</a>
<li>
<a href="1698642000-first-ticket.html">First Ticket</a>
<li>
<a href="1693890000-blog-issue.html">Blog Issue</a>
<li>
<a href="1693630800-hello-world.html">Hello World</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/09
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="REF-290 Submitted"><h1 id="REF-290 Submitted" class="header"><a href="#REF-290 Submitted">REF-290 Submitted</a></h1></div>
<div id="REF-290 Submitted-Further Work"><h2 id="Further Work" class="header"><a href="#REF-290 Submitted-Further Work">Further Work</a></h2></div>
<p>
To finish off what I've done for my REF:
</p>
<ul>
<li>
I (after talking with my lead) had to bind a view (R.id.timeout_text_input as timoutInput) and call timeoutInput.setError in the section needing to present errors (MoreFragment.java)
<li>
Had to add errorEnabled to TextInputLayoutStyle (as it seems I forgot to do so to begin with despite notating it in my commit).
</ul>
<div id="REF-290 Submitted-People Mentioned In post"><h2 id="People Mentioned In post" class="header"><a href="#REF-290 Submitted-People Mentioned In post">People Mentioned In post</a></h2></div>
<hr />
<table>
<thead>
<tr>
<th>
Name
</th>
<th>
Notes
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
Bobby Whitley
</td>
<td>
Team Lead
</td>
</tr>
</tbody>
</table>
</body>
</html>

View File

@ -0,0 +1,64 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>Busy Week</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1700104768-new-job-offer.html">New Job Offer</a>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
<li>
<a href="1699558725-ref-290-submitted.html">REF-290 Submitted</a>
<li>
<a href="1699375988-ref-209-start.html">REF-290: Start</a>
<li>
<a href="1698642000-first-ticket.html">First Ticket</a>
</ul>
<hr />
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/11/18
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="Busy Week"><h1 id="Busy Week" class="header"><a href="#Busy Week">Busy Week</a></h1></div>
<hr />
<p>
I've been exceptionally busy this week at work. We had some high profile projects that my department was being forced to assist with (the projects were another depts). Which unfortunately put us behind on our own projects.
</p>
<div id="Busy Week-Did I do any Tickets"><h2 id="Did I do any Tickets" class="header"><a href="#Busy Week-Did I do any Tickets">Did I do any Tickets</a></h2></div>
<hr />
<p>
No unfortunately I haven't had time to pick up any tickets from the board. Although with any luck next week I will be able to pick one up (as I kinda feel useless).
</p>
</body>
</html>

View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>No Tickets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1700863814-auvik-trial.html">Auvik Trial</a>
<li>
<a href="1700345096-busy-week.html">Busy Week</a>
<li>
<a href="1700104768-new-job-offer.html">New Job Offer</a>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
<li>
<a href="1699558725-ref-290-submitted.html">REF-290 Submitted</a>
</ul>
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/12/02
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="No Tickets"><h1 id="No Tickets" class="header"><a href="#No Tickets">No Tickets</a></h1></div>
<hr />
<p>
There were no tickets for us to work on for the last 2 weeks. So there has been nothing to do.
</p>
</body>
</html>

View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<link rel="Stylesheet" type="text/css" href="../../style.css">
<link rel="alternate" type="application/rss+xml" title="RSS" href="../../rss.xml">
<title>No Tickets</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<hr />
<p>
<a href="index.html">Index</a>
<hr />
</p>
<p>
last 5 posts
<hr />
</p>
<ul>
<li>
<a href="1701545547-no-tickets.html">No Tickets</a>
<li>
<a href="1700863814-auvik-trial.html">Auvik Trial</a>
<li>
<a href="1700345096-busy-week.html">Busy Week</a>
<li>
<a href="1700104768-new-job-offer.html">New Job Offer</a>
<li>
<a href="1699564352-webhooks.html">Webhooks</a>
</ul>
<p>
<span id="-Date:"></span><strong id="Date:">Date:</strong> 2023/12/07
</p>
<p>
<span id="-Author:"></span><strong id="Author:">Author:</strong> Tristan Ancelet
</p>
<div id="No Tickets"><h1 id="No Tickets" class="header"><a href="#No Tickets">No Tickets</a></h1></div>
<p>
Unfortunately there are no tickets for us to do at the moment. The tickets that are there are too advanced for us in school to do. However, once QA goes through our other tickets they will put in tickets for bug fixes.
</p>
</body>
</html>