Images

  1. 2 years ago

    Hello. When I create a new image, it lists it at the bottom of the images list instead of in alphabetical order. Is there a way to default it to alphabetical order instead of having to manually sort it? If I sort it once and change to another area, it goes back to being listed with the newest images on the bottom.

    Also, is there a simpler way to change the default profile for all images? If I wanted to change the Kernel for all of the images, I have to drill down into each image and change the PXE Boot Options. It would be nice to go to a Profile section and change it once and have it be applied to all images that have that profile assigned to it. Maybe have it listed under the Global or Admin sections.

    Thanks!!

    I guess we can call the first problem a WebUI bug. You can fix it by doing this if you want. Otherwise it'll be in the next release.

    Edit clonedeploy web directory\views\images\search.aspx.cs

    Change

    gvImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id, txtSearch.Text);

    To

    gvImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id, txtSearch.Text).OrderBy(x => x.Name).ToList();

    There is no simpler way to change the image profiles. I'll add something in the next release to address this.

  2. clonedeploy

    26 May 2016 Administrator Answer

    I guess we can call the first problem a WebUI bug. You can fix it by doing this if you want. Otherwise it'll be in the next release.

    Edit clonedeploy web directory\views\images\search.aspx.cs

    Change

    gvImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id, txtSearch.Text);

    To

    gvImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id, txtSearch.Text).OrderBy(x => x.Name).ToList();

    There is no simpler way to change the image profiles. I'll add something in the next release to address this.

  3. Great! I got the display order changed and I'll wait for the next release on the profile question. Thanks for all of the great work!

  4. Hello. I just discovered that when you go to a computer and manually select an image, the default order is like it was in the Images section. Can this be changed to alphabetical order as well? I don't know if it's a quick fix like the one you already had me do or if it's a bit more involved. Thanks!

  5. last year

    @T3chGuy007:
    If you are still on 1.0.0 (in 1.1.0 it seems to be already sorted, I am wating for the upgrade package):

    File: C:\Program Files (x86)\clonedeploy\web\App_Code\BasePages\PageBaseMaster.cs
            protected void PopulateImagesDdl(DropDownList ddlImages)
            {
                //ddlImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id).Select(i => new { i.Id, i.Name });
                ddlImages.DataSource = BLL.Image.SearchImagesForUser(CloneDeployCurrentUser.Id).Select(i => new { i.Id, i.Name }).OrderBy(x => x.Name).ToList();
  6. @deployer:

    Thank you for supplying a fix for the sort order! I changed that line in my PageBaseMaster.cs file and it fixed the issue. I am running 1.0.1p3 and am waiting for an update package as well to 1.1.0. Thanks again!

  7. That was quick ^^ Good to hear it was helping you.

  8. Yeah, just sitting here working and saw your reply so thought I would try it. Worked like a charm! Thanks to you and @clonedeploy for fixing both issues!

 

or Sign Up to reply!