Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend Status Badges #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

JVickery-TBS
Copy link
Contributor

feat(templates): status badges;

  • Added status badges.

As promised back in February (here: #200 (comment)), this adds frontend badges stating the status of the xloadering and availability in the datastore.

Threw in the French (at least French Canadian) badges as well.

- Added status badges.
}
debug_level_statuses = ['complete', 'active', 'inactive', 'unknown']

if status in debug_level_statuses and not toolkit.asbool(toolkit.config.get('ckanext.xloader.debug_badges', False)):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer to reverse this, checking a list of statuses that can be shown regardless, then if the current status isn't on that list, require the debug flag.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThrawnCA okay lemme know if that is better (and if I even did what you actually asked for haha). Thanks!

- Reverse debug badge logic.
except toolkit.ObjectNotFound:
xloader_job = {}

if xloader_job.get('status') == 'complete':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could refactor this to extract xloader_job.get('status') to a variable at the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants