Skip to content

Commit

Permalink
- update save_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
cklewar committed Apr 7, 2018
1 parent 2926931 commit d8b00ca
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
8 changes: 4 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,10 +254,10 @@ def save_settings(self, dev_user=None, dev_pw=None, routers=None, age_out_interv
self.age_out_interval = age_out_interval
self.routers = routers

with open('ui/config.yml', 'w') as fp:
config = {'dev_user': self.dev_user, 'dev_pw': self.dev_pw, 'routers': self.routers,
'age_out_interval': self.age_out_interval}
yaml.safe_dump(config, fp, default_flow_style=False)
#with open('ui/config.yml', 'w') as fp:
# config = {'dev_user': self.dev_user, 'dev_pw': self.dev_pw, 'routers': self.routers,
# 'age_out_interval': self.age_out_interval}
# yaml.safe_dump(config, fp, default_flow_style=False)

def load_settings(self):

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
junos-eznc == 2.1.7
jxmlease==1.0.1
jxmlease == 1.0.1
CherryPy == 11.0.0
requests == 2.18.4
PyYAML == 3.12
Expand Down
2 changes: 1 addition & 1 deletion ui/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
age_out_interval: 00:01:00
age_out_interval: 00:03:00
dev_pw: juniper123
dev_user: root
routers:
Expand Down
6 changes: 0 additions & 6 deletions ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,6 @@ <h2 style="text-align:right;float:right;" class="mainheader">Monitoring BGP Flow
<input type="text" class="form-control" id="inputDevUser" placeholder="root">
</div>
</div>
<div class="form-group row">
<label for="inputDevIP" class="col-sm-2 col-form-label">Device IP</label>
<div class="col-sm-3">
<input type="text" class="form-control" id="inputDevIP" placeholder="10.11.111.120">
</div>
</div>
<div class="form-group row">
<label for="inputDevPassword" class="col-sm-2 col-form-label">Device Password</label>
<div class="col-sm-3">
Expand Down

0 comments on commit d8b00ca

Please sign in to comment.