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
implementation of deleting from settings using modal #4438
Conversation
@@ -73,6 +73,17 @@ angular.module('openshiftConsole') | |||
DataService.list("projects", $scope, function(projects) { | |||
$scope.projects = projects.by("metadata.name"); | |||
$scope.showGetStarted = hashSizeFilter($scope.projects) === 0; | |||
|
|||
// if projectToDelete is in URL and if project exists to be deleted | |||
if ($location.search()['projectToDelete']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of passing this as a URL parameter, I'd prefer this was just done in memory, could have a flash messages service or something
@gruiz17 our QE team opened a bug for the error message that appears when a viewer tries to delete a project and doesn't have permissions, currently it dumps a raw API blob, should probably be pulling the error message out when we have one, see https://bugzilla.redhat.com/show_bug.cgi?id=1258720 |
25d4416
to
9d07576
Compare
@jwforres in my latest commit, i've also switched to using a service instead of url params when redirecting from settings to home 😄 |
.service("AlertMessageService", function(){ | ||
var alerts = []; | ||
return { | ||
addAlert: function(alert) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
need a way to clear the alerts or once you have added an alert to this its going to show up every time you navigate to the project list
attach screenshots to the PR for what it looks like now |
80a5b35
to
4c3d023
Compare
@jwforres i've made all the fixes based on your feedback. here is a gif! |
remove delete project modal html several changes * don't show alert for just any project in the query string * UI fixes on modal * rename functions for clarity go bin Additions to delete project functionality. CSS and markup - custom delete-modal style - use trashcan icon instead of delete button to be consistent with delete action from project list view - minor positioning tweaks and removal of inline styles where not needed. TODO: - use delete modal when deleting from project list view changes to projects and settings: * add modal controller * put modal in separate html file * refactor projects page to use modal * remove delete/cancel buttons from projects page * make error messages friendly on UI instead of showing the entire API output remove mistakenly added files add alert service instead of using url params remove unnecessary comment minor changes: * redo comments * remove copied over projectDelete stuff * add clearing alerts to alertmessageservice * abstract loadprojects scope fix for showing project name scope fix on projects to make project name show up in project view
[merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/4738/) (Image: devenv-fedora_2275) |
Evaluated for origin merge up to 3a55535 |
[Test]ing while waiting on the merge queue |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/4738/) |
Evaluated for origin test up to 3a55535 |
remove delete project modal html
several changes
go bin