You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

cloudrbanin.js 20 kB

3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. export default async function initCloudrain() {
  2. function paddingZeros(str, len) {
  3. str = str.toString();
  4. if (str.length < len) {
  5. str = new Array(len - str.length).fill('0').join('') + str;
  6. }
  7. return str;
  8. }
  9. function timeFormat(date) {
  10. return `${date.getFullYear()}-${paddingZeros(date.getMonth() + 1, 2)}-${paddingZeros(date.getDate(), 2)} ${paddingZeros(date.getHours(), 2)}:${paddingZeros(date.getMinutes(), 2)}:${paddingZeros(date.getSeconds(), 2)}`;
  11. }
  12. let debug_button = $(".cloudbrain_debug").data("debug");
  13. let debug_again_button = $(".cloudbrain_debug").data("debug-again");
  14. let timeid = window.setInterval(loadJobStatus, 15000);
  15. let timeidShow = window.setInterval(loadShowJobStatus, 15000);
  16. $(document).ready(loadJobStatus);
  17. $(document).ready(loadShowJobStatus);
  18. function loadJobStatus() {
  19. $(".job-status").each((index, job) => {
  20. const ID = job.dataset.jobid;
  21. if (!ID) return;
  22. const repoPath = job.dataset.repopath;
  23. // const computeResource = job.dataset.resource
  24. const versionname = job.dataset.version;
  25. const bootfile = job.dataset.bootfile;
  26. const status_text = $(`#${ID}-text`).text();
  27. const finalState = [
  28. "STOPPED",
  29. "CREATE_FAILED",
  30. "UNAVAILABLE",
  31. "DELETED",
  32. "RESIZE_FAILED",
  33. "SUCCEEDED",
  34. "IMAGE_FAILED",
  35. "SUBMIT_FAILED",
  36. "DELETE_FAILED",
  37. "KILLED",
  38. "COMPLETED",
  39. "FAILED",
  40. "CANCELED",
  41. "LOST",
  42. "START_FAILED",
  43. "SUBMIT_MODEL_FAILED",
  44. "DEPLOY_SERVICE_FAILED",
  45. "CHECK_FAILED",
  46. ];
  47. if (finalState.includes(status_text)) {
  48. return;
  49. }
  50. // const diffResource = computeResource == "NPU" ? 'modelarts/notebook' : 'cloudbrain'
  51. $.get(
  52. `/api/v1/repos/${repoPath}/${ID}?version_name=${versionname}`,
  53. (data) => {
  54. const ID = data.ID || data.JobID;
  55. const status = data.JobStatus;
  56. const duration = data.JobDuration;
  57. const aiCenter = data.AiCenter || '--'
  58. $("#duration-" + ID).text(duration);
  59. $("#cluster-" + ID).text(aiCenter);
  60. $("#" + versionname + "-ai_center").text(data.AiCenter);
  61. if (status != status_text) {
  62. $("#" + ID + "-icon")
  63. .removeClass()
  64. .addClass(status);
  65. $("#" + ID + "-text").text(status);
  66. finalState.includes(status) &&
  67. $("#" + ID + "-stop")
  68. .removeClass("blue")
  69. .addClass("disabled");
  70. }
  71. if (status === "RUNNING") {
  72. $("#ai-debug-" + ID)
  73. .removeClass("disabled")
  74. .addClass("blue")
  75. .text(debug_button)
  76. .css("margin", "0 1rem");
  77. $("#model-image-" + ID)
  78. .removeClass("disabled")
  79. .addClass("blue");
  80. }
  81. if (status !== "RUNNING") {
  82. // $('#model-debug-'+ID).removeClass('blue')
  83. // $('#model-debug-'+ID).addClass('disabled')
  84. $("#model-image-" + ID)
  85. .removeClass("blue")
  86. .addClass("disabled");
  87. }
  88. if (
  89. ["CREATING", "STOPPING", "WAITING", "STARTING"].includes(status)
  90. ) {
  91. $("#ai-debug-" + ID)
  92. .removeClass("blue")
  93. .addClass("disabled");
  94. }
  95. if (
  96. [
  97. "STOPPED",
  98. "FAILED",
  99. "START_FAILED",
  100. "CREATE_FAILED",
  101. "SUCCEEDED",
  102. ].includes(status)
  103. ) {
  104. if (!bootfile) {
  105. $("#ai-debug-" + ID)
  106. .removeClass("disabled")
  107. .addClass("blue")
  108. .text(debug_again_button)
  109. .css("margin", "0");
  110. } else {
  111. $("#ai-debug-" + ID).remove()
  112. }
  113. }
  114. if (["RUNNING", "WAITING"].includes(status)) {
  115. $("#ai-stop-" + ID)
  116. .removeClass("disabled")
  117. .addClass("blue");
  118. }
  119. if (
  120. [
  121. "CREATING",
  122. "STOPPING",
  123. "STARTING",
  124. "STOPPED",
  125. "FAILED",
  126. "START_FAILED",
  127. "SUCCEEDED",
  128. "COMPLETED",
  129. "CREATE_FAILED",
  130. ].includes(status)
  131. ) {
  132. $("#ai-stop-" + ID)
  133. .removeClass("blue")
  134. .addClass("disabled");
  135. }
  136. if (
  137. [
  138. "STOPPED",
  139. "FAILED",
  140. "START_FAILED",
  141. "KILLED",
  142. "COMPLETED",
  143. "SUCCEEDED",
  144. "CREATE_FAILED",
  145. ].includes(status)
  146. ) {
  147. $("#ai-delete-" + ID)
  148. .removeClass("disabled")
  149. .addClass("blue");
  150. } else {
  151. $("#ai-delete-" + ID)
  152. .removeClass("blue")
  153. .addClass("disabled");
  154. }
  155. }
  156. ).fail(function (err) {
  157. console.log(err);
  158. });
  159. });
  160. }
  161. function loadShowJobStatus() {
  162. $(".ui.accordion.border-according").each((index, job) => {
  163. const jobID = job.dataset.jobid;
  164. if (!jobID) return;
  165. const repoPath = job.dataset.repopath;
  166. const versionname = job.dataset.version;
  167. // ['IMAGE_FAILED','SUBMIT_FAILED','DELETE_FAILED','KILLED','COMPLETED','FAILED','CANCELED','LOST','START_FAILED']
  168. // if (job.textContent.trim() == 'IMAGE_FAILED' || job.textContent.trim() == 'SUBMIT_FAILED' || job.textContent.trim() == 'DELETE_FAILED'
  169. // || job.textContent.trim() == 'KILLED' || job.textContent.trim() == 'COMPLETED' || job.textContent.trim() == 'FAILED'
  170. // || job.textContent.trim() == 'CANCELED' || job.textContent.trim() == 'LOST') {
  171. // return
  172. // }
  173. let status = $(`#${versionname}-status-span`).text().trim();
  174. if (
  175. [
  176. "IMAGE_FAILED",
  177. "SUBMIT_FAILED",
  178. "DELETE_FAILED",
  179. "KILLED",
  180. "COMPLETED",
  181. "FAILED",
  182. "CANCELED",
  183. "LOST",
  184. "START_FAILED",
  185. "SUCCEEDED",
  186. "STOPPED",
  187. "CREATE_FAILED",
  188. ].includes(status)
  189. ) {
  190. return;
  191. }
  192. let stopArray = [
  193. "KILLED",
  194. "FAILED",
  195. "START_FAILED",
  196. "KILLING",
  197. "COMPLETED",
  198. "SUCCEEDED",
  199. "CREATE_FAILED",
  200. "STOPPED",
  201. ];
  202. let deleteArray = [
  203. "KILLED",
  204. "FAILED",
  205. "START_FAILED",
  206. "COMPLETED",
  207. "SUCCEEDED",
  208. "CREATE_FAILED",
  209. "STOPPED",
  210. ];
  211. $.get(
  212. `/api/v1/repos/${repoPath}/${jobID}?version_name=${versionname}`,
  213. (data) => {
  214. $(`#${versionname}-duration-span`).text(data.JobDuration);
  215. $(`#${versionname}-status-span span`).text(data.JobStatus);
  216. $(`#${versionname}-status-span i`).attr("class", data.JobStatus);
  217. // detail status and duration
  218. data.StartTime !== undefined && data.StartTime > 0 && $("#" + versionname + "-startTime").text(timeFormat(new Date(data.StartTime * 1000)));
  219. $("#" + versionname + "-duration").text(data.JobDuration);
  220. $("#" + versionname + "-status").text(data.JobStatus);
  221. $("#" + versionname + "-ai_center").text(data.AiCenter);
  222. if (stopArray.includes(data.JobStatus)) {
  223. $("#" + versionname + "-stop").addClass("disabled");
  224. }
  225. if (deleteArray.includes(data.JobStatus)) {
  226. $(`#${versionname}-delete`).removeClass("disabled");
  227. $(`#${versionname}-delete`).addClass("blue");
  228. }
  229. if (data.JobStatus === "COMPLETED") {
  230. $("#" + versionname + "-create-model")
  231. .removeClass("disabled")
  232. .addClass("blue");
  233. }
  234. }
  235. ).fail(function (err) {
  236. console.log(err);
  237. });
  238. });
  239. }
  240. function assertDelete(obj, versionName, repoPath) {
  241. if (obj.style.color == "rgb(204, 204, 204)") {
  242. return;
  243. } else {
  244. const delId = obj.parentNode.id;
  245. let flag = 1;
  246. $(".ui.basic.modal")
  247. .modal({
  248. onDeny: function () {
  249. flag = false;
  250. },
  251. onApprove: function () {
  252. if (!versionName) {
  253. document.getElementById(delId).submit();
  254. } else {
  255. deleteVersion(versionName, repoPath);
  256. }
  257. flag = true;
  258. },
  259. onHidden: function () {
  260. if (flag == false) {
  261. $(".alert")
  262. .html("您已取消操作")
  263. .removeClass("alert-success")
  264. .addClass("alert-danger")
  265. .show()
  266. .delay(1500)
  267. .fadeOut();
  268. }
  269. },
  270. })
  271. .modal("show");
  272. }
  273. }
  274. function deleteVersion(versionName, repoPath) {
  275. const url = `/api/v1/repos/${repoPath}`;
  276. $.post(url, { version_name: versionName }, (data) => {
  277. if (data.StatusOK === 0 || data.Code === 0) {
  278. location.reload();
  279. }
  280. }).fail(function (err) {
  281. console.log(err);
  282. });
  283. }
  284. $(".ui.basic.ai_delete").click(function () {
  285. const repoPath = this.dataset.repopath;
  286. const versionName = this.dataset.version;
  287. if (repoPath && versionName) {
  288. assertDelete(this, versionName, repoPath);
  289. } else {
  290. assertDelete(this);
  291. }
  292. });
  293. function stopDebug(ID, stopUrl,bootFile) {
  294. $.ajax({
  295. type: "POST",
  296. url: stopUrl,
  297. data: $("#stopForm-" + ID).serialize(),
  298. success: function (res) {
  299. if (res.result_code === "0") {
  300. $("#" + ID + "-icon")
  301. .removeClass()
  302. .addClass(res.status);
  303. $("#" + ID + "-text").text(res.status);
  304. if (res.status === "STOPPED") {
  305. if (!bootFile) {
  306. $("#ai-debug-" + ID)
  307. .removeClass("disabled")
  308. .addClass("blue")
  309. .text(debug_again_button)
  310. .css("margin", "0");
  311. } else {
  312. $("#ai-debug-" + ID).remove()
  313. }
  314. $("#ai-image-" + ID)
  315. .removeClass("blue")
  316. .addClass("disabled");
  317. $("#ai-model-debug-" + ID)
  318. .removeClass("blue")
  319. .addClass("disabled");
  320. $("#ai-delete-" + ID)
  321. .removeClass("disabled")
  322. .addClass("blue");
  323. $("#ai-stop-" + ID)
  324. .removeClass("blue")
  325. .addClass("disabled");
  326. } else {
  327. $("#ai-debug-" + ID)
  328. .removeClass("blue")
  329. .addClass("disabled");
  330. $("#ai-stop-" + ID)
  331. .removeClass("blue")
  332. .addClass("disabled");
  333. }
  334. } else {
  335. $(".alert")
  336. .html(res.error_msg)
  337. .removeClass("alert-success")
  338. .addClass("alert-danger")
  339. .show()
  340. .delay(2000)
  341. .fadeOut();
  342. }
  343. },
  344. error: function (res) {
  345. console.log(res);
  346. },
  347. });
  348. }
  349. $(".ui.basic.ai_stop").click(function () {
  350. const ID = this.dataset.jobid;
  351. const repoPath = this.dataset.repopath;
  352. const bootFile = this.dataset.bootfile
  353. stopDebug(ID, repoPath,bootFile);
  354. });
  355. function stopVersion(version_name, ID, repoPath) {
  356. const url = `/api/v1/repos/${repoPath}/${ID}/stop_version`;
  357. $.post(url, { version_name: version_name }, (data) => {
  358. if (data.StatusOK === 0) {
  359. $("#ai-stop-" + ID).removeClass("blue");
  360. $("#ai-stop-" + ID).addClass("disabled");
  361. refreshStatus(version_name, ID, repoPath);
  362. }
  363. }).fail(function (err) {
  364. console.log(err);
  365. });
  366. }
  367. function refreshStatus(version_name, ID, repoPath) {
  368. const url = `/api/v1/repos/${repoPath}/${ID}/?version_name${version_name}`;
  369. $.get(url, (data) => {
  370. $(`#${ID}-icon`).attr("class", data.JobStatus);
  371. // detail status and duration
  372. $(`#${ID}-text`).text(data.JobStatus);
  373. if (
  374. [
  375. "STOPPED",
  376. "FAILED",
  377. "START_FAILED",
  378. "KILLED",
  379. "COMPLETED",
  380. "SUCCEEDED",
  381. "CREATE_FAILED",
  382. ].includes(data.JobStatus)
  383. ) {
  384. $("#ai-delete-" + ID)
  385. .removeClass("disabled")
  386. .addClass("blue");
  387. }
  388. }).fail(function (err) {
  389. console.log(err);
  390. });
  391. }
  392. $(".ui.basic.ai_stop_version").click(function () {
  393. const ID = this.dataset.jobid;
  394. const repoPath = this.dataset.repopath;
  395. const versionName = this.dataset.version;
  396. stopVersion(versionName, ID, repoPath);
  397. });
  398. function getModelInfo(repoPath, modelName, versionName, jobName) {
  399. $.get(
  400. `${repoPath}/modelmanage/show_model_info_api?name=${modelName}`,
  401. (data) => {
  402. if (data.length === 0) {
  403. $(`#${jobName}`).popup("toggle");
  404. } else {
  405. let versionData = data.filter((item) => {
  406. return item.version === versionName;
  407. });
  408. if (versionData.length == 0) {
  409. $(`#${jobName}`).popup("toggle");
  410. } else {
  411. location.href = `${repoPath}/modelmanage/show_model_info?name=${modelName}`;
  412. }
  413. }
  414. }
  415. );
  416. }
  417. $(".goto_modelmanage").click(function () {
  418. const repoPath = this.dataset.repopath;
  419. const modelName = this.dataset.modelname;
  420. const versionName = this.dataset.version;
  421. const jobName = this.dataset.jobname;
  422. getModelInfo(repoPath, modelName, versionName, jobName);
  423. });
  424. function debugAgain(ID, debugUrl, redirect_to) {
  425. if ($("#" + ID + "-text").text() === "RUNNING") {
  426. window.open(debugUrl + "debug");
  427. } else {
  428. $.ajax({
  429. type: "POST",
  430. url: debugUrl + "restart?redirect_to=" + redirect_to,
  431. data: $("#debugAgainForm-" + ID).serialize(),
  432. success: function (res) {
  433. if (res["WechatRedirectUrl"]) {
  434. window.location.href = res["WechatRedirectUrl"];
  435. } else if (res.result_code === "0") {
  436. if (res.id !== ID) {
  437. location.reload();
  438. } else {
  439. $("#" + ID + "-icon")
  440. .removeClass()
  441. .addClass(res.status);
  442. $("#" + ID + "-text").text(res.status);
  443. $("#ai-debug-" + ID)
  444. .removeClass("blue")
  445. .addClass("disabled");
  446. $("#ai-delete-" + ID)
  447. .removeClass("blue")
  448. .addClass("disabled");
  449. $("#ai-debug-" + ID)
  450. .text(debug_button)
  451. .css("margin", "0 1rem");
  452. }
  453. } else if (res.result_code == "2") {
  454. $(".ui.modal.debug-again-alert").modal("show");
  455. } else {
  456. $(".alert")
  457. .html(res.error_msg)
  458. .removeClass("alert-success")
  459. .addClass("alert-danger")
  460. .show()
  461. .delay(3000)
  462. .fadeOut();
  463. }
  464. },
  465. error: function (res) {
  466. console.log(res);
  467. },
  468. });
  469. }
  470. }
  471. $(".ui.basic.ai_debug").click(function () {
  472. const ID = this.dataset.jobid;
  473. const repoPath = this.dataset.repopath;
  474. const redirect_to = this.dataset.linkpath;
  475. debugAgain(ID, repoPath, redirect_to);
  476. });
  477. function setWaitNums() {
  478. if ($(".cloudbrain-type").length === 0 && $(".gpu-type").length === 0) {
  479. return;
  480. }
  481. if (
  482. $(".cloudbrain-type").length !== 0 &&
  483. !$(".cloudbrain-type").data("queue")
  484. ) {
  485. return;
  486. }
  487. let waitNums = $(".cloudbrain-type").data("queue").split("map")[1];
  488. let test = new Map();
  489. let waitNumsArray = waitNums.split(" ");
  490. waitNumsArray.forEach((element, index) => {
  491. if (index === 0) {
  492. test.set(element.slice(1, -2), parseInt(element.slice(-1)));
  493. } else if (index === waitNumsArray.length - 1) {
  494. test.set(element.slice(0, -3), parseInt(element.slice(-2, -1)));
  495. } else {
  496. test.set(element.slice(0, -2), parseInt(element.slice(-1)));
  497. }
  498. });
  499. $(".ui.search.dropdown.gpu-type").dropdown({
  500. onChange: function (value, text, $selectedItem) {
  501. let gpuTypeNums = test.get(value);
  502. let gpuTypeNumString =
  503. $(".cloudbrain-type").data("queue-start") +
  504. " " +
  505. gpuTypeNums +
  506. " " +
  507. $(".cloudbrain-type").data("queue-end");
  508. $("#gpu-nums").text(gpuTypeNumString);
  509. },
  510. });
  511. }
  512. setWaitNums();
  513. }
  514. function userSearchControll() {
  515. if ($("#userCloud").length === 0) {
  516. return;
  517. }
  518. const params = new URLSearchParams(window.location.search);
  519. let cluster;
  520. if ($(".cloudbrain_debug").length === 1) {
  521. if (!params.get("cluster")) {
  522. cluster = $(".cloudbrain_debug").data("all-cluster");
  523. } else {
  524. if (params.get("cluster") === "resource_cluster_c2net") {
  525. cluster = $(".cloudbrain_debug").data("cluster-c2net");
  526. } else {
  527. cluster = $(".cloudbrain_debug").data("cluster-openi");
  528. }
  529. }
  530. }
  531. let jobType;
  532. if ($(".cloudbrain_debug").length === 1) {
  533. if (!params.get("jobType")) {
  534. jobType = $(".cloudbrain_debug").data("allTask");
  535. } else {
  536. if (params.get("jobType") === "DEBUG") {
  537. jobType = $(".cloudbrain_debug").data("debug-task");
  538. } else if (params.get("jobType") === "TRAIN") {
  539. jobType = $(".cloudbrain_debug").data("train-task");
  540. } else if (params.get("jobType") === "INFERENCE") {
  541. jobType = $(".cloudbrain_debug").data("inference-task");
  542. } else {
  543. jobType = $(".cloudbrain_debug").data("benchmark-task");
  544. }
  545. }
  546. }
  547. let aiCenter = !params.get("aiCenter")
  548. ? $(".cloudbrain_debug").data("all-aiCenter")
  549. : params.get("aiCenter");
  550. let listType = !params.get("listType")
  551. ? $(".cloudbrain_debug").data("all-compute")
  552. : params.get("listType");
  553. let jobStatus = !params.get("jobStatus")
  554. ? $(".cloudbrain_debug").data("all-status")
  555. : params.get("jobStatus").toUpperCase();
  556. const dropdownValueArray = [cluster, aiCenter, jobType, listType, jobStatus];
  557. $("#userCloud .default.text ").each(function (index, e) {
  558. index != 1 && $(e).text(dropdownValueArray[index]);
  559. });
  560. }
  561. function AdaminSearchControll() {
  562. if ($("#adminCloud").length === 0) {
  563. return;
  564. }
  565. const params = new URLSearchParams(window.location.search);
  566. let cluster;
  567. if ($(".cloudbrain_debug").length === 1) {
  568. if (!params.get("cluster")) {
  569. cluster = $(".cloudbrain_debug").data("all-cluster");
  570. } else {
  571. if (params.get("cluster") === "resource_cluster_c2net") {
  572. cluster = $(".cloudbrain_debug").data("cluster-c2net");
  573. } else {
  574. cluster = $(".cloudbrain_debug").data("cluster-openi");
  575. }
  576. }
  577. }
  578. let aiCenter = !params.get("aiCenter")
  579. ? $(".cloudbrain_debug").data("all-aiCenter")
  580. : params.get("aiCenter");
  581. let jobType = !params.get("jobType")
  582. ? $(".cloudbrain_debug").data("all-task")
  583. : params.get("jobType");
  584. let listType = !params.get("listType")
  585. ? $(".cloudbrain_debug").data("all-compute")
  586. : params.get("listType");
  587. let jobStatus = !params.get("jobStatus")
  588. ? $(".cloudbrain_debug").data("all-status")
  589. : params.get("jobStatus").toUpperCase();
  590. const dropdownValueArray = [cluster, aiCenter, jobType, listType, jobStatus];
  591. $("#adminCloud .default.text ").each(function (index, e) {
  592. index != 1 && $(e).text(dropdownValueArray[index]);
  593. });
  594. }
  595. userSearchControll();
  596. AdaminSearchControll();
  597. $(".message .close").on("click", function () {
  598. $(this).closest(".message").transition("fade");
  599. });