http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/models/timeline.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/models/timeline.js b/tez-ui2/src/main/webapp/app/models/timeline.js deleted file mode 100644 index a0b83e2..0000000 --- a/tez-ui2/src/main/webapp/app/models/timeline.js +++ /dev/null @@ -1,91 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; -import Ember from 'ember'; - -import AbstractModel from './abstract'; - -export default AbstractModel.extend({ - - needs:{ - app: { - type: ["appRm", "AhsApp"], - idKey: "appID", - silent: true - } - }, - - appID: Ember.computed("entityID", function () { - var idParts = this.get("entityID").split("_"); - return `application_${idParts[1]}_${idParts[2]}`; - }), - app: DS.attr("object"), // Either RMApp or AHSApp - - atsStatus: DS.attr("string"), - status: Ember.computed("atsStatus", "app.status", "app.finalStatus", function () { - var status = this.get("atsStatus"), - yarnStatus = this.get("app.status"); - - if (status !== 'RUNNING' || (yarnStatus !== 'FINISHED' && yarnStatus !== 'KILLED' && yarnStatus !== 'FAILED')) { - return status; - } - - if (yarnStatus === 'KILLED' || yarnStatus === 'FAILED') { - return yarnStatus; - } - - return this.get("app.finalStatus"); - }), - - progress: Ember.computed("status", function () { - return this.get("status") === "SUCCEEDED" ? 1 : null; - }), - - startTime: DS.attr("number"), - endTime: DS.attr("number"), - duration: Ember.computed("startTime", "endTime", function () { - var duration = this.get("endTime") - this.get("startTime"); - return duration > 0 ? duration : null; - }), - - // Hash will be created only on demand, till then counters will be stored in _counterGroups - _counterGroups: DS.attr('object'), - counterGroupsHash: Ember.computed("_counterGroups", function () { - var counterHash = {}, - counterGroups = this.get("_counterGroups") || []; - - counterGroups.forEach(function (group) { - var counters = group.counters, - groupHash; - - groupHash = counterHash[group.counterGroupName] = counterHash[group.counterGroupName] || {}; - - counters.forEach(function (counter) { - groupHash[counter.counterName] = counter.counterValue; - }); - }); - - return counterHash; - }), - - diagnostics: DS.attr('string'), - - events: DS.attr('object'), - -});
http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/models/vertex-am.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/models/vertex-am.js b/tez-ui2/src/main/webapp/app/models/vertex-am.js deleted file mode 100644 index a20d171..0000000 --- a/tez-ui2/src/main/webapp/app/models/vertex-am.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import DS from 'ember-data'; - -import AMModel from './am'; - -export default AMModel.extend({ - - totalTasks: DS.attr("number"), - succeededTasks: DS.attr("number"), - runningTasks: DS.attr("number"), - pendingTasks: DS.attr("number"), - failedTaskAttempts: DS.attr("number"), - killedTaskAttempts: DS.attr("number"), - - initTime: DS.attr('number'), - startTime: DS.attr('number'), - endTime: DS.attr('number'), - firstTaskStartTime: DS.attr('number'), - lastTaskFinishTime: DS.attr('number'), - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/models/vertex.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/models/vertex.js b/tez-ui2/src/main/webapp/app/models/vertex.js deleted file mode 100644 index e54bff2..0000000 --- a/tez-ui2/src/main/webapp/app/models/vertex.js +++ /dev/null @@ -1,146 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import DS from 'ember-data'; - -import AMTimelineModel from './am-timeline'; - -function valueComputerFactory(path1, path2) { - return function () { - var value = this.get(path1); - if(value === undefined || value === null){ - value = this.get(path2); - } - return value; - }; -} - -export default AMTimelineModel.extend({ - needs: { - dag: { - type: "dag", - idKey: "dagID", - silent: true - }, - am: { - type: "vertexAm", - idKey: "entityID", - loadType: "demand", - queryParams: function (model) { - return { - vertexID: parseInt(model.get("index")), - dagID: parseInt(model.get("dag.index")), - counters: "*" - }; - }, - urlParams: function (model) { - return { - app_id: model.get("appID") - }; - } - } - }, - - name: DS.attr('string'), - - _initTime: DS.attr('number'), - _startTime: DS.attr('number'), - _endTime: DS.attr('number'), - _firstTaskStartTime: DS.attr('number'), - _lastTaskFinishTime: DS.attr('number'), - - initTime: Ember.computed("am.initTime", "_initTime", - valueComputerFactory("am.initTime", "_initTime") - ), - startTime: Ember.computed("am.startTime", "_startTime", - valueComputerFactory("am.startTime", "_startTime") - ), - endTime: Ember.computed("am.endTime", "_endTime", - valueComputerFactory("am.endTime", "_endTime") - ), - firstTaskStartTime: Ember.computed("am.firstTaskStartTime", "_firstTaskStartTime", - valueComputerFactory("am.firstTaskStartTime", "_firstTaskStartTime") - ), - lastTaskFinishTime: Ember.computed("am.lastTaskFinishTime", "_lastTaskFinishTime", - valueComputerFactory("am.lastTaskFinishTime", "_lastTaskFinishTime") - ), - - totalTasks: DS.attr('number'), - _failedTasks: DS.attr('number'), - _succeededTasks: DS.attr('number'), - _killedTasks: DS.attr('number'), - - failedTasks: Ember.computed("am.failedTasks", "_failedTasks", - valueComputerFactory("am.failedTasks", "_failedTasks") - ), - succeededTasks: Ember.computed("am.succeededTasks", "_succeededTasks", - valueComputerFactory("am.succeededTasks", "_succeededTasks") - ), - killedTasks: Ember.computed("am.killedTasks", "_killedTasks", - valueComputerFactory("am.killedTasks", "_killedTasks") - ), - - finalStatus: Ember.computed("status", "failedTaskAttempts", function () { - var status = this.get("status"); - if(status === "SUCCEEDED" && this.get("failedTaskAttempts")) { - status = "SUCCEEDED_WITH_FAILURES"; - } - return status; - }), - - runningTasks: Ember.computed("am.runningTasks", "status", function () { - var runningTasks = this.get("am.runningTasks"); - if(runningTasks === undefined) { - runningTasks = this.get("status") === 'SUCCEEDED' ? 0 : null; - } - return runningTasks; - }), - pendingTasks: Ember.computed("totalTasks", "succeededTasks", "runningTasks", function () { - var pendingTasks = null, - runningTasks = this.get("runningTasks"), - totalTasks = this.get("totalTasks"); - if(totalTasks!== null && runningTasks !== null) { - pendingTasks = totalTasks - this.get("succeededTasks") - runningTasks; - } - return pendingTasks; - }), - - _failedTaskAttempts: DS.attr('number'), - _killedTaskAttempts: DS.attr('number'), - failedTaskAttempts: Ember.computed("am.failedTaskAttempts", "_failedTaskAttempts", - valueComputerFactory("am.failedTaskAttempts", "_failedTaskAttempts") - ), - killedTaskAttempts: Ember.computed("am.killedTaskAttempts", "_killedTaskAttempts", - valueComputerFactory("am.killedTaskAttempts", "_killedTaskAttempts") - ), - - minDuration: DS.attr('number'), - maxDuration: DS.attr('number'), - avgDuration: DS.attr('number'), - - firstTasksToStart: DS.attr("object"), - lastTasksToFinish: DS.attr("object"), - shortestDurationTasks: DS.attr("object"), - longestDurationTasks: DS.attr("object"), - - processorClassName: DS.attr('string'), - - dagID: DS.attr('string'), - dag: DS.attr('object'), // Auto-loaded by need -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/router.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/router.js b/tez-ui2/src/main/webapp/app/router.js deleted file mode 100644 index 98a456a..0000000 --- a/tez-ui2/src/main/webapp/app/router.js +++ /dev/null @@ -1,59 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import config from './config/environment'; - -const Router = Ember.Router.extend({ - location: config.locationType -}); - -Router.map(function() { - this.route('dags', { path: '/' }); - this.route('dag', {path: '/dag/:dag_id'}, function() { - this.route('vertices'); - this.route('tasks'); - this.route('attempts'); - this.route('counters'); - this.route('index', {path: '/'}, function() {}); - this.route('graphical'); - this.route('swimlane'); - }); - this.route('vertex', {path: '/vertex/:vertex_id'}, function() { - this.route('tasks'); - this.route('attempts'); - this.route('counters'); - }); - this.route('task', {path: '/task/:task_id'}, function() { - this.route('attempts'); - this.route('counters'); - }); - this.route('attempt', {path: '/attempt/:attempt_id'}, function () { - this.route('counters'); - }); - // Alias for backward compatibility with Tez UI V1 - this.route('app', {path: '/tez-app/:app_id'}, function () {}); - this.route('app', {path: '/app/:app_id'}, function () { - this.route('dags'); - this.route('configs'); - }); - this.route('multi-am-pollster'); - this.route('single-am-pollster'); -}); - -export default Router; http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/abstract.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/abstract.js b/tez-ui2/src/main/webapp/app/routes/abstract.js deleted file mode 100644 index 39b8314..0000000 --- a/tez-ui2/src/main/webapp/app/routes/abstract.js +++ /dev/null @@ -1,189 +0,0 @@ -/*global more*/ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import DS from 'ember-data'; - -import LoaderService from '../services/loader'; -import UnlinkedPromise from '../errors/unlinked-promise'; -import NameMixin from '../mixins/name'; - -var MoreObject = more.Object; - -export default Ember.Route.extend(NameMixin, { - title: null, // Must be set by inheriting class - - loaderNamespace: null, - isLoading: false, - currentPromiseId: null, - loadedValue: null, - - isLeafRoute: false, - breadcrumbs: null, - childCrumbs: null, - - currentQuery: {}, - - loaderQueryParams: {}, - - init: function () { - var namespace = this.get("loaderNamespace"); - if(namespace) { - this.setLoader(namespace); - } - }, - - model: function(params/*, transition*/) { - this.set("currentQuery", this.queryFromParams(params)); - Ember.run.later(this, "loadData"); - }, - - queryFromParams: function (params) { - var query = {}; - - MoreObject.forEach(this.get("loaderQueryParams"), function (name, paramKey) { - var value = Ember.get(params, paramKey); - if(value) { - query[name] = value; - } - }); - - return query; - }, - - setDocTitle: function () { - Ember.$(document).attr('title', "Tez UI : " + this.get('title')); - }, - - setupController: function (controller, model) { - this._super(controller, model); - this.setDocTitle(); - }, - - checkAndCall: function (id, functionName, query, options, value) { - if(id === this.get("currentPromiseId")) { - return this[functionName](value, query, options); - } - else { - throw new UnlinkedPromise(); - } - }, - - loadData: function (options) { - var promiseId = Math.random(), - query = this.get("currentQuery"); - - options = options || {}; - - this.set('currentPromiseId', promiseId); - - return Ember.RSVP.resolve(). - then(this.checkAndCall.bind(this, promiseId, "setLoading", query, options)). - then(this.checkAndCall.bind(this, promiseId, "beforeLoad", query, options)). - then(this.checkAndCall.bind(this, promiseId, "load", query, options)). - then(this.checkAndCall.bind(this, promiseId, "afterLoad", query, options)). - then(this.checkAndCall.bind(this, promiseId, "setValue", query, options)). - catch(this.onLoadFailure.bind(this)); - }, - - setLoading: function (/*query, options*/) { - this.set('isLoading', true); - this.set('controller.isLoading', true); - }, - beforeLoad: function (value/*, query, options*/) { - return value; - }, - load: function (value/*, query, options*/) { - return value; - }, - afterLoad: function (value/*, query, options*/) { - return value; - }, - setValue: function (value/*, query, options*/) { - this.set('loadedValue', value); - - this.set('isLoading', false); - this.set('controller.isLoading', false); - - this.send("setLoadTime", this.getLoadTime(value)); - - return value; - }, - onLoadFailure: function (error) { - if(error instanceof UnlinkedPromise) { - Ember.Logger.warn("Slow down, you are refreshing too fast!"); - } - else { - this.send("error", error); - throw(error); - } - }, - - getLoadTime: function (value) { - if(value instanceof DS.RecordArray) { - value = value.get("content.0.record"); - } - else if(Array.isArray(value)) { - value = value[0]; - } - - if(value) { - return Ember.get(value, "loadTime"); - } - }, - - _setControllerModel: Ember.observer("loadedValue", function () { - var controller = this.get("controller"); - if(controller) { - controller.set("model", this.get("loadedValue")); - } - }), - - setLoader: function (nameSpace) { - this.set("loader", LoaderService.create({ - nameSpace: nameSpace, - store: this.get("store"), - container: this.get("container") - })); - }, - - startCrumbBubble: function () { - this.send("bubbleBreadcrumbs", []); - }, - - actions: { - setBreadcrumbs: function (crumbs) { - var name = this.get("name"); - if(crumbs && crumbs[name]) { - this.set("breadcrumbs", crumbs[name]); - } - return true; - }, - bubbleBreadcrumbs: function (crumbs) { - crumbs.unshift.apply(crumbs, this.get("breadcrumbs")); - return true; - }, - reload: function () { - Ember.run.later(this, "loadData", {reload: true}); - }, - willTransition: function () { - this.set("loadedValue", null); - }, - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/am-pollster.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/am-pollster.js b/tez-ui2/src/main/webapp/app/routes/am-pollster.js deleted file mode 100644 index e26c0aa..0000000 --- a/tez-ui2/src/main/webapp/app/routes/am-pollster.js +++ /dev/null @@ -1,93 +0,0 @@ -/*global more*/ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; - -import PollsterRoute from './pollster'; - -var MoreObject = more.Object; - -export default PollsterRoute.extend({ - - countersToPoll: null, - - onRecordPoll: function (record) { - var query = {}, - countersToPoll = this.get("countersToPoll"); - - if(countersToPoll !== null) { - query.counters = countersToPoll; - } - - return this.get("loader").loadNeed(record, "am", {reload: true}, query); - }, - - onPollFailure: function (error) { - var that = this, - record = this.get("polledRecords.0"); - - this.get("loader").queryRecord("appRm", record.get("appID"), {reload: true}).then(function (appRm) { - if(appRm.get('isComplete')) { - that.scheduleReload(); - } - else { - that.send("error", error); - } - }, function (error) { - that.send("error", error); - that.scheduleReload(); - }); - }, - - scheduleReload: function () { - this.set("polledRecords", null); - Ember.run.debounce(this, "reload", this.get("polling.interval") * 2); - }, - - reload: function () { - this.set("polledRecords", null); - this.send("reload"); - }, - - actions: { - countersToPollChanged: function (counterColumnDefinitions) { - var counterGroupHash = {}, - counterGroups = []; - - if(counterColumnDefinitions){ - counterColumnDefinitions.forEach(function (definition) { - var counterGroupName = definition.get("counterGroupName"), - counterNames = counterGroupHash[counterGroupName]; - if(!counterNames) { - counterNames = counterGroupHash[counterGroupName] = []; - } - counterNames.push(definition.get("counterName")); - }); - - MoreObject.forEach(counterGroupHash, function (groupName, counters) { - counters = counters.join(","); - counterGroups.push(`${groupName}/${counters}`); - }); - } - - this.set("countersToPoll", counterGroups.join(";")); - } - } - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/app.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/app.js b/tez-ui2/src/main/webapp/app/routes/app.js deleted file mode 100644 index 395a9be..0000000 --- a/tez-ui2/src/main/webapp/app/routes/app.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - title: "Application", - - loaderQueryParams: { - id: "app_id" - }, - - model: function (params) { - return this.get("loader").queryRecord('app', "tez_" + this.queryFromParams(params).id). - catch(this.onLoadFailure.bind(this)); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/app/configs.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/app/configs.js b/tez-ui2/src/main/webapp/app/routes/app/configs.js deleted file mode 100644 index bdd53ae..0000000 --- a/tez-ui2/src/main/webapp/app/routes/app/configs.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "Application Details", - - loaderNamespace: "app", - - canPoll: false, - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('app', this.modelFor("app").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/app/dags.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/app/dags.js b/tez-ui2/src/main/webapp/app/routes/app/dags.js deleted file mode 100644 index 8264299..0000000 --- a/tez-ui2/src/main/webapp/app/routes/app/dags.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "DAGs", - - loaderNamespace: "app", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('dag', { - appID: this.modelFor("app").get("appID") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/app/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/app/index.js b/tez-ui2/src/main/webapp/app/routes/app/index.js deleted file mode 100644 index 7df42e5..0000000 --- a/tez-ui2/src/main/webapp/app/routes/app/index.js +++ /dev/null @@ -1,39 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "Application Details", - - loaderNamespace: "app", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - onRecordPoll: function () { - this.reload(); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('app', this.modelFor("app").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/application.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/application.js b/tez-ui2/src/main/webapp/app/routes/application.js deleted file mode 100644 index 5ae68b8..0000000 --- a/tez-ui2/src/main/webapp/app/routes/application.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; - -export default Ember.Route.extend({ - title: "Application", - - pageReset: function () { - this.send("resetTooltip"); - }, - - actions: { - didTransition: function(/* transition */) { - this.pageReset(); - }, - bubbleBreadcrumbs: function (breadcrumbs) { - this.set("controller.breadcrumbs", breadcrumbs); - }, - - error: function (error) { - this.set("controller.appError", error); - Ember.Logger.error(error); - }, - - resetTooltip: function () { - Ember.$(document).tooltip("destroy"); - Ember.$(document).tooltip({ - delay: 20, - tooltipClass: 'generic-tooltip' - }); - }, - - // Modal window actions - openModal: function (componentName, options) { - options = options || {}; - - if(typeof componentName === "object") { - options = componentName; - componentName = null; - } - - this.render(options.modalName || "simple-modal", { - into: 'application', - outlet: 'modal', - model: { - title: options.title, - componentName: componentName, - content: options.content, - targetObject: options.targetObject - } - }); - Ember.run.later(function () { - Ember.$(".simple-modal").modal(); - }); - }, - closeModal: function () { - Ember.$(".simple-modal").modal("hide"); - }, - destroyModal: function () { - Ember.run.later(this, function () { - this.disconnectOutlet({ - outlet: 'modal', - parentView: 'application' - }); - }); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/attempt.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/attempt.js b/tez-ui2/src/main/webapp/app/routes/attempt.js deleted file mode 100644 index 3d0224f..0000000 --- a/tez-ui2/src/main/webapp/app/routes/attempt.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - title: "Attempt", - - loaderQueryParams: { - id: "attempt_id" - }, - - model: function (params) { - return this.get("loader").queryRecord('attempt', this.queryFromParams(params).id). - catch(this.onLoadFailure.bind(this)); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/attempt/counters.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/attempt/counters.js b/tez-ui2/src/main/webapp/app/routes/attempt/counters.js deleted file mode 100644 index add4ce5..0000000 --- a/tez-ui2/src/main/webapp/app/routes/attempt/counters.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "attempt", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('attempt', this.modelFor("attempt").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/attempt/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/attempt/index.js b/tez-ui2/src/main/webapp/app/routes/attempt/index.js deleted file mode 100644 index add4ce5..0000000 --- a/tez-ui2/src/main/webapp/app/routes/attempt/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "attempt", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('attempt', this.modelFor("attempt").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag.js b/tez-ui2/src/main/webapp/app/routes/dag.js deleted file mode 100644 index 13f1bc0..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - title: "DAG", - - loaderQueryParams: { - id: "dag_id" - }, - - model: function (params) { - return this.get("loader").queryRecord('dag', this.queryFromParams(params).id). - catch(this.onLoadFailure.bind(this)); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/attempts.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/attempts.js b/tez-ui2/src/main/webapp/app/routes/dag/attempts.js deleted file mode 100644 index 167c10e..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/attempts.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "All Task Attempts", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('attempt', { - dagID: this.modelFor("dag").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/counters.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/counters.js b/tez-ui2/src/main/webapp/app/routes/dag/counters.js deleted file mode 100644 index be60c1d..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/counters.js +++ /dev/null @@ -1,36 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('dag', this.modelFor("dag").get("id"), options); - }, - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/graphical.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/graphical.js b/tez-ui2/src/main/webapp/app/routes/dag/graphical.js deleted file mode 100644 index 69d2de4..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/graphical.js +++ /dev/null @@ -1,81 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "Graphical View", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('vertex', { - dagID: this.modelFor("dag").get("id") - }, options); - }, - - _loadedValueObserver: Ember.observer("loadedValue", function () { - var loadedValue = this.get("loadedValue"), - records = []; - - if(loadedValue) { - loadedValue.forEach(function (record) { - records.push(record); - }); - - this.set("polledRecords", records); - } - Ember.run.later(this, "setViewHeight", 100); - }), - - setViewHeight: function () { - var container = Ember.$('#graphical-view-component-container'), - offset; - - if(container) { - offset = container.offset(); - container.height( - Math.max( - // 50 pixel is left at the bottom - offset ? Ember.$(window).height() - offset.top - 70 : 0, - 500 // Minimum dag view component container height - ) - ); - } - }, - - actions: { - didTransition: function () { - Ember.$(window).on('resize', this.setViewHeight); - this._super(); - return true; - }, - willTransition: function () { - Ember.$(window).off('resize', this.setViewHeight); - this._super(); - return true; - }, - } - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/index.js b/tez-ui2/src/main/webapp/app/routes/dag/index.js deleted file mode 100644 index acabc58..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/index.js +++ /dev/null @@ -1,58 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -import downloadDAGZip from '../../utils/download-dag-zip'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('dag', this.modelFor("dag").get("id"), options); - }, - - actions: { - downloadDagJson: function () { - var dag = this.get("loadedValue"), - downloader = downloadDAGZip(dag, { - batchSize: 500, - timelineHost: this.get("hosts.timeline"), - timelineNamespace: this.get("env.app.namespaces.webService.timeline") - }), - modalContent = Ember.Object.create({ - dag: dag, - downloader: downloader - }); - - this.send("openModal", "zip-download-modal", { - title: "Download data", - content: modalContent - }); - } - } - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/index/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/index/index.js b/tez-ui2/src/main/webapp/app/routes/dag/index/index.js deleted file mode 100644 index 72d8686..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/index/index.js +++ /dev/null @@ -1,62 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('vertex', { - dagID: this.modelFor("dag").get("id") - }, options); - }, - - _canPollObserver: Ember.observer("canPoll", function () { - if(this.get("canPoll")) { - this.get("polling").setPoll(this.pollData, this, "dag.index.index"); - } - else { - this.get("polling").resetPoll("dag.index.index"); - } - }), - - updateLoadTime: function (value) { - return value; - }, - - actions: { - reload: function () { - this._super(); - return true; - }, - willTransition: function () { - this.set("loadedValue", null); - return true; - }, - } - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/swimlane.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/swimlane.js b/tez-ui2/src/main/webapp/app/routes/dag/swimlane.js deleted file mode 100644 index c79b00c..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/swimlane.js +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "Vertex Swimlane", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('vertex', { - dagID: this.modelFor("dag").get("id") - }, options); - }, - - _loadedValueObserver: Ember.observer("loadedValue", function () { - var loadedValue = this.get("loadedValue"), - records = []; - - if(loadedValue) { - loadedValue.forEach(function (record) { - records.push(record); - }); - - this.set("polledRecords", records); - } - }), - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/tasks.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/tasks.js b/tez-ui2/src/main/webapp/app/routes/dag/tasks.js deleted file mode 100644 index 744913d..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/tasks.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "All Tasks", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('task', { - dagID: this.modelFor("dag").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dag/vertices.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dag/vertices.js b/tez-ui2/src/main/webapp/app/routes/dag/vertices.js deleted file mode 100644 index 0b7d63b..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dag/vertices.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "All Vertices", - - loaderNamespace: "dag", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('vertex', { - dagID: this.modelFor("dag").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/dags.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/dags.js b/tez-ui2/src/main/webapp/app/routes/dags.js deleted file mode 100644 index 33366c8..0000000 --- a/tez-ui2/src/main/webapp/app/routes/dags.js +++ /dev/null @@ -1,167 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; - -import AbstractRoute from './abstract'; - -const REFRESH = {refreshModel: true}; - -export default AbstractRoute.extend({ - title: "All DAGs", - - queryParams: { - dagName: REFRESH, - dagID: REFRESH, - submitter: REFRESH, - status: REFRESH, - appID: REFRESH, - callerID: REFRESH, - - rowCount: REFRESH - }, - - loaderQueryParams: { - dagName: "dagName", - dagID: "dagID", - user: "submitter", - status: "status", - appID: "appID", - callerID: "callerID", - - limit: "rowCount", - }, - - loaderNamespace: "dags", - - fromId: null, - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - // Client side filtering to ensure that records are relevant after status correction - filterRecords: function (records, query) { - query = { - name: query.dagName, - entityID: query.dagID, - submitter: query.submitter, - status: query.status, - appID: query.appID, - callerID: query.callerID - }; - - return records.filter(function (record) { - for(var propName in query) { - if(query[propName] && query[propName] !== record.get(propName)) { - return false; - } - } - return true; - }); - }, - - load: function (value, query/*, options*/) { - var loader, - that = this, - limit = this.get("controller.rowCount") || query.limit; - - if(query.dagID) { - that.set("loadedRecords", []); - loader = this.get("loader").queryRecord('dag', query.dagID, {reload: true}).then(function (record) { - return [record]; - }); - } - else { - query = Ember.$.extend({}, query, { - limit: limit + 1 - }); - loader = this.get("loader").query('dag', query, {reload: true}); - } - - return loader.then(function (records) { - - if(records.get("length") > limit) { - let lastRecord = records.popObject(); - that.set("controller.moreAvailable", true); - that.set("fromId", lastRecord.get("entityID")); - } - else { - that.set("controller.moreAvailable", false); - } - - records = that.filterRecords(records, query); - records.forEach(function (record) { - if(record.get("status") === "RUNNING") { - that.get("loader").loadNeed(record, "am", {reload: true}).catch(function () { - record.set("am", null); - }); - } - }); - return records; - }); - }, - - loadNewPage: function () { - var query = this.get("currentQuery"), - that = this; - - query = Ember.$.extend({}, query, { - fromId: this.get("fromId") - }); - - this.set("controller.loadingMore", true); - return this.load(null, query).then(function (data) { - if(that.get("controller.loadingMore")) { - that.set("controller.loadingMore", false); - that.get("loadedValue").pushObjects(data); - return data; - } - }); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - }, - loadPage: function (page) { - var that = this; - if(this.get("controller.moreAvailable") && !this.get("controller.loadingMore")) { - this.send("resetTooltip"); - this.loadNewPage().then(function (data) { - if(data) { - that.set("controller.pageNum", page); - } - return data; - }); - } - }, - reload: function () { - this.set("controller.loadingMore", false); - this.set("controller.pageNum", 1); - this._super(); - }, - willTransition: function () { - var loader = this.get("loader"); - loader.unloadAll("dag"); - loader.unloadAll("ahs-app"); - this._super(); - }, - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js b/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js deleted file mode 100644 index c3260a6..0000000 --- a/tez-ui2/src/main/webapp/app/routes/multi-am-pollster.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import AmPollsterRoute from './am-pollster'; - -export default AmPollsterRoute.extend({ - - canPoll: Ember.computed("polledRecords.0.app.isComplete", "loadedValue", function () { - var isComplete = this.get("polledRecords.0.app.isComplete"); - return isComplete === false && this._super(); - }), - - actions: { - setPollingRecords: function (records) { - this.set("polledRecords", records); - } - } - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/pollster.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/pollster.js b/tez-ui2/src/main/webapp/app/routes/pollster.js deleted file mode 100644 index 9e1e40d..0000000 --- a/tez-ui2/src/main/webapp/app/routes/pollster.js +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - polling: Ember.inject.service("pollster"), - - // Todo - Change name to recordsToPoll - polledRecords: null, - - // Must be implemented by inheriting classes - onRecordPoll: function (val) {return val;}, - onPollSuccess: function (val) {return val;}, - onPollFailure: function (err) {throw(err);}, - - pollData: function () { - var polledRecords = this.get("polledRecords"); - - if(!this.get("isLoading") && polledRecords) { - polledRecords = polledRecords.map(this.onRecordPoll.bind(this)); - return Ember.RSVP.all(polledRecords). - then(this.updateLoadTime.bind(this)). - then(this.onPollSuccess.bind(this), this.onPollFailure.bind(this)); - } - return Ember.RSVP.reject(); - }, - - canPoll: Ember.computed("polledRecords", "loadedValue", function () { - return this.get("polledRecords") && this.get("loadedValue"); - }), - - updateLoadTime: function (value) { - this.send("setLoadTime", this.getLoadTime(value)); - return value; - }, - - _canPollInit: Ember.on("init", function () { - // This sets a flag that ensures that the _canPollObserver is called whenever - // canPoll changes. By default observers on un-used computed properties - // are not called. - this.get("canPoll"); - }), - - _canPollObserver: Ember.observer("canPoll", function () { - if(this.get("canPoll")) { - this.get("polling").setPoll(this.pollData, this); - } - else { - this.get("polling").resetPoll(); - } - }), - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js b/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js deleted file mode 100644 index 4a0d507..0000000 --- a/tez-ui2/src/main/webapp/app/routes/single-am-pollster.js +++ /dev/null @@ -1,34 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import AmPollsterRoute from './am-pollster'; - -export default AmPollsterRoute.extend({ - - canPoll: Ember.computed("polledRecords", "loadedValue.app.isComplete", function () { - var isComplete = this.get("loadedValue.app.isComplete"); - return isComplete === false && this._super(); - }), - - _loadedValueObserver: Ember.observer("loadedValue", function () { - var loadedValue = this.get("loadedValue"); - this.set("polledRecords", loadedValue ? [this.get("loadedValue")] : null); - }) - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/task.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/task.js b/tez-ui2/src/main/webapp/app/routes/task.js deleted file mode 100644 index 54d29f1..0000000 --- a/tez-ui2/src/main/webapp/app/routes/task.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - title: "Task", - - loaderQueryParams: { - id: "task_id" - }, - - model: function (params) { - return this.get("loader").queryRecord('task', this.queryFromParams(params).id). - catch(this.onLoadFailure.bind(this)); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/task/attempts.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/task/attempts.js b/tez-ui2/src/main/webapp/app/routes/task/attempts.js deleted file mode 100644 index 536d085..0000000 --- a/tez-ui2/src/main/webapp/app/routes/task/attempts.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "Task Attempts", - - loaderNamespace: "task", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('attempt', { - taskID: this.modelFor("task").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/task/counters.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/task/counters.js b/tez-ui2/src/main/webapp/app/routes/task/counters.js deleted file mode 100644 index 086e0cc..0000000 --- a/tez-ui2/src/main/webapp/app/routes/task/counters.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "task", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('task', this.modelFor("task").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/task/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/task/index.js b/tez-ui2/src/main/webapp/app/routes/task/index.js deleted file mode 100644 index f012796..0000000 --- a/tez-ui2/src/main/webapp/app/routes/task/index.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "task", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - loadAttempts: function (taskID, options) { - var that = this; - - this.get("loader").query('attempt', { - taskID: taskID - }, options).then(function (attempts) { - that.set("controller.attempts", attempts); - }); - }, - - load: function (value, query, options) { - var taskID = this.modelFor("task").get("id"); - this.loadAttempts(taskID, options); - return this.get("loader").queryRecord('task', taskID, options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/vertex.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/vertex.js b/tez-ui2/src/main/webapp/app/routes/vertex.js deleted file mode 100644 index 6e99fd1..0000000 --- a/tez-ui2/src/main/webapp/app/routes/vertex.js +++ /dev/null @@ -1,38 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import AbstractRoute from './abstract'; - -export default AbstractRoute.extend({ - title: "Vertex", - - loaderQueryParams: { - id: "vertex_id" - }, - - model: function (params) { - return this.get("loader").queryRecord('vertex', this.queryFromParams(params).id). - catch(this.onLoadFailure.bind(this)); - }, - - actions: { - setLoadTime: function (time) { - this.set("controller.loadTime", time); - } - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js b/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js deleted file mode 100644 index b0b33b2..0000000 --- a/tez-ui2/src/main/webapp/app/routes/vertex/attempts.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "Task Attempts", - - loaderNamespace: "vertex", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('attempt', { - vertexID: this.modelFor("vertex").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/vertex/counters.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/counters.js b/tez-ui2/src/main/webapp/app/routes/vertex/counters.js deleted file mode 100644 index d7cae37..0000000 --- a/tez-ui2/src/main/webapp/app/routes/vertex/counters.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "vertex", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('vertex', this.modelFor("vertex").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/vertex/index.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/index.js b/tez-ui2/src/main/webapp/app/routes/vertex/index.js deleted file mode 100644 index d7cae37..0000000 --- a/tez-ui2/src/main/webapp/app/routes/vertex/index.js +++ /dev/null @@ -1,35 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import SingleAmPollsterRoute from '../single-am-pollster'; - -export default SingleAmPollsterRoute.extend({ - title: "DAG Details", - - loaderNamespace: "vertex", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").queryRecord('vertex', this.modelFor("vertex").get("id"), options); - }, -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js b/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js deleted file mode 100644 index 25e0f4b..0000000 --- a/tez-ui2/src/main/webapp/app/routes/vertex/tasks.js +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import MultiAmPollsterRoute from '../multi-am-pollster'; - -export default MultiAmPollsterRoute.extend({ - title: "All Tasks", - - loaderNamespace: "vertex", - - setupController: function (controller, model) { - this._super(controller, model); - Ember.run.later(this, "startCrumbBubble"); - }, - - load: function (value, query, options) { - return this.get("loader").query('task', { - vertexID: this.modelFor("vertex").get("id") - }, options); - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/serializers/ahs-app.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/serializers/ahs-app.js b/tez-ui2/src/main/webapp/app/serializers/ahs-app.js deleted file mode 100644 index 0c35d54..0000000 --- a/tez-ui2/src/main/webapp/app/serializers/ahs-app.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; -import LoaderSerializer from './loader'; - -export default LoaderSerializer.extend({ - primaryKey: 'appId', - - extractArrayPayload: function (payload) { - return payload.app; - }, - - maps: { - entityID: 'appId', - attemptID: function(source) { - // while an attempt is in progress the attempt id contains a '-' - return (Ember.get(source, 'currentAppAttemptId') || '').replace('-',''); - }, - - name: 'name', - queue: 'queue', - user: 'user', - type: 'type', - - status: 'appState', - finalStatus: 'finalAppStatus', - - startTime: 'startedTime', - endTime: 'finishedTime', - - diagnostics: 'otherinfo.diagnostics', - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/serializers/am.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/serializers/am.js b/tez-ui2/src/main/webapp/app/serializers/am.js deleted file mode 100644 index f9c5848..0000000 --- a/tez-ui2/src/main/webapp/app/serializers/am.js +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import LoaderSerializer from './loader'; - -export default LoaderSerializer.extend({ - primaryKey: 'id', - - payloadNamespace: null, // Must be set by inheriting classes - - extractSinglePayload: function (rawPayload) { - return rawPayload[this.get("payloadNamespace")][0]; - }, - extractArrayPayload: function(rawPayload) { - return rawPayload[this.get("payloadNamespace")]; - }, - - maps: { - entityID: 'id', - - status: 'status', - progress: 'progress', - - counterGroupsHash: 'counters' - } -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/serializers/app-rm.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/serializers/app-rm.js b/tez-ui2/src/main/webapp/app/serializers/app-rm.js deleted file mode 100644 index 37166c3..0000000 --- a/tez-ui2/src/main/webapp/app/serializers/app-rm.js +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import Ember from 'ember'; - -import RMSerializer from './rm'; - -export default RMSerializer.extend({ - - extractSinglePayload: function (rawPayload) { - return Ember.get(rawPayload, "app"); - }, - - extractArrayPayload: function(rawPayload) { - return Ember.get(rawPayload, "apps.app"); - }, - -}); http://git-wip-us.apache.org/repos/asf/tez/blob/13132ec7/tez-ui2/src/main/webapp/app/serializers/app.js ---------------------------------------------------------------------- diff --git a/tez-ui2/src/main/webapp/app/serializers/app.js b/tez-ui2/src/main/webapp/app/serializers/app.js deleted file mode 100644 index 0d05c6c..0000000 --- a/tez-ui2/src/main/webapp/app/serializers/app.js +++ /dev/null @@ -1,32 +0,0 @@ -/** - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import TimelineSerializer from './timeline'; - -export default TimelineSerializer.extend({ - maps: { - domain: 'domain', - user: 'otherinfo.user', - - buildTime: 'otherinfo.tezVersion.buildTime', - tezRevision: 'otherinfo.tezVersion.revision', - tezVersion: 'otherinfo.tezVersion.version', - - configs: 'otherinfo.config', - } -});
