From db54ede4ba247f54bc96744612cd9225b2a64e01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 14 Dec 2016 12:36:56 +0100 Subject: [PATCH 01/35] a --- src/Setup/res/License.rtf | 78 +++++++++++++++++++-------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/src/Setup/res/License.rtf b/src/Setup/res/License.rtf index 05bb43065c..ec4283c649 100644 --- a/src/Setup/res/License.rtf +++ b/src/Setup/res/License.rtf @@ -1,40 +1,40 @@ -{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang3081\deflangfe3081{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2 Calibri;}} -{\colortbl ;\red48\green51\blue51;\red0\green0\blue0;\red67\green67\blue67;\red0\green0\blue255;} -{\*\generator Riched20 10.0.14393}{\*\mmathPr\mdispDef1\mwrapIndent1440\mwrapRight1 }\viewkind4\uc1 -\pard\widctlpar\sb240\sa240\cf1\b\f0\fs40\lang1033 Evaluation License Agreement\cf2\b0\f1\par -\cf3\f0\fs20 IMPORTANT - READ CAREFULLY THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT (THIS "\b AGREEMENT\b0 ") BEFORE CLICKING ON THE "I AGREE" BUTTON. BY CLICKING ON THE "I AGREE" BUTTON, INSTALLING OR USING ALL OR ANY PORTION OF THE SOFTWARE (AS DEFINED BELOW), YOU, ON YOUR OWN BEHALF AS AN INDIVIDUAL, AND ON BEHALF OF YOUR EMPLOYER OR ANOTHER ENTITY WHICH HAS NOT YET DONE SO (COLLECTIVELY "\b YOU\b0 ", OR "\b LICENSEE\b0 "), ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, THAT YOU UNDERSTAND IT, AND ARE CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO THIS AGREEMENT WITH NSERVICEBUS LTD. (DOING BUSINESS AS PARTICULAR SOFTWARE) ("\b NSB\b0 "). IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU MAY NOT DOWNLOAD, INSTALL OR USE NSB'S SOFTWARE AND RELATED DOCUMENTATION. IF YOU WISH TO USE THE SOFTWARE AS AN EMPLOYEE, CONTRACTOR, OR AGENT OF A CORPORATION, PARTNERSHIP OR SIMILAR ENTITY, THEN YOU MUST BE AUTHORIZED TO SIGN FOR AND BIND THE ENTITY IN ORDER TO ACCEPT THE TERMS OF THIS AGREEMENT. THE LICENSE GRANTED UNDER THIS AGREEMENT IS HEREBY CONDITIONED UPON ACCEPTANCE OF SUCH TERMS BY SUCH AUTHORIZED PERSONNEL. IF YOU HAVE ENTERED INTO A SEPARATE WRITTEN LICENSE AGREEMENT WITH NSB FOR USE OF THE SOFTWARE, THE TERMS AND CONDITIONS OF SUCH OTHER AGREEMENT SHALL PREVAIL OVER ANY CONFLICTING TERMS OR CONDITIONS IN THIS AGREEMENT.\par -FURTHERMORE, YOU HEREBY WAIVE ANY RIGHTS OR REQUIREMENTS UNDER ANY LAWS OR REGULATIONS IN ANY JURISDICTION WHICH REQUIRE AN ORIGINAL (NON-ELECTRONIC) SIGNATURE OR DELIVERY OR RETENTION OF NON-ELECTRONIC RECORDS, TO THE EXTENT PERMITTED UNDER APPLICABLE LAW.\par -YOU ASSUME ALL RESPONSIBILITY FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM THE SOFTWARE.\par - -\pard -{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}} -\fi-426\li426\tx426\tx1134\b Evaluation Period:\b0 14 days from the date Licensee's installs or receives access to the Software, which may be renewed for an additional 30-day period upon request by you and agreement of NSB, or as otherwise may be extended by NSB ("\b Evaluation Period\b0 "). All extensions of the initial 14-day Evaluation Period, or any other extension, will be granted in NSB's sole discretion.\line\~\~ \~\b\par -{\pntext\f0 2.\tab}Software to be Evaluated:\b0 the Particular Service Platform (the "\b Software\b0 ").\line\b\par -{\pntext\f0 3.\tab}License Grant:\b0 During the Evaluation Period, NSB hereby grants to Licensee a temporary, nonexclusive, revocable, non-sublicensable, nontransferable, limited license to use the Software, solely to evaluate whether to license the Software from NSB or enter into some other commercial arrangement with NSB, and only as authorized in this Agreement. Licensee may not use the Software for general production use or following the Evaluation Period. The Software is licensed for Licensee\f2\rquote\f0 s internal use, and neither the Software nor any derivative of the Software may be used by, sub-licensed, re-sold, rented or distributed to, any other party.\line\b\par -{\pntext\f0 4.\tab}License Restrictions:\b0 Except as expressly and unambiguously permitted by this Agreement, Licensee may not, nor permit anyone else to, directly or indirectly: (i) distribute, rent, lease, market, sublicense, resell or otherwise transfer the Software or use the Software to operate, or make the Software available, in a time-sharing, outsourcing, or service bureau environment or otherwise make it available on a network accessible to multiple users or devices; (ii) copy or modify the Software either alone or in conjunction with any other product or program; (iii) remove, alter or obscure, any identification, including copyright, trademark, patent or other notices, contained in or on the Software; (iv) circumvent, disable or otherwise interfere with security-related features of the Software or features that prevent, restrict or limit use of the Software;(v) use the NSB name, logo or trademarks without prior written consent from NSB; or (vi) use the Software to violate any applicable laws, rules or regulations, or for any unlawful, harmful, irresponsible, or inappropriate purpose, or in any manner that breaches this Agreement.\line\b\par - -\pard -{\pntext\f0 5.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}} -\fi-360\li426\tx426\tx1080 Ownership Rights:\b0 Licensee acknowledges and agrees that all right, title, and interest in and to the Software, and any modifications, or derivative works of, the Software, including associated intellectual property rights, are exclusively owned by, and shall remain with, NSB. This Agreement does not convey to Licensee any ownership interest in the Software.\line\b\par -{\pntext\f0 6.\tab}Term and Termination:\b0 This Agreement and Licensee\f2\rquote\f0 s license to use the Software will terminate upon expiration of the Evaluation Period, unless terminated earlier upon notice from NSB. NSB may terminate this Agreement and the license granted to Licensee herein at any time and for any reason, without liability of any kind to Licensee in connection with the consequences of such termination. Unauthorized copying of the Software or otherwise failing to comply with this Agreement will result in automatic immediate termination of this Agreement and will make available to NSB legal remedies. Upon termination of the license, Licensee shall uninstall, cease using, and delete the Software. \line\b\par -{\pntext\f0 7.\tab}Non Disclosure:\b0 Without limitation to the restrictions of Section \f1\lang3081\ltrmark\f0\lang1033 4 above, Licensee agrees not to disclose any portion of the Software to any third party and to take reasonable steps to ensure the Software is not disclosed or distributed by Licensee\f2\rquote\f0 s employees or agents in violation of the provisions of this Agreement.\line\b\par -{\pntext\f0 8.\tab}Feedback:\b0 Licensee hereby grant NSB an irrevocable, free of charge, license under all intellectual property rights (including copyright) to use, for any and all purposes, any feedback, including materials, error corrections, enhancements, modifications, derivatives, suggestions and the like that Licensee may provide NSB in connection with the Software. \line\b\par -{\pntext\f0 9.\tab}Privacy Policy:\b0 NSB will collect and use information about your use of the Software in accordance with NSB\f2\rquote\f0 s privacy policy which is available at {\cf0{\field{\*\fldinst{HYPERLINK https://particular.net/privacy }}{\fldrslt{https://particular.net/privacy\ul0\cf0}}}}\f0\fs20 ("\b Privacy Policy\b0 "), as may be amended from time to time, and you agree that we may do so. Notwithstanding the foregoing, you are aware that you are not legally obligated to provide us with personal information, and you hereby confirm that when you provide NSB with personal information, you do so of your own free will. \line\b\par -{\pntext\f0 10.\tab}Third-Party Software:\b0 Licensee acknowledges that portions of the Software include Third-Party Software (including open source software) that may be subject to the terms and conditions imposed by the licensors of the Third-Party Software ("Third-Party Terms"). In order to comply with the Third Party Terms a list of the Third Party-Software and related Third-Party Terms is available at {\cf0{\field{\*\fldinst{HYPERLINK http://particular.net/ThirdPartyLicenses }}{\fldrslt{http://particular.net/ThirdPartyLicenses\ul0\cf0}}}}\f0\fs20 . Licensee agrees (i) that its use of the Third-Party Software is subject to and governed by the Third-Party Terms; and (ii) to comply with all Third-Party Terms. To the extent of any conflict between any Third-Party Terms and the terms of this Agreement, the Third-Party Terms shall prevail in connection with the related Third-Party Software. Notwithstanding anything to the contrary in this Agreement, NSB makes no warranty or indemnity with respect to any Third-Party Software. \line\b\par -{\pntext\f0 11.\tab}Exclusion of Warranty:\b0 THE SOFTWARE IS PROVIDED TO LICENSEE AT NO CHARGE ON AN AS-IS BASIS, FOR EVALUATION PURPOSES ONLY, AND TO THE MAXIMUM EXTENT PERMITTED BY LAW, NSB DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ALL WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. \line\b\par -{\pntext\f0 12.\tab}Liability:\b0 NOTWITHSTANDING ANYTHING TO THE CONTRARY, INCLUDING ANY PROVISION OF THIS AGREEMENT: \line\b\par - -\pard -{\pntext\f0 A.\tab}{\*\pn\pnlvlbody\pnf0\pnindent283\pnstart1\pnucltr{\pntxta.}} -\fi-283\li993\tx1418\tx2520\b0 IN NO EVENT SHALL NSB BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, INDIRECT, CONSEQUENTIAL, SPECIAL, EXEMPLARY, PUNITIVE OR INCIDENTAL DAMAGES, OR DAMAGES FOR LOSS OF BUSINESS OR PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF GOODWILL OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE; \par -{\pntext\f0 B.\tab}THE TOTAL CUMULATIVE LIABILITY OF NSB FOR ALL DAMAGES AND LOSSES THAT ARISE UNDER OR IN CONNECTION WITH THIS AGREEMENT, OR THAT RESULT FROM YOUR USE OF OR INABILITY TO USE THE SOFTWARE, SHALL NOT IN ANY CIRCUMSTANCES EXCEED THE AMOUNT OF FEES OR OTHER PAYMENTS, IF ANY, ACTUALLY PAID BY YOU TO NSB DURING THE EVALUATION PERIOD FOR THE USE OF THE SOFTWARE PURSUANT TO THE LICENSE GRANTED HEREIN; \par -{\pntext\f0 C.\tab}THE LIMITATIONS ON NSB\f2\rquote\f0 S LIABILITY SET FORTH IN THIS SECTION \lang3081\ltrmark\lang1033 12 SHALL APPLY EVEN IF NSB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY OR BASIS OF LIABILITY (INCLUDING, WITHOUT LIMITATION, BREACH OF CONTRACT, TORT, NEGLIGENCE OR STRICT LIABILITY). SOME STATES MAY NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO LICENSEE.\line\par - -\pard\widctlpar\fi-426\li426\tx426\tx1080 13.\tab\b Indemnification:\b0 You agree to defend, indemnify and hold harmless NSB and our affiliates, and our respective officers, directors, employees and agents, from and against any and all claims, damages, obligations, losses, liabilities, costs and expenses (including but not limited to attorney's fees) arising from: (i) your use of, or inability to use, the Software; (ii) your violation of this Agreement; and (iii) your violation of any third party right, including without limitation any copyright, property, or privacy right. Without limiting or excusing your obligations under this Section \f1\lang3081\ltrmark\f0\lang1033 14, we reserve the right, but are not under any obligation, to assume the exclusive defense and control (at your expense) of any matter which is subject to an indemnification by you if you choose not to defend or settle it. You agree not to settle any matter subject to an indemnification by you without first obtaining our express approval. \line\b\par -\b0 14.\tab\b Government Use:\b0 If Licensee is part of an agency, department, or other entity of the United States Government ("Government"), the use, duplication, reproduction, release, modification, disclosure or transfer of the Software is restricted in accordance with the Federal Acquisition Regulations as applied to civilian agencies and the Defense Federal Acquisition Regulation Supplement as applied to military agencies. The Software is a "commercial item", "commercial computer software" and "commercial computer software documentation". In accordance with such provisions, any use of the Software by the Government shall be governed solely by the terms of this Agreement.\line\b\par -\b0 15.\tab\b Governing Law/Jurisdiction:\b0 This Agreement shall be deemed to be made in, and the validity, interpretation and enforcement of this Agreement, and any disputes between you and NSB, shall be governed by and construed in accordance with the laws of, the State of New York, NY, excluding its conflicts of laws principles and excluding the United Nations Convention on Contracts for the International Sale of Goods. All disputes arising out of or relating to this Agreement shall be submitted to the exclusive jurisdiction of the courts of competent jurisdiction located in the state of New York, NY, and each party irrevocably consents to such personal jurisdiction and waives all objections to such venue. Notwithstanding the foregoing, we may seek injunctive relief in any court of competent jurisdiction worldwide. \line\par -16.\tab\b Miscellaneous:\b0 This Agreement represents the complete agreement concerning the Software between NSB and Licensee and supersedes all prior agreements and representations between NSB and Licensee. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. Any waiver of any provision of this Agreement will be effective only if in writing and signed by NSB. The terms of this Agreement are personal to Licensee and may not be assigned or transferred for any reason whatsoever without the consent of NSB and any action or conduct in violation of the foregoing shall be void and without effect. NSB may assign this Agreement and delegate any of its obligations hereunder without re\lang3081 striction. This Section \ltrmark 16 and Sections \ltrmark 4 (License Restrictions), \ltrmark 5 (Ownership Rights), \ltrmark 7 (Non-Disclosure), \ltrmark 8 (Feedback), \ltrmark 10 (Third Party Software), \ltrmark 11 (Exclusion of Warranty), \ltrmark 12 (Limited Liability), \ltrmark 13 (Government Use), and \ltrmark 15 (Governing Law an\lang1033 d Jurisdiction), and any provision so intended, and any outstanding obligations and rights previously accrued, shall survive termination or expiration of this Agreement.\b\par - -\pard\widctlpar\sb240\sa240\b0 YOU EXPRESSLY ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS AND UNDERSTAND THE RIGHTS, OBLIGATIONS, TERMS AND CONDITIONS SET FORTH HEREIN. BY CLICKING ON THE AGREE BUTTON AND/OR CONTINUING TO INSTALL OR USE THE SOFTWARE, YOU EXPRESSLY CONSENT TO BE BOUND BY THESE TERMS.\par -} +{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang3081\deflangfe3081{\fonttbl{\f0\fswiss\fprq2\fcharset0 Calibri;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\fswiss\fprq2 Calibri;}} +{\colortbl ;\red48\green51\blue51;\red0\green0\blue0;\red67\green67\blue67;\red0\green0\blue255;} +{\*\generator Riched20 10.0.14393}{\*\mmathPr\mdispDef1\mwrapIndent1440\mwrapRight1 }\viewkind4\uc1 +\pard\widctlpar\sb240\sa240\cf1\b\f0\fs40\lang1033 Evaluation License Agreement\cf2\b0\f1\par +\cf3\f0\fs20 IMPORTANT - READ CAREFULLY THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT (THIS "\b AGREEMENT\b0 ") BEFORE CLICKING ON THE "I AGREE" BUTTON. BY CLICKING ON THE "I AGREE" BUTTON, INSTALLING OR USING ALL OR ANY PORTION OF THE SOFTWARE (AS DEFINED BELOW), YOU, ON YOUR OWN BEHALF AS AN INDIVIDUAL, AND ON BEHALF OF YOUR EMPLOYER OR ANOTHER ENTITY WHICH HAS NOT YET DONE SO (COLLECTIVELY "\b YOU\b0 ", OR "\b LICENSEE\b0 "), ACKNOWLEDGE THAT YOU HAVE READ THIS AGREEMENT, THAT YOU UNDERSTAND IT, AND ARE CONSENTING TO BE BOUND BY AND ARE BECOMING A PARTY TO THIS AGREEMENT WITH NSERVICEBUS LTD. (DOING BUSINESS AS PARTICULAR SOFTWARE) ("\b NSB\b0 "). IF YOU DO NOT AGREE TO THE TERMS OF THIS AGREEMENT, YOU MAY NOT DOWNLOAD, INSTALL OR USE NSB'S SOFTWARE AND RELATED DOCUMENTATION. IF YOU WISH TO USE THE SOFTWARE AS AN EMPLOYEE, CONTRACTOR, OR AGENT OF A CORPORATION, PARTNERSHIP OR SIMILAR ENTITY, THEN YOU MUST BE AUTHORIZED TO SIGN FOR AND BIND THE ENTITY IN ORDER TO ACCEPT THE TERMS OF THIS AGREEMENT. THE LICENSE GRANTED UNDER THIS AGREEMENT IS HEREBY CONDITIONED UPON ACCEPTANCE OF SUCH TERMS BY SUCH AUTHORIZED PERSONNEL. IF YOU HAVE ENTERED INTO A SEPARATE WRITTEN LICENSE AGREEMENT WITH NSB FOR USE OF THE SOFTWARE, THE TERMS AND CONDITIONS OF SUCH OTHER AGREEMENT SHALL PREVAIL OVER ANY CONFLICTING TERMS OR CONDITIONS IN THIS AGREEMENT.\par +FURTHERMORE, YOU HEREBY WAIVE ANY RIGHTS OR REQUIREMENTS UNDER ANY LAWS OR REGULATIONS IN ANY JURISDICTION WHICH REQUIRE AN ORIGINAL (NON-ELECTRONIC) SIGNATURE OR DELIVERY OR RETENTION OF NON-ELECTRONIC RECORDS, TO THE EXTENT PERMITTED UNDER APPLICABLE LAW.\par +YOU ASSUME ALL RESPONSIBILITY FOR THE SELECTION OF THE SOFTWARE TO ACHIEVE YOUR INTENDED RESULTS AND FOR THE INSTALLATION, USE AND RESULTS OBTAINED FROM THE SOFTWARE.\par + +\pard +{\pntext\f0 1.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}} +\fi-426\li426\tx426\tx1134\b Evaluation Period:\b0 14 days from the date Licensee's installs or receives access to the Software, which may be renewed for an additional 30-day period upon request by you and agreement of NSB, or as otherwise may be extended by NSB ("\b Evaluation Period\b0 "). All extensions of the initial 14-day Evaluation Period, or any other extension, will be granted in NSB's sole discretion.\line\~\~ \~\b\par +{\pntext\f0 2.\tab}Software to be Evaluated:\b0 the Particular Service Platform (the "\b Software\b0 ").\line\b\par +{\pntext\f0 3.\tab}License Grant:\b0 During the Evaluation Period, NSB hereby grants to Licensee a temporary, nonexclusive, revocable, non-sublicensable, nontransferable, limited license to use the Software, solely to evaluate whether to license the Software from NSB or enter into some other commercial arrangement with NSB, and only as authorized in this Agreement. Licensee may not use the Software for general production use or following the Evaluation Period. The Software is licensed for Licensee\f2\rquote\f0 s internal use, and neither the Software nor any derivative of the Software may be used by, sub-licensed, re-sold, rented or distributed to, any other party.\line\b\par +{\pntext\f0 4.\tab}License Restrictions:\b0 Except as expressly and unambiguously permitted by this Agreement, Licensee may not, nor permit anyone else to, directly or indirectly: (i) distribute, rent, lease, market, sublicense, resell or otherwise transfer the Software or use the Software to operate, or make the Software available, in a time-sharing, outsourcing, or service bureau environment or otherwise make it available on a network accessible to multiple users or devices; (ii) copy or modify the Software either alone or in conjunction with any other product or program; (iii) remove, alter or obscure, any identification, including copyright, trademark, patent or other notices, contained in or on the Software; (iv) circumvent, disable or otherwise interfere with security-related features of the Software or features that prevent, restrict or limit use of the Software;(v) use the NSB name, logo or trademarks without prior written consent from NSB; or (vi) use the Software to violate any applicable laws, rules or regulations, or for any unlawful, harmful, irresponsible, or inappropriate purpose, or in any manner that breaches this Agreement.\line\b\par + +\pard +{\pntext\f0 5.\tab}{\*\pn\pnlvlbody\pnf0\pnindent0\pnstart1\pndec{\pntxta.}} +\fi-360\li426\tx426\tx1080 Ownership Rights:\b0 Licensee acknowledges and agrees that all right, title, and interest in and to the Software, and any modifications, or derivative works of, the Software, including associated intellectual property rights, are exclusively owned by, and shall remain with, NSB. This Agreement does not convey to Licensee any ownership interest in the Software.\line\b\par +{\pntext\f0 6.\tab}Term and Termination:\b0 This Agreement and Licensee\f2\rquote\f0 s license to use the Software will terminate upon expiration of the Evaluation Period, unless terminated earlier upon notice from NSB. NSB may terminate this Agreement and the license granted to Licensee herein at any time and for any reason, without liability of any kind to Licensee in connection with the consequences of such termination. Unauthorized copying of the Software or otherwise failing to comply with this Agreement will result in automatic immediate termination of this Agreement and will make available to NSB legal remedies. Upon termination of the license, Licensee shall uninstall, cease using, and delete the Software. \line\b\par +{\pntext\f0 7.\tab}Non Disclosure:\b0 Without limitation to the restrictions of Section \f1\lang3081\ltrmark\f0\lang1033 4 above, Licensee agrees not to disclose any portion of the Software to any third party and to take reasonable steps to ensure the Software is not disclosed or distributed by Licensee\f2\rquote\f0 s employees or agents in violation of the provisions of this Agreement.\line\b\par +{\pntext\f0 8.\tab}Feedback:\b0 Licensee hereby grant NSB an irrevocable, free of charge, license under all intellectual property rights (including copyright) to use, for any and all purposes, any feedback, including materials, error corrections, enhancements, modifications, derivatives, suggestions and the like that Licensee may provide NSB in connection with the Software. \line\b\par +{\pntext\f0 9.\tab}Privacy Policy:\b0 NSB will collect and use information about your use of the Software in accordance with NSB\f2\rquote\f0 s privacy policy which is available at {\cf0{\field{\*\fldinst{HYPERLINK https://particular.net/privacy }}{\fldrslt{https://particular.net/privacy\ul0\cf0}}}}\f0\fs20 ("\b Privacy Policy\b0 "), as may be amended from time to time, and you agree that we may do so. Notwithstanding the foregoing, you are aware that you are not legally obligated to provide us with personal information, and you hereby confirm that when you provide NSB with personal information, you do so of your own free will. \line\b\par +{\pntext\f0 10.\tab}Third-Party Software:\b0 Licensee acknowledges that portions of the Software include Third-Party Software (including open source software) that may be subject to the terms and conditions imposed by the licensors of the Third-Party Software ("Third-Party Terms"). In order to comply with the Third Party Terms a list of the Third Party-Software and related Third-Party Terms is available at {\cf0{\field{\*\fldinst{HYPERLINK http://particular.net/ThirdPartyLicenses }}{\fldrslt{http://particular.net/ThirdPartyLicenses\ul0\cf0}}}}\f0\fs20 . Licensee agrees (i) that its use of the Third-Party Software is subject to and governed by the Third-Party Terms; and (ii) to comply with all Third-Party Terms. To the extent of any conflict between any Third-Party Terms and the terms of this Agreement, the Third-Party Terms shall prevail in connection with the related Third-Party Software. Notwithstanding anything to the contrary in this Agreement, NSB makes no warranty or indemnity with respect to any Third-Party Software. \line\b\par +{\pntext\f0 11.\tab}Exclusion of Warranty:\b0 THE SOFTWARE IS PROVIDED TO LICENSEE AT NO CHARGE ON AN AS-IS BASIS, FOR EVALUATION PURPOSES ONLY, AND TO THE MAXIMUM EXTENT PERMITTED BY LAW, NSB DISCLAIMS ALL WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, ALL WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. \line\b\par +{\pntext\f0 12.\tab}Liability:\b0 NOTWITHSTANDING ANYTHING TO THE CONTRARY, INCLUDING ANY PROVISION OF THIS AGREEMENT: \line\b\par + +\pard +{\pntext\f0 A.\tab}{\*\pn\pnlvlbody\pnf0\pnindent283\pnstart1\pnucltr{\pntxta.}} +\fi-283\li993\tx1418\tx2520\b0 IN NO EVENT SHALL NSB BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING, WITHOUT LIMITATION, INDIRECT, CONSEQUENTIAL, SPECIAL, EXEMPLARY, PUNITIVE OR INCIDENTAL DAMAGES, OR DAMAGES FOR LOSS OF BUSINESS OR PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF GOODWILL OR OTHER PECUNIARY LOSS) ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE; \par +{\pntext\f0 B.\tab}THE TOTAL CUMULATIVE LIABILITY OF NSB FOR ALL DAMAGES AND LOSSES THAT ARISE UNDER OR IN CONNECTION WITH THIS AGREEMENT, OR THAT RESULT FROM YOUR USE OF OR INABILITY TO USE THE SOFTWARE, SHALL NOT IN ANY CIRCUMSTANCES EXCEED THE AMOUNT OF FEES OR OTHER PAYMENTS, IF ANY, ACTUALLY PAID BY YOU TO NSB DURING THE EVALUATION PERIOD FOR THE USE OF THE SOFTWARE PURSUANT TO THE LICENSE GRANTED HEREIN; \par +{\pntext\f0 C.\tab}THE LIMITATIONS ON NSB\f2\rquote\f0 S LIABILITY SET FORTH IN THIS SECTION \lang3081\ltrmark\lang1033 12 SHALL APPLY EVEN IF NSB HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES AND REGARDLESS OF THE THEORY OR BASIS OF LIABILITY (INCLUDING, WITHOUT LIMITATION, BREACH OF CONTRACT, TORT, NEGLIGENCE OR STRICT LIABILITY). SOME STATES MAY NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO LICENSEE.\line\par + +\pard\widctlpar\fi-426\li426\tx426\tx1080 13.\tab\b Indemnification:\b0 You agree to defend, indemnify and hold harmless NSB and our affiliates, and our respective officers, directors, employees and agents, from and against any and all claims, damages, obligations, losses, liabilities, costs and expenses (including but not limited to attorney's fees) arising from: (i) your use of, or inability to use, the Software; (ii) your violation of this Agreement; and (iii) your violation of any third party right, including without limitation any copyright, property, or privacy right. Without limiting or excusing your obligations under this Section \f1\lang3081\ltrmark\f0\lang1033 14, we reserve the right, but are not under any obligation, to assume the exclusive defense and control (at your expense) of any matter which is subject to an indemnification by you if you choose not to defend or settle it. You agree not to settle any matter subject to an indemnification by you without first obtaining our express approval. \line\b\par +\b0 14.\tab\b Government Use:\b0 If Licensee is part of an agency, department, or other entity of the United States Government ("Government"), the use, duplication, reproduction, release, modification, disclosure or transfer of the Software is restricted in accordance with the Federal Acquisition Regulations as applied to civilian agencies and the Defense Federal Acquisition Regulation Supplement as applied to military agencies. The Software is a "commercial item", "commercial computer software" and "commercial computer software documentation". In accordance with such provisions, any use of the Software by the Government shall be governed solely by the terms of this Agreement.\line\b\par +\b0 15.\tab\b Governing Law/Jurisdiction:\b0 This Agreement shall be deemed to be made in, and the validity, interpretation and enforcement of this Agreement, and any disputes between you and NSB, shall be governed by and construed in accordance with the laws of, the State of New York, NY, excluding its conflicts of laws principles and excluding the United Nations Convention on Contracts for the International Sale of Goods. All disputes arising out of or relating to this Agreement shall be submitted to the exclusive jurisdiction of the courts of competent jurisdiction located in the state of New York, NY, and each party irrevocably consents to such personal jurisdiction and waives all objections to such venue. Notwithstanding the foregoing, we may seek injunctive relief in any court of competent jurisdiction worldwide. \line\par +16.\tab\b Miscellaneous:\b0 This Agreement represents the complete agreement concerning the Software between NSB and Licensee and supersedes all prior agreements and representations between NSB and Licensee. If any provision of this Agreement is held to be unenforceable for any reason, such provision shall be reformed only to the extent necessary to make it enforceable. Any waiver of any provision of this Agreement will be effective only if in writing and signed by NSB. The terms of this Agreement are personal to Licensee and may not be assigned or transferred for any reason whatsoever without the consent of NSB and any action or conduct in violation of the foregoing shall be void and without effect. NSB may assign this Agreement and delegate any of its obligations hereunder without re\lang3081 striction. This Section \ltrmark 16 and Sections \ltrmark 4 (License Restrictions), \ltrmark 5 (Ownership Rights), \ltrmark 7 (Non-Disclosure), \ltrmark 8 (Feedback), \ltrmark 10 (Third Party Software), \ltrmark 11 (Exclusion of Warranty), \ltrmark 12 (Limited Liability), \ltrmark 13 (Government Use), and \ltrmark 15 (Governing Law an\lang1033 d Jurisdiction), and any provision so intended, and any outstanding obligations and rights previously accrued, shall survive termination or expiration of this Agreement.\b\par + +\pard\widctlpar\sb240\sa240\b0 YOU EXPRESSLY ACKNOWLEDGE THAT YOU HAVE READ THESE TERMS AND UNDERSTAND THE RIGHTS, OBLIGATIONS, TERMS AND CONDITIONS SET FORTH HEREIN. BY CLICKING ON THE AGREE BUTTON AND/OR CONTINUING TO INSTALL OR USE THE SOFTWARE, YOU EXPRESSLY CONSENT TO BE BOUND BY THESE TERMS.\par +} \ No newline at end of file From caa71e6d57678edad6d254197090ae803e6d11ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 3 Oct 2016 14:17:44 +0200 Subject: [PATCH 02/35] Adding message page, for better content sharing (sending link to a message) --- .../ServicePulse.Host.csproj | 3 + src/ServicePulse.Host/app/index.html | 4 + .../js/services/services.service-control.js | 7 ++ .../app/js/views/failed_messages/view.html | 2 +- .../app/js/views/message/controller.js | 90 ++++++++++++++++++ .../app/js/views/message/route.js | 22 +++++ .../app/js/views/message/view.html | 91 +++++++++++++++++++ 7 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 src/ServicePulse.Host/app/js/views/message/controller.js create mode 100644 src/ServicePulse.Host/app/js/views/message/route.js create mode 100644 src/ServicePulse.Host/app/js/views/message/view.html diff --git a/src/ServicePulse.Host/ServicePulse.Host.csproj b/src/ServicePulse.Host/ServicePulse.Host.csproj index 56b56ff5b6..bee30919ea 100644 --- a/src/ServicePulse.Host/ServicePulse.Host.csproj +++ b/src/ServicePulse.Host/ServicePulse.Host.csproj @@ -111,6 +111,9 @@ + + + diff --git a/src/ServicePulse.Host/app/index.html b/src/ServicePulse.Host/app/index.html index d88098bdf7..f4b372097a 100644 --- a/src/ServicePulse.Host/app/index.html +++ b/src/ServicePulse.Host/app/index.html @@ -139,6 +139,10 @@

Warning!

+ + + + diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index 4bf4da1817..90c53b2f97 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -56,6 +56,13 @@ }); } + function getFailedMessageById(messageId) { + var url = uri.join(scConfig.service_control_url, 'errors', messageId); + return $http.get(url).then(function (response) { + return response; + }); + } + function getHistoricGroups() { var url = uri.join(scConfig.service_control_url, 'recoverability', 'history'); return $http.get(url).then(function (response) { diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 98b21cf262..463bcaad37 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -65,7 +65,7 @@

Failed Messages

-

{{message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+

{{message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+
+
+
+

Message

+
+
+
+
+
+ + +
+
+
+
+
+
+
+
+
+
+

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+ +
+
+
+
+ + Retried + Archived + {{vm.message.number_of_processing_attempts}} Retry Failures + +
+
+
+
+

+ + + + + + + + + +

+
{{ vm.message.exception.message }}
+
{{ vm.message.exception.stack_trace }}
+ + + + + + + +
{{header.key}} +
{{header.value}}
+
+
{{vm.message.headersUnavailable}}
+
{{vm.message.messageBody}}
+
{{vm.message.bodyUnavailable}}
+
+
+
+
+
+
+
\ No newline at end of file From 05100662fa4bf3b4377e528ead479fe088599da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Tue, 4 Oct 2016 14:40:52 +0200 Subject: [PATCH 03/35] Fixing an issue of not selecting menu item when on message page --- src/ServicePulse.Host/app/js/app.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ServicePulse.Host/app/js/app.controller.js b/src/ServicePulse.Host/app/js/app.controller.js index b43d741e55..ec866a3ffb 100644 --- a/src/ServicePulse.Host/app/js/app.controller.js +++ b/src/ServicePulse.Host/app/js/app.controller.js @@ -23,7 +23,7 @@ $scope.Version = version; $scope.isActive = function(viewLocation) { - var active = (viewLocation === $location.path()); + var active = $location.path().startsWith(viewLocation); return active; }; From 0f8168ef84da23ad3a5a70e76852baad803d9f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 10 Oct 2016 11:55:01 +0200 Subject: [PATCH 04/35] Adding unarchive button to message screen --- .../app/js/views/message/controller.js | 13 +++++++++++-- .../app/js/views/message/view.html | 4 +++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index dc6b755a04..40c584d437 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -7,7 +7,8 @@ $routeParams, scConfig, toastService, - serviceControlService) { + serviceControlService, + archivedMessageService) { var vm = this; @@ -53,6 +54,13 @@ toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); vm.message.archived = true; }; + + vm.unarchiveMessage = function () { + archivedMessageService.restoreMessageFromArchive(vm.message.message_id, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') + .then(function (message) { + vm.message.archived = false; + }); + }; vm.debugInServiceInsight = function () { var messageId = vm.message.message_id; @@ -81,7 +89,8 @@ "$routeParams", "scConfig", "toastService", - "serviceControlService" + "serviceControlService", + "archivedMessageService" ]; angular.module("sc") diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index e3cbca7c04..d9ec5a5291 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -8,8 +8,10 @@

Message

- + + +
From 0ca2996d178dc82940f77a934079914d685bbb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 12 Oct 2016 13:03:44 +0200 Subject: [PATCH 05/35] Changing the methods to support promise. --- .../js/services/services.service-control.js | 7 ++++ .../app/js/views/archive/controller.js | 18 ++++++----- .../js/views/failed_messages/controller.js | 32 +++++++++++-------- .../app/js/views/message/controller.js | 17 ++++++---- 4 files changed, 46 insertions(+), 28 deletions(-) diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index 90c53b2f97..88c7035490 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -73,6 +73,13 @@ }); } + function getFailedMessageById(messageId) { + var url = uri.join(scConfig.service_control_url, 'errors', 'last', messageId); + return $http.get(url).then(function (response) { + return response; + }); + } + function getFailedMessagesForExceptionGroup(groupId, sortBy, page) { var url = uri.join(scConfig.service_control_url, 'recoverability', 'groups', groupId, 'errors?page=' + page + '&sort=' + sortBy + '&status=unresolved'); return $http.get(url).then(function(response) { diff --git a/src/ServicePulse.Host/app/js/views/archive/controller.js b/src/ServicePulse.Host/app/js/views/archive/controller.js index a60cef3f33..39f56ac39a 100644 --- a/src/ServicePulse.Host/app/js/views/archive/controller.js +++ b/src/ServicePulse.Host/app/js/views/archive/controller.js @@ -149,15 +149,17 @@ vm.retrySelected = function () { - serviceControlService.retryFailedMessages(vm.selectedIds); - vm.selectedIds = []; + serviceControlService.retryFailedMessages(vm.selectedIds) + .then(() => { + vm.selectedIds = []; - for (var i = 0; i < vm.failedMessages.length; i++) { - if (vm.failedMessages[i].selected) { - vm.failedMessages[i].selected = false; - vm.failedMessages[i].retried = true; - } - } + for (var i = 0; i < vm.failedMessages.length; i++) { + if (vm.failedMessages[i].selected) { + vm.failedMessages[i].selected = false; + vm.failedMessages[i].retried = true; + } + } + }); }; vm.unarchiveSelected = function () { diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/controller.js b/src/ServicePulse.Host/app/js/views/failed_messages/controller.js index 77cedc60f3..045568edd4 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/controller.js +++ b/src/ServicePulse.Host/app/js/views/failed_messages/controller.js @@ -105,23 +105,27 @@ }; vm.retrySelected = function () { - serviceControlService.retryFailedMessages(vm.selectedIds); - toastService.showInfo("Retrying " + vm.selectedIds.length + " messages..."); - vm.selectedIds = []; - - vm.failedMessages = vm.failedMessages.filter(function(item) { - return !item.selected; - }); + serviceControlService.retryFailedMessages(vm.selectedIds) + .then(() => { + toastService.showInfo("Retrying " + vm.selectedIds.length + " messages..."); + vm.selectedIds = []; + + vm.failedMessages = vm.failedMessages.filter(function(item) { + return !item.selected; + }); + }); }; vm.archiveSelected = function () { - serviceControlService.archiveFailedMessages(vm.selectedIds); - toastService.showInfo("Archiving " + vm.selectedIds.length + " messages..."); - vm.selectedIds = []; - - vm.failedMessages = vm.failedMessages.filter(function (item) { - return !item.selected; - }); + serviceControlService.archiveFailedMessages(vm.selectedIds) + .then(() => { + toastService.showInfo("Archiving " + vm.selectedIds.length + " messages..."); + vm.selectedIds = []; + + vm.failedMessages = vm.failedMessages.filter(function(item) { + return !item.selected; + }); + }); }; vm.archiveExceptionGroup = function (group) { diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index 40c584d437..63eb5280d6 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -44,15 +44,20 @@ }; vm.retryMessage = function () { - serviceControlService.retryFailedMessages([vm.message.message_id]); - toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); - vm.message.retried = true; + serviceControlService.retryFailedMessages([vm.message.message_id]) + .then(() => { + toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); + vm.message.retried = true; + } + ); }; vm.archiveMessage = function () { - serviceControlService.archiveFailedMessages([vm.message.message_id]); - toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); - vm.message.archived = true; + serviceControlService.archiveFailedMessages([vm.message.message_id]) + .then(() => { + toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); + vm.message.archived = true; + }); }; vm.unarchiveMessage = function () { From 2150182465d107dcfdedcfce3d114cb3bdf25afa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 12 Oct 2016 15:16:31 +0200 Subject: [PATCH 06/35] Adding tests to controller --- src/ServicePulse.Host.Tests/SpecsRunner.html | 5 + .../tests/js/_references.js | 4 + .../tests/js/views/message/controller.spec.js | 181 ++++++++++++++++++ 3 files changed, 190 insertions(+) create mode 100644 src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js diff --git a/src/ServicePulse.Host.Tests/SpecsRunner.html b/src/ServicePulse.Host.Tests/SpecsRunner.html index 58831f62fa..7dc2f9fd73 100644 --- a/src/ServicePulse.Host.Tests/SpecsRunner.html +++ b/src/ServicePulse.Host.Tests/SpecsRunner.html @@ -129,6 +129,10 @@ + + + + @@ -136,6 +140,7 @@ + diff --git a/src/ServicePulse.Host.Tests/tests/js/_references.js b/src/ServicePulse.Host.Tests/tests/js/_references.js index 106e7f7f24..ae2ea54bcd 100644 --- a/src/ServicePulse.Host.Tests/tests/js/_references.js +++ b/src/ServicePulse.Host.Tests/tests/js/_references.js @@ -88,4 +88,8 @@ /// /// /// +/// +/// +/// + /// \ No newline at end of file diff --git a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js new file mode 100644 index 0000000000..d279228a0a --- /dev/null +++ b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js @@ -0,0 +1,181 @@ +describe('messagesController', function () { + beforeEach(module('sc')); + + var $controller; + + beforeEach(inject(function (_$controller_) { + $controller = _$controller_; + })); + + describe('retrying message', function () { + var $scope, controller, serviceControlService, root, $httpBackend; + + beforeEach(inject(function ($rootScope, $injector, $q) { + $scope = {}; + root = $rootScope; + $httpBackend = $injector.get('$httpBackend'); + $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); + $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); + + serviceControlService = { + retryFailedMessages: function() {}, + getFailedMessageById: function() { + return $q.defer().promise; + } + }; + controller = $controller('messagesController', { + $scope: $scope, + $routeParams: { messageId: 'some-message-id' }, + scConfig: null, + toastService: { showInfo: function () {} }, + serviceControlService: serviceControlService, + archivedMessageService: null + }); + })); + + it('message marked as resolved', inject(function ($q) { + var deferred = $q.defer(); + spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, retried: false }; + controller.retryMessage(); + + root.$apply(function () { deferred.resolve('Remote call result') }); + + expect(controller.message.retried).toEqual(true); + expect(serviceControlService.retryFailedMessages).toHaveBeenCalled(); + })); + + it('failed, message not marked as resolved', inject(function ($q) { + var deferred = $q.defer(); + spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, retried: false }; + controller.retryMessage(); + + root.$apply(function () { deferred.reject('Remote call result') }); + + expect(controller.message.retried).toEqual(false); + expect(serviceControlService.retryFailedMessages).toHaveBeenCalled(); + })); + }); + + describe('archiving message', function () { + var $scope, controller, serviceControlService, root, $httpBackend; + + beforeEach(inject(function ($rootScope, $injector, $q) { + $scope = {}; + root = $rootScope; + $httpBackend = $injector.get('$httpBackend'); + $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); + $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); + + serviceControlService = { + archiveFailedMessages: function () { }, + getFailedMessageById: function () { + return $q.defer().promise; + } + }; + controller = $controller('messagesController', { + $scope: $scope, + $routeParams: { messageId: 'some-message-id' }, + scConfig: null, + toastService: { showInfo: function () { } }, + serviceControlService: serviceControlService, + archivedMessageService: null + }); + })); + + it('message marked as archived', inject(function ($q) { + var deferred = $q.defer(); + spyOn(serviceControlService, 'archiveFailedMessages').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, archived: false }; + controller.archiveMessage(); + + root.$apply(function () { deferred.resolve('Remote call result') }); + + expect(controller.message.archived).toEqual(true); + expect(serviceControlService.archiveFailedMessages).toHaveBeenCalled(); + })); + + it('failed, message not marked as archived', inject(function ($q) { + var deferred = $q.defer(); + spyOn(serviceControlService, 'archiveFailedMessages').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, archived: false }; + controller.archiveMessage(); + + root.$apply(function () { deferred.reject('Remote call result') }); + + expect(controller.message.archived).toEqual(false); + expect(serviceControlService.archiveFailedMessages).toHaveBeenCalled(); + })); + }); + + describe('un-archiving message', function () { + var $scope, controller, serviceControlService, root, $httpBackend, archivedMessageService; + + beforeEach(inject(function ($rootScope, $injector, $q) { + $scope = {}; + root = $rootScope; + $httpBackend = $injector.get('$httpBackend'); + $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); + $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); + + serviceControlService = { + getFailedMessageById: function () { + return $q.defer().promise; + } + }; + archivedMessageService = { restoreMessageFromArchive: function () { } }; + + controller = $controller('messagesController', { + $scope: $scope, + $routeParams: { messageId: 'some-message-id' }, + scConfig: null, + toastService: { showInfo: function () { } }, + serviceControlService: serviceControlService, + archivedMessageService: archivedMessageService + }); + })); + + it('message not marked as archived', inject(function ($q) { + var deferred = $q.defer(); + spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, archived: true }; + controller.unarchiveMessage(); + + root.$apply(function () { deferred.resolve('Remote call result') }); + + expect(controller.message.archived).toEqual(false); + expect(archivedMessageService.restoreMessageFromArchive).toHaveBeenCalled(); + })); + + it('failed, message marked as archived', inject(function ($q) { + var deferred = $q.defer(); + spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { + return deferred.promise; + }); + + controller.message = { message_id: 1, archived: true }; + controller.unarchiveMessage(); + + root.$apply(function () { deferred.reject('Remote call result') }); + + expect(controller.message.archived).toEqual(true); + expect(archivedMessageService.restoreMessageFromArchive).toHaveBeenCalled(); + })); + }); +}); \ No newline at end of file From 255a19297995e4df837424a7310d1fd5143aa727 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 13 Oct 2016 13:03:21 +0200 Subject: [PATCH 07/35] fixing tests --- .../ServicePulse.Host.Tests.csproj | 1 + .../tests/js/views/message/controller.spec.js | 25 ++++++------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/ServicePulse.Host.Tests/ServicePulse.Host.Tests.csproj b/src/ServicePulse.Host.Tests/ServicePulse.Host.Tests.csproj index dbd79228b7..53ab7cdae8 100644 --- a/src/ServicePulse.Host.Tests/ServicePulse.Host.Tests.csproj +++ b/src/ServicePulse.Host.Tests/ServicePulse.Host.Tests.csproj @@ -82,6 +82,7 @@ + diff --git a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js index d279228a0a..a070792891 100644 --- a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js +++ b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js @@ -8,14 +8,11 @@ })); describe('retrying message', function () { - var $scope, controller, serviceControlService, root, $httpBackend; + var $scope, controller, serviceControlService, root; beforeEach(inject(function ($rootScope, $injector, $q) { $scope = {}; root = $rootScope; - $httpBackend = $injector.get('$httpBackend'); - $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); - $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); serviceControlService = { retryFailedMessages: function() {}, @@ -25,7 +22,7 @@ }; controller = $controller('messagesController', { $scope: $scope, - $routeParams: { messageId: 'some-message-id' }, + $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () {} }, serviceControlService: serviceControlService, @@ -65,15 +62,12 @@ }); describe('archiving message', function () { - var $scope, controller, serviceControlService, root, $httpBackend; + var $scope, controller, serviceControlService, root; beforeEach(inject(function ($rootScope, $injector, $q) { $scope = {}; root = $rootScope; - $httpBackend = $injector.get('$httpBackend'); - $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); - $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); - + serviceControlService = { archiveFailedMessages: function () { }, getFailedMessageById: function () { @@ -82,7 +76,7 @@ }; controller = $controller('messagesController', { $scope: $scope, - $routeParams: { messageId: 'some-message-id' }, + $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, @@ -122,15 +116,12 @@ }); describe('un-archiving message', function () { - var $scope, controller, serviceControlService, root, $httpBackend, archivedMessageService; + var $scope, controller, serviceControlService, root, archivedMessageService; beforeEach(inject(function ($rootScope, $injector, $q) { $scope = {}; root = $rootScope; - $httpBackend = $injector.get('$httpBackend'); - $httpBackend.whenGET('http://localhost:33333/api/errors/queues/addresses').respond(null); - $httpBackend.whenGET('http://localhost:33333/api/redirects').respond(null); - + serviceControlService = { getFailedMessageById: function () { return $q.defer().promise; @@ -140,7 +131,7 @@ controller = $controller('messagesController', { $scope: $scope, - $routeParams: { messageId: 'some-message-id' }, + $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, From b98ab2239777d300d76116a63317b6e254fdd9e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 31 Oct 2016 16:10:26 +0100 Subject: [PATCH 08/35] Fixing tests to run in phantomjs --- src/ServicePulse.Host.Tests/SpecsRunner.html | 9 +-- .../tests/js/_references.js | 6 +- .../tests/js/views/message/controller.spec.js | 58 ++++++++++--------- .../app/js/views/message/controller.js | 12 ++-- 4 files changed, 42 insertions(+), 43 deletions(-) diff --git a/src/ServicePulse.Host.Tests/SpecsRunner.html b/src/ServicePulse.Host.Tests/SpecsRunner.html index 7dc2f9fd73..e6350ee871 100644 --- a/src/ServicePulse.Host.Tests/SpecsRunner.html +++ b/src/ServicePulse.Host.Tests/SpecsRunner.html @@ -10,11 +10,6 @@ - - - - - @@ -33,6 +28,8 @@ + + @@ -133,7 +130,7 @@ - + diff --git a/src/ServicePulse.Host.Tests/tests/js/_references.js b/src/ServicePulse.Host.Tests/tests/js/_references.js index ae2ea54bcd..76243363c8 100644 --- a/src/ServicePulse.Host.Tests/tests/js/_references.js +++ b/src/ServicePulse.Host.Tests/tests/js/_references.js @@ -85,11 +85,11 @@ /// /// /// -/// -/// +/// +/// /// /// /// -/// +/// /// \ No newline at end of file diff --git a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js index a070792891..f11e50bb39 100644 --- a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js +++ b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js @@ -1,5 +1,8 @@ describe('messagesController', function () { - beforeEach(module('sc')); + + beforeEach(function () { + module('sc'); + }); var $controller; @@ -8,11 +11,11 @@ })); describe('retrying message', function () { - var $scope, controller, serviceControlService, root; - - beforeEach(inject(function ($rootScope, $injector, $q) { - $scope = {}; + var controller, serviceControlService, root, q; + + beforeEach(inject(function ($rootScope, $q) { root = $rootScope; + q = $q; serviceControlService = { retryFailedMessages: function() {}, @@ -20,8 +23,9 @@ return $q.defer().promise; } }; - controller = $controller('messagesController', { - $scope: $scope, + + controller = $controller("messagesController", { + $scope: $rootScope.$new(), $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () {} }, @@ -30,8 +34,8 @@ }); })); - it('message marked as resolved', inject(function ($q) { - var deferred = $q.defer(); + it('message marked as resolved', function () { + var deferred = q.defer(); spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { return deferred.promise; }); @@ -43,10 +47,10 @@ expect(controller.message.retried).toEqual(true); expect(serviceControlService.retryFailedMessages).toHaveBeenCalled(); - })); + }); - it('failed, message not marked as resolved', inject(function ($q) { - var deferred = $q.defer(); + it('failed, message not marked as resolved', function () { + var deferred = q.defer(); spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { return deferred.promise; }); @@ -58,14 +62,13 @@ expect(controller.message.retried).toEqual(false); expect(serviceControlService.retryFailedMessages).toHaveBeenCalled(); - })); + }); }); describe('archiving message', function () { - var $scope, controller, serviceControlService, root; + var controller, serviceControlService, root; - beforeEach(inject(function ($rootScope, $injector, $q) { - $scope = {}; + beforeEach(inject(function ($rootScope, $q) { root = $rootScope; serviceControlService = { @@ -75,7 +78,7 @@ } }; controller = $controller('messagesController', { - $scope: $scope, + $scope: {}, $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () { } }, @@ -116,12 +119,11 @@ }); describe('un-archiving message', function () { - var $scope, controller, serviceControlService, root, archivedMessageService; + var controller, serviceControlService, root, archivedMessageService, q; - beforeEach(inject(function ($rootScope, $injector, $q) { - $scope = {}; + beforeEach(inject(function ($rootScope, $q) { root = $rootScope; - + q = $q; serviceControlService = { getFailedMessageById: function () { return $q.defer().promise; @@ -130,7 +132,7 @@ archivedMessageService = { restoreMessageFromArchive: function () { } }; controller = $controller('messagesController', { - $scope: $scope, + $scope: {}, $routeParams: { messageId: "some-message-id" }, scConfig: null, toastService: { showInfo: function () { } }, @@ -139,8 +141,8 @@ }); })); - it('message not marked as archived', inject(function ($q) { - var deferred = $q.defer(); + it('message not marked as archived', function () { + var deferred = q.defer(); spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { return deferred.promise; }); @@ -152,10 +154,10 @@ expect(controller.message.archived).toEqual(false); expect(archivedMessageService.restoreMessageFromArchive).toHaveBeenCalled(); - })); + }); - it('failed, message marked as archived', inject(function ($q) { - var deferred = $q.defer(); + it('failed, message marked as archived', function () { + var deferred = q.defer(); spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { return deferred.promise; }); @@ -167,6 +169,6 @@ expect(controller.message.archived).toEqual(true); expect(archivedMessageService.restoreMessageFromArchive).toHaveBeenCalled(); - })); + }); }); }); \ No newline at end of file diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index 63eb5280d6..ac25144c06 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -13,11 +13,11 @@ var vm = this; vm.message = {}; - - var init = function () { + + var init = function() { var messageId = $routeParams.messageId; vm.loadMessage(messageId); - } + }; vm.clipComplete = function(messageId) { toastService.showInfo(messageId + ' copied to clipboard'); @@ -45,7 +45,7 @@ vm.retryMessage = function () { serviceControlService.retryFailedMessages([vm.message.message_id]) - .then(() => { + .then(function() { toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); vm.message.retried = true; } @@ -54,7 +54,7 @@ vm.archiveMessage = function () { serviceControlService.archiveFailedMessages([vm.message.message_id]) - .then(() => { + .then(function() { toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); vm.message.archived = true; }); @@ -62,7 +62,7 @@ vm.unarchiveMessage = function () { archivedMessageService.restoreMessageFromArchive(vm.message.message_id, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') - .then(function (message) { + .then(function () { vm.message.archived = false; }); }; From 5fb2115ffbc4aa75bcff144bb6737c55048e415c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 31 Oct 2016 16:52:14 +0100 Subject: [PATCH 09/35] Setting minimum SC version. adding support for events --- .../tests/js/views/message/controller.spec.js | 9 +++++--- .../app/js/views/message/controller.js | 22 ++++++++++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js index f11e50bb39..ceae75ee23 100644 --- a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js +++ b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js @@ -30,7 +30,8 @@ scConfig: null, toastService: { showInfo: function () {} }, serviceControlService: serviceControlService, - archivedMessageService: null + archivedMessageService: null, + notifyService: function () { return { subscribe: function () { } } } }); })); @@ -83,7 +84,8 @@ scConfig: null, toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, - archivedMessageService: null + archivedMessageService: null, + notifyService: function () { return { subscribe: function () { } } } }); })); @@ -137,7 +139,8 @@ scConfig: null, toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, - archivedMessageService: archivedMessageService + archivedMessageService: archivedMessageService, + notifyService: function () { return { subscribe: function () { } } } }); })); diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index ac25144c06..af7ce5fc12 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -8,10 +8,12 @@ scConfig, toastService, serviceControlService, - archivedMessageService) { + archivedMessageService, + notifyService) { var vm = this; - + var notifier = notifyService(); + vm.message = {}; var init = function() { @@ -19,6 +21,13 @@ vm.loadMessage(messageId); }; + notifier.subscribe($scope, function (event, messageFailureResolved) { + if (messageFailureResolved.failed_message_id === vm.message.message_id) { + toastService.showInfo('Message was successfully retried.'); + vm.message.retried = false; + } + }, "MessageFailureResolved"); + vm.clipComplete = function(messageId) { toastService.showInfo(messageId + ' copied to clipboard'); }; @@ -44,7 +53,7 @@ }; vm.retryMessage = function () { - serviceControlService.retryFailedMessages([vm.message.message_id]) + serviceControlService.retryFailedMessages([vm.message.id]) .then(function() { toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); vm.message.retried = true; @@ -53,7 +62,7 @@ }; vm.archiveMessage = function () { - serviceControlService.archiveFailedMessages([vm.message.message_id]) + serviceControlService.archiveFailedMessages([vm.message.id]) .then(function() { toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); vm.message.archived = true; @@ -61,7 +70,7 @@ }; vm.unarchiveMessage = function () { - archivedMessageService.restoreMessageFromArchive(vm.message.message_id, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') + archivedMessageService.restoreMessageFromArchive(vm.message.id, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') .then(function () { vm.message.archived = false; }); @@ -95,7 +104,8 @@ "scConfig", "toastService", "serviceControlService", - "archivedMessageService" + "archivedMessageService", + "notifyService" ]; angular.module("sc") From c7ae31d7a77e67c23633f2eeb56605ac220a2548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 31 Oct 2016 18:25:44 +0100 Subject: [PATCH 10/35] Supporting the flow of the message --- .../app/js/views/message/controller.js | 15 +++++++++++++-- .../app/js/views/message/view.html | 5 +++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index af7ce5fc12..2e38c093a7 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -22,11 +22,19 @@ }; notifier.subscribe($scope, function (event, messageFailureResolved) { - if (messageFailureResolved.failed_message_id === vm.message.message_id) { + if (messageFailureResolved.failed_message_id === vm.message.id) { toastService.showInfo('Message was successfully retried.'); vm.message.retried = false; + vm.message.resolved = true; } - }, "MessageFailureResolved"); + }, "MessageFailureResolvedByRetry"); + + notifier.subscribe($scope, function (event, messageFailureResolved) { + if (messageFailureResolved.failed_message_id === vm.message.id) { + toastService.showInfo('Message failed.'); + vm.message.retried = false; + } + }, "MessageFailed"); vm.clipComplete = function(messageId) { toastService.showInfo(messageId + ' copied to clipboard'); @@ -92,6 +100,9 @@ vm.loadMessage = function (messageId) { serviceControlService.getFailedMessageById(messageId).then(function (response) { vm.message = response.data; + vm.message.archived = vm.message.status === 'archived'; + vm.message.resolved = vm.message.status === 'resolved'; + vm.message.retried = vm.message.status === 'retryIssued'; }); }; diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index d9ec5a5291..597a3b4d35 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -8,9 +8,9 @@

Message

- + - +
@@ -36,6 +36,7 @@

Message

Retried Archived + Processed {{vm.message.number_of_processing_attempts}} Retry Failures
From cdfa1c6f2fcddd5d3f68e52ee5fa640e7dbec392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Tue, 31 Jan 2017 16:02:14 +0100 Subject: [PATCH 11/35] Adding Mock view for Sergio to test the 1 page message --- .../app/js/services/services.service-control.js | 15 ++++++++------- .../app/js/views/message/controller.js | 6 ++++++ .../app/js/views/message/view.html | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index 88c7035490..0ef6d737ec 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -56,7 +56,7 @@ }); } - function getFailedMessageById(messageId) { + function getFailedMessageById(messageId) { var url = uri.join(scConfig.service_control_url, 'errors', messageId); return $http.get(url).then(function (response) { return response; @@ -192,7 +192,7 @@ function retryAllFailedMessages() { var url = uri.join(scConfig.service_control_url, 'errors', 'retry', 'all'); - $http.post(url) + return $http.post(url) .success(function() { notifications.pushForCurrentRoute('Retrying all messages...', 'info'); }) @@ -203,7 +203,7 @@ function retryFailedMessages(selectedMessages) { var url = uri.join(scConfig.service_control_url, 'errors', 'retry'); - $http.post(url, selectedMessages) + return $http.post(url, selectedMessages) .success(function() { notifications.pushForCurrentRoute('Retrying {{num}} messages...', 'info', { num: selectedMessages.length }); }) @@ -215,7 +215,7 @@ function archiveFailedMessages(selectedMessages) { var url = uri.join(scConfig.service_control_url, 'errors', 'archive'); - $http({ + return $http({ url: url, data: selectedMessages, method: 'PATCH' @@ -230,7 +230,7 @@ function archiveExceptionGroup(id, successText) { var url = uri.join(scConfig.service_control_url, 'recoverability', 'groups', id, 'errors', 'archive'); - $http.post(url) + return $http.post(url) .success(function() { // notifications.pushForCurrentRoute(successText, 'info'); }) @@ -252,7 +252,7 @@ function retryExceptionGroup(id, successText) { var url = uri.join(scConfig.service_control_url, 'recoverability', 'groups', id, 'errors', 'retry'); - $http.post(url) + return $http.post(url) .success(function() { // notifications.pushForCurrentRoute(successText, 'info'); }) @@ -318,7 +318,8 @@ retryExceptionGroup: retryExceptionGroup, getHeartbeatStats: getHeartbeatStats, loadQueueNames: loadQueueNames, - acknowledgeGroup: acknowledgeGroup + acknowledgeGroup: acknowledgeGroup, + getFailedMessageById: getFailedMessageById }; return service; diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index 2e38c093a7..d2ecb8d4a1 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -84,6 +84,12 @@ }); }; + //to be deleted + vm.resolveButtonClicked = function() { + vm.message.status = "resolved"; + vm.message.resolved = true; + } + vm.debugInServiceInsight = function () { var messageId = vm.message.message_id; var dnsName = scConfig.service_control_url.toLowerCase(); diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 597a3b4d35..affbbed66c 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -11,7 +11,7 @@

Message

- +
For Sergio Only!!!vm.message.status - {{vm.message.status}}
From 043418ceafe800d271bfc2bf05f3494427c2f363 Mon Sep 17 00:00:00 2001 From: sergioc Date: Wed, 1 Feb 2017 21:36:19 +0100 Subject: [PATCH 12/35] Initial layout of message page - restored row hover state in All Failed Messages / Group detail views - updated message detail page --- src/ServicePulse.Host/app/css/particular.css | 8 ++++- .../app/js/views/failed_messages/view.html | 34 +++---------------- .../app/js/views/message/view.html | 32 ++++++++++------- 3 files changed, 31 insertions(+), 43 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index 71d9573545..d9bd75b6f0 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -769,7 +769,7 @@ p.endpoint-metadata { padding-bottom: 0; } -.events .box:hover { +.events .box:hover, .box.failed-message:hover { cursor: pointer; background-color: #edf6f7; border: 1px solid #00a3c4; @@ -1093,7 +1093,13 @@ div.danger.sc-restart-warning > strong { padding-top: 15px; } +.failed-message a { + color: #000; +} +.failed-message a:hover { + text-decoration: none; +} /* RESPONSIVE TWEAKS */ diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 463bcaad37..1dddbc8078 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -55,8 +55,8 @@

Failed Messages

- -
+
+
@@ -85,33 +85,7 @@

Failed Messages

-

- - - - - - - - - -

+
{{ message.exception.message }}
{{ message.exception.stack_trace }}
@@ -131,7 +105,7 @@

Failed Messages

- + diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index affbbed66c..925306a6ac 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -2,9 +2,11 @@
-

Message

+
BACK
+

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+
@@ -15,22 +17,28 @@

Message

+ +
+
+ +
+
+ +
+ +
+
-
-
-

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

- -
-
+
From c19034849cef7e2ba99e9837fe85be2ad6d38321 Mon Sep 17 00:00:00 2001 From: sergioc Date: Thu, 2 Feb 2017 17:18:55 +0100 Subject: [PATCH 13/35] More message type view tweaks --- src/ServicePulse.Host/app/css/particular.css | 12 +++++++ .../app/js/views/message/view.html | 33 +++++++++---------- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index d9bd75b6f0..3b84e9cf14 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -1101,6 +1101,18 @@ div.danger.sc-restart-warning > strong { text-decoration: none; } +h1.message-type-title { + margin: 0; +} + +div.btn-toolbar.message-toolbar { + margin-bottom: 32px; +} + +.group-title.group-message-count sp-moment, .group-title.group-message-count i { + font-size: 16px; + color: #777f7f; +} /* RESPONSIVE TWEAKS */ diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 925306a6ac..2246931c9e 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -3,24 +3,13 @@
BACK
-

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

-
- - - -
For Sergio Only!!!vm.message.status - {{vm.message.status}}
-
-
-
- -
-
-
+
+
+
+ + + + +
+
+
+
@@ -74,9 +74,6 @@ -

{{ vm.message.exception.message }}
{{ vm.message.exception.stack_trace }}
@@ -94,9 +91,11 @@
{{vm.message.messageBody}}
{{vm.message.bodyUnavailable}}
+
- \ No newline at end of file + +
For Sergio Only!!!vm.message.status - {{vm.message.status}}
\ No newline at end of file From b66527d0e338852857bcc6911cdb4b77c53b0378 Mon Sep 17 00:00:00 2001 From: sergioc Date: Fri, 3 Feb 2017 16:32:59 +0100 Subject: [PATCH 14/35] re-configured message list click hot spots tweaks --- src/ServicePulse.Host/app/css/particular.css | 36 ++++++++++++++++++- .../app/js/views/failed_messages/view.html | 19 ++++++---- 2 files changed, 47 insertions(+), 8 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index 3b84e9cf14..d6ea0c555b 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -311,6 +311,7 @@ div.tooltip html { -moz-osx-font-smoothing: grayscale; -webkit-font-smoothing: antialiased; + height: 100%; } body { background-color: #f2f6f7 !important; } @@ -769,7 +770,7 @@ p.endpoint-metadata { padding-bottom: 0; } -.events .box:hover, .box.failed-message:hover { +.events .box:hover, { cursor: pointer; background-color: #edf6f7; border: 1px solid #00a3c4; @@ -1093,6 +1094,11 @@ div.danger.sc-restart-warning > strong { padding-top: 15px; } +.failed-message { + padding: 0; + height: 100%; +} + .failed-message a { color: #000; } @@ -1101,6 +1107,34 @@ div.danger.sc-restart-warning > strong { text-decoration: none; } +div.check.col-md-1 { + padding-right: 0px; + height: 100%; +} + +div.col-md-11.failed-message-data:hover { + cursor: pointer; + background-color: #edf6f7; + border: 1px solid #00a3c4; +} + +div.col-md-11.failed-message-data div { + padding-left: 0; +} + +div.check.col-md-1, div.col-md-11.failed-message-data { + padding-top: 15px; + padding-bottom: 15px; + height: 130px; +} + +.stacktrace-preview { + height: 38px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + h1.message-type-title { margin: 0; } diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 1dddbc8078..16b401fe35 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -57,12 +57,17 @@

Failed Messages

-
+ +
+ +
+ +
+ +
-
- -
-
+ +
-
+
-
{{ message.exception.message }}
+
{{ message.exception.message }}
{{ message.exception.stack_trace }}
From 36fbd414125e0d53ca169a4718b654c076f0d09f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 6 Feb 2017 13:46:00 +0100 Subject: [PATCH 15/35] * Making Failed message row to inside a tag that takes you to single message view.html * Making a container of a checkbox clickable to select that checkbox --- .../app/js/views/failed_messages/view.html | 87 ++++++++++--------- 1 file changed, 44 insertions(+), 43 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 16b401fe35..39a6639c11 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -58,56 +58,57 @@

Failed Messages

- - - - - - -
{{header.key}} -
{{header.value}}
-
-
{{message.headersUnavailable}}
-
{{message.messageBody}}
-
{{message.bodyUnavailable}}
+
+
+ +
{{ message.exception.message }}
+
{{ message.exception.stack_trace }}
+ + + + + + + +
{{header.key}} +
{{header.value}}
+
+
{{message.headersUnavailable}}
+
{{message.messageBody}}
+
{{message.bodyUnavailable}}
+
-
+
From a8cdf6e00ef927d862150406905e7a20a103ae7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 6 Feb 2017 14:23:24 +0100 Subject: [PATCH 16/35] Changing cursor to pointer on input div --- .../app/js/views/failed_messages/view.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 39a6639c11..b0ef8d2abf 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -58,14 +58,14 @@

Failed Messages

-
+
-
+
-
+
From 0b04c130588fab93ccd9239958006620f0f3d51f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Mon, 6 Feb 2017 15:01:21 +0100 Subject: [PATCH 17/35] Changing panels to behave like tabs, marking with class active tab --- .../app/js/views/message/controller.js | 5 +++-- .../app/js/views/message/view.html | 22 ++++--------------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index d2ecb8d4a1..e11e8032b6 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -18,7 +18,8 @@ var init = function() { var messageId = $routeParams.messageId; - vm.loadMessage(messageId); + vm.loadMessage(messageId).then(function () { vm.togglePanel(vm.message, 1); }); + }; notifier.subscribe($scope, function (event, messageFailureResolved) { @@ -104,7 +105,7 @@ }; vm.loadMessage = function (messageId) { - serviceControlService.getFailedMessageById(messageId).then(function (response) { + return serviceControlService.getFailedMessageById(messageId).then(function (response) { vm.message = response.data; vm.message.archived = vm.message.status === 'archived'; vm.message.resolved = vm.message.status === 'resolved'; diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 2246931c9e..b85efc164d 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -29,10 +29,6 @@
-
- -
-
@@ -51,24 +47,14 @@
-

- - - - - - - - - - - - -

-
{{ message.exception.message }}
-
{{ message.exception.stack_trace }}
- - - - - - - -
{{header.key}} -
{{header.value}}
-
-
{{message.headersUnavailable}}
-
{{message.messageBody}}
-
{{message.bodyUnavailable}}
+ +
+
+ +
{{ message.exception.message }}
+ +
-
+
+
-
+ +
\ No newline at end of file diff --git a/src/ServicePulse.Host/app/js/views/event_log_items/eventLogItems.tpl.html b/src/ServicePulse.Host/app/js/views/event_log_items/eventLogItems.tpl.html index 6e16612d46..b3dfe56bc7 100644 --- a/src/ServicePulse.Host/app/js/views/event_log_items/eventLogItems.tpl.html +++ b/src/ServicePulse.Host/app/js/views/event_log_items/eventLogItems.tpl.html @@ -4,7 +4,7 @@
Last 10 events
-
+
diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/view.html b/src/ServicePulse.Host/app/js/views/failed_groups/view.html index 12544303b4..34f90d0fa6 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_groups/view.html @@ -1,11 +1,4 @@ 
-
-
-

Failed Messages

-
-
-
-
@@ -85,7 +78,7 @@
Failed message groups
-
diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 0caa7c2b46..d1e2890d4c 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -10,6 +10,11 @@
-
+
+
-
- -
-
- - Retried - Archived - Processed - {{vm.message.number_of_processing_attempts}} Retry Failures - -
-
-
-
-

- - - - -

+
+ +
{{ vm.message.exception.message }}
{{ vm.message.exception.stack_trace }}
diff --git a/src/ServicePulse.Host/app/layout/navbar.html b/src/ServicePulse.Host/app/layout/navbar.html index c5726d612c..7535b726dc 100644 --- a/src/ServicePulse.Host/app/layout/navbar.html +++ b/src/ServicePulse.Host/app/layout/navbar.html @@ -12,7 +12,7 @@ position: absolute;">! - Service Pulse + Service Pulse diff --git a/src/ServicePulse.Host/app/layout/navbar.html b/src/ServicePulse.Host/app/layout/navbar.html index 7535b726dc..a37e51debc 100644 --- a/src/ServicePulse.Host/app/layout/navbar.html +++ b/src/ServicePulse.Host/app/layout/navbar.html @@ -12,7 +12,7 @@ position: absolute;">! - Service Pulse + Service Pulse @@ -63,36 +43,32 @@
-
+
- @@ -53,7 +56,7 @@

{{vm.selectedExceptionGroup.c
-
+
@@ -61,7 +64,7 @@

{{vm.selectedExceptionGroup.c

-
diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 25cb63eae2..cf2aed4e51 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -19,6 +19,10 @@ + + + +

From 4be86ca72b3e584696fb7c2491d41e9cd8697571 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 8 Feb 2017 14:04:07 +0100 Subject: [PATCH 22/35] Adding additional information related to archive messages --- .../js/services/services.service-control.js | 7 ------ .../app/js/views/message/controller.js | 25 +++++++++++++------ .../app/js/views/message/view.html | 10 ++++---- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index 0ef6d737ec..d2766aad7c 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -56,13 +56,6 @@ }); } - function getFailedMessageById(messageId) { - var url = uri.join(scConfig.service_control_url, 'errors', messageId); - return $http.get(url).then(function (response) { - return response; - }); - } - function getHistoricGroups() { var url = uri.join(scConfig.service_control_url, 'recoverability', 'history'); return $http.get(url).then(function (response) { diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index e11e8032b6..fcf0cfd58e 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -5,18 +5,22 @@ function controller( $scope, $routeParams, + $moment, scConfig, toastService, serviceControlService, archivedMessageService, - notifyService) { + notifyService, + sharedDataService) { var vm = this; var notifier = notifyService(); vm.message = {}; - var init = function() { + var init = function () { + var configuration = sharedDataService.getConfiguration(); + vm.error_retention_period = $moment.duration(configuration.data_retention.error_retention_period).asHours(); var messageId = $routeParams.messageId; vm.loadMessage(messageId).then(function () { vm.togglePanel(vm.message, 1); }); @@ -74,6 +78,7 @@ serviceControlService.archiveFailedMessages([vm.message.id]) .then(function() { toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); + vm.loadMessage(vm.message.id).then(function () { vm.togglePanel(vm.message, 1); }); vm.message.archived = true; }); }; @@ -106,10 +111,14 @@ vm.loadMessage = function (messageId) { return serviceControlService.getFailedMessageById(messageId).then(function (response) { - vm.message = response.data; - vm.message.archived = vm.message.status === 'archived'; - vm.message.resolved = vm.message.status === 'resolved'; - vm.message.retried = vm.message.status === 'retryIssued'; + var message = response.data; + message.archived = message.status === 'archived'; + message.resolved = message.status === 'resolved'; + message.retried = message.status === 'retryIssued'; + var countdown = $moment(message.last_modified).add(vm.error_retention_period, 'hours'); + message.delete_soon = countdown < $moment(); + message.deleted_in = countdown.format(); + vm.message = message; }); }; @@ -119,11 +128,13 @@ controller.$inject = [ "$scope", "$routeParams", + "$moment", "scConfig", "toastService", "serviceControlService", "archivedMessageService", - "notifyService" + "notifyService", + "sharedDataService" ]; angular.module("sc") diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index cf2aed4e51..51fb8bf4ad 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -19,11 +19,11 @@ - - - - -

+

+ + + +

From 70aa40f25b7f9dfe4848827352d5ccac9cb3286c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 8 Feb 2017 14:18:27 +0100 Subject: [PATCH 23/35] Handling static section that is displayed when the message is not there --- .../app/js/views/message/controller.js | 8 +- .../app/js/views/message/view.html | 102 +++++++++--------- 2 files changed, 59 insertions(+), 51 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index fcf0cfd58e..5d492942ff 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -46,6 +46,9 @@ }; vm.togglePanel = function (message, panelnum) { + if (!message) + return false; + if (!angular.isDefined(message.messageBody)) { serviceControlService.getMessageBody(message.message_id).then(function (msg) { message.messageBody = msg.data; @@ -119,7 +122,10 @@ message.delete_soon = countdown < $moment(); message.deleted_in = countdown.format(); vm.message = message; - }); + }, + function() { + vm.message = null; + }); }; init(); diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 51fb8bf4ad..b3b25274d4 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -3,75 +3,77 @@
BACK
-

{{vm.message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

+

{{vm.message.message_type}}

+ + +
+
+
+
-
-

+
-
-
-
-
- - - - - +
+
+
+ + + + + +
-
-
-
-
+
+
+
+ +
+
+ -
-
-
-
Stacktrace
-
Headers
-
Message body
+
{{ vm.message.exception.message }}
+
{{ vm.message.exception.stack_trace }}
+

+ + + + + + +
{{header.key}} +
{{header.value}}
+
+
{{vm.message.headersUnavailable}}
+
{{vm.message.messageBody}}
+
{{vm.message.bodyUnavailable}}
-
{{ vm.message.exception.message }}
-
{{ vm.message.exception.stack_trace }}
- - - - - - - -
{{header.key}} -
{{header.value}}
-
-
{{vm.message.headersUnavailable}}
-
{{vm.message.messageBody}}
-
{{vm.message.bodyUnavailable}}
-
-
-
For Sergio Only!!!vm.message.status - {{vm.message.status}}
\ No newline at end of file +
\ No newline at end of file From 116421fd255c06870bba38d702954232da9df5a0 Mon Sep 17 00:00:00 2001 From: sergioc Date: Wed, 8 Feb 2017 16:17:41 +0100 Subject: [PATCH 24/35] Improved copy of inexistant message state message, small UI tweaks --- src/ServicePulse.Host/app/css/particular.css | 6 +++++- src/ServicePulse.Host/app/js/views/archive/view.html | 2 +- .../app/js/views/failed_groups/view.html | 4 ++-- src/ServicePulse.Host/app/js/views/message/view.html | 12 ++++++++---- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index a7a6e14425..7bda3161ee 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -1208,7 +1208,7 @@ pre { } h1.message-type-title { - margin: 0; + margin: 0 0 8px; font-size: 24px; } @@ -1266,6 +1266,10 @@ span.metadata.danger, i.fa.fa-trash-o.danger, sp-moment.danger { padding-right: 0; } +.message-metadata { + display: inline; +} + /* RESPONSIVE TWEAKS */ @media only screen and (min-width: 993px) { diff --git a/src/ServicePulse.Host/app/js/views/archive/view.html b/src/ServicePulse.Host/app/js/views/archive/view.html index a0da48453a..b5d3dd8dff 100644 --- a/src/ServicePulse.Host/app/js/views/archive/view.html +++ b/src/ServicePulse.Host/app/js/views/archive/view.html @@ -39,7 +39,7 @@
-
+
diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/view.html b/src/ServicePulse.Host/app/js/views/failed_groups/view.html index 34f90d0fa6..1387af724d 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_groups/view.html @@ -78,13 +78,13 @@
Failed message groups
-
+
-

{{group.title}}

+

{{group.title}}

- + + + +
- +
From ca768427bfb28690311ea4964eb42a4b3a2335dd Mon Sep 17 00:00:00 2001 From: sergioc Date: Thu, 9 Feb 2017 11:58:45 +0100 Subject: [PATCH 25/35] tweaks - attempt to use stop event propagation in message group link --- .../app/js/views/failed_groups/controller.js | 6 ++++-- src/ServicePulse.Host/app/js/views/failed_groups/view.html | 4 ++-- src/ServicePulse.Host/app/js/views/message/view.html | 1 - 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/controller.js b/src/ServicePulse.Host/app/js/views/failed_groups/controller.js index 8f3ac46a9e..2a8464200a 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/controller.js +++ b/src/ServicePulse.Host/app/js/views/failed_groups/controller.js @@ -48,7 +48,7 @@ }); } - vm.archiveExceptionGroup = function(group) { + vm.archiveExceptionGroup = function(group, $event) { group.workflow_state = { status: 'requestingArchive', message: 'Archive request initiated...' }; failedMessageGroupsService.archiveGroup(group.id, 'Archive Group Request Enqueued', @@ -62,9 +62,10 @@ group.workflow_state = createWorkflowState('error', message); notifier.notify('ArchiveGroupRequestRejected', group); }); + $event.stopPropagation(); }; - vm.retryExceptionGroup = function(group) { + vm.retryExceptionGroup = function(group, $event) { group.workflow_state = { status: 'waiting', message: getMessageForRetryStatus('waiting') }; failedMessageGroupsService.retryGroup(group.id, @@ -79,6 +80,7 @@ group.workflow_state = createWorkflowState('error', message); notifier.notify('RetryGroupRequestRejected', group); }); + $event.stopPropagation(); }; diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/view.html b/src/ServicePulse.Host/app/js/views/failed_groups/view.html index 1387af724d..c51b610713 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_groups/view.html @@ -98,10 +98,10 @@
Failed message groups
- -
diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/view.html index 94d42a9864..8550cb570d 100644 --- a/src/ServicePulse.Host/app/js/views/message/view.html +++ b/src/ServicePulse.Host/app/js/views/message/view.html @@ -39,7 +39,6 @@ -
From d36ca30bb3b2e4d3f3ea9265a395e217f8c08746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 9 Feb 2017 14:27:13 +0100 Subject: [PATCH 26/35] Preventing click propagation from confirm-click panel --- .../app/js/directives/ui.particular.confirmclick.js | 1 + .../app/js/views/failed_groups/controller.js | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ServicePulse.Host/app/js/directives/ui.particular.confirmclick.js b/src/ServicePulse.Host/app/js/directives/ui.particular.confirmclick.js index fca13c1de3..183f52d9c1 100644 --- a/src/ServicePulse.Host/app/js/directives/ui.particular.confirmclick.js +++ b/src/ServicePulse.Host/app/js/directives/ui.particular.confirmclick.js @@ -58,6 +58,7 @@ } } }); + e.stopPropagation(); }); } }; diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/controller.js b/src/ServicePulse.Host/app/js/views/failed_groups/controller.js index 2a8464200a..8f3ac46a9e 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/controller.js +++ b/src/ServicePulse.Host/app/js/views/failed_groups/controller.js @@ -48,7 +48,7 @@ }); } - vm.archiveExceptionGroup = function(group, $event) { + vm.archiveExceptionGroup = function(group) { group.workflow_state = { status: 'requestingArchive', message: 'Archive request initiated...' }; failedMessageGroupsService.archiveGroup(group.id, 'Archive Group Request Enqueued', @@ -62,10 +62,9 @@ group.workflow_state = createWorkflowState('error', message); notifier.notify('ArchiveGroupRequestRejected', group); }); - $event.stopPropagation(); }; - vm.retryExceptionGroup = function(group, $event) { + vm.retryExceptionGroup = function(group) { group.workflow_state = { status: 'waiting', message: getMessageForRetryStatus('waiting') }; failedMessageGroupsService.retryGroup(group.id, @@ -80,7 +79,6 @@ group.workflow_state = createWorkflowState('error', message); notifier.notify('RetryGroupRequestRejected', group); }); - $event.stopPropagation(); }; From c4e583f16c911be450027e7d503f79b2df4853e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 9 Feb 2017 14:50:06 +0100 Subject: [PATCH 27/35] Fixing issue of refreshing archived message --- .../app/js/views/message/controller.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index 5d492942ff..7bf8bcbdbd 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -81,11 +81,19 @@ serviceControlService.archiveFailedMessages([vm.message.id]) .then(function() { toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); - vm.loadMessage(vm.message.id).then(function () { vm.togglePanel(vm.message, 1); }); + // below line is a way to not fetch for the whole message from SC. We update date to now and calculate delete fields + vm.message.last_modified = $moment().format(); + calculateDeleteDate(vm.message, vm.error_retention_period); vm.message.archived = true; }); }; + function calculateDeleteDate(message, errorRetentionPeriod) { + var countdown = $moment(message.last_modified).add(errorRetentionPeriod, 'hours'); + message.delete_soon = countdown < $moment(); + message.deleted_in = countdown.format(); + } + vm.unarchiveMessage = function () { archivedMessageService.restoreMessageFromArchive(vm.message.id, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') .then(function () { @@ -118,9 +126,7 @@ message.archived = message.status === 'archived'; message.resolved = message.status === 'resolved'; message.retried = message.status === 'retryIssued'; - var countdown = $moment(message.last_modified).add(vm.error_retention_period, 'hours'); - message.delete_soon = countdown < $moment(); - message.deleted_in = countdown.format(); + calculateDeleteDate(message, vm.error_retention_period); vm.message = message; }, function() { From 17ba1a9850538a0006a7bfecc76bf1330e9a59bf Mon Sep 17 00:00:00 2001 From: sergioc Date: Thu, 9 Feb 2017 16:23:40 +0100 Subject: [PATCH 28/35] tweak msg group action link behavior --- src/ServicePulse.Host/app/css/particular.css | 4 ++++ src/ServicePulse.Host/app/js/views/failed_groups/view.html | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index 7bda3161ee..7e218eea73 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -1159,6 +1159,10 @@ input[type=checkbox] { text-decoration: underline; } +.msg-type-hover-off { + text-decoration: none; +} + .failed-message-data:hover { cursor: pointer; } diff --git a/src/ServicePulse.Host/app/js/views/failed_groups/view.html b/src/ServicePulse.Host/app/js/views/failed_groups/view.html index c51b610713..e5017ce3e2 100644 --- a/src/ServicePulse.Host/app/js/views/failed_groups/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_groups/view.html @@ -84,7 +84,7 @@
Failed message groups
-

{{group.title}}

+

{{group.title}}

Failed message groups
- -
From 034f6453002f74408393e2cb2bdaf1586c688988 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 9 Feb 2017 16:58:18 +0100 Subject: [PATCH 29/35] Change the route for the feature to work after William added deep linking for failed message groups --- src/ServicePulse.Host/app/js/views/archive/view.html | 2 +- src/ServicePulse.Host/app/js/views/failed_messages/view.html | 2 +- src/ServicePulse.Host/app/js/views/message/route.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/archive/view.html b/src/ServicePulse.Host/app/js/views/archive/view.html index b5d3dd8dff..a378bc4ed7 100644 --- a/src/ServicePulse.Host/app/js/views/archive/view.html +++ b/src/ServicePulse.Host/app/js/views/archive/view.html @@ -51,7 +51,7 @@
- +

{{message.message_type || 'Message Type Unknown - missing metadata EnclosedMessageTypes'}}

diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index 4c9360545b..a06fab5dea 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -65,7 +65,7 @@

{{vm.selectedExceptionGroup.c

- +
diff --git a/src/ServicePulse.Host/app/js/views/message/route.js b/src/ServicePulse.Host/app/js/views/message/route.js index 91ec815079..fa3b2581c3 100644 --- a/src/ServicePulse.Host/app/js/views/message/route.js +++ b/src/ServicePulse.Host/app/js/views/message/route.js @@ -2,7 +2,7 @@ 'use strict'; function routeProvider($routeProvider) { - $routeProvider.when('/failedMessages/:messageId', { + $routeProvider.when('/message/:messageId', { data: { pageTitle: 'Message' }, From bc7144d7da609220ea2834ad67ce8fc06841554e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 15 Feb 2017 11:25:24 +0100 Subject: [PATCH 30/35] Fixing tests to pass --- .../tests/js/views/message/controller.spec.js | 39 +++++++++++++------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js index ceae75ee23..b05bc1bd88 100644 --- a/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js +++ b/src/ServicePulse.Host.Tests/tests/js/views/message/controller.spec.js @@ -10,7 +10,7 @@ $controller = _$controller_; })); - describe('retrying message', function () { + describe('when retrying a message', function () { var controller, serviceControlService, root, q; beforeEach(inject(function ($rootScope, $q) { @@ -31,11 +31,16 @@ toastService: { showInfo: function () {} }, serviceControlService: serviceControlService, archivedMessageService: null, - notifyService: function () { return { subscribe: function () { } } } + notifyService: function () { return { subscribe: function () { } } }, + sharedDataService: { + getConfiguration () { + return { data_retention: { error_retention_period: 7 } }; + } + } }); })); - it('message marked as resolved', function () { + it('and the retry succeeds, the message is marked as resolved', function () { var deferred = q.defer(); spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { return deferred.promise; @@ -50,7 +55,7 @@ expect(serviceControlService.retryFailedMessages).toHaveBeenCalled(); }); - it('failed, message not marked as resolved', function () { + it('and the retry fails, the message is not marked as resolved', function () { var deferred = q.defer(); spyOn(serviceControlService, 'retryFailedMessages').and.callFake(function () { return deferred.promise; @@ -66,7 +71,7 @@ }); }); - describe('archiving message', function () { + describe('when archiving a message', function () { var controller, serviceControlService, root; beforeEach(inject(function ($rootScope, $q) { @@ -85,11 +90,16 @@ toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, archivedMessageService: null, - notifyService: function () { return { subscribe: function () { } } } + notifyService: function () { return { subscribe: function () { } } }, + sharedDataService: { + getConfiguration () { + return { data_retention: { error_retention_period: 7 } }; + } + } }); })); - it('message marked as archived', inject(function ($q) { + it('and the archive succeeds, the message is marked as archived', inject(function ($q) { var deferred = $q.defer(); spyOn(serviceControlService, 'archiveFailedMessages').and.callFake(function () { return deferred.promise; @@ -104,7 +114,7 @@ expect(serviceControlService.archiveFailedMessages).toHaveBeenCalled(); })); - it('failed, message not marked as archived', inject(function ($q) { + it('and the archive failed, the message is not marked as archived', inject(function ($q) { var deferred = $q.defer(); spyOn(serviceControlService, 'archiveFailedMessages').and.callFake(function () { return deferred.promise; @@ -120,7 +130,7 @@ })); }); - describe('un-archiving message', function () { + describe('when unarchiving a message', function () { var controller, serviceControlService, root, archivedMessageService, q; beforeEach(inject(function ($rootScope, $q) { @@ -140,11 +150,16 @@ toastService: { showInfo: function () { } }, serviceControlService: serviceControlService, archivedMessageService: archivedMessageService, - notifyService: function () { return { subscribe: function () { } } } + notifyService: function () { return { subscribe: function () { } } }, + sharedDataService: { + getConfiguration () { + return { data_retention: { error_retention_period: 7 } }; + } + } }); })); - it('message not marked as archived', function () { + it('and the unarchive succeeds, the message is not marked as archived', function () { var deferred = q.defer(); spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { return deferred.promise; @@ -159,7 +174,7 @@ expect(archivedMessageService.restoreMessageFromArchive).toHaveBeenCalled(); }); - it('failed, message marked as archived', function () { + it('and the unarchive fails, the message is still marked as archived', function () { var deferred = q.defer(); spyOn(archivedMessageService, 'restoreMessageFromArchive').and.callFake(function () { return deferred.promise; From 4d879403b9d290fa31789c0cb5d1e53e06655efe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Wed, 15 Feb 2017 11:25:41 +0100 Subject: [PATCH 31/35] Addressing Williams comments --- .../ServicePulse.Host.csproj | 2 +- src/ServicePulse.Host/app/css/particular.css | 3 +-- .../js/services/services.service-control.js | 4 +--- .../app/js/views/archive/controller.js | 15 --------------- .../js/views/failed_messages/controller.js | 8 +++++--- .../app/js/views/failed_messages/view.html | 2 +- .../app/js/views/message/controller.js | 19 ++++++------------- .../message/{view.html => messages-view.html} | 0 .../app/js/views/message/route.js | 2 +- 9 files changed, 16 insertions(+), 39 deletions(-) rename src/ServicePulse.Host/app/js/views/message/{view.html => messages-view.html} (100%) diff --git a/src/ServicePulse.Host/ServicePulse.Host.csproj b/src/ServicePulse.Host/ServicePulse.Host.csproj index bee30919ea..15d0d20850 100644 --- a/src/ServicePulse.Host/ServicePulse.Host.csproj +++ b/src/ServicePulse.Host/ServicePulse.Host.csproj @@ -113,7 +113,7 @@ - + diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index 7e218eea73..2f47c129e7 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -391,7 +391,6 @@ h3 { border-radius: 4px; color: #777f7f; display: block; -// height: 130px; padding: 25px 10px; position: relative; text-align: center; @@ -764,7 +763,7 @@ p.endpoint-metadata { padding-bottom: 0; } -.events .box:hover, { +.events .box:hover { cursor: pointer; background-color: #edf6f7; border: 1px solid #00a3c4; diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index d2766aad7c..3830689ff3 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -68,9 +68,7 @@ function getFailedMessageById(messageId) { var url = uri.join(scConfig.service_control_url, 'errors', 'last', messageId); - return $http.get(url).then(function (response) { - return response; - }); + return $http.get(url); } function getFailedMessagesForExceptionGroup(groupId, sortBy, page) { diff --git a/src/ServicePulse.Host/app/js/views/archive/controller.js b/src/ServicePulse.Host/app/js/views/archive/controller.js index 39f56ac39a..5128b04c0a 100644 --- a/src/ServicePulse.Host/app/js/views/archive/controller.js +++ b/src/ServicePulse.Host/app/js/views/archive/controller.js @@ -147,21 +147,6 @@ } }; - - vm.retrySelected = function () { - serviceControlService.retryFailedMessages(vm.selectedIds) - .then(() => { - vm.selectedIds = []; - - for (var i = 0; i < vm.failedMessages.length; i++) { - if (vm.failedMessages[i].selected) { - vm.failedMessages[i].selected = false; - vm.failedMessages[i].retried = true; - } - } - }); - }; - vm.unarchiveSelected = function () { archivedMessageService.restoreMessagesFromArchive(vm.selectedIds, 'Restore From Archive Request Accepted', 'Restore From Archive Request Rejected') .then(function (message) { diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/controller.js b/src/ServicePulse.Host/app/js/views/failed_messages/controller.js index 045568edd4..c17b33c829 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/controller.js +++ b/src/ServicePulse.Host/app/js/views/failed_messages/controller.js @@ -94,9 +94,11 @@ }; vm.toggleRowSelect = function (row) { - row.selected = !row.selected; + vm.updateSelectedIdsWithMessage(row); + }; + vm.updateSelectedIdsWithMessage = function(row) { if (row.selected) { vm.selectedIds.push(row.id); } else { @@ -105,9 +107,9 @@ }; vm.retrySelected = function () { + toastService.showInfo("Retrying " + vm.selectedIds.length + " messages..."); serviceControlService.retryFailedMessages(vm.selectedIds) .then(() => { - toastService.showInfo("Retrying " + vm.selectedIds.length + " messages..."); vm.selectedIds = []; vm.failedMessages = vm.failedMessages.filter(function(item) { @@ -117,9 +119,9 @@ }; vm.archiveSelected = function () { + toastService.showInfo("Archiving " + vm.selectedIds.length + " messages..."); serviceControlService.archiveFailedMessages(vm.selectedIds) .then(() => { - toastService.showInfo("Archiving " + vm.selectedIds.length + " messages..."); vm.selectedIds = []; vm.failedMessages = vm.failedMessages.filter(function(item) { diff --git a/src/ServicePulse.Host/app/js/views/failed_messages/view.html b/src/ServicePulse.Host/app/js/views/failed_messages/view.html index a06fab5dea..b0ae0273c2 100644 --- a/src/ServicePulse.Host/app/js/views/failed_messages/view.html +++ b/src/ServicePulse.Host/app/js/views/failed_messages/view.html @@ -58,7 +58,7 @@

{{vm.selectedExceptionGroup.c
- +
diff --git a/src/ServicePulse.Host/app/js/views/message/controller.js b/src/ServicePulse.Host/app/js/views/message/controller.js index 7bf8bcbdbd..f4b4fc876e 100644 --- a/src/ServicePulse.Host/app/js/views/message/controller.js +++ b/src/ServicePulse.Host/app/js/views/message/controller.js @@ -23,7 +23,6 @@ vm.error_retention_period = $moment.duration(configuration.data_retention.error_retention_period).asHours(); var messageId = $routeParams.messageId; vm.loadMessage(messageId).then(function () { vm.togglePanel(vm.message, 1); }); - }; notifier.subscribe($scope, function (event, messageFailureResolved) { @@ -69,26 +68,26 @@ }; vm.retryMessage = function () { + toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); serviceControlService.retryFailedMessages([vm.message.id]) - .then(function() { - toastService.showInfo("Retrying the message " + vm.message.message_id + " ..."); + .then(function() { vm.message.retried = true; } ); }; vm.archiveMessage = function () { + toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); serviceControlService.archiveFailedMessages([vm.message.id]) .then(function() { - toastService.showInfo("Archiving the message " + vm.message.message_id + " ..."); // below line is a way to not fetch for the whole message from SC. We update date to now and calculate delete fields vm.message.last_modified = $moment().format(); - calculateDeleteDate(vm.message, vm.error_retention_period); + updateMessageDeleteDate(vm.message, vm.error_retention_period); vm.message.archived = true; }); }; - function calculateDeleteDate(message, errorRetentionPeriod) { + function updateMessageDeleteDate(message, errorRetentionPeriod) { var countdown = $moment(message.last_modified).add(errorRetentionPeriod, 'hours'); message.delete_soon = countdown < $moment(); message.deleted_in = countdown.format(); @@ -101,12 +100,6 @@ }); }; - //to be deleted - vm.resolveButtonClicked = function() { - vm.message.status = "resolved"; - vm.message.resolved = true; - } - vm.debugInServiceInsight = function () { var messageId = vm.message.message_id; var dnsName = scConfig.service_control_url.toLowerCase(); @@ -126,7 +119,7 @@ message.archived = message.status === 'archived'; message.resolved = message.status === 'resolved'; message.retried = message.status === 'retryIssued'; - calculateDeleteDate(message, vm.error_retention_period); + updateMessageDeleteDate(message, vm.error_retention_period); vm.message = message; }, function() { diff --git a/src/ServicePulse.Host/app/js/views/message/view.html b/src/ServicePulse.Host/app/js/views/message/messages-view.html similarity index 100% rename from src/ServicePulse.Host/app/js/views/message/view.html rename to src/ServicePulse.Host/app/js/views/message/messages-view.html diff --git a/src/ServicePulse.Host/app/js/views/message/route.js b/src/ServicePulse.Host/app/js/views/message/route.js index fa3b2581c3..a59764146e 100644 --- a/src/ServicePulse.Host/app/js/views/message/route.js +++ b/src/ServicePulse.Host/app/js/views/message/route.js @@ -6,7 +6,7 @@ data: { pageTitle: 'Message' }, - templateUrl: 'js/views/message/view.html', + templateUrl: 'js/views/message/messages-view.html', controller: 'messagesController', controllerAs: 'vm' }); From 5867da09f5d3daaedf815a7bf6298403893571e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 16 Feb 2017 12:00:29 +0100 Subject: [PATCH 32/35] Fixing checkbox issue on the archive screen --- src/ServicePulse.Host/app/js/views/archive/controller.js | 3 +++ src/ServicePulse.Host/app/js/views/archive/view.html | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ServicePulse.Host/app/js/views/archive/controller.js b/src/ServicePulse.Host/app/js/views/archive/controller.js index 5128b04c0a..a08a116710 100644 --- a/src/ServicePulse.Host/app/js/views/archive/controller.js +++ b/src/ServicePulse.Host/app/js/views/archive/controller.js @@ -139,7 +139,10 @@ } row.selected = !row.selected; + vm.updateSelectedIdsWithMessage(row); + }; + vm.updateSelectedIdsWithMessage = function (row) { if (row.selected) { vm.selectedIds.push(row.id); } else { diff --git a/src/ServicePulse.Host/app/js/views/archive/view.html b/src/ServicePulse.Host/app/js/views/archive/view.html index a378bc4ed7..9133bddfff 100644 --- a/src/ServicePulse.Host/app/js/views/archive/view.html +++ b/src/ServicePulse.Host/app/js/views/archive/view.html @@ -45,7 +45,7 @@
- +
From 6a25123b2e31f29c476c0fa2e4dbe9c85186e62b Mon Sep 17 00:00:00 2001 From: sergioc Date: Thu, 16 Feb 2017 13:18:35 +0100 Subject: [PATCH 33/35] Fixed pending retries list --- src/ServicePulse.Host/app/css/particular.css | 17 +- .../app/js/views/pending_retries/view.html | 157 ++++++++---------- 2 files changed, 76 insertions(+), 98 deletions(-) diff --git a/src/ServicePulse.Host/app/css/particular.css b/src/ServicePulse.Host/app/css/particular.css index 2f47c129e7..2962b26021 100644 --- a/src/ServicePulse.Host/app/css/particular.css +++ b/src/ServicePulse.Host/app/css/particular.css @@ -885,7 +885,6 @@ nav { } .filter-input { - margin-left: 5px; width: 100%; } @@ -903,6 +902,11 @@ nav { padding-top: 8px; } +.sort-menu.dropdown { + margin-right: 32px; + padding-top: 0; +} + .repeat-item.ng-enter, .repeat-item.ng-leave { -webkit-transition:0.5s linear all; @@ -1126,7 +1130,7 @@ input[type=checkbox] { } .checkbox label:after { - opacity: 0.1; + opacity: 0; content: ''; position: absolute; width: 11px; @@ -1255,7 +1259,7 @@ button img { width: 17px; } -.btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group { +.btn-toolbar > .btn, .btn-toolbar > .btn-group, .btn-toolbar > .input-group, .action-btns .btn { margin-left: 0; margin-right: 5px; } @@ -1289,9 +1293,6 @@ span.metadata.danger, i.fa.fa-trash-o.danger, sp-moment.danger { margin-top: 0; padding-top: 0; } - .action-btns { - margin-left: 5px; - } } @media only screen and (max-width: 768px) { @@ -1321,10 +1322,6 @@ span.metadata.danger, i.fa.fa-trash-o.danger, sp-moment.danger { padding-right: 0; padding-left: 0; } - - .tabs { - - } .tabs h5 { padding-bottom: 4px; diff --git a/src/ServicePulse.Host/app/js/views/pending_retries/view.html b/src/ServicePulse.Host/app/js/views/pending_retries/view.html index 4ef83bb3c7..35e838e0ea 100644 --- a/src/ServicePulse.Host/app/js/views/pending_retries/view.html +++ b/src/ServicePulse.Host/app/js/views/pending_retries/view.html @@ -1,10 +1,5 @@ 
-
-
-

Failed Messages

-
-
@@ -12,7 +7,7 @@

Failed Messages

-
+
@@ -30,14 +25,9 @@

Failed Messages

-
- - - - -
+
-
+
- +
+
+
+ + + + +
+
+
\ No newline at end of file From d9730c1c1d95d7606d36032ee985a7882bd523c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20W=C3=B3jcik?= Date: Thu, 16 Feb 2017 13:37:18 +0100 Subject: [PATCH 34/35] making changes to align pending retries impl with archived and all messages screen --- .../app/js/views/pending_retries/controller.js | 4 ++++ .../app/js/views/pending_retries/view.html | 13 ++----------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/ServicePulse.Host/app/js/views/pending_retries/controller.js b/src/ServicePulse.Host/app/js/views/pending_retries/controller.js index b2eb93484d..92f74cee0b 100644 --- a/src/ServicePulse.Host/app/js/views/pending_retries/controller.js +++ b/src/ServicePulse.Host/app/js/views/pending_retries/controller.js @@ -173,6 +173,10 @@ row.selected = !row.selected; + vm.updateSelectedIdsWithMessage(row); + }; + + vm.updateSelectedIdsWithMessage = function (row) { if (row.selected) { vm.selectedIds.push(row.id); } else { diff --git a/src/ServicePulse.Host/app/js/views/pending_retries/view.html b/src/ServicePulse.Host/app/js/views/pending_retries/view.html index 35e838e0ea..f91eea5d93 100644 --- a/src/ServicePulse.Host/app/js/views/pending_retries/view.html +++ b/src/ServicePulse.Host/app/js/views/pending_retries/view.html @@ -110,22 +110,13 @@
- - - - - - - - - - +
- +
From 0a7903f9ce4f4f78212aefde5e2e25e005dd8e9e Mon Sep 17 00:00:00 2001 From: WilliamBZA Date: Fri, 17 Feb 2017 08:12:07 +0200 Subject: [PATCH 35/35] Neaten up Service Control promises --- .../js/services/services.service-control.js | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/ServicePulse.Host/app/js/services/services.service-control.js b/src/ServicePulse.Host/app/js/services/services.service-control.js index 3830689ff3..b3e09991dc 100644 --- a/src/ServicePulse.Host/app/js/services/services.service-control.js +++ b/src/ServicePulse.Host/app/js/services/services.service-control.js @@ -161,13 +161,7 @@ function dismissCustomChecks(customCheck) { var url = uri.join(scConfig.service_control_url, 'customchecks', customCheck.id); - $http.delete(url) - .success(function() { - // notifications.pushForCurrentRoute('"{{item.custom_check_id}}" custom check muted', 'info', { item: customCheck }); - }) - .error(function() { - // notifications.pushForCurrentRoute('Failed to mute "{{item.custom_check_id}}" custom check', 'danger', { item: customCheck }); - }); + $http.delete(url); } function retryPendingMessagesForQueue(queueName) { @@ -222,9 +216,6 @@ function archiveExceptionGroup(id, successText) { var url = uri.join(scConfig.service_control_url, 'recoverability', 'groups', id, 'errors', 'archive'); return $http.post(url) - .success(function() { - // notifications.pushForCurrentRoute(successText, 'info'); - }) .error(function() { notifications.pushForCurrentRoute('Archiving messages failed', 'danger'); }); @@ -232,10 +223,7 @@ function acknowledgeGroup(id, successText, failureText) { var url = uri.join(scConfig.service_control_url, 'recoverability', 'unacknowledgedgroups', id); - return $http.delete(url).then( - function () { - // notifications.pushForCurrentRoute(successText, 'info'); - }, function () { + return $http.delete(url).error( function () { notifications.pushForCurrentRoute('Retrying messages failed', 'danger'); }); } @@ -244,9 +232,6 @@ var url = uri.join(scConfig.service_control_url, 'recoverability', 'groups', id, 'errors', 'retry'); return $http.post(url) - .success(function() { - // notifications.pushForCurrentRoute(successText, 'info'); - }) .error(function() { notifications.pushForCurrentRoute('Retrying messages failed', 'danger'); });