Bläddra i källkod

AMBARI-392. Add ID attributes to HTML tags to help test automation (Contributed by Yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/branches/ambari-186@1347167 13f79535-47bb-0310-9956-ffa450edef68
Vikram Dixit K 13 år sedan
förälder
incheckning
97edcb5a1c
5 ändrade filer med 40 tillägg och 10 borttagningar
  1. 2 0
      CHANGES.txt
  2. 1 1
      hmc/html/installFailed.php
  3. 1 1
      hmc/html/reinstall.php
  4. 29 0
      hmc/html/welcome.php
  5. 7 8
      hmc/js/manageServices.js

+ 2 - 0
CHANGES.txt

@@ -6,6 +6,8 @@ characters wide.
 
 Release 0.1.x - unreleased
 
+  AMBARI-392. Add ID attributes to HTML tags to help test automation (Yusaku via Vikram)
+
   AMBARI-358. Make index.php always accessible, rather than automatically forwarding to the action, even if there's only one action that the user can take (Yusaku via Vikram)
 
   AMBARI-390. Handle multiple ZooKeeper service masters in Assign Masters page (Yusaku via Vikram)

+ 1 - 1
hmc/html/installFailed.php

@@ -20,7 +20,7 @@
         <div class="alert alert-important" style="margin-top:40px;padding:20px">
           <h2 style="margin-bottom:10px"><?php echo $RES['installFailed.header'] ?></h2>
           <p><?php echo $RES['installFailed.body'] ?></p>
-          <a class='btn btn-large' style='margin-top:20px' href='uninstallWizard.php'><?php echo $RES['installFailed.submit.label'] ?></a>
+          <a id="submitLinkId" class='btn btn-large' style='margin-top:20px' href='uninstallWizard.php'><?php echo $RES['installFailed.submit.label'] ?></a>
         </div>
       </div>
     </div>

+ 1 - 1
hmc/html/reinstall.php

@@ -20,7 +20,7 @@
         <div class="alert alert-important" style="margin-top:40px;padding:20px">
           <h2 style="margin-bottom:10px"><?php echo $RES['reinstall.header'] ?></h2>
           <p><?php echo $RES['reinstall.body'] ?></p>
-          <a class='btn btn-large' style='margin-top:20px' href='initializeCluster.php'><?php echo $RES['reinstall.submit.label'] ?></a>
+          <a id="submitLinkId" class='btn btn-large' style='margin-top:20px' href='initializeCluster.php'><?php echo $RES['reinstall.submit.label'] ?></a>
         </div>
       </div>
     </div>

+ 29 - 0
hmc/html/welcome.php

@@ -0,0 +1,29 @@
+<?php require_once "./head.inc"; ?>
+<html>
+  <head>
+    <title id="pageTitleId"><?php echo $RES['page.title'] ?></title>
+
+    <!-- CSS -->
+    <link type="text/css" rel="stylesheet" href="../yui-3.5.1/build/cssreset/cssreset-min.css">
+    <link type="text/css" rel="stylesheet" href="../css/bootstrap.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common2.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/common3.css" media="screen"/>
+    <link type="text/css" rel="stylesheet" href="../css/selectHosts.css" media="screen"/>
+    <link rel="shortcut icon" href="../images/logo-micro.gif">
+    <!-- End CSS -->
+  </head>
+
+  <body class="yui3-skin-sam">
+    <?php require "./topnav.htmli"; ?>
+
+    <div id="ContentDivId">
+      <div class="alert alert-info" style="margin-top:40px;padding:20px">
+        <h2 style="margin-bottom:10px"><?php echo $RES['welcome.header'] ?></h2>
+        <p><?php echo $RES['welcome.body'] ?></p>
+        <p><span class='label label-info'>Note</span><span style='margin-left:10px;'><?php echo $RES['welcome.note'] ?></span></p> 
+        <a id="submitLinkId" class='btn btn-large' style='margin-top:20px' href='initializeCluster.php'><?php echo $RES['welcome.submit.label'] ?></a>
+      </div>
+    </div>
+  </body>
+</html>

+ 7 - 8
hmc/js/manageServices.js

@@ -349,18 +349,17 @@ function performServiceManagement( action, serviceName, confirmationDataPanel )
 
             success:
               '<p>' +
-                'Yabba Dabba Doo! Manage services ' + 
+                'Successfully completed the operation. ' + 
                   '<a href="javascript:void(null)" id=closeManageServicesProgressWidgetLinkId>' + 
-                    'even harder' +
-                  '</a>' + 
-                '?' +
+                    'Continue' +
+                  '</a>' +
               '</p>',
 
             failure: 
               '<p>' + 
-                'Scooby Doo, where are you? Perhaps in the ' +
-                  '<a href="javascript:void(null)" id=showManageServicesTxnLogsLinkId>Operation Logs</a>' +
-                '?' +
+                'Failed to complete the operation.  Please ' +
+                  '<a href="javascript:void(null)" id=showManageServicesTxnLogsLinkId>take a look at Operation Logs</a>' +
+                ' to see what might have gone wrong.' +
               '</p>'
           };
 
@@ -586,7 +585,7 @@ function generateServiceManagementEntryMarkup( serviceName, serviceInfo ) {
     generatedServiceManagementEntryMarkup += 
 
       '<li class="serviceManagementEntry '+ serviceManagementEntryCssClass + '">' + 
-        '<div>' + 
+        '<div id="serviceManagementFor' + serviceName + '">' + 
           '<span class="serviceManagementEntryNameContainer">' +
             '<a href="javascript:void(null)" name="' + serviceName + '" class="serviceManagementEntryName">' + 
               serviceInfo.displayName +