Git Product home page Git Product logo

shepherd's Issues

Error when deleting a domain

There is an error when on tries to delete a domain.

Internal Server Error: /admin/catalog/domain/
...
  File "/opt/Shepherd/catalog/models.py", line 193, in __str__
    return f'{self.client} {self.project.project_type} - {self.domain.name} ({self.activitytype.activity}) {self.start_date} to {self.end_date} - {self.o
perator}'
AttributeError: 'History' object has no attribute 'project'

The line

return f'{self.client} {self.project.project_type} - {self.domain.name} ({self.activitytype.activity}) {self.start_date} to {self.end_date} - {self.operator}'

Should be changed with

        return f'{self.client} {self.project_type.project_type} - {self.domain.name} ({self.activity_type.activity}) {self.start_date} to {self.end_date} - {self.operator}'

I'll send a PR to fix it.

Domain update task never runs

running update domain categories doesnt work. Page will state task is queued but going to administration page and checking scheduled/failed/successful task all shows nothing.

Bluecoat check fails

Bluecoat recently modified their website, and as a consequence the method to fetch the data changed. They added an XSRF token.

There might be a way to modify the script to make it work with their new model, I'll have a look at it.
In the meanwhile I would recommend removing the script part that checks Bluecoat.

Error if client name does not exist

The client field in the Checkout form is a free text area.

client = forms.CharField(help_text='Enter a name for the client.')

Is there a reason it is not a ModelChoiceField like the Project Type to select from the client list ?

Because right now, there is an error if the client name does not exist.

Internal Server Error: /catalog/checkout/15
Traceback (most recent call last):
...
  File "/opt/Shepherd/catalog/views.py", line 123, in checkout
    client = Client.objects.get(name__iexact=client_name)
...
catalog.models.Client.DoesNotExist: Client matching query does not exist.

DoesNotExist at /catalog/domain/1

When clicking on a domain from the 'All Registered Domains' page, I receive the following error:

DoesNotExist at /catalog/domain/2

Group matching query does not exist.

Request Method: 	GET
Request URL: 	http://127.0.0.1:8000/catalog/domain/2
Django Version: 	2.1.5
Exception Type: 	DoesNotExist
Exception Value: 	

Group matching query does not exist.

Exception Location: 	/usr/local/lib/python3.6/dist-packages/django/db/models/query.py in get, line 399
Python Executable: 	/usr/bin/python3
Python Version: 	3.6.7
Python Path: 	

['/opt/Shepherd',
 '/usr/lib/python36.zip',
 '/usr/lib/python3.6',
 '/usr/lib/python3.6/lib-dynload',
 '/root/.local/lib/python3.6/site-packages',
 '/usr/local/lib/python3.6/dist-packages',
 '/usr/lib/python3/dist-packages']

I'm running Ubuntu 18.10.

Domain Updates Failed

Get the following error when running the Domain Update

argument of type 'NoneType' is not iterable : Traceback (most recent call last): File "/usr/local/lib/python3.7/dist-packages/django_q/cluster.py", line 377, in worker res = f(*task['args'], **task['kwargs']) File "/opt/Shepherd/tasks.py", line 103, in check_domains lab_results = domain_review.check_domain_status() File "/opt/Shepherd/modules/review.py", line 421, in check_domain_status if 'categories' in vt_results: TypeError: argument of type 'NoneType' is not iterable

"Update Categories" fails when using unicode domains

The application fails to update domain categories when it is tracking a unicode domain. The following error is displayed in the console:

[+] Starting update of $UNICODE_DOMAIN
20:01:16 [Q] ERROR Failed [autumn-three-steak-earth] - name 'error' is not defined : Traceback (most recent call last):
  File "/home/USER/Code/Shepherd/modules/review.py", line 126, in check_ibm_xforce
    req = self.session.get(xforce_api_uri, headers=headers, verify=False)
  File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/USER/.local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "/home/USER/.local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 603, in urlopen
    chunked=chunked)
  File "/home/USER/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 355, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/lib/python3.7/http/client.py", line 1229, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/lib/python3.7/http/client.py", line 1270, in _send_request
    self.putheader(hdr, value)
  File "/usr/lib/python3.7/http/client.py", line 1202, in putheader
    values[i] = one_value.encode('latin-1')
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 54-55: ordinal not in range(256)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/USER/.local/lib/python3.7/site-packages/django_q/cluster.py", line 381, in worker
    res = f(*task['args'], **task['kwargs'])
  File "/home/USER/Code/Shepherd/tasks.py", line 105, in check_domains
    lab_results = domain_review.check_domain_status()
  File "/home/USER/Code/Shepherd/modules/review.py", line 450, in check_domain_status
    xforce_results = self.check_ibm_xforce(domain_name)
  File "/home/USER/Code/Shepherd/modules/review.py", line 143, in check_ibm_xforce
    print('[!] IBM X-Force request failed: {}'.format(error))
NameError: name 'error' is not defined

picture

Hello
thx for Ghost
How can I upload a picture in the description?

Checkout start date

This is more a question than an issue.

In the checkout form the start date is a required field.

start_date = forms.DateField(help_text='Select a start date for the project.')

But when the History instance is created, it is forced to current date.

Shepherd/catalog/models.py

Lines 168 to 169 in dfba838

# This field is automatically filled with the current date at check-out
start_date = models.DateField('Start Date', auto_now_add=True, max_length=100, help_text='Enter the start date of the project')

Is this because of future features to checkout a domain in advance or is this a bug ?

Domain add requires all fields to be filled in

When manually creating a domain entry every field must be filled in, even when it makes no sense. IE Why should I have to fill in domain categories, when they can be blank once the domain is created.

Please alter the form to allow Categories, note, and purchase/expiration date fields to be blank/empty or have a default value pre-filled to allow for streamlined entry of new domains.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.