Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(356)

Unified Diff: appengine/swarming/elements/res/imp/common/task-behavior.html

Issue 2408743002: Move elements/ to ui/ (Closed)
Patch Set: rebase again Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: appengine/swarming/elements/res/imp/common/task-behavior.html
diff --git a/appengine/swarming/elements/res/imp/common/task-behavior.html b/appengine/swarming/elements/res/imp/common/task-behavior.html
deleted file mode 100644
index 970a461695215332237d7baa6d65f53a2b5b62f4..0000000000000000000000000000000000000000
--- a/appengine/swarming/elements/res/imp/common/task-behavior.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--
- Copyright 2016 The LUCI Authors. All rights reserved.
- Use of this source code is governed under the Apache License, Version 2.0
- that can be found in the LICENSE file.
-
- It contains the definition of the following Behaviors:
-
- SwarmingBehaviors.TaskBehavior
-
- This behavior contains many constants and some functions that are useful
- for task-related code.
-
- It also includes the style module "task-style" to allow for common styles
- to be shared across multiple pages.
-
--->
-<script>
- window.SwarmingBehaviors = window.SwarmingBehaviors || {};
- (function(){
- SwarmingBehaviors.TaskBehavior = {
- properties: {
- BOT_DIED: {
- type: String,
- value: "BOT_DIED",
- },
- CANCELED: {
- type: String,
- value: "CANCELED",
- },
- COMPLETED: {
- type: String,
- value: "COMPLETED",
- },
- COMPLETED_DEDUPED: {
- type: String,
- value: "COMPLETED (DEDUPED)",
- },
- COMPLETED_FAILURE: {
- type: String,
- value: "COMPLETED (FAILURE)",
- },
- COMPLETED_SUCCESS: {
- type: String,
- value: "COMPLETED (SUCCESS)",
- },
- EXPIRED: {
- type: String,
- value: "EXPIRED",
- },
- PENDING: {
- type: String,
- value: "PENDING",
- },
- RUNNING: {
- type: String,
- value: "RUNNING",
- },
- TIMED_OUT: {
- type: String,
- value: "TIMED_OUT",
- },
- },
-
- stateClass: function(state) {
- if (state === this.CANCELED || state === this.TIMED_OUT || state === this.EXPIRED) {
- return "exception";
- }
- if (state === this.BOT_DIED) {
- return "bot_died";
- }
- if (state === this.COMPLETED_FAILURE) {
- return "failed_task";
- }
- if (state === this.RUNNING || state === this.PENDING) {
- return "pending_task";
- }
- return "";
- }
- };
- })();
-</script>
-
-<dom-module id="task-style">
- <template>
- <style>
- /* These colors are from buildbot */
- .failed_task {
- background-color: #ffdddd;
- }
- .bot_died {
- background-color: #cccccc;
- }
- .exception {
- background-color: #edd2ff;
- }
- .pending_task {
- background-color: #fffc6c;
- }
- </style>
- </template>
-</dom-module>

Powered by Google App Engine
This is Rietveld 408576698