Skip to content

Commit

Permalink
Merge pull request #26 from sukhbir-singh/formatting_bug_fix
Browse files Browse the repository at this point in the history
fixed bug related to device formatting
  • Loading branch information
cpg authored Aug 10, 2019
2 parents 7edaa13 + 975b8cd commit 5ba9259
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 40 deletions.
16 changes: 8 additions & 8 deletions app/views/disk_wizard/done.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ css:
br/
- else
- @user_selections["format"]
.col-md-6.col-md-offset-3
div
table.table
thead
tr
Expand All @@ -101,25 +101,25 @@ css:
td
| \/var/hda/disks/#{@user_selections['label']}

.col-md-12.well.well-sm
a.btn.btn-success href="/tab/disks/disk_wizards"
.col-md-12
a.btn.btn-success.mb-2 href="/tab/disks/disk_wizard"
| Continue with another device
button#get_debug_info.btn.btn-warning onclick="getDebugURL();"
button#get_debug_info.btn.btn-warning.ml-3.mb-2 onclick="getDebugURL();"
| Get Debug infomation

#fpaste_loading.col-md-8.col-md-offset-2
/ = image_tag "disk_wizard/progress.gif"
p.text-primary
span.glyphicon.glyphicon-time
| Please wait.Generating fpaste URL.......
#debug_info.col-md-10.col-md-offset-1 style=("display: none;")
.panel.panel-default
form.form-inline role="form"
#debug_info.col-md-10.d-inline-block.mt-2 style=("display: none;")
div.mt-2.panel.panel-default
form.ml-2.form-inline role="form"
.form-group.has-success.has-feedback
label.control-label for="fpaste_url"
| URL:
span.glyphicon.glyphicon-globe
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 500px;") title=("Press Ctrl+c to coppy URL to clipboard") type="text" /
input#fpaste_url.form-control autocomplete="off" data-placement="top" data-toggle="tooltip" onclick="$(this).select();" placeholder=("Generating URL..") style=("width: 375px; font-size:14px;") title=("Press Ctrl+C to copy URL to clipboard") type="text" /
span.glyphicon.glyphicon-ok.form-control-feedback
.panel-body.text-left
p.text-primary
Expand Down
2 changes: 1 addition & 1 deletion lib/modules/operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def reload
DiskUtils.probe_kernal
end
DebugLogger.info "|#{self.class.name}|>|#{__method__}|:Device Kname #{self.kname}"
node = DiskUtils.find dev_path
node = DiskUtils.all_devices dev_path
if node['type'].eql? 'part'
node.each do |key, value|
instance_variable_set("@#{key}", value) unless value.nil?
Expand Down
72 changes: 41 additions & 31 deletions vendor/bash/debug_info.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,46 @@
#!/bin/bash
echo "Disk-Wizard Debug information fetcher"

echo -e "\n------------This Debug Information was Generated on $(date +"%B-%d-%Y %r")------------\n" > /var/log/debug_info.tmp
output=/tmp/dw_debug_$$.tmp

#exec > $output 2>&1

echo -e "\n------------This Debug Information was Generated on $(date +"%B-%d-%Y %r")------------\n"

printf "\n/*===*dsw.log wrapper script log (tail -n 50)===*/\n"

printf "\n/*===*dsw.log wrapper script log (tail -n 50)===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsw.log ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
tail -n 50 /var/hda/apps/520ut3lo6w/elevated/dsw.log >> /var/log/debug_info.tmp
fi

printf "\n/*=== *Current mounted partitions ===*/\n" >> /var/log/debug_info.tmp
sudo mount -l >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *list disk/partitions details with parted ===*/\n" >> /var/log/debug_info.tmp
parted -sl print all >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *List all logical volumes ===*/\n" >> /var/log/debug_info.tmp
lvdisplay -av >> /var/log/debug_info.tmp 2>&1

printf "\n/*=== *dsk-wz.sh wrapper script ===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
cat /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh >> /var/log/debug_info.tmp
fi

printf "\n/*=== *disk-wizard rails log file(tail -n 50)===*/\n" >> /var/log/debug_info.tmp
if [ ! -f /var/hda/platform/html/log/dw_debug.log ]; then
echo "File not found!" >> /var/log/debug_info.tmp
else
tail -n 50 /var/hda/platform/html/log/dw_debug.log >> /var/log/debug_info.tmp
fi

fpaste -l bash /var/log/debug_info.tmp
echo "File not found!"
else
tail -n 50 /var/hda/apps/520ut3lo6w/elevated/dsw.log
fi

printf "\n/*=== *Current mounted partitions ===*/\n"
sudo mount -l

printf "\n/*=== *list disk/partitions details with parted ===*/\n"
parted -sl print all

printf "\n/*=== *List all logical volumes ===*/\n"
lvdisplay -av

printf "\n/*=== *dsk-wz.sh wrapper script ===*/\n"

if [ ! -f /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh ]; then
echo "File not found!"
else
cat /var/hda/apps/520ut3lo6w/elevated/dsk-wz.sh
fi

printf "\n/*=== *disk-wizard rails log file(tail -n 50)===*/\n"

if [ ! -f /var/hda/platform/html/log/dw_debug.log ]; then
echo "File not found!"
else
tail -n 50 /var/hda/platform/html/log/dw_debug.log
fi

#fpaste -l "shell" /var/log/debug_info.tmp

tail -n 600 /var/hda/platform/html/log/dw_debug.log > temp_file && fpaste temp_file

0 comments on commit 5ba9259

Please sign in to comment.