-
Notifications
You must be signed in to change notification settings - Fork 3
Script Development Complete #2
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
Open
MRichards99
wants to merge
33
commits into
stfc:master
Choose a base branch
from
MRichards99:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Files introduced by IDE
First commit of this file: - Works out which row to append from - Few inital lines to extract data from TSV file
Cleanup of code from previous commit: - Sections of code moved around to suit where they're needed (not used until a certain point) - General code improvement, little things
- Basic functionality now works, data is taken from TSV file and appended to the spreadsheet - Needs lots of cleanup regarding formatting, loss of excel formulas etc.
No reason for this to occur, xlrd takes this role
- Script now using openpyxl module instead of xlrd because xlrd erased formulas upon saving spreadsheet - This now means OnCall spreadsheet must be .xlsx file to work with the script - State of script in this commit: working, formulas don't erase - Working hours conditional formatting doesn't work as the ticket creation time hasn't been split (one variable containing date, another containing the time)
- Script now manipulates .xlsx files
- Separates them for the two cells in the spreadsheet - The 'outside work hours?' formatting still not working - if time created is doubled clicked in Excel then it works but that's manual
- Once running script, the added 'RT query' cells had an error saying they should be numbers but are text - fixed in this commit - The same cells were being aligned to the right once I made the above change so are now aligned to centre as per previous spreadsheet use
- Hyperlink is added to each ticket ID to point at ticket on RT
- Thin border for all cells created - Thick outer border for the cells added also created
- Layout of code slightly changed
- This will mean the spreadsheet won't need to be corrected due to merged tickets and subjects updated (e.g. ceph-mon1-5 tickets)
- Due to the change to the 'with' statement above, you can no longer say both files can be found at this stage in the code
- Will add to 'Service' column when you can tell what service the alarm refers to - Currently implemented for: CEPH, CE and DISK Server services - Uses alarm to search for keywords
- Text will be wrapped on all cells for rows being written to during execution of the script
- Name of host added under the host column (to the relevant row) if it can be identified from the alarm name
- Better comments - Constants added for filenames and sheet name for things that will definitely end up changing over time
- Try and except blocks setup for missing Callouts.xlsx and missing sheet in that file - Few bits of code cleanup to improve readability
- Added try except block on with open statement
- Instructions to use the script added as well as a couple of changes
- If subject didn't include 'and cleared', the Nagios filler would still remain in the alarm name - This generalises nagiosFiller and searches for the first 'T' (for Tier 1) to remove Nagios filler
- README made clearer to understand - RT custom search easier to put into RT (more like RT language used)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes the development for the script as well as a README to understand how to use it. The script shouldn't need any changes functionality wise (it's been used with the spreadsheet for a few weeks and relevant changes have been made during this time), which is why I'm opening a pull request at this stage.