in app/prism/PrismLogic.scala [153:165]
def doesInstanceBelongToSSA(instance: Instance, ssaa: SSAA): Boolean =
ssaa.stack == instance.stack &&
ssaa.stage.fold(true)(s => instance.stage.contains(s)) &&
ssaa.app.fold(true)(instance.app.contains(_))
/** Sort Launch Configurations by accountName (ie. the owner of the stack) and
* by Launch Configuration name, in ascending order
*/
def sortLCsByOwner(
configs: List[LaunchConfiguration]
): List[LaunchConfiguration] = {
configs.sortBy(lc => (lc.meta.origin.accountName.getOrElse(""), lc.name))
}