Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add AJAX to Squid AV widget #327

Merged
merged 3 commits into from
Mar 15, 2017
Merged

Conversation

doktornotor
Copy link
Contributor

No description provided.

success: function(data){
$('#squidav_status').html(data);
}
});
Copy link
Contributor

Choose a reason for hiding this comment

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

It's good practice to include an error handler. In this case it could return an HTML error message?

@doktornotor
Copy link
Contributor Author

Not exactly sure what it should show there; what kind of error you mean?

@sbeaver-netgate
Copy link
Contributor

sbeaver-netgate commented Mar 8, 2017

If the AJAX call is successful, squidav_status is updated and all is well, but if for some reason the AJAX call does not succeed, nothing happens. An jQuery AJAX call can report an error, but we don't do anything about it, and it seems like we should :)

Perhaps:
success: function(data) { $('#squidav_status').html(data); }, error: function() { $('#squidav_status').html("<div class=\"alert alert-danger\">Unable to retrieve status</div>"); }

@doktornotor
Copy link
Contributor Author

Well OK, there's a bunch of Ajax calls across the pfSense code, pretty much none of those does anything on failure. The one here is very much a verbatim copy of the gmirror widget code

Perhaps you could do some mass commits there, I'm definitely much less familiar with JS.

@sbeaver-netgate
Copy link
Contributor

Yes. Whenever I work on them I try to add an error handler, but I haven't got to many of them yet. Whenever we add new code, I think it should it should use error handling.

@sbeaver-netgate sbeaver-netgate self-requested a review March 8, 2017 19:45
@netgate-git-updates netgate-git-updates merged commit 1357adb into pfsense:devel Mar 15, 2017
@doktornotor doktornotor deleted the patch-3 branch March 15, 2017 14:30
netgate-git-updates pushed a commit that referenced this pull request Aug 15, 2018
  [ Robert Edmonds ]
  * Release 1.3.1.

  * Restore protobuf-2.x compatibility (#284, #285).

  * Use xenial and protobuf 3.6.1 in the Travis-CI environment (#332).

  * Convert uses of protobuf's scoped_ptr.h to C++11 std::unique_ptr, needed
    to compile against protobuf 3.6.1 (#320, #333).

  * Use AX_CXX_COMPILE_STDCXX macro to enable C++11 support in old compilers
    (#312, #317, #327, #334).

  [ Fredrik Gustafsson ]
  * Add std:: to some types (#294, #305, #309).

  [ Sam Collinson ]
  * Check the return value of int_range_lookup before using as an array
    index; it can return -1 (#315).

  [ Matthias Dittrich ]
  * Fix compilation on mingw by using explicit protoc --plugin=NAME=PATH
    syntax in Makefile.am (#289, #290).

Sponsored by:	Farsight Security, Inc.
netgate-git-updates pushed a commit that referenced this pull request Oct 10, 2019
- Pet portclippy while here

Changelog:

 * First run and build fixes #482 #473 #467 #479 (maciejsszmigiero)
 * Add OTP (two factor authentication) support #327 #394 (Noettore)
 * Display passwords as QR codes #421 (frawi)
 * Renaming password #463 #469 (Noettore)
 * Correct font color with Dark themes #340 #476 (a-andreyev)
 * Sorted profiles dropdown as in #404 #472 (Noettore)

PR:		241176
Submitted by:	Anne Jan Brouwer <[email protected]> (maintainer)
Approved by:	tz (mentor)
Differential Revision:	https://reviews.freebsd.org/D21973
netgate-git-updates pushed a commit that referenced this pull request Jul 5, 2022
Changes since 0.3.0:

We reached v1.0.0

- fix!: Replace limit flag with paginate by @ankitpokhrel in #359
- fix!: Append components on edit instead of overriding by @ankitpokhrel in #368
- feat!: Append label to an issue, show labels at issue list view by @stchar in #300
- refactor!: Move boards and project list to subcommand by @ankitpokhrel in #314

- feat: Support custom fields on issue create by @ankitpokhrel in #319
- feat: Add support to read from .netrc by @adolsalamanca in #329
- feat: Add support for OS keyrings/-chains by @boyvanamstel in #348
- feat: Support auth with personal access tokens by @marek-veber / @ankitpokhrel in #327
- feat: Allow to set fixVersions on issue creation by @ankitpokhrel in #276
- feat: Allow insecure TLS by @ankitpokhrel in #305
- feat: Add --no-browser option to open cmd by @ankitpokhrel in #308
- feat: Add search option for boards on jira init by @ankitpokhrel in #322
- feat: Add issues unlink command by @sushilkg in #347
- feat: Support refresh for issues list by @GZLiew in #325
- feat: Ability to delete issue by @ankitpokhrel in #336
- feat: Allow to set custom fields on epic create by @ankitpokhrel in #364
- feat: Allow to edit release-info/fixVersions by @ankitpokhrel in #365
- feat: Allow removing labels on edit by @ankitpokhrel in #371
- feat: Support creating issues with custom subtask type by @danobi in #372
- feat: Allow removing component on edit by @ankitpokhrel in #374
- feat: Allow removing fixVersions on edit by @ankitpokhrel in #376
- feat: Support custom fields on issue edit by @ankitpokhrel in #377
- feat: Jira init non-interactive by @ankitpokhrel in #381
- feat: Show subtasks in issue view by @ankitpokhrel in #382
- feat: Allow project filter in raw jql by @ankitpokhrel in #395

- fix: Makefile compatiblity with Make 3.81 by @danmichaelo in #252
- fix: Config generation issue by @ankitpokhrel in #275
- fix(cfg): Strip trailing slash on server name by @ankitpokhrel in #295
- fix: Jira client should respect timeout opt by @ankitpokhrel in #304
- fix: Respect GLAMOUR_STYLE env on issue view by @ankitpokhrel in #317
- fix: Get subtask handle from config by @ankitpokhrel in #296
- fix: Jira wiki parser by @ankitpokhrel in #326
- fix: Display correctly columns in list sprint command help by @adolsalamanca in #320
- fix: Panic on empty sub-list by @ankitpokhrel in #330
- fix: Issue with assigning user by @ankitpokhrel in #321
- fix: OOM bug on issue view by @ankitpokhrel in #350
- fix: Assign parent key as is on edit by @ankitpokhrel in #351
- fix: Add additional check for total boards returned by @ankitpokhrel in #360
- fix: Issue with query param in user assignment by @ankitpokhrel in #380
- fix: Subtask clone by @ankitpokhrel in #383
- fix: editing issue with custom field in non interactive mode by @DrudgeRajen in #391

- dep: Upgrade charmbracelet/glamour to 0.5.0 by @ankitpokhrel in #309
- dep: Upgrade rivo/tview to latest by @ankitpokhrel in #310
- dep: Upgrade outdated packages by @ankitpokhrel in #311
- dep: Upgrade cobra to 1.4.0 by @ankitpokhrel in #373

- Use md ext for tmp file to trigger vim syntax by @ElementalWarrior in #318

Full Changelog: ankitpokhrel/jira-cli@v0.3.0...v1.0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants