Remove all the pre-registered "apps" from Portal

6227
13
09-24-2015 09:19 AM
AndrewEgleton1
New Contributor

Hi,

How can I remove all the "esri_apps" content from my Portal?

There are a large number of pre-registered apps, owned by an account called "esri_apps", that I can find no way of removing from Portal.

When opening the item details as the administrator the usual remove or change owner buttons are not present, and I don't want any of the Portal users to be able to see this content.

Thanks!

13 Replies
BenGrod
Occasional Contributor III

Curious if there is a solution for this issue. We would also like to remove or filter out the Esri content (especially foreign language) that returns in the Portal for ArcGIS search results (v10.3.1).

0 Kudos
RandallWilliams
Esri Regular Contributor

There's an enhancement in the works for this feature.

ENH-000090864 : Cannot remove a pre-existing content from portal for ArcGIS

KirkChesla
New Contributor III

Yes I too would like to install a 'clean' Portal without thousands and thousands of items/content already in my Portal.

I am unsure how much of it really is needed. 

I am developing a process that may work.  Install portal but before you run initial site set up you need to truncate the items and contents files.

...\portal\framework\template

* replaced index.zip with the empty_index.zip

* la_content.zip - emptied the zip

* portal_content.zip - emptied the zip

I ran the site create, no content was in the site but when browsing postgre database with PGadmin found all the tables had records for users/items/content, etc...

** I found data.sql in the templates folder also that inserted all these records.

I truncated the data.sql file as well. 

For the most part the Portal is now empty without all the pre-loaded content. 

AbeCoughlin1
New Contributor III

Kirk, where do you find the pg database to query and what's the login details? Is that also in the code?

I agree that it should be removed. I'm also trying to release a Portal site but the 1500 apps (reducible to ~300 by turning off Living Atlas & External Content) are off-putting as my staff will both be confused by the number of items plus they won't be able to find the key items we're trying to build and share with them and further more, if I want spam and marketing tools I'll look at the rest of the internet - we do not need it in our Portal. I was considering not to share portal but simply build map carousels, maps and apps gallerys or minimal gallerys. A sad workaround.

0 Kudos
AaronDorsey1
New Contributor III

Any update on this?

0 Kudos
AbeCoughlin1
New Contributor III

I just found one sweet and easy method.

If you create a role based on the 'Viewer' role you can uncheck the box for 'View content shared with portal'. This stops them seeing any of the living atlas layers. Unfortunately, items owned by 'esri_apps' still comes through but this at least reduces these bloat items from over 1500 down to less than 50.

I've found that you can change ownership of most of the living atlas and esri owned layers etc and then delete them. I do plan to do this but it takes a while to work through 1600 such items. In the future I will share only what is relevant to the organization or what is already in the organization. Note to those individuals who may think I'm censoring our staff, I will be including numerous links on the home page and encouraging them to explore what ArcGIS has to offer and bring their ideas to me to discuss so we can consider implementing them. I think we all agree, the esri_apps and so much of the living atlas, interesting as it is, is simply SPAM in today's work place.

HelenYang1
New Contributor II

Wonder how can you change the owner for the esri_apps items. I run as the administrotor, when I tried to change the owner for those items, I was told "You do not have permission s to access this resource."

I'm running 10.7.1 portal now.

Can you advise how did you managed  to do it?

Thanks 

Helen

0 Kudos
AnibalMmartinez
Occasional Contributor

Hola, en mi organización tenemos la misma inquietud, estamos con ArcGis y Portal OnPrimise 10.5.0. no hay posibilidad de migración por el momento, agradecería que alguien aporte una alternativa de solución para cumplir con esta necesidad.

0 Kudos
RoberthSanchez
New Contributor III

Hola Anibal, en mi organización tuvimos el mismo problema y logramos solventarlo modificando con JavaScript el DOM de la aplicación y escondiendo los elementos referidos a contenido de ArcGIS Online y ArcGIS Living Atlas, el proceso se constituye por añadir dos scripts al html de los archivos gallery.html y viewer.html en la ruta de instalación de portal en:

\webapps\arcgis#home\gallery.html

\webapps\arcgis#home\webmap\viewer.html

En el archivo gallery.html:

var IndexedSearchForm = false
try {
    var intervalo = setInterval(function () {
        if (document.getElementById("addContentSearchFrom") && !IndexedSearchForm) {

            document.getElementById("addContentSearchFrom").click()
            var secondInterval = setInterval(function () {
                if (document.getElementById("addContentSearchFrom_popup6")) {
                    document.getElementById("addContentSearchFrom_popup6").click()
                    clearInterval(secondInterval)
                }
            }, 5)
            IndexedSearchForm = true
            clearInterval(intervalo)
            document.getElementById("addContentSearchFrom").addEventListener("click", function (e) {
                var contentByIdInterval = setInterval(function () {
                    if (document.getElementById("addContentSearchFrom_popup0")) {
                        if (document.getElementById("addContentSearchFrom_popup0").clientHeight > 0) {

                            document.getElementById("addContentSearchFrom_popup0").remove()
                            document.getElementById("addContentSearchFrom_popup1").remove()
                            document.getElementById("addContentSearchFrom_popup2").remove()
                            document.getElementById("addContentSearchFrom_popup3").remove()
                            document.getElementById("addContentSearchFrom_popup4").remove()
                            clearInterval(contentByIdInterval)
                        }
                    }
                }, 5)
            })
            document.getElementsByClassName("dijitArrowButtonContainer")[0].addEventListener("click", function (e) {

                var contentByClassInterval = setInterval(function () {
                    if (document.getElementById("addContentSearchFrom_popup0")) {
                        if (document.getElementById("addContentSearchFrom_popup0").clientHeight > 0) {

                            document.getElementById("addContentSearchFrom_popup0").remove()
                            document.getElementById("addContentSearchFrom_popup1").remove()
                            document.getElementById("addContentSearchFrom_popup2").remove()
                            document.getElementById("addContentSearchFrom_popup3").remove()
                            document.getElementById("addContentSearchFrom_popup4").remove()
                            clearInterval(contentByClassInterval)
                        }
                    }
                }, 5)
            })
        }
    }, 5)
} catch (error) {
    console.log(error)
}
var webMapRemoveInterval = setTimeout(function () {
    try {
        if (document.getElementById("webmap-add-esri-maplayers")) {
            document.getElementById("webmap-add-esri-maplayers").remove()
            clearInterval(webMapRemoveInterval)
        }
    } catch (error) {
        console.log(error)
    }
}, 2500)

 

En el archivo viewer.html:

try {
        if(!window.location.href.indexOf("favorites") > -1 || !window.location.href.indexOf("organization") > -1){
         window.location.href = window.location.href.split("#")[0] + "#c=organization&o=modified"
        }
         var interval = setInterval(function() {
          if(document.getElementById("organization")){
            if(document.getElementById("organization").clientHeight > 0){
                document.getElementById("esri").style.visibility = 'hidden'
                clearInterval(interval)
            }
          }
        }, 5)
    } catch (error) {
        console.log(error)
    }

Los resultados:

Espero te sea de ayuda.

Saludos.