Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Atlaskit Editor is not opening up on Service Desk Jira DC page.

Norbert Tovt April 19, 2024

Hey, I am facing with the issue where I can use Editor-core on any issue page except a Service Desk issue. It is because _handleMutationEvent, method provided from Jira DC, causes infinite loop. I don't know how to disable this mutation event handler because I don't have access to this code directly. Please, try to help me. Appreciate you! 

WRMCB = function(e) {
var c = console;
if (c && c.log && c.error) {
c.log('Error running batched script.');
c.error(e);
}
}
;
try {
/* module-key = 'com.atlassian.servicedesk.frontend-webpack-plugin:49', location = 'queues-queues-module.fbd94dd8dfdda01f377d.js' */
(window.jsdsjsonp = window.jsdsjsonp || []).push([[49], {
1449: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Project && (ServiceDesk.Internal.Project = {}),
void 0 === ServiceDesk.Internal.Project.Mixin && (ServiceDesk.Internal.Project.Mixin = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules && (ServiceDesk.Internal.Project.Mixin.PageModules = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.Templates && (ServiceDesk.Internal.Project.Mixin.PageModules.Templates = {}),
ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page = function(e, t) {
return '<div class="sd-header-container"></div><section class="sd-page-panel ' + ((e = e || {}).styleClass ? soy.$$escapeHtml(e.styleClass) : "") + '" id="sd-page-panel"><div class="js-page-panel-content sd-page-panel-content">' + (e.body ? soy.$$filterNoAutoescape(e.body) : '<aui-spinner class="sd-loading-panel" size="large"></aui-spinner>') + "</div></section>"
}
,
goog.DEBUG && (ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page.soyTemplateName = "ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page");
ServiceDesk.Internal.Project.Mixin.PageModules.Templates
},
1780: function(e, t, n) {
"use strict";
n.r(t);
var i = n(3)
, r = n(2448)
, a = n(442)
, s = n(5334)
, o = n(21)
, u = n.n(o)
, c = n(9)
, d = n.n(c)
, l = n(17)
, v = n(5333)
, p = n(22)
, f = n.n(p)
, g = (n(4336),
n(4335),
d()() + "/rest/servicedesk/1/servicedesk/" + u.a.get("projectKey") + "/queues/queues-limit")
, h = Object(r.a)({
id: "sd-queues-nav",
navLocation: ["sd-queues-nav", "servicedesk.agent.queues", "servicedesk.agent.queues.ungrouped"],
manageLocation: "com.atlassian.servicedesk.project-ui:sd-queues-custom-actions",
pageDescriptors: a.a.getPages(),
emptyView: new s.a,
title: "Queues",
styleClass: "sd-queues"
});
t.default = h.extend({
enable: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return h.prototype.enable.apply(this, t).done(function() {
Object(l.c)(g).then(function(e) {
Object(v.a)(e.queuesLimit),
f.a.trace("sd.queues.loaded")
})
})
},
update: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return h.prototype.update.apply(this, t).done(function() {
return f.a.trace("sd.queues.loaded")
})
}
})
},
2329: function(e, t, n) {
"use strict";
var i = n(4)
, r = n(5)
, a = null
, s = r.a.Model.extend({
initialize: function() {
this.namedAttributes.items = a
},
namedAttributes: {
key: String,
label: String,
href: String,
styleClass: String,
params: Object,
items: r.a.Collection
},
defaults: {
params: {}
},
idAttribute: "key",
isSelected: function() {
var e = window.location.href;
return -1 !== e.indexOf(this.getHref(), e.length - this.getHref().length)
},
toJSON: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return i.default.extend(r.a.Model.prototype.toJSON.apply(this, t), {
isSelected: this.isSelected()
})
}
});
a = r.a.Collection.extend({
model: s
}),
t.a = a
},
2330: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(2329);
t.a = i.a.Model.extend({
namedAttributes: {
key: String,
label: String,
items: r.a,
params: Object
},
idAttribute: "key"
})
},
2331: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(2330);
t.a = i.a.Collection.extend({
model: r.a
})
},
2332: function(e, t, n) {
"use strict";
n.d(t, "b", function() {
return d
}),
n.d(t, "a", function() {
return l
});
var i = n(9)
, r = n.n(i)
, a = n(2331)
, s = n(521)
, o = n(17)
, u = n(21)
, c = n.n(u)
, d = function(e) {
return a.a.extend({
getUrl: function() {
return r()() + "/rest/servicedesk/1/" + c.a.get("projectKey") + "/webfragments/sections/" + e
},
fetch: function(e) {
var t = this;
return Object(o.e)(this.getUrl(), e).done(function(e) {
return t.set(e)
})
}
})
}
, l = function(e) {
return s.a.extend({
getUrl: function() {
return r()() + "/rest/servicedesk/1/" + c.a.get("projectKey") + "/webfragments/panels/" + e
},
fetch: function(e) {
var t = this;
return Object(o.e)(this.getUrl(), e).done(function(e) {
return t.set(e)
})
}
})
}
},
2445: function(e, t, n) {},
2446: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Project && (ServiceDesk.Internal.Project = {}),
void 0 === ServiceDesk.Internal.Project.Mixin && (ServiceDesk.Internal.Project.Mixin = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules && (ServiceDesk.Internal.Project.Mixin.PageModules = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates = {}),
ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport = function(e, t) {
return '<div class="sd-subnav-unpinned"><span id="' + soy.$$escapeHtml(e.triggerHolderId) + '"></span><div id="' + soy.$$escapeHtml(e.unpinnedHolderId) + '"></div></div>'
}
,
goog.DEBUG && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport.soyTemplateName = "ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport");
ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates
},
2447: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return c
});
var i = n(1451)
, r = n(114)
, a = n(85)
, s = n(25)
, o = n.n(s)
, u = function(e) {
this.navigator = i.a.create({
id: e.id,
title: e.title,
manageText: e.manageText,
manageLocation: e.manageLocation,
pinnedHolderId: e.pinnedHolderId,
unpinnedHolderId: e.unpinnedHolderId,
triggerHolderId: e.triggerHolderId,
isPinned: e.isPinned,
save: this.save.bind(this),
searchHolder: " "
}),
this.navigator.on("navigatorUnPinned", function() {
o.a.trigger("sd.pinnable.nav.unpinned")
}),
this.navigator.on("navigatorPinned", function() {
o.a.trigger("sd.pinnable.nav.pinned")
}),
this.pinnedHolderId = e.pinnedHolderId,
this.triggerHolderId = e.triggerHolderId
};
u.prototype.save = function(e) {
return Object(a.g)(e).then(r.h)
}
,
u.prototype.show = function() {
this.navigator.show()
}
,
u.prototype.hide = function() {
this.navigator.hide()
}
,
u.prototype.update = function(e, t) {
this.navigator.update(e, t)
}
;
var c = function(e) {
return new u(e)
}
},
2448: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return N
});
var i = n(18)
, r = n.n(i)
, a = n(4)
, s = n(2)
, o = n(5)
, u = n(22)
, c = n.n(u)
, d = n(21)
, l = n.n(d)
, v = n(424)
, p = n(2332)
, f = n(85)
, g = n(114)
, h = n(2447)
, m = n(9)
, S = n.n(m)
, I = n(17)
, b = (n(1449),
n(2446),
n(2445),
Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var i in n)
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i])
}
return e
}
)
, y = void 0
, P = void 0
, j = function(e) {
e && "pending" === e.state() && e.abort()
}
, k = "redirect"
, M = "full"
, D = "empty"
, N = function(e) {
Array.isArray(e.navLocation) && (e.navLocation = e.navLocation.join(",")),
e.id || c.a.error("You must specify an id for this sub nav. This is what will be used to persist, pinned/unpinned states"),
e = a.default.defaults(e, {
pinnedHolderId: "sd-page-panel",
triggerHolderId: "js-subnav-trigger-" + e.id,
unpinnedHolderId: "js-subnav-unpinned-" + e.id
});
var t = S()() + "/rest/projects/1.0/subnav/" + e.id;
return o.a.View.extend({
templates: {
page: ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page,
unpinnedSupport: ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport
},
mixins: [v.a],
initialize: function() {
this.emptyView = e.emptyView,
this.navLocation = e.navLocation,
this.pageDescriptors = e.pageDescriptors,
this.showNavCondition = e.showNavCondition || function() {
return !0
}
,
this.styleClass = e.styleClass,
this.webSections = new (Object(p.b)(e.navLocation))
},
enable: function(t, n) {
var i = this;
return this.setElement(n),
this.$el.html(this.templates.page({
styleClass: e.styleClass
})),
s.default.when(this._fetchAndCreateSubNav(), this._fetchSubNavItems()).then(function() {
return i._installMutationObserver(),
i._updateOrEnableNavAndPage(t)
})
},
update: function(e) {
var t = this
, n = r()();
return this._fetchSubNavItems().done(function() {
t._updateOrEnableNavAndPage(e).done(function(e) {
switch (e) {
case k:
t.trigger(k);
break;
case M:
t.trigger(M);
break;
case D:
t.trigger(D)
}
n.resolve()
})
}),
n
},
disable: function() {
this._uninstallMutationObserver(),
this._prevActiveNavItem = this._activeNavItem,
this.disablePage()
},
_getSelection: function(e) {
var t = e.pageDescriptors
, n = e.navItems
, i = e.pageId
, r = e.entityId
, s = a.default.flatten(a.default.pluck(n, "items"))
, o = this._normalizeNavItems(s, e.moduleId)
, u = a.default.find(t, function(e) {
return e.id === i
});
if (!u)
return this._getPreferredSelection(o, t);
if (u.standalone)
return {
panel: u
};
var c = a.default.find(o, function(e) {
if (e.pageId === i)
return e.entityId === r || !e.entityId
});
return c ? {
navItemId: c.id,
panel: u
} : this._getPreferredSelection(o, t)
},
_getPreferredSelection: function(e, t) {
var n = void 0;
return this._activeNavItem && (this._prevActiveNavItem = this._activeNavItem),
this._prevActiveNavItem && (n = a.default.findWhere(e, {
id: this._prevActiveNavItem
})) && !1 !== n.allowAsDefault ? {
redirect: n.link
} : (n = a.default.find(e, function(e) {
return t[e.pageId] && !1 !== e.allowAsDefault
})) ? {
redirect: n.link
} : void 0
},
_normalizeNavItems: function(e, t) {
return a.default.map(e, function(e) {
var n = e.link.split(t + "/")[1]
, i = n ? n.split("/") : [];
return e.pageId = i[0],
e.entityId = i[1],
e
})
},
_fetchAndCreateSubNav: function() {
var n = this;
return j(y),
(y = Object(I.c)(t)).done(function(t) {
var i = !1 !== t.pinned;
null !== e.isPinnedOverride && void 0 !== e.isPinnedOverride && (i = e.isPinnedOverride),
n.nav = Object(h.a)(b({}, e, {
isPinned: i
}))
})
},
_fetchSubNavItems: function() {
return j(P),
P = this.webSections.fetch({
projectKey: l.a.get("projectKey")
})
},
_refreshNav: function() {
var e = this;
return this._fetchSubNavItems().done(function() {
var t = Object(f.c)(e.navLocation, e.webSections.toJSON(), e._currentNavState.state);
e.nav.update(t, e._currentNavState.selectedNavItemId)
})
},
_getApi: function() {
var e = this;
return {
on: function() {
return e.on.apply(e, arguments)
},
off: function() {
return e.off.apply(e, arguments)
},
refreshNav: this._refreshNav.bind(this),
$settingHeaderEl: this.getSettingHeaderEl(),
subNav: this.nav
}
},
_updateOrEnableNavAndPage: function(t) {
var n = this
, i = r()()
, a = Object(f.c)(this.navLocation, this.webSections.toJSON(), t)
, o = this._getSelection({
pageDescriptors: this.pageDescriptors,
navItems: a,
moduleId: t.module,
pageId: t.item,
entityId: t.secondaryItem
});
if (o && o.redirect)
return Object(g.e)(o.redirect, {
replace: !0
}),
i.resolve(k);
var u = this.showNavCondition(this.webSections, t);
if (u) {
var c = o && o.navItemId;
this._currentNavState = {
state: t,
selectedNavItemId: c
},
this.nav.update(a, c),
i.done(function() {
n._prevActiveNavItem = n._activeNavItem,
n._activeNavItem = c;
var e = Object(s.default)("h2[is='unpinned-subnav']");
e.length && !e.find(".sd-subnav-unpinned").length && n._renderUnpinnedSupport(e),
Object(s.default)("#pinnednav-opts-" + n.nav.navigator.options.id).length || n.nav.show()
})
}
return o && o.panel ? this.updateOrEnablePage(o.panel, t, this.getPanelEl(), this._getApi()).done(function() {
i.resolve(M)
}) : this.emptyView && (this.$el.html(this.templates.page({
styleClass: e.styleClass
})),
this.emptyView.setElement(this.getPanelEl()).render(),
delete this.enabledPage,
i.resolve(D)),
i.done(function() {
u || n.nav.hide(),
n.cachedSubNavState = t
})
},
getPanelEl: function() {
return this.$(".js-page-panel-content")
},
getSettingHeaderEl: function() {
return this.$(".sd-header-container")
},
_renderUnpinnedSupport: function(t) {
var n = this.templates.unpinnedSupport({
triggerHolderId: e.triggerHolderId,
unpinnedHolderId: e.unpinnedHolderId
});
t.append(n),
Object(s.default)("#pinnednav-opts-" + this.nav.navigator.options.id).length || this.nav.show()
},
_installMutationObserver: function() {
if (window.MutationObserver) {
var e = this.getPanelEl()[0];
e && (this.mutationObserver = new MutationObserver(this._handleMutationEvent.bind(this)),
this.mutationObserver.observe(e, {
childList: !0,
subtree: !0
}))
} else
c.a.warn("MutationObserver is not defined. Autodiscovery of the unpinned nav may not work as expected")
},
_handleMutationEvent: function(e) {
a.default.find(e, function(e) {
return a.default.find(e.addedNodes, function(e) {
var t = Object(s.default)(e).find("h2[is='unpinned-subnav']");
if (t.length && !t.find(".sd-subnav-unpinned").length)
return this._renderUnpinnedSupport(t),
!0
}, this)
}, this)
},
_uninstallMutationObserver: function() {
this.mutationObserver && this.mutationObserver.disconnect()
}
})
}
},
320: function(e, t, n) {
"use strict";
n.r(t),
n.d(t, "projectUrl", function() {
return v
}),
n.d(t, "projectSettingsUrl", function() {
return p
}),
n.d(t, "requestTypesUrl", function() {
return f
}),
n.d(t, "requestSecurityUrl", function() {
return g
}),
n.d(t, "createSlaUrl", function() {
return h
}),
n.d(t, "importSlaUrl", function() {
return m
}),
n.d(t, "customSlaUrl", function() {
return S
}),
n.d(t, "editSlaUrl", function() {
return I
}),
n.d(t, "calendarsListUrl", function() {
return b
}),
n.d(t, "editCalendarUrl", function() {
return y
}),
n.d(t, "customersUrl", function() {
return P
}),
n.d(t, "organisationUrl", function() {
return j
}),
n.d(t, "queuesFragment", function() {
return k
}),
n.d(t, "reportsFragment", function() {
return M
}),
n.d(t, "issueFragment", function() {
return D
}),
n.d(t, "metricsFragment", function() {
return N
}),
n.d(t, "customerNotificationsFragment", function() {
return O
});
var i = n(4)
, r = n(9)
, a = n.n(r)
, s = {
BASE: "queues",
CUSTOM: "custom"
}
, o = {
BASE: "reports",
CUSTOM: "custom",
TIMESCALE: "timescale"
}
, u = {
BASE: "issue"
}
, c = {
BASE: "settings",
SLA: "sla",
CUSTOMER_NOTIFICATIONS: "customer-notifications",
RULE: "rule"
};
function d(e) {
return [a()(), "projects", e].join("/")
}
function l(e) {
return i.default.compact(e).join("/")
}
var v = function(e, t) {
var n = d(e);
return encodeURI(t ? n + t : n)
}
, p = function(e, t) {
var n = function(e) {
return [a()(), "servicedesk/admin", e].join("/")
}(e);
return encodeURI(t ? n + "/" + t : n)
}
, f = function(e, t) {
return p(e, t ? "request-types/request-type/" + t : "request-types")
}
, g = function(e) {
return p(e, "request-security")
}
, h = function(e) {
var t = p(e, "sla");
return encodeURI(t + "/custom/new")
}
, m = function(e) {
var t = p(e, "sla");
return encodeURI(t + "/import")
}
, S = function(e, t) {
var n = p(e, "sla");
return encodeURI(t ? n + "/custom/" + t : n)
}
, I = function(e, t) {
var n = p(e, "sla");
return encodeURI(t ? n + "/custom/" + t + "/edit" : n)
}
, b = function(e) {
return encodeURI(p(e, "calendars") + "/list")
}
, y = function(e, t) {
var n = p(e, "calendars");
return encodeURI(t ? n + "/calendar/" + t + "/edit" : n)
}
, P = function(e) {
return v(e, "/customers")
}
, j = function(e, t) {
var n = d(e);
return encodeURI(t ? n + "/organization/" + t : n)
}
, k = function(e, t) {
var n = [s.BASE];
return e && n.push(s.CUSTOM, e),
t && n.push(t),
l(n)
}
, M = function(e, t, n) {
var i = [o.BASE];
return e && i.push(o.CUSTOM, e),
t && i.push(o.TIMESCALE, t),
n && i.push(n),
l(i)
}
, D = function(e) {
return l([u.BASE, e])
}
, N = function(e) {
return l([c.BASE, c.SLA, e])
}
, O = function(e, t) {
var n = p(e, "customer-notifications/rule");
return encodeURI(t ? n + "/" + t : n)
}
},
4335: function(e, t, n) {},
4336: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Pages && (ServiceDesk.Internal.Pages = {}),
void 0 === ServiceDesk.Internal.Pages.Queues && (ServiceDesk.Internal.Pages.Queues = {}),
void 0 === ServiceDesk.Internal.Pages.Queues.Templates && (ServiceDesk.Internal.Pages.Queues.Templates = {}),
ServiceDesk.Internal.Pages.Queues.Templates.noQueue = function(e, t) {
return '<div class="sd-queues-none"><p>' + soy.$$escapeHtml("You have no queues") + "</p><p>" + soy.$$filterNoAutoescape(AJS.format("You may want to \u003ca href=\"{0}\"\u003ecreate a queue\u003c/a\u003e", n(320).projectUrl(e.projectKey, "/queues/custom/new"))) + "</p></div>"
}
,
goog.DEBUG && (ServiceDesk.Internal.Pages.Queues.Templates.noQueue.soyTemplateName = "ServiceDesk.Internal.Pages.Queues.Templates.noQueue");
ServiceDesk.Internal.Pages.Queues.Templates
},
521: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(820);
t.a = i.a.Collection.extend({
model: r.a
})
},
5333: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return u
});
var i = n(3)
, r = n(2)
, a = n(4)
, s = n(28)
, o = void 0;
var u = a.default.once(function(e) {
o = e,
Object(s.a)("sd-add-queue", {
type: s.a.types.CLASS,
created: function(e) {
var t, n = Object(r.default)(e);
(function(e) {
var t = e.closest(".aui-navgroup-inner").find('.aui-nav[data-id="com.atlassian.servicedesk.project-ui:sd-queues-custom"]');
return void 0 === o || t.children().length < o
}
)(n) || ((t = n).removeAttr("href"),
t.attr("aria-disabled", "true"),
t.attr("title", i.format("You\'\'ve been busy! Your project has reached the limit of {0} queues. You\'\'ll need to delete a queue before you can create a new one.", o)))
}
})
})
},
5334: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(21)
, a = n.n(r);
n(4336),
n(4335);
t.a = i.a.View.extend({
template: ServiceDesk.Internal.Pages.Queues.Templates.noQueue,
render: function() {
this.$el.html(this.template({
projectKey: a.a.get("projectKey")
}))
}
})
},
820: function(e, t, n) {
"use strict";
var i = n(5);
t.a = i.a.Model.extend({
namedAttributes: {
key: String,
params: Object,
name: String,
html: String
},
defaults: {
params: {}
},
idAttribute: "key"
})
}
}]);
} catch (e) {
WRMCB(e)
}
;WRMCB = function(e) {
var c = console;
if (c && c.log && c.error) {
c.log('Error running batched script.');
c.error(e);
}
}
;
try {
/* module-key = 'com.atlassian.servicedesk.frontend-webpack-plugin:49', location = 'queues-queues-module.fbd94dd8dfdda01f377d.js' */
(window.jsdsjsonp = window.jsdsjsonp || []).push([[49], {
1449: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Project && (ServiceDesk.Internal.Project = {}),
void 0 === ServiceDesk.Internal.Project.Mixin && (ServiceDesk.Internal.Project.Mixin = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules && (ServiceDesk.Internal.Project.Mixin.PageModules = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.Templates && (ServiceDesk.Internal.Project.Mixin.PageModules.Templates = {}),
ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page = function(e, t) {
return '<div class="sd-header-container"></div><section class="sd-page-panel ' + ((e = e || {}).styleClass ? soy.$$escapeHtml(e.styleClass) : "") + '" id="sd-page-panel"><div class="js-page-panel-content sd-page-panel-content">' + (e.body ? soy.$$filterNoAutoescape(e.body) : '<aui-spinner class="sd-loading-panel" size="large"></aui-spinner>') + "</div></section>"
}
,
goog.DEBUG && (ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page.soyTemplateName = "ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page");
ServiceDesk.Internal.Project.Mixin.PageModules.Templates
},
1780: function(e, t, n) {
"use strict";
n.r(t);
var i = n(3)
, r = n(2448)
, a = n(442)
, s = n(5334)
, o = n(21)
, u = n.n(o)
, c = n(9)
, d = n.n(c)
, l = n(17)
, v = n(5333)
, p = n(22)
, f = n.n(p)
, g = (n(4336),
n(4335),
d()() + "/rest/servicedesk/1/servicedesk/" + u.a.get("projectKey") + "/queues/queues-limit")
, h = Object(r.a)({
id: "sd-queues-nav",
navLocation: ["sd-queues-nav", "servicedesk.agent.queues", "servicedesk.agent.queues.ungrouped"],
manageLocation: "com.atlassian.servicedesk.project-ui:sd-queues-custom-actions",
pageDescriptors: a.a.getPages(),
emptyView: new s.a,
title: "Queues",
styleClass: "sd-queues"
});
t.default = h.extend({
enable: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return h.prototype.enable.apply(this, t).done(function() {
Object(l.c)(g).then(function(e) {
Object(v.a)(e.queuesLimit),
f.a.trace("sd.queues.loaded")
})
})
},
update: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return h.prototype.update.apply(this, t).done(function() {
return f.a.trace("sd.queues.loaded")
})
}
})
},
2329: function(e, t, n) {
"use strict";
var i = n(4)
, r = n(5)
, a = null
, s = r.a.Model.extend({
initialize: function() {
this.namedAttributes.items = a
},
namedAttributes: {
key: String,
label: String,
href: String,
styleClass: String,
params: Object,
items: r.a.Collection
},
defaults: {
params: {}
},
idAttribute: "key",
isSelected: function() {
var e = window.location.href;
return -1 !== e.indexOf(this.getHref(), e.length - this.getHref().length)
},
toJSON: function() {
for (var e = arguments.length, t = Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return i.default.extend(r.a.Model.prototype.toJSON.apply(this, t), {
isSelected: this.isSelected()
})
}
});
a = r.a.Collection.extend({
model: s
}),
t.a = a
},
2330: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(2329);
t.a = i.a.Model.extend({
namedAttributes: {
key: String,
label: String,
items: r.a,
params: Object
},
idAttribute: "key"
})
},
2331: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(2330);
t.a = i.a.Collection.extend({
model: r.a
})
},
2332: function(e, t, n) {
"use strict";
n.d(t, "b", function() {
return d
}),
n.d(t, "a", function() {
return l
});
var i = n(9)
, r = n.n(i)
, a = n(2331)
, s = n(521)
, o = n(17)
, u = n(21)
, c = n.n(u)
, d = function(e) {
return a.a.extend({
getUrl: function() {
return r()() + "/rest/servicedesk/1/" + c.a.get("projectKey") + "/webfragments/sections/" + e
},
fetch: function(e) {
var t = this;
return Object(o.e)(this.getUrl(), e).done(function(e) {
return t.set(e)
})
}
})
}
, l = function(e) {
return s.a.extend({
getUrl: function() {
return r()() + "/rest/servicedesk/1/" + c.a.get("projectKey") + "/webfragments/panels/" + e
},
fetch: function(e) {
var t = this;
return Object(o.e)(this.getUrl(), e).done(function(e) {
return t.set(e)
})
}
})
}
},
2445: function(e, t, n) {},
2446: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Project && (ServiceDesk.Internal.Project = {}),
void 0 === ServiceDesk.Internal.Project.Mixin && (ServiceDesk.Internal.Project.Mixin = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules && (ServiceDesk.Internal.Project.Mixin.PageModules = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav = {}),
void 0 === ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates = {}),
ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport = function(e, t) {
return '<div class="sd-subnav-unpinned"><span id="' + soy.$$escapeHtml(e.triggerHolderId) + '"></span><div id="' + soy.$$escapeHtml(e.unpinnedHolderId) + '"></div></div>'
}
,
goog.DEBUG && (ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport.soyTemplateName = "ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport");
ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates
},
2447: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return c
});
var i = n(1451)
, r = n(114)
, a = n(85)
, s = n(25)
, o = n.n(s)
, u = function(e) {
this.navigator = i.a.create({
id: e.id,
title: e.title,
manageText: e.manageText,
manageLocation: e.manageLocation,
pinnedHolderId: e.pinnedHolderId,
unpinnedHolderId: e.unpinnedHolderId,
triggerHolderId: e.triggerHolderId,
isPinned: e.isPinned,
save: this.save.bind(this),
searchHolder: " "
}),
this.navigator.on("navigatorUnPinned", function() {
o.a.trigger("sd.pinnable.nav.unpinned")
}),
this.navigator.on("navigatorPinned", function() {
o.a.trigger("sd.pinnable.nav.pinned")
}),
this.pinnedHolderId = e.pinnedHolderId,
this.triggerHolderId = e.triggerHolderId
};
u.prototype.save = function(e) {
return Object(a.g)(e).then(r.h)
}
,
u.prototype.show = function() {
this.navigator.show()
}
,
u.prototype.hide = function() {
this.navigator.hide()
}
,
u.prototype.update = function(e, t) {
this.navigator.update(e, t)
}
;
var c = function(e) {
return new u(e)
}
},
2448: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return N
});
var i = n(18)
, r = n.n(i)
, a = n(4)
, s = n(2)
, o = n(5)
, u = n(22)
, c = n.n(u)
, d = n(21)
, l = n.n(d)
, v = n(424)
, p = n(2332)
, f = n(85)
, g = n(114)
, h = n(2447)
, m = n(9)
, S = n.n(m)
, I = n(17)
, b = (n(1449),
n(2446),
n(2445),
Object.assign || function(e) {
for (var t = 1; t < arguments.length; t++) {
var n = arguments[t];
for (var i in n)
Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i])
}
return e
}
)
, y = void 0
, P = void 0
, j = function(e) {
e && "pending" === e.state() && e.abort()
}
, k = "redirect"
, M = "full"
, D = "empty"
, N = function(e) {
Array.isArray(e.navLocation) && (e.navLocation = e.navLocation.join(",")),
e.id || c.a.error("You must specify an id for this sub nav. This is what will be used to persist, pinned/unpinned states"),
e = a.default.defaults(e, {
pinnedHolderId: "sd-page-panel",
triggerHolderId: "js-subnav-trigger-" + e.id,
unpinnedHolderId: "js-subnav-unpinned-" + e.id
});
var t = S()() + "/rest/projects/1.0/subnav/" + e.id;
return o.a.View.extend({
templates: {
page: ServiceDesk.Internal.Project.Mixin.PageModules.Templates.page,
unpinnedSupport: ServiceDesk.Internal.Project.Mixin.PageModules.WithSubNav.Templates.unpinnedSupport
},
mixins: [v.a],
initialize: function() {
this.emptyView = e.emptyView,
this.navLocation = e.navLocation,
this.pageDescriptors = e.pageDescriptors,
this.showNavCondition = e.showNavCondition || function() {
return !0
}
,
this.styleClass = e.styleClass,
this.webSections = new (Object(p.b)(e.navLocation))
},
enable: function(t, n) {
var i = this;
return this.setElement(n),
this.$el.html(this.templates.page({
styleClass: e.styleClass
})),
s.default.when(this._fetchAndCreateSubNav(), this._fetchSubNavItems()).then(function() {
return i._installMutationObserver(),
i._updateOrEnableNavAndPage(t)
})
},
update: function(e) {
var t = this
, n = r()();
return this._fetchSubNavItems().done(function() {
t._updateOrEnableNavAndPage(e).done(function(e) {
switch (e) {
case k:
t.trigger(k);
break;
case M:
t.trigger(M);
break;
case D:
t.trigger(D)
}
n.resolve()
})
}),
n
},
disable: function() {
this._uninstallMutationObserver(),
this._prevActiveNavItem = this._activeNavItem,
this.disablePage()
},
_getSelection: function(e) {
var t = e.pageDescriptors
, n = e.navItems
, i = e.pageId
, r = e.entityId
, s = a.default.flatten(a.default.pluck(n, "items"))
, o = this._normalizeNavItems(s, e.moduleId)
, u = a.default.find(t, function(e) {
return e.id === i
});
if (!u)
return this._getPreferredSelection(o, t);
if (u.standalone)
return {
panel: u
};
var c = a.default.find(o, function(e) {
if (e.pageId === i)
return e.entityId === r || !e.entityId
});
return c ? {
navItemId: c.id,
panel: u
} : this._getPreferredSelection(o, t)
},
_getPreferredSelection: function(e, t) {
var n = void 0;
return this._activeNavItem && (this._prevActiveNavItem = this._activeNavItem),
this._prevActiveNavItem && (n = a.default.findWhere(e, {
id: this._prevActiveNavItem
})) && !1 !== n.allowAsDefault ? {
redirect: n.link
} : (n = a.default.find(e, function(e) {
return t[e.pageId] && !1 !== e.allowAsDefault
})) ? {
redirect: n.link
} : void 0
},
_normalizeNavItems: function(e, t) {
return a.default.map(e, function(e) {
var n = e.link.split(t + "/")[1]
, i = n ? n.split("/") : [];
return e.pageId = i[0],
e.entityId = i[1],
e
})
},
_fetchAndCreateSubNav: function() {
var n = this;
return j(y),
(y = Object(I.c)(t)).done(function(t) {
var i = !1 !== t.pinned;
null !== e.isPinnedOverride && void 0 !== e.isPinnedOverride && (i = e.isPinnedOverride),
n.nav = Object(h.a)(b({}, e, {
isPinned: i
}))
})
},
_fetchSubNavItems: function() {
return j(P),
P = this.webSections.fetch({
projectKey: l.a.get("projectKey")
})
},
_refreshNav: function() {
var e = this;
return this._fetchSubNavItems().done(function() {
var t = Object(f.c)(e.navLocation, e.webSections.toJSON(), e._currentNavState.state);
e.nav.update(t, e._currentNavState.selectedNavItemId)
})
},
_getApi: function() {
var e = this;
return {
on: function() {
return e.on.apply(e, arguments)
},
off: function() {
return e.off.apply(e, arguments)
},
refreshNav: this._refreshNav.bind(this),
$settingHeaderEl: this.getSettingHeaderEl(),
subNav: this.nav
}
},
_updateOrEnableNavAndPage: function(t) {
var n = this
, i = r()()
, a = Object(f.c)(this.navLocation, this.webSections.toJSON(), t)
, o = this._getSelection({
pageDescriptors: this.pageDescriptors,
navItems: a,
moduleId: t.module,
pageId: t.item,
entityId: t.secondaryItem
});
if (o && o.redirect)
return Object(g.e)(o.redirect, {
replace: !0
}),
i.resolve(k);
var u = this.showNavCondition(this.webSections, t);
if (u) {
var c = o && o.navItemId;
this._currentNavState = {
state: t,
selectedNavItemId: c
},
this.nav.update(a, c),
i.done(function() {
n._prevActiveNavItem = n._activeNavItem,
n._activeNavItem = c;
var e = Object(s.default)("h2[is='unpinned-subnav']");
e.length && !e.find(".sd-subnav-unpinned").length && n._renderUnpinnedSupport(e),
Object(s.default)("#pinnednav-opts-" + n.nav.navigator.options.id).length || n.nav.show()
})
}
return o && o.panel ? this.updateOrEnablePage(o.panel, t, this.getPanelEl(), this._getApi()).done(function() {
i.resolve(M)
}) : this.emptyView && (this.$el.html(this.templates.page({
styleClass: e.styleClass
})),
this.emptyView.setElement(this.getPanelEl()).render(),
delete this.enabledPage,
i.resolve(D)),
i.done(function() {
u || n.nav.hide(),
n.cachedSubNavState = t
})
},
getPanelEl: function() {
return this.$(".js-page-panel-content")
},
getSettingHeaderEl: function() {
return this.$(".sd-header-container")
},
_renderUnpinnedSupport: function(t) {
var n = this.templates.unpinnedSupport({
triggerHolderId: e.triggerHolderId,
unpinnedHolderId: e.unpinnedHolderId
});
t.append(n),
Object(s.default)("#pinnednav-opts-" + this.nav.navigator.options.id).length || this.nav.show()
},
_installMutationObserver: function() {
if (window.MutationObserver) {
var e = this.getPanelEl()[0];
e && (this.mutationObserver = new MutationObserver(this._handleMutationEvent.bind(this)),
this.mutationObserver.observe(e, {
childList: !0,
subtree: !0
}))
} else
c.a.warn("MutationObserver is not defined. Autodiscovery of the unpinned nav may not work as expected")
},
_handleMutationEvent: function(e) {
a.default.find(e, function(e) {
return a.default.find(e.addedNodes, function(e) {
var t = Object(s.default)(e).find("h2[is='unpinned-subnav']");
if (t.length && !t.find(".sd-subnav-unpinned").length)
return this._renderUnpinnedSupport(t),
!0
}, this)
}, this)
},
_uninstallMutationObserver: function() {
this.mutationObserver && this.mutationObserver.disconnect()
}
})
}
},
320: function(e, t, n) {
"use strict";
n.r(t),
n.d(t, "projectUrl", function() {
return v
}),
n.d(t, "projectSettingsUrl", function() {
return p
}),
n.d(t, "requestTypesUrl", function() {
return f
}),
n.d(t, "requestSecurityUrl", function() {
return g
}),
n.d(t, "createSlaUrl", function() {
return h
}),
n.d(t, "importSlaUrl", function() {
return m
}),
n.d(t, "customSlaUrl", function() {
return S
}),
n.d(t, "editSlaUrl", function() {
return I
}),
n.d(t, "calendarsListUrl", function() {
return b
}),
n.d(t, "editCalendarUrl", function() {
return y
}),
n.d(t, "customersUrl", function() {
return P
}),
n.d(t, "organisationUrl", function() {
return j
}),
n.d(t, "queuesFragment", function() {
return k
}),
n.d(t, "reportsFragment", function() {
return M
}),
n.d(t, "issueFragment", function() {
return D
}),
n.d(t, "metricsFragment", function() {
return N
}),
n.d(t, "customerNotificationsFragment", function() {
return O
});
var i = n(4)
, r = n(9)
, a = n.n(r)
, s = {
BASE: "queues",
CUSTOM: "custom"
}
, o = {
BASE: "reports",
CUSTOM: "custom",
TIMESCALE: "timescale"
}
, u = {
BASE: "issue"
}
, c = {
BASE: "settings",
SLA: "sla",
CUSTOMER_NOTIFICATIONS: "customer-notifications",
RULE: "rule"
};
function d(e) {
return [a()(), "projects", e].join("/")
}
function l(e) {
return i.default.compact(e).join("/")
}
var v = function(e, t) {
var n = d(e);
return encodeURI(t ? n + t : n)
}
, p = function(e, t) {
var n = function(e) {
return [a()(), "servicedesk/admin", e].join("/")
}(e);
return encodeURI(t ? n + "/" + t : n)
}
, f = function(e, t) {
return p(e, t ? "request-types/request-type/" + t : "request-types")
}
, g = function(e) {
return p(e, "request-security")
}
, h = function(e) {
var t = p(e, "sla");
return encodeURI(t + "/custom/new")
}
, m = function(e) {
var t = p(e, "sla");
return encodeURI(t + "/import")
}
, S = function(e, t) {
var n = p(e, "sla");
return encodeURI(t ? n + "/custom/" + t : n)
}
, I = function(e, t) {
var n = p(e, "sla");
return encodeURI(t ? n + "/custom/" + t + "/edit" : n)
}
, b = function(e) {
return encodeURI(p(e, "calendars") + "/list")
}
, y = function(e, t) {
var n = p(e, "calendars");
return encodeURI(t ? n + "/calendar/" + t + "/edit" : n)
}
, P = function(e) {
return v(e, "/customers")
}
, j = function(e, t) {
var n = d(e);
return encodeURI(t ? n + "/organization/" + t : n)
}
, k = function(e, t) {
var n = [s.BASE];
return e && n.push(s.CUSTOM, e),
t && n.push(t),
l(n)
}
, M = function(e, t, n) {
var i = [o.BASE];
return e && i.push(o.CUSTOM, e),
t && i.push(o.TIMESCALE, t),
n && i.push(n),
l(i)
}
, D = function(e) {
return l([u.BASE, e])
}
, N = function(e) {
return l([c.BASE, c.SLA, e])
}
, O = function(e, t) {
var n = p(e, "customer-notifications/rule");
return encodeURI(t ? n + "/" + t : n)
}
},
4335: function(e, t, n) {},
4336: function(e, t, n) {
"use strict";
"undefined" == typeof ServiceDesk && (window.ServiceDesk = {}),
void 0 === ServiceDesk.Internal && (ServiceDesk.Internal = {}),
void 0 === ServiceDesk.Internal.Pages && (ServiceDesk.Internal.Pages = {}),
void 0 === ServiceDesk.Internal.Pages.Queues && (ServiceDesk.Internal.Pages.Queues = {}),
void 0 === ServiceDesk.Internal.Pages.Queues.Templates && (ServiceDesk.Internal.Pages.Queues.Templates = {}),
ServiceDesk.Internal.Pages.Queues.Templates.noQueue = function(e, t) {
return '<div class="sd-queues-none"><p>' + soy.$$escapeHtml("You have no queues") + "</p><p>" + soy.$$filterNoAutoescape(AJS.format("You may want to \u003ca href=\"{0}\"\u003ecreate a queue\u003c/a\u003e", n(320).projectUrl(e.projectKey, "/queues/custom/new"))) + "</p></div>"
}
,
goog.DEBUG && (ServiceDesk.Internal.Pages.Queues.Templates.noQueue.soyTemplateName = "ServiceDesk.Internal.Pages.Queues.Templates.noQueue");
ServiceDesk.Internal.Pages.Queues.Templates
},
521: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(820);
t.a = i.a.Collection.extend({
model: r.a
})
},
5333: function(e, t, n) {
"use strict";
n.d(t, "a", function() {
return u
});
var i = n(3)
, r = n(2)
, a = n(4)
, s = n(28)
, o = void 0;
var u = a.default.once(function(e) {
o = e,
Object(s.a)("sd-add-queue", {
type: s.a.types.CLASS,
created: function(e) {
var t, n = Object(r.default)(e);
(function(e) {
var t = e.closest(".aui-navgroup-inner").find('.aui-nav[data-id="com.atlassian.servicedesk.project-ui:sd-queues-custom"]');
return void 0 === o || t.children().length < o
}
)(n) || ((t = n).removeAttr("href"),
t.attr("aria-disabled", "true"),
t.attr("title", i.format("You\'\'ve been busy! Your project has reached the limit of {0} queues. You\'\'ll need to delete a queue before you can create a new one.", o)))
}
})
})
},
5334: function(e, t, n) {
"use strict";
var i = n(5)
, r = n(21)
, a = n.n(r);
n(4336),
n(4335);
t.a = i.a.View.extend({
template: ServiceDesk.Internal.Pages.Queues.Templates.noQueue,
render: function() {
this.$el.html(this.template({
projectKey: a.a.get("projectKey")
}))
}
})
},
820: function(e, t, n) {
"use strict";
var i = n(5);
t.a = i.a.Model.extend({
namedAttributes: {
key: String,
params: Object,
name: String,
html: String
},
defaults: {
params: {}
},
idAttribute: "key"
})
}
}]);
} catch (e) {
WRMCB(e)
}
;

a  

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.0.0
TAGS
AUG Leaders

Atlassian Community Events